@blueking/ai-blueking 0.5.0-beta.3 → 0.5.0-beta.5
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 +37 -7
- package/dist/components-new/ai-cite.vue.d.ts +14 -5
- package/dist/components-new/ai-header.vue.d.ts +14 -5
- 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 +18 -10
- package/dist/components-new/delete-confirm.vue.d.ts +12 -3
- package/dist/components-new/prompt-list.vue.d.ts +29 -0
- package/dist/components-new/render-message.vue.d.ts +27 -4
- package/dist/components-new/render-popup.vue.d.ts +12 -3
- package/dist/components-new/shortcuts-bar.vue.d.ts +14 -5
- package/dist/components-new/text-editor.vue.d.ts +40 -8
- package/dist/composables/use-input-interaction.d.ts +29 -0
- package/dist/composables/use-main-container.d.ts +5 -5
- package/dist/composables/use-nimbus.d.ts +5 -5
- package/dist/composables/use-resizable-container.d.ts +35 -0
- package/dist/composables/use-scroll-show.d.ts +1 -1
- package/dist/composables/use-select-pop.d.ts +6 -13
- package/dist/composables/use-textarea-height.d.ts +2 -2
- package/dist/lang/index.d.ts +1 -0
- package/dist/views/nimbus.vue.d.ts +14 -5
- package/dist/vue2/index.es.min.js +14943 -14801
- package/dist/vue2/index.iife.min.js +114 -302
- package/dist/vue2/index.umd.min.js +70 -258
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +4636 -4431
- package/dist/vue3/index.iife.min.js +105 -293
- package/dist/vue3/index.umd.min.js +24 -24
- package/dist/vue3/style.css +1 -1
- package/package.json +2 -2
|
@@ -4,8 +4,14 @@ interface Props {
|
|
|
4
4
|
enablePopup?: boolean;
|
|
5
5
|
shortcuts?: ShortCut[];
|
|
6
6
|
url?: string;
|
|
7
|
+
prompts?: string[];
|
|
7
8
|
}
|
|
8
|
-
declare const _default: import("vue").DefineComponent<Props
|
|
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
|
+
}>, {
|
|
9
15
|
handleShow: () => void;
|
|
10
16
|
handleStop: () => void;
|
|
11
17
|
sendChat: (content: import("@blueking/ai-ui-sdk").BasicChatContent | import("@blueking/ai-ui-sdk").ShortcutChatContent, callback?: (() => void) | undefined) => void;
|
|
@@ -17,19 +23,43 @@ declare const _default: import("vue").DefineComponent<Props, {
|
|
|
17
23
|
message: string;
|
|
18
24
|
cite: string;
|
|
19
25
|
}) => void;
|
|
20
|
-
},
|
|
26
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
27
|
"shortcut-click": (shortcut: ShortCut) => void;
|
|
22
28
|
close: () => void;
|
|
23
29
|
show: () => void;
|
|
24
30
|
stop: () => void;
|
|
25
|
-
}, string, import("vue").PublicProps, Readonly<Props
|
|
26
|
-
|
|
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
|
+
}>>> & {
|
|
27
37
|
onShow?: (() => any) | undefined;
|
|
38
|
+
onClose?: (() => any) | undefined;
|
|
28
39
|
onStop?: (() => any) | undefined;
|
|
29
40
|
"onShortcut-click"?: ((shortcut: ShortCut) => any) | undefined;
|
|
30
|
-
}
|
|
31
|
-
shortcuts: ShortCut[];
|
|
41
|
+
}, {
|
|
32
42
|
enablePopup: boolean;
|
|
43
|
+
prompts: string[];
|
|
44
|
+
shortcuts: ShortCut[];
|
|
33
45
|
url: string;
|
|
34
|
-
}, {}
|
|
46
|
+
}, {}>;
|
|
35
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
|
+
};
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
2
|
text: string;
|
|
3
3
|
showCloseIcon?: boolean | undefined;
|
|
4
|
-
}
|
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
5
|
close: () => void;
|
|
6
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
7
|
text: string;
|
|
8
8
|
showCloseIcon?: boolean | undefined;
|
|
9
|
-
}
|
|
9
|
+
}>>> & {
|
|
10
10
|
onClose?: (() => any) | undefined;
|
|
11
|
-
}
|
|
11
|
+
}, {}, {}>;
|
|
12
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
|
+
};
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
2
|
isCompressionHeight: boolean;
|
|
3
|
-
}
|
|
3
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
4
|
close: () => void;
|
|
5
5
|
toggleCompression: () => void;
|
|
6
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
7
|
isCompressionHeight: boolean;
|
|
8
|
-
}
|
|
8
|
+
}>>> & {
|
|
9
9
|
onClose?: (() => any) | undefined;
|
|
10
10
|
onToggleCompression?: (() => any) | undefined;
|
|
11
|
-
}
|
|
11
|
+
}, {}, {}>;
|
|
12
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
|
+
};
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
import { type ShortCut } from '@blueking/ai-ui-sdk';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
3
|
shortcuts: ShortCut[];
|
|
4
4
|
loading: boolean;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
clear: () => void;
|
|
8
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
prompts: string[];
|
|
6
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
7
|
send: (value: string) => void;
|
|
10
8
|
"update:modelValue": (value: string) => void;
|
|
11
9
|
stop: () => void;
|
|
12
10
|
"height-change": (height: number) => void;
|
|
13
11
|
"shortcut-click": (shortcut: ShortCut) => void;
|
|
14
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
15
13
|
shortcuts: ShortCut[];
|
|
16
14
|
loading: boolean;
|
|
17
|
-
|
|
15
|
+
prompts: string[];
|
|
16
|
+
}>>> & {
|
|
17
|
+
onSend?: ((value: string) => any) | undefined;
|
|
18
18
|
onStop?: (() => any) | undefined;
|
|
19
19
|
"onShortcut-click"?: ((shortcut: ShortCut) => any) | undefined;
|
|
20
|
-
onSend?: ((value: string) => any) | undefined;
|
|
21
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
20
|
"onHeight-change"?: ((height: number) => any) | undefined;
|
|
23
|
-
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
|
+
}, {}, {}>;
|
|
24
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
|
+
};
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
2
|
onConfirm: () => void;
|
|
3
3
|
onCancel: () => void;
|
|
4
4
|
title?: string | undefined;
|
|
5
5
|
content?: string | undefined;
|
|
6
|
-
}
|
|
6
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
7
|
onConfirm: () => void;
|
|
8
8
|
onCancel: () => void;
|
|
9
9
|
title?: string | undefined;
|
|
10
10
|
content?: string | undefined;
|
|
11
|
-
}
|
|
11
|
+
}>>>, {}, {}>;
|
|
12
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
|
+
};
|
|
@@ -5,22 +5,45 @@ interface Props {
|
|
|
5
5
|
showTime?: boolean;
|
|
6
6
|
index: number;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: import("vue").DefineComponent<Props
|
|
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, {
|
|
9
12
|
delete: (index: number) => void;
|
|
10
13
|
regenerate: (index: number) => void;
|
|
11
14
|
resend: (index: number, value: {
|
|
12
15
|
message: string;
|
|
13
16
|
cite: string;
|
|
14
17
|
}) => void;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<Props
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
19
|
+
userPhoto: string;
|
|
20
|
+
showTime: boolean;
|
|
21
|
+
}>>> & {
|
|
16
22
|
onDelete?: ((index: number) => any) | undefined;
|
|
17
23
|
onRegenerate?: ((index: number) => any) | undefined;
|
|
18
24
|
onResend?: ((index: number, value: {
|
|
19
25
|
message: string;
|
|
20
26
|
cite: string;
|
|
21
27
|
}) => any) | undefined;
|
|
22
|
-
}
|
|
28
|
+
}, {
|
|
23
29
|
userPhoto: string;
|
|
24
30
|
showTime: boolean;
|
|
25
|
-
}, {}
|
|
31
|
+
}, {}>;
|
|
26
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
|
+
};
|
|
@@ -2,11 +2,20 @@ import { type ShortCut } from '@blueking/ai-ui-sdk';
|
|
|
2
2
|
interface IProps {
|
|
3
3
|
shortcuts: ShortCut[];
|
|
4
4
|
}
|
|
5
|
-
declare const _default: import("vue").DefineComponent<IProps
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<IProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
6
|
click: (...args: any[]) => void;
|
|
7
7
|
"shortcut-click": (...args: any[]) => void;
|
|
8
|
-
}, string, import("vue").PublicProps, Readonly<IProps
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<IProps>>> & {
|
|
9
9
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
10
10
|
"onShortcut-click"?: ((...args: any[]) => any) | undefined;
|
|
11
|
-
}
|
|
11
|
+
}, {}, {}>;
|
|
12
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
|
+
};
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { type ShortCut } from '@blueking/ai-ui-sdk';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
3
|
shortcuts: ShortCut[];
|
|
4
|
-
}
|
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
5
|
"shortcut-click": (args_0: ShortCut) => void;
|
|
6
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
7
|
shortcuts: ShortCut[];
|
|
8
|
-
}
|
|
8
|
+
}>>> & {
|
|
9
9
|
"onShortcut-click"?: ((args_0: ShortCut) => any) | undefined;
|
|
10
|
-
}
|
|
10
|
+
}, {}, {}>;
|
|
11
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
|
+
};
|
|
@@ -1,25 +1,57 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
2
2
|
modelValue?: string | undefined;
|
|
3
3
|
placeholder?: string | undefined;
|
|
4
4
|
autoFocus?: boolean | undefined;
|
|
5
|
-
|
|
5
|
+
loading?: boolean | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
modelValue: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
autoFocus: boolean;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
}>, {
|
|
6
12
|
focus: () => void;
|
|
7
13
|
clear: () => void;
|
|
8
|
-
},
|
|
14
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
15
|
submit: (value: string) => void;
|
|
10
16
|
"update:modelValue": (value: string) => void;
|
|
17
|
+
stop: () => void;
|
|
11
18
|
cancel: () => void;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
13
20
|
modelValue?: string | undefined;
|
|
14
21
|
placeholder?: string | undefined;
|
|
15
22
|
autoFocus?: boolean | undefined;
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
loading?: boolean | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
modelValue: string;
|
|
26
|
+
placeholder: string;
|
|
27
|
+
autoFocus: boolean;
|
|
28
|
+
loading: boolean;
|
|
29
|
+
}>>> & {
|
|
18
30
|
onSubmit?: ((value: string) => any) | undefined;
|
|
31
|
+
onStop?: (() => any) | undefined;
|
|
19
32
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
20
|
-
|
|
33
|
+
onCancel?: (() => any) | undefined;
|
|
34
|
+
}, {
|
|
21
35
|
placeholder: string;
|
|
22
36
|
modelValue: string;
|
|
37
|
+
loading: boolean;
|
|
23
38
|
autoFocus: boolean;
|
|
24
|
-
}, {}
|
|
39
|
+
}, {}>;
|
|
25
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 {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare function useMainContainer(): {
|
|
2
2
|
minWidth: number;
|
|
3
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
|
|
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
9
|
handleDragging: (x: number, y: number) => void;
|
|
10
10
|
handleResizing: (x: number, y: number, w: number, h: number) => void;
|
|
11
11
|
toggleCompression: () => void;
|
|
@@ -4,11 +4,11 @@ export declare function useNimbus(emit: {
|
|
|
4
4
|
}): {
|
|
5
5
|
nimbusWidth: number;
|
|
6
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
|
|
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
12
|
handleNimbusDragging: (_x: number, y: number) => void;
|
|
13
13
|
handleNimbusMinimize: (isMinimize: boolean) => void;
|
|
14
14
|
handleClick: () => void;
|
|
@@ -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 {};
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
interface Position {
|
|
2
|
-
top: string;
|
|
3
|
-
left: string;
|
|
4
|
-
}
|
|
5
1
|
export declare function useSelect(enablePopup: boolean): {
|
|
6
|
-
isIconVisible: import("vue").Ref<boolean
|
|
2
|
+
isIconVisible: import("vue").Ref<boolean>;
|
|
7
3
|
iconPosition: import("vue").Ref<{
|
|
8
4
|
top: string;
|
|
9
5
|
left: string;
|
|
10
|
-
}, Position | {
|
|
11
|
-
top: string;
|
|
12
|
-
left: string;
|
|
13
6
|
}>;
|
|
14
|
-
selectedText: import("vue").Ref<string
|
|
7
|
+
selectedText: import("vue").Ref<string>;
|
|
8
|
+
citeText: import("vue").Ref<string>;
|
|
15
9
|
hideIcon: () => void;
|
|
16
10
|
clearSelection: () => void;
|
|
17
11
|
setSelection: (text: string) => void;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
popupRef: import("vue").Ref<HTMLElement | null
|
|
12
|
+
setCiteText: (text: string) => void;
|
|
13
|
+
lockSelectedText: import("vue").Ref<boolean>;
|
|
14
|
+
popupRef: import("vue").Ref<HTMLElement | null>;
|
|
21
15
|
};
|
|
22
|
-
export {};
|
|
@@ -11,8 +11,8 @@ interface TextareaHeightOptions {
|
|
|
11
11
|
* @returns 相关的状态和方法
|
|
12
12
|
*/
|
|
13
13
|
export declare function useTextareaHeight(options?: TextareaHeightOptions): {
|
|
14
|
-
textareaHeight: import("vue").Ref<number
|
|
15
|
-
textareaRef: import("vue").Ref<HTMLTextAreaElement | undefined
|
|
14
|
+
textareaHeight: import("vue").Ref<number>;
|
|
15
|
+
textareaRef: import("vue").Ref<HTMLTextAreaElement | undefined>;
|
|
16
16
|
updateHeight: () => void;
|
|
17
17
|
resetHeight: () => void;
|
|
18
18
|
bindTextarea: (textareaElement: HTMLTextAreaElement) => void;
|
package/dist/lang/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export declare const langData: {
|
|
|
43
43
|
readonly 扩展高度: "Expand height";
|
|
44
44
|
readonly 缩小高度: "Shrink height";
|
|
45
45
|
readonly 恢复默认大小: "Restore default size";
|
|
46
|
+
readonly 无匹配结果: "No matching results";
|
|
46
47
|
};
|
|
47
48
|
export declare const zhLangData: {
|
|
48
49
|
translateShortcut: string;
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
2
|
isPanelShow: boolean;
|
|
3
|
-
}
|
|
3
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
4
|
click: () => void;
|
|
5
5
|
minimize: (value: boolean) => void;
|
|
6
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
7
|
isPanelShow: boolean;
|
|
8
|
-
}
|
|
8
|
+
}>>> & {
|
|
9
9
|
onClick?: (() => any) | undefined;
|
|
10
10
|
onMinimize?: ((value: boolean) => any) | undefined;
|
|
11
|
-
}
|
|
11
|
+
}, {}, {}>;
|
|
12
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
|
+
};
|