@blueking/ai-blueking 0.4.4-beta.1 → 0.4.4
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/ai-blueking-new.vue.d.ts +65 -0
- package/dist/components-new/ai-cite.vue.d.ts +21 -0
- package/dist/components-new/ai-header.vue.d.ts +21 -0
- package/dist/components-new/ai-selected-box.vue.d.ts +22 -0
- package/dist/components-new/bar-button.vue.d.ts +23 -0
- package/dist/components-new/chat-input-box.vue.d.ts +32 -0
- package/dist/components-new/delete-confirm.vue.d.ts +21 -0
- package/dist/components-new/prompt-list.vue.d.ts +29 -0
- package/dist/components-new/render-message.vue.d.ts +49 -0
- package/dist/components-new/render-popup.vue.d.ts +21 -0
- package/dist/components-new/shortcuts-bar.vue.d.ts +20 -0
- package/dist/components-new/text-editor.vue.d.ts +57 -0
- package/dist/composables/use-input-interaction.d.ts +29 -0
- package/dist/composables/use-main-container.d.ts +12 -0
- package/dist/composables/use-nimbus.d.ts +21 -0
- package/dist/composables/use-resizable-container.d.ts +35 -0
- package/dist/composables/use-textarea-height.d.ts +20 -0
- package/dist/composables/use-tippy.d.ts +25 -0
- package/dist/utils/delete-confirm.d.ts +20 -0
- package/dist/utils/index.d.ts +43 -0
- package/dist/views/nimbus.vue.d.ts +21 -0
- package/dist/vue2/index.es.min.js +7952 -8318
- package/dist/vue2/index.iife.min.js +77 -77
- package/dist/vue2/index.umd.min.js +37 -37
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +486 -514
- package/dist/vue3/index.iife.min.js +69 -69
- package/dist/vue3/index.umd.min.js +10 -10
- package/dist/vue3/style.css +1 -1
- package/package.json +1 -1
- package/dist/composables/use-bk-ai.d.ts +0 -22
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type ShortCut } from '@blueking/ai-ui-sdk';
|
|
2
|
+
import 'vue-draggable-resizable/style.css';
|
|
3
|
+
interface Props {
|
|
4
|
+
enablePopup?: boolean;
|
|
5
|
+
shortcuts?: ShortCut[];
|
|
6
|
+
url?: string;
|
|
7
|
+
prompts?: string[];
|
|
8
|
+
}
|
|
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
|
+
}>, {
|
|
15
|
+
handleShow: () => void;
|
|
16
|
+
handleStop: () => void;
|
|
17
|
+
sendChat: (content: import("@blueking/ai-ui-sdk").BasicChatContent | import("@blueking/ai-ui-sdk").ShortcutChatContent, callback?: (() => void) | undefined) => void;
|
|
18
|
+
handleSendMessage: (message: string) => void;
|
|
19
|
+
handleShortcutClick: (shortcut: ShortCut) => void;
|
|
20
|
+
handleDelete: (index: number) => void;
|
|
21
|
+
handleRegenerate: (index: number) => void;
|
|
22
|
+
handleResend: (index: number, value: {
|
|
23
|
+
message: string;
|
|
24
|
+
cite: string;
|
|
25
|
+
}) => void;
|
|
26
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
"shortcut-click": (shortcut: ShortCut) => void;
|
|
28
|
+
close: () => void;
|
|
29
|
+
show: () => void;
|
|
30
|
+
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;
|
|
38
|
+
onClose?: (() => any) | undefined;
|
|
39
|
+
onStop?: (() => any) | undefined;
|
|
40
|
+
"onShortcut-click"?: ((shortcut: ShortCut) => any) | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
enablePopup: boolean;
|
|
43
|
+
prompts: string[];
|
|
44
|
+
shortcuts: ShortCut[];
|
|
45
|
+
url: string;
|
|
46
|
+
}, {}>;
|
|
47
|
+
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,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,21 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
|
+
isCompressionHeight: boolean;
|
|
3
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
close: () => void;
|
|
5
|
+
toggleCompression: () => void;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
|
+
isCompressionHeight: boolean;
|
|
8
|
+
}>>> & {
|
|
9
|
+
onClose?: (() => any) | undefined;
|
|
10
|
+
onToggleCompression?: (() => 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,22 @@
|
|
|
1
|
+
import { type ShortCut } from '@blueking/ai-ui-sdk';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
+
selectedText: string;
|
|
4
|
+
actions: ShortCut[];
|
|
5
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"shortcut-click": (shortcut: ShortCut) => void;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
8
|
+
selectedText: string;
|
|
9
|
+
actions: ShortCut[];
|
|
10
|
+
}>>> & {
|
|
11
|
+
"onShortcut-click"?: ((shortcut: ShortCut) => any) | undefined;
|
|
12
|
+
}, {}, {}>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
|
+
type __VLS_TypePropsToOption<T> = {
|
|
16
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
17
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
18
|
+
} : {
|
|
19
|
+
type: import('vue').PropType<T[K]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
|
+
icon: string;
|
|
3
|
+
color?: string | undefined;
|
|
4
|
+
text: string;
|
|
5
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
click: () => void;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
8
|
+
icon: string;
|
|
9
|
+
color?: string | undefined;
|
|
10
|
+
text: string;
|
|
11
|
+
}>>> & {
|
|
12
|
+
onClick?: (() => any) | undefined;
|
|
13
|
+
}, {}, {}>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
+
type __VLS_TypePropsToOption<T> = {
|
|
17
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
+
} : {
|
|
20
|
+
type: import('vue').PropType<T[K]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ShortCut } from '@blueking/ai-ui-sdk';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
+
shortcuts: ShortCut[];
|
|
4
|
+
loading: boolean;
|
|
5
|
+
prompts: string[];
|
|
6
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
send: (value: string) => void;
|
|
8
|
+
"update:modelValue": (value: string) => void;
|
|
9
|
+
stop: () => void;
|
|
10
|
+
"height-change": (height: number) => void;
|
|
11
|
+
"shortcut-click": (shortcut: ShortCut) => void;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
13
|
+
shortcuts: ShortCut[];
|
|
14
|
+
loading: boolean;
|
|
15
|
+
prompts: string[];
|
|
16
|
+
}>>> & {
|
|
17
|
+
onSend?: ((value: string) => any) | undefined;
|
|
18
|
+
onStop?: (() => any) | undefined;
|
|
19
|
+
"onShortcut-click"?: ((shortcut: ShortCut) => any) | undefined;
|
|
20
|
+
"onHeight-change"?: ((height: number) => any) | undefined;
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
|
+
}, {}, {}>;
|
|
23
|
+
export default _default;
|
|
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,21 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
|
+
onConfirm: () => void;
|
|
3
|
+
onCancel: () => void;
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
content?: string | undefined;
|
|
6
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
content?: string | 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,29 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
|
+
prompts: string[];
|
|
3
|
+
show: boolean;
|
|
4
|
+
}>, {
|
|
5
|
+
handleArrowDown: () => void;
|
|
6
|
+
handleArrowUp: () => void;
|
|
7
|
+
handleEnter: () => boolean;
|
|
8
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
select: (prompt: string) => void;
|
|
10
|
+
"height-change": (height: number) => void;
|
|
11
|
+
"update:show": (value: boolean) => void;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
13
|
+
prompts: string[];
|
|
14
|
+
show: boolean;
|
|
15
|
+
}>>> & {
|
|
16
|
+
onSelect?: ((prompt: string) => any) | undefined;
|
|
17
|
+
"onHeight-change"?: ((height: number) => any) | undefined;
|
|
18
|
+
"onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
19
|
+
}, {}, {}>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
22
|
+
type __VLS_TypePropsToOption<T> = {
|
|
23
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
24
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
25
|
+
} : {
|
|
26
|
+
type: import('vue').PropType<T[K]>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type ISessionContent } from '@blueking/ai-ui-sdk';
|
|
2
|
+
interface Props {
|
|
3
|
+
message: ISessionContent;
|
|
4
|
+
userPhoto?: string;
|
|
5
|
+
showTime?: boolean;
|
|
6
|
+
index: number;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
9
|
+
userPhoto: string;
|
|
10
|
+
showTime: boolean;
|
|
11
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
delete: (index: number) => void;
|
|
13
|
+
regenerate: (index: number) => void;
|
|
14
|
+
resend: (index: number, value: {
|
|
15
|
+
message: string;
|
|
16
|
+
cite: string;
|
|
17
|
+
}) => void;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
19
|
+
userPhoto: string;
|
|
20
|
+
showTime: boolean;
|
|
21
|
+
}>>> & {
|
|
22
|
+
onDelete?: ((index: number) => any) | undefined;
|
|
23
|
+
onRegenerate?: ((index: number) => any) | undefined;
|
|
24
|
+
onResend?: ((index: number, value: {
|
|
25
|
+
message: string;
|
|
26
|
+
cite: string;
|
|
27
|
+
}) => any) | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
userPhoto: string;
|
|
30
|
+
showTime: boolean;
|
|
31
|
+
}, {}>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithDefaults<P, D> = {
|
|
34
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
35
|
+
default: D[K];
|
|
36
|
+
}> : P[K];
|
|
37
|
+
};
|
|
38
|
+
type __VLS_Prettify<T> = {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} & {};
|
|
41
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
42
|
+
type __VLS_TypePropsToOption<T> = {
|
|
43
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
44
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
45
|
+
} : {
|
|
46
|
+
type: import('vue').PropType<T[K]>;
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ShortCut } from '@blueking/ai-ui-sdk';
|
|
2
|
+
interface IProps {
|
|
3
|
+
shortcuts: ShortCut[];
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<IProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
click: (...args: any[]) => void;
|
|
7
|
+
"shortcut-click": (...args: any[]) => void;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<IProps>>> & {
|
|
9
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
"onShortcut-click"?: ((...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
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ShortCut } from '@blueking/ai-ui-sdk';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
+
shortcuts: ShortCut[];
|
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"shortcut-click": (args_0: ShortCut) => void;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
|
+
shortcuts: ShortCut[];
|
|
8
|
+
}>>> & {
|
|
9
|
+
"onShortcut-click"?: ((args_0: ShortCut) => any) | undefined;
|
|
10
|
+
}, {}, {}>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToOption<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
2
|
+
modelValue?: string | undefined;
|
|
3
|
+
placeholder?: string | undefined;
|
|
4
|
+
autoFocus?: boolean | undefined;
|
|
5
|
+
loading?: boolean | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
modelValue: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
autoFocus: boolean;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
}>, {
|
|
12
|
+
focus: () => void;
|
|
13
|
+
clear: () => void;
|
|
14
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
submit: (value: string) => void;
|
|
16
|
+
"update:modelValue": (value: string) => void;
|
|
17
|
+
stop: () => void;
|
|
18
|
+
cancel: () => void;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
20
|
+
modelValue?: string | undefined;
|
|
21
|
+
placeholder?: string | undefined;
|
|
22
|
+
autoFocus?: boolean | undefined;
|
|
23
|
+
loading?: boolean | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
modelValue: string;
|
|
26
|
+
placeholder: string;
|
|
27
|
+
autoFocus: boolean;
|
|
28
|
+
loading: boolean;
|
|
29
|
+
}>>> & {
|
|
30
|
+
onSubmit?: ((value: string) => any) | undefined;
|
|
31
|
+
onStop?: (() => any) | undefined;
|
|
32
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
33
|
+
onCancel?: (() => any) | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
placeholder: string;
|
|
36
|
+
modelValue: string;
|
|
37
|
+
loading: boolean;
|
|
38
|
+
autoFocus: boolean;
|
|
39
|
+
}, {}>;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithDefaults<P, D> = {
|
|
42
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
43
|
+
default: D[K];
|
|
44
|
+
}> : P[K];
|
|
45
|
+
};
|
|
46
|
+
type __VLS_Prettify<T> = {
|
|
47
|
+
[K in keyof T]: T[K];
|
|
48
|
+
} & {};
|
|
49
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
50
|
+
type __VLS_TypePropsToOption<T> = {
|
|
51
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
52
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
53
|
+
} : {
|
|
54
|
+
type: import('vue').PropType<T[K]>;
|
|
55
|
+
required: true;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 输入交互配置选项
|
|
4
|
+
*/
|
|
5
|
+
interface InputInteractionOptions {
|
|
6
|
+
/** 发送消息的函数 */
|
|
7
|
+
onSend?: (text: string) => void;
|
|
8
|
+
/** 停止生成的函数 */
|
|
9
|
+
onStop?: () => void;
|
|
10
|
+
/** 是否处于加载状态 */
|
|
11
|
+
isLoading?: Ref<boolean>;
|
|
12
|
+
/** 输入内容获取函数 */
|
|
13
|
+
getInputValue?: () => string;
|
|
14
|
+
/** 清空输入内容的函数 */
|
|
15
|
+
clearInput?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 使用输入交互
|
|
19
|
+
* 处理文本输入的交互逻辑,包括Enter键处理和输入法组合输入状态
|
|
20
|
+
*/
|
|
21
|
+
export declare function useInputInteraction(options?: InputInteractionOptions): {
|
|
22
|
+
isComposing: Ref<boolean>;
|
|
23
|
+
handleCompositionStart: () => void;
|
|
24
|
+
handleCompositionEnd: () => void;
|
|
25
|
+
handleEnter: (e: KeyboardEvent) => void;
|
|
26
|
+
handleSend: () => void;
|
|
27
|
+
handleStop: () => void;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function useMainContainer(): {
|
|
2
|
+
minWidth: number;
|
|
3
|
+
minHeight: number;
|
|
4
|
+
top: import("vue").Ref<number>;
|
|
5
|
+
left: import("vue").Ref<number>;
|
|
6
|
+
width: import("vue").Ref<number>;
|
|
7
|
+
height: import("vue").Ref<number>;
|
|
8
|
+
isCompressionHeight: import("vue").Ref<boolean>;
|
|
9
|
+
handleDragging: (x: number, y: number) => void;
|
|
10
|
+
handleResizing: (x: number, y: number, w: number, h: number) => void;
|
|
11
|
+
toggleCompression: () => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function useNimbus(emit: {
|
|
2
|
+
(e: 'click'): void;
|
|
3
|
+
(e: 'minimize', value: boolean): void;
|
|
4
|
+
}): {
|
|
5
|
+
nimbusWidth: number;
|
|
6
|
+
nimbusHeight: number;
|
|
7
|
+
nimbusLeft: import("vue").Ref<number>;
|
|
8
|
+
nimbusTop: import("vue").Ref<number>;
|
|
9
|
+
isMinimize: import("vue").Ref<boolean>;
|
|
10
|
+
isHovering: import("vue").Ref<boolean>;
|
|
11
|
+
isDragging: import("vue").Ref<boolean>;
|
|
12
|
+
handleNimbusDragging: (_x: number, y: number) => void;
|
|
13
|
+
handleNimbusMinimize: (isMinimize: boolean) => void;
|
|
14
|
+
handleClick: () => void;
|
|
15
|
+
handleMinimize: () => void;
|
|
16
|
+
handleDragging: (x: number, y: number) => void;
|
|
17
|
+
handleMouseEnter: () => void;
|
|
18
|
+
handleMouseLeave: () => void;
|
|
19
|
+
handleMouseDown: () => void;
|
|
20
|
+
handleMouseUp: () => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 可调整大小容器的配置选项
|
|
3
|
+
*/
|
|
4
|
+
interface ResizableContainerOptions {
|
|
5
|
+
/** 初始宽度,默认为 400px */
|
|
6
|
+
initWidth?: number;
|
|
7
|
+
/** 最小宽度,默认为 400px */
|
|
8
|
+
minWidth?: number;
|
|
9
|
+
/** 最小高度,默认为 400px */
|
|
10
|
+
minHeight?: number;
|
|
11
|
+
/** 屏幕最大宽度的百分比,默认为 40% */
|
|
12
|
+
maxWidthPercent?: number;
|
|
13
|
+
/** 最小高度,默认为 800px */
|
|
14
|
+
miniHeight?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 使用可调整大小的容器
|
|
18
|
+
* 合并了 use-main-container 和原 use-resizable-container 的功能
|
|
19
|
+
* @param options 配置选项
|
|
20
|
+
* @returns 容器的属性和方法
|
|
21
|
+
*/
|
|
22
|
+
export declare function useResizableContainer(options?: ResizableContainerOptions): {
|
|
23
|
+
minWidth: number;
|
|
24
|
+
minHeight: number;
|
|
25
|
+
maxWidth: import("vue").Ref<number>;
|
|
26
|
+
top: import("vue").Ref<number>;
|
|
27
|
+
left: import("vue").Ref<number>;
|
|
28
|
+
width: import("vue").Ref<number>;
|
|
29
|
+
height: import("vue").Ref<number>;
|
|
30
|
+
isCompressionHeight: import("vue").Ref<boolean>;
|
|
31
|
+
handleDragging: (x: number, y: number) => void;
|
|
32
|
+
handleResizing: (x: number, y: number, w: number, h: number) => void;
|
|
33
|
+
toggleCompression: () => void;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface TextareaHeightOptions {
|
|
2
|
+
minHeight?: number;
|
|
3
|
+
maxHeight?: number;
|
|
4
|
+
defaultHeight?: number;
|
|
5
|
+
debounceTime?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 文本区域高度自适应的组合式函数
|
|
9
|
+
*
|
|
10
|
+
* @param options 配置选项
|
|
11
|
+
* @returns 相关的状态和方法
|
|
12
|
+
*/
|
|
13
|
+
export declare function useTextareaHeight(options?: TextareaHeightOptions): {
|
|
14
|
+
textareaHeight: import("vue").Ref<number>;
|
|
15
|
+
textareaRef: import("vue").Ref<HTMLTextAreaElement | undefined>;
|
|
16
|
+
updateHeight: () => void;
|
|
17
|
+
resetHeight: () => void;
|
|
18
|
+
bindTextarea: (textareaElement: HTMLTextAreaElement) => void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Instance, Props } from 'tippy.js';
|
|
3
|
+
import 'tippy.js/dist/tippy.css';
|
|
4
|
+
export type TooltipOptions = Partial<Props>;
|
|
5
|
+
export interface TooltipTarget {
|
|
6
|
+
element: Element | string;
|
|
7
|
+
content: string;
|
|
8
|
+
options?: TooltipOptions;
|
|
9
|
+
}
|
|
10
|
+
interface TooltipAPI {
|
|
11
|
+
instances: Ref<Instance[]>;
|
|
12
|
+
createTooltip: (element: Element | string, content: string, options?: TooltipOptions) => Instance | null;
|
|
13
|
+
createTooltipsForSelector: (selector: string, content: string, options?: TooltipOptions) => Instance[];
|
|
14
|
+
createMultipleTooltips: (targets: TooltipTarget[]) => Instance[];
|
|
15
|
+
destroyAll: () => void;
|
|
16
|
+
updateContent: (instance: Instance, content: string) => void;
|
|
17
|
+
destroyInstance: (instance: Instance) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Composable for managing tippy tooltips
|
|
21
|
+
* @param defaultOptions - Default options for all tooltips
|
|
22
|
+
* @returns Tooltip utility functions
|
|
23
|
+
*/
|
|
24
|
+
export declare function useTooltip(defaultOptions?: TooltipOptions): TooltipAPI;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Instance as TippyInstance, type Props as TippyProps } from 'tippy.js';
|
|
2
|
+
import 'tippy.js/dist/tippy.css';
|
|
3
|
+
/**
|
|
4
|
+
* 创建删除确认框
|
|
5
|
+
* @param target 目标元素
|
|
6
|
+
* @param options 配置选项
|
|
7
|
+
* @returns Tippy实例
|
|
8
|
+
*/
|
|
9
|
+
export declare function createDeleteConfirm(target: Element | null | string, options: {
|
|
10
|
+
onConfirm: () => void;
|
|
11
|
+
onCancel?: () => void;
|
|
12
|
+
placement?: TippyProps['placement'];
|
|
13
|
+
title?: string;
|
|
14
|
+
content?: string;
|
|
15
|
+
appendTo?: TippyProps['appendTo'];
|
|
16
|
+
}): TippyInstance | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* 关闭所有删除确认框
|
|
19
|
+
*/
|
|
20
|
+
export declare function closeAllDeleteConfirms(): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取 cookie
|
|
3
|
+
* @param {*} name cookie 的名称
|
|
4
|
+
*/
|
|
5
|
+
export declare const getCookieByName: (name: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* 判断是否是json字符串
|
|
8
|
+
* @param str
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare const isJSON: (str: string) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* 节流,每隔一段时间执行
|
|
14
|
+
* @param {*} fn 需要执行的函数
|
|
15
|
+
* @param {*} delay 延迟时间,默认200
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare const throttle: <T>(fn: (t: T) => void, delay?: number) => (t: T) => false | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* 防抖,延迟一段时间执行
|
|
21
|
+
* @param {*} fn 需要执行的函数
|
|
22
|
+
* @param {*} delay 延迟时间,默认200
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
export declare const debounce: <T, R>(fn: (P?: T) => R, delay?: number) => (params?: T) => void;
|
|
26
|
+
/**
|
|
27
|
+
* 处理提示词模板,替换模板中的变量
|
|
28
|
+
* @param prompt 提示词模板
|
|
29
|
+
* @param selectedText 选中的文本
|
|
30
|
+
* @returns 处理后的提示词
|
|
31
|
+
*/
|
|
32
|
+
export declare const processPromptTemplate: (prompt: string, selectedText: string) => string;
|
|
33
|
+
/**
|
|
34
|
+
* 格式化时间
|
|
35
|
+
* @param val 时间
|
|
36
|
+
* @returns 格式化后的时间
|
|
37
|
+
*/
|
|
38
|
+
export declare function durationFormatter(val: number): string;
|
|
39
|
+
/**
|
|
40
|
+
* 滚动到页面底部
|
|
41
|
+
* @param el 需要滚动的元素
|
|
42
|
+
*/
|
|
43
|
+
export declare const scrollToBottom: (el: HTMLElement) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
|
+
isPanelShow: boolean;
|
|
3
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
click: () => void;
|
|
5
|
+
minimize: (value: boolean) => void;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
|
+
isPanelShow: boolean;
|
|
8
|
+
}>>> & {
|
|
9
|
+
onClick?: (() => any) | undefined;
|
|
10
|
+
onMinimize?: ((value: boolean) => 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
|
+
};
|