g-ai-robot3 0.1.49 → 0.1.50
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/components/digitalHuman.vue.d.ts +59 -0
- package/dist/components/suspensionMsgBubble.vue.d.ts +26 -0
- package/dist/g-ai-robot3.es.js +35073 -2839
- package/dist/g-ai-robot3.umd.js +295 -8
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.vue.d.ts +15 -45
- package/dist/type.d.ts +26 -14
- package/dist/utils/index.d.ts +5 -5
- package/package.json +4 -2
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ellipsisText{display:inline-block;width:20px;height:24px;position:relative}.ellipsisText:after{position:absolute;left:0;top:4px;content:"···";animation:loading-animation 1s infinite linear}@keyframes loading-animation{0%{content:"·"}50%{content:"··"}to{content:"···"}}#g-ai-
|
|
1
|
+
.digital-human[data-v-1d599b86]{z-index:0}.digital-human #video[data-v-1d599b86]{position:absolute;left:0;top:0}.suspension-msg-bubble[data-v-a7c845c9]{position:absolute;left:65%;bottom:85%;width:220px;pointer-events:none;z-index:1}.suspension-msg-bubble .bubble-item[data-v-a7c845c9]{margin-bottom:5px}.bubble-move[data-v-a7c845c9],.bubble-enter-active[data-v-a7c845c9],.bubble-leave-active[data-v-a7c845c9]{transition:all .5s ease}.bubble-enter-from[data-v-a7c845c9],.bubble-leave-to[data-v-a7c845c9]{opacity:0;transform:translate(30px)}.bubble-leave-active[data-v-a7c845c9]{position:absolute}.ellipsisText{display:inline-block;width:20px;height:24px;position:relative}.ellipsisText:after{position:absolute;left:0;top:4px;content:"···";animation:loading-animation 1s infinite linear}@keyframes loading-animation{0%{content:"·"}50%{content:"··"}to{content:"···"}}#g-ai-robot[data-v-a6da9fd1]{position:fixed}#g-ai-robot .robot[data-v-a6da9fd1]{cursor:pointer}#g-ai-robot .robot .digital-human-wrap[data-v-a6da9fd1]{position:relative}#g-ai-robot .robot.disabled[data-v-a6da9fd1]{cursor:not-allowed}#g-ai-robot .robot img[data-v-a6da9fd1]{height:100px;width:100px}#g-ai-robot .talk_main[data-v-a6da9fd1]{position:absolute;width:400px;height:600px;background:#f5f6f7}#g-ai-robot .talk_main.top[data-v-a6da9fd1]{left:50%;bottom:100px;transform:translate(-50%)}#g-ai-robot .talk_main.bottom[data-v-a6da9fd1]{left:50%;top:100px;transform:translate(-50%)}#g-ai-robot .talk_main.right[data-v-a6da9fd1]{left:100px;bottom:50%;transform:translateY(50%)}#g-ai-robot .talk_main.left[data-v-a6da9fd1]{right:100px;bottom:50%;transform:translateY(50%)}#g-ai-robot .talk_main.top-end[data-v-a6da9fd1]{left:100px;bottom:100px}#g-ai-robot .talk_main.top-start[data-v-a6da9fd1]{right:100px;bottom:100px}#g-ai-robot .talk_main.bottom-start[data-v-a6da9fd1]{right:100px;top:100px}#g-ai-robot .talk_main.bottom-end[data-v-a6da9fd1]{left:100px;top:100px}#g-ai-robot .talk_main header[data-v-a6da9fd1]{height:44px;background:linear-gradient(to right,#ebf1ff,#e5faf8,#f2ebfe);display:flex;padding:0 16px;align-items:center;justify-content:space-between;cursor:move}#g-ai-robot .talk_main header span[data-v-a6da9fd1]{font-size:16px;font-weight:700}#g-ai-robot .talk_main header span.close[data-v-a6da9fd1]{color:#999}#g-ai-robot .talk_main header i[data-v-a6da9fd1]{cursor:pointer}#g-ai-robot .talk_main header i.disabled[data-v-a6da9fd1]{cursor:not-allowed}#g-ai-robot .talk_main .qa_body[data-v-a6da9fd1]{list-style:none;padding:16px;box-sizing:border-box;margin:0;height:calc(100% - 116px);overflow-y:auto}#g-ai-robot .talk_main .qa_body[data-v-a6da9fd1]::-webkit-scrollbar{width:8px;background-color:#f9f9f9}#g-ai-robot .talk_main .qa_body[data-v-a6da9fd1]::-webkit-scrollbar-track{background:#e1e1e1;border-radius:10px}#g-ai-robot .talk_main .qa_body[data-v-a6da9fd1]::-webkit-scrollbar-thumb{background-color:#c1c1c1;border-radius:10px}#g-ai-robot .talk_main .qa_body li[data-v-a6da9fd1]{display:flex;margin-bottom:24px;justify-content:flex-end}#g-ai-robot .talk_main .qa_body li .is_icon[data-v-a6da9fd1]{width:30px;height:30px;border-radius:50%;color:#fff;display:flex}#g-ai-robot .talk_main .qa_body li .is_icon i[data-v-a6da9fd1]{margin:auto}#g-ai-robot .talk_main .qa_body li.is_ai[data-v-a6da9fd1]{justify-content:flex-start}#g-ai-robot .talk_main .qa_body li.is_ai .text_main[data-v-a6da9fd1]{box-shadow:0 4px 20px #0476ed29;border:1px solid;border-image-source:linear-gradient(180deg,#ffffff 0%,rgba(255,255,255,.5) 104.31%);background:linear-gradient(92.03deg,#77f1ff39 -2.18%,#edfaff99 48.06%,#5ba8ff2c 107.05%)}#g-ai-robot .talk_main .qa_body li.is_ai .text_main>.value[data-v-a6da9fd1]{white-space:pre-wrap}#g-ai-robot .talk_main .qa_body li .text_main[data-v-a6da9fd1]{padding:10px;max-width:calc(100% - 100px);border:1px solid;margin:0 8px;border-image-source:linear-gradient(90deg,#ffffff 0%,rgba(255,255,255,.5) 100%);box-shadow:0 4px 20px #0476ed29;background:linear-gradient(90.81deg,#f4fcff99 1.75%,#fff9 32.33%,#eef6ff99 102.86%);border-radius:6px}#g-ai-robot .talk_main .qa_body li .text_main>.value[data-v-a6da9fd1]{display:flex;align-items:center;overflow-wrap:break-word;word-wrap:break-word;font-size:14px;font-weight:400}#g-ai-robot .talk_main .qa_body li .text_main .btn i[data-v-a6da9fd1]{font-size:14px;font-weight:400;color:#037aff;margin-right:10px;cursor:pointer;text-decoration:underline}#g-ai-robot .talk_main .qa_body li .text_main .btn i.open[data-v-a6da9fd1]{filter:hue-rotate(180deg);animation:opacityCss 2s linear infinite}#g-ai-robot .talk_main #playChart[data-v-a6da9fd1]{width:calc(100% - 32px);height:40px;left:16px;display:inline-block;bottom:100px;position:absolute;visibility:hidden;border:1px solid #ccc;vertical-align:bottom}#g-ai-robot .talk_main #playChart.show[data-v-a6da9fd1]{visibility:visible}#g-ai-robot .talk_main #playChart.hiddle[data-v-a6da9fd1]{visibility:hidden}#g-ai-robot .talk_main .qa_input[data-v-a6da9fd1]{padding:10px 16px;display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:0;left:0;right:0;box-sizing:border-box}#g-ai-robot .talk_main .qa_input textarea[data-v-a6da9fd1]{width:100%;height:68px;resize:none;background-color:#fff;border:1px solid #dcdfe6;color:#606266;padding:6px}#g-ai-robot .talk_main .qa_input textarea[data-v-a6da9fd1]:focus{outline:none;border-color:#409eff}#g-ai-robot .talk_main .qa_input .is_icon[data-v-a6da9fd1]{width:30px}#g-ai-robot .talk_main .qa_input .is_icon p[data-v-a6da9fd1]{display:flex;align-items:center;justify-content:flex-end;margin:6px 0}#g-ai-robot .talk_main .qa_input .is_icon p[data-v-a6da9fd1]:nth-of-type(1){position:relative}#g-ai-robot .talk_main .qa_input .is_icon p i[data-v-a6da9fd1]{animation:rotateCss-a6da9fd1 2s linear infinite;font-size:20px;color:#606266}#g-ai-robot .talk_main .qa_input .is_icon p img[data-v-a6da9fd1]{width:20px;height:20px;cursor:pointer}#g-ai-robot .talk_main .qa_input .is_icon p img.close[data-v-a6da9fd1]{filter:hue-rotate(180deg);animation:opacityCss 2s linear infinite}#g-ai-robot .talk_main .qa_input .is_icon p.send img.disabled[data-v-a6da9fd1]{cursor:not-allowed}#g-ai-robot .talk_main .qa_input .is_icon p i[data-v-a6da9fd1]{cursor:pointer}@keyframes rotateCss-a6da9fd1{0%{transform:rotate(0)}25%{transform:rotate(90deg)}50%{transform:rotate(180deg)}70%{transform:rotate(270deg)}to{transform:rotate(360deg)}}@font-face{font-family:iconfont;src:url(//at.alicdn.com/t/c/font_4633255_xm549qw7rxj.woff2?t=1721900327001) format("woff2"),url(//at.alicdn.com/t/c/font_4633255_xm549qw7rxj.woff?t=1721900327001) format("woff"),url(//at.alicdn.com/t/c/font_4633255_xm549qw7rxj.ttf?t=1721900327001) format("truetype")}.iconfont[data-v-a6da9fd1]{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-guanbi[data-v-a6da9fd1]:before{content:""}.icon-nvsheng[data-v-a6da9fd1]:before{content:""}.icon-nansheng[data-v-a6da9fd1]:before{content:""}.icon-fuzhi[data-v-a6da9fd1]:before{content:""}.icon-zhongxinhuida[data-v-a6da9fd1]:before{content:""}
|
package/dist/index.d.ts
CHANGED
package/dist/index.vue.d.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare function __VLS_template(): {
|
|
4
|
-
reference?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
1
|
+
import { IndexProps } from "./type.ts";
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IndexProps>, {
|
|
7
3
|
isDebug: boolean;
|
|
4
|
+
showMsgBubble: boolean;
|
|
8
5
|
stream: string;
|
|
9
6
|
title: string;
|
|
10
7
|
greet: string;
|
|
11
8
|
waitTxt: string;
|
|
12
9
|
systemName: string;
|
|
13
|
-
robotCss: {
|
|
10
|
+
robotCss: () => {
|
|
14
11
|
left: string;
|
|
15
12
|
bottom: string;
|
|
16
13
|
};
|
|
@@ -18,13 +15,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
18
15
|
useAudio: boolean;
|
|
19
16
|
space: number;
|
|
20
17
|
mode: string;
|
|
21
|
-
canvasWidth: number;
|
|
22
|
-
canvasHeight: number;
|
|
23
18
|
openInstruct: boolean;
|
|
24
|
-
videoStyle: {
|
|
25
|
-
width: string;
|
|
26
|
-
visibility: string;
|
|
27
|
-
};
|
|
28
19
|
cozeInfo: () => {
|
|
29
20
|
bot_id: string;
|
|
30
21
|
};
|
|
@@ -33,10 +24,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
33
24
|
audioWs: string;
|
|
34
25
|
wsServer: string;
|
|
35
26
|
instructWs: string;
|
|
36
|
-
offer: string;
|
|
37
|
-
human: string;
|
|
38
|
-
stop_audio: string;
|
|
39
|
-
humanaudio: string;
|
|
40
27
|
searchTextCallback: (params: any) => void;
|
|
41
28
|
eventFun: () => {
|
|
42
29
|
keywords: string[];
|
|
@@ -44,15 +31,16 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
44
31
|
fun: (a: any) => void;
|
|
45
32
|
}[];
|
|
46
33
|
}>>, {
|
|
47
|
-
searchText: (data: any) => Promise<import(
|
|
48
|
-
}, {}, {}, {}, import(
|
|
34
|
+
searchText: (data: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
35
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IndexProps>, {
|
|
49
36
|
isDebug: boolean;
|
|
37
|
+
showMsgBubble: boolean;
|
|
50
38
|
stream: string;
|
|
51
39
|
title: string;
|
|
52
40
|
greet: string;
|
|
53
41
|
waitTxt: string;
|
|
54
42
|
systemName: string;
|
|
55
|
-
robotCss: {
|
|
43
|
+
robotCss: () => {
|
|
56
44
|
left: string;
|
|
57
45
|
bottom: string;
|
|
58
46
|
};
|
|
@@ -60,13 +48,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
60
48
|
useAudio: boolean;
|
|
61
49
|
space: number;
|
|
62
50
|
mode: string;
|
|
63
|
-
canvasWidth: number;
|
|
64
|
-
canvasHeight: number;
|
|
65
51
|
openInstruct: boolean;
|
|
66
|
-
videoStyle: {
|
|
67
|
-
width: string;
|
|
68
|
-
visibility: string;
|
|
69
|
-
};
|
|
70
52
|
cozeInfo: () => {
|
|
71
53
|
bot_id: string;
|
|
72
54
|
};
|
|
@@ -75,10 +57,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
75
57
|
audioWs: string;
|
|
76
58
|
wsServer: string;
|
|
77
59
|
instructWs: string;
|
|
78
|
-
offer: string;
|
|
79
|
-
human: string;
|
|
80
|
-
stop_audio: string;
|
|
81
|
-
humanaudio: string;
|
|
82
60
|
searchTextCallback: (params: any) => void;
|
|
83
61
|
eventFun: () => {
|
|
84
62
|
keywords: string[];
|
|
@@ -87,22 +65,17 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
87
65
|
}[];
|
|
88
66
|
}>>> & Readonly<{}>, {
|
|
89
67
|
title: string;
|
|
68
|
+
mode: "audio" | "text" | "video";
|
|
69
|
+
placement: "top-end" | "top-start" | "bottom-end" | "bottom-start";
|
|
90
70
|
isDebug: boolean;
|
|
71
|
+
showMsgBubble: boolean;
|
|
91
72
|
stream: "True" | "False";
|
|
92
73
|
greet: string;
|
|
93
74
|
waitTxt: string;
|
|
94
75
|
systemName: string;
|
|
95
|
-
robotCss: import(
|
|
96
|
-
placement: "top-end" | "top-start" | "bottom-end" | "bottom-start";
|
|
76
|
+
robotCss: import("vue").CSSProperties;
|
|
97
77
|
useAudio: boolean;
|
|
98
78
|
space: number;
|
|
99
|
-
mode: "audio" | "text";
|
|
100
|
-
canvasWidth: number;
|
|
101
|
-
canvasHeight: number;
|
|
102
|
-
videoStyle: {
|
|
103
|
-
width: string;
|
|
104
|
-
visibility: string;
|
|
105
|
-
};
|
|
106
79
|
openInstruct: boolean;
|
|
107
80
|
qaServer: string;
|
|
108
81
|
cozeInfo: {
|
|
@@ -112,18 +85,15 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
112
85
|
audioWs: string;
|
|
113
86
|
wsServer: string;
|
|
114
87
|
instructWs: string;
|
|
115
|
-
offer: string;
|
|
116
|
-
human: string;
|
|
117
|
-
stop_audio: string;
|
|
118
|
-
humanaudio: string;
|
|
119
88
|
searchTextCallback: (params: Record<string, any>) => void;
|
|
120
89
|
eventFun: {
|
|
121
90
|
keywords: string[];
|
|
122
91
|
trigger: "before" | "after" | "together";
|
|
123
92
|
fun: (a: Record<string, any>) => void;
|
|
124
93
|
}[];
|
|
125
|
-
}, {}, {}, {}, string, import(
|
|
126
|
-
|
|
94
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
95
|
+
reference?(_: {}): any;
|
|
96
|
+
}>;
|
|
127
97
|
export default _default;
|
|
128
98
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
129
99
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
package/dist/type.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { CSSProperties } from
|
|
2
|
-
|
|
1
|
+
import { CSSProperties } from "vue";
|
|
2
|
+
export type IndexProps = Props & DigitalHumanProps & SuspensionMsgBubble;
|
|
3
|
+
export type ConversationType = "aiAnswer" | "aiLocal" | "user";
|
|
3
4
|
export interface Props {
|
|
4
5
|
isDebug?: boolean;
|
|
5
|
-
|
|
6
|
+
showMsgBubble?: boolean;
|
|
7
|
+
stream?: "True" | "False";
|
|
6
8
|
title?: string;
|
|
7
9
|
greet?: string;
|
|
8
10
|
waitTxt?: string;
|
|
@@ -11,13 +13,7 @@ export interface Props {
|
|
|
11
13
|
placement?: "top-end" | "top-start" | "bottom-end" | "bottom-start";
|
|
12
14
|
useAudio?: boolean;
|
|
13
15
|
space?: number;
|
|
14
|
-
mode?: "audio" | "text";
|
|
15
|
-
canvasWidth?: number;
|
|
16
|
-
canvasHeight?: number;
|
|
17
|
-
videoStyle?: {
|
|
18
|
-
width: string;
|
|
19
|
-
visibility: string;
|
|
20
|
-
};
|
|
16
|
+
mode?: "audio" | "text" | "video";
|
|
21
17
|
openInstruct?: boolean;
|
|
22
18
|
qaServer?: string;
|
|
23
19
|
cozeInfo?: {
|
|
@@ -28,10 +24,6 @@ export interface Props {
|
|
|
28
24
|
audioWs?: string;
|
|
29
25
|
wsServer?: string;
|
|
30
26
|
instructWs?: string;
|
|
31
|
-
offer?: string;
|
|
32
|
-
human?: string;
|
|
33
|
-
stop_audio?: string;
|
|
34
|
-
humanaudio?: string;
|
|
35
27
|
searchTextCallback?: (params: Record<string, any>) => void;
|
|
36
28
|
eventFun?: {
|
|
37
29
|
keywords: string[];
|
|
@@ -39,3 +31,23 @@ export interface Props {
|
|
|
39
31
|
fun: (a: Record<string, any>) => void;
|
|
40
32
|
}[];
|
|
41
33
|
}
|
|
34
|
+
export interface DigitalHumanProps {
|
|
35
|
+
videoStyle?: CSSProperties;
|
|
36
|
+
offer?: string;
|
|
37
|
+
human?: string;
|
|
38
|
+
humanaudio?: string;
|
|
39
|
+
stop_audio?: string;
|
|
40
|
+
canvasWidth?: number;
|
|
41
|
+
canvasHeight?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface MsgItem {
|
|
44
|
+
id: number;
|
|
45
|
+
content: string;
|
|
46
|
+
type: ConversationType;
|
|
47
|
+
}
|
|
48
|
+
export interface SuspensionMsgBubble {
|
|
49
|
+
showMsgNumber?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface SuspensionMsgBubbleProps extends SuspensionMsgBubble {
|
|
52
|
+
msgList: MsgItem[];
|
|
53
|
+
}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ export declare const copyTextToClipboard: (text: string) => void;
|
|
|
2
2
|
export declare const moveElement: (el: HTMLElement, event: any) => void;
|
|
3
3
|
export declare const getStreamData: (url: string, onmessage: (e: any) => void) => void;
|
|
4
4
|
export declare const getStreamDataPost: (url: string, data: any, options: {
|
|
5
|
-
signal?: AbortSignal;
|
|
6
|
-
onopen?: (response: Response) => void;
|
|
7
|
-
onmessage?: (data: any) => void;
|
|
8
|
-
onclose?: () => void;
|
|
9
|
-
onerror?: (err: any) => number | null | undefined | void;
|
|
5
|
+
signal?: AbortSignal | undefined;
|
|
6
|
+
onopen?: ((response: Response) => void) | undefined;
|
|
7
|
+
onmessage?: ((data: any) => void) | undefined;
|
|
8
|
+
onclose?: (() => void) | undefined;
|
|
9
|
+
onerror?: ((err: any) => number | null | undefined | void) | undefined;
|
|
10
10
|
}) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "g-ai-robot3",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.50",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/g-ai-robot3.js",
|
|
7
7
|
"module": "dist/g-ai-robot3.es.js",
|
|
@@ -20,12 +20,13 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
23
|
+
"ant-design-x-vue": "^1.0.3",
|
|
23
24
|
"axios": "^1.7.2",
|
|
24
25
|
"pinyin-pro": "^3.25.0",
|
|
25
26
|
"recorder-core": "^1.3.24102001",
|
|
26
27
|
"terser": "^5.29.2",
|
|
27
28
|
"vite-plugin-dts": "^3.7.3",
|
|
28
|
-
"vue": "^3.
|
|
29
|
+
"vue": "^3.5.10"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@rollup/pluginutils": "^5.1.0",
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
"vite": "^5.2.0",
|
|
37
38
|
"vite-plugin-css-modules": "^0.0.1",
|
|
38
39
|
"vite-plugin-libcss": "^1.1.1",
|
|
40
|
+
"vite-plugin-vue-devtools": "^7.7.2",
|
|
39
41
|
"vue-tsc": "^2.0.6"
|
|
40
42
|
}
|
|
41
43
|
}
|