@liyalabs/liya-3d-avatar-widget-vuejs 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +218 -0
- package/dist/api/assistants.d.ts +3 -0
- package/dist/api/avatar.d.ts +56 -0
- package/dist/api/chat.d.ts +3 -0
- package/dist/api/client.d.ts +6 -0
- package/dist/api/files.d.ts +6 -0
- package/dist/api/index.d.ts +22 -0
- package/dist/api/sessions.d.ts +5 -0
- package/dist/components/app/LiyaChatApp.vue.d.ts +33 -0
- package/dist/components/app/SessionSidebar.vue.d.ts +21 -0
- package/dist/components/app/index.d.ts +17 -0
- package/dist/components/avatar/AvatarModal.vue.d.ts +21 -0
- package/dist/components/avatar/AvatarScene.vue.d.ts +76 -0
- package/dist/components/avatar/index.d.ts +17 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/components/shared/ChatInput.vue.d.ts +23 -0
- package/dist/components/shared/MessageBubble.vue.d.ts +17 -0
- package/dist/components/shared/MessageList.vue.d.ts +24 -0
- package/dist/components/shared/index.d.ts +18 -0
- package/dist/components/widget/index.d.ts +16 -0
- package/dist/composables/index.d.ts +20 -0
- package/dist/composables/useAvatarColors.d.ts +37 -0
- package/dist/composables/useBrowserCompat.d.ts +30 -0
- package/dist/composables/useChat.d.ts +63 -0
- package/dist/composables/useFileUpload.d.ts +84 -0
- package/dist/composables/useSessions.d.ts +43 -0
- package/dist/composables/useVoice.d.ts +44 -0
- package/dist/i18n/index.d.ts +17 -0
- package/dist/i18n/translations.d.ts +101 -0
- package/dist/i18n/useI18n.d.ts +8 -0
- package/dist/index.d.ts +10 -0
- package/dist/liya-3d-avatar-widget-vuejs.css +1 -0
- package/dist/liya-3d-avatar-widget-vuejs.js +22630 -0
- package/dist/liya-3d-avatar-widget-vuejs.umd.cjs +3691 -0
- package/dist/plugin.d.ts +8 -0
- package/dist/types/index.d.ts +195 -0
- package/package.json +69 -0
package/README.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# @liyalabs/liya-3d-avatar-widget
|
|
2
|
+
|
|
3
|
+
3D Talking Avatar Widget - AI Assistant with real-time lip-sync animation for Vue.js 3.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- π **3D Avatar** - Three.js powered 3D avatar with customizable models (GLB/GLTF)
|
|
8
|
+
- π **Lip-Sync** - Real-time lip synchronization using viseme data
|
|
9
|
+
- π€ **Voice Input** - Speech-to-text for hands-free interaction
|
|
10
|
+
- π **Voice Output** - Text-to-speech with avatar animation
|
|
11
|
+
- π¬ **Full Chat** - Complete chat widget with all features from liya-ai-chat-vue
|
|
12
|
+
- π **File Upload** - Attach files to conversations
|
|
13
|
+
- π‘ **Suggestions** - Quick reply suggestions
|
|
14
|
+
- π¨ **Customizable** - Theming, positioning, and branding options
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @liyalabs/liya-3d-avatar-widget-vuejs
|
|
20
|
+
# or
|
|
21
|
+
yarn add @liyalabs/liya-3d-avatar-widget-vuejs
|
|
22
|
+
# or
|
|
23
|
+
pnpm add @liyalabs/liya-3d-avatar-widget-vuejs
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
### 1. Initialize the Plugin
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
// main.ts
|
|
32
|
+
import { createApp } from 'vue'
|
|
33
|
+
import App from './App.vue'
|
|
34
|
+
import LiyaAvatarWidget from '@liyalabs/liya-3d-avatar-widget'
|
|
35
|
+
import '@liyalabs/liya-3d-avatar-widget/style.css'
|
|
36
|
+
|
|
37
|
+
const app = createApp(App)
|
|
38
|
+
|
|
39
|
+
app.use(LiyaAvatarWidget, {
|
|
40
|
+
apiUrl: 'https://app-X-ai.liyalabs.com', // Your assigned backend URL (see GAR section)
|
|
41
|
+
apiKey: 'your-api-key',
|
|
42
|
+
assistantId: 'your-assistant-id',
|
|
43
|
+
assistantName: 'AI Assistant'
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
app.mount('#app')
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. Use the Widget Component
|
|
50
|
+
|
|
51
|
+
```vue
|
|
52
|
+
<template>
|
|
53
|
+
<LiyaAvatarWidget
|
|
54
|
+
:show-avatar-button="true"
|
|
55
|
+
avatar-model-url="/models/avatar.glb"
|
|
56
|
+
welcome-message="Merhaba! Size nasΔ±l yardΔ±mcΔ± olabilirim?"
|
|
57
|
+
@avatar-opened="onAvatarOpened"
|
|
58
|
+
@message-sent="onMessageSent"
|
|
59
|
+
/>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script setup>
|
|
63
|
+
import { LiyaAvatarWidget } from '@liyalabs/liya-3d-avatar-widget'
|
|
64
|
+
|
|
65
|
+
function onAvatarOpened() {
|
|
66
|
+
console.log('Avatar modal opened')
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function onMessageSent(message) {
|
|
70
|
+
console.log('Message sent:', message)
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Components
|
|
76
|
+
|
|
77
|
+
### LiyaAvatarWidget
|
|
78
|
+
|
|
79
|
+
Main widget component with chat panel and avatar button.
|
|
80
|
+
|
|
81
|
+
#### Props
|
|
82
|
+
|
|
83
|
+
| Prop | Type | Default | Description |
|
|
84
|
+
|------|------|---------|-------------|
|
|
85
|
+
| `position` | `'bottom-right' \| 'bottom-left' \| 'top-right' \| 'top-left'` | `'bottom-right'` | Widget position |
|
|
86
|
+
| `showAvatarButton` | `boolean` | `true` | Show "Talk with Avatar" button |
|
|
87
|
+
| `avatarModelUrl` | `string` | `''` | URL to GLB/GLTF avatar model |
|
|
88
|
+
| `welcomeMessage` | `string` | `'...'` | Welcome message |
|
|
89
|
+
| `showVoice` | `boolean` | `true` | Show voice input button |
|
|
90
|
+
| `showFileUpload` | `boolean` | `true` | Show file upload button |
|
|
91
|
+
| `theme` | `ThemeConfig` | `{}` | Theme customization |
|
|
92
|
+
|
|
93
|
+
#### Events
|
|
94
|
+
|
|
95
|
+
| Event | Payload | Description |
|
|
96
|
+
|-------|---------|-------------|
|
|
97
|
+
| `opened` | - | Chat panel opened |
|
|
98
|
+
| `closed` | - | Chat panel closed |
|
|
99
|
+
| `avatarOpened` | - | Avatar modal opened |
|
|
100
|
+
| `avatarClosed` | - | Avatar modal closed |
|
|
101
|
+
| `messageSent` | `string` | User sent a message |
|
|
102
|
+
| `messageReceived` | `string` | Assistant responded |
|
|
103
|
+
|
|
104
|
+
### AvatarModal
|
|
105
|
+
|
|
106
|
+
Standalone avatar modal component.
|
|
107
|
+
|
|
108
|
+
```vue
|
|
109
|
+
<template>
|
|
110
|
+
<AvatarModal
|
|
111
|
+
:is-open="isOpen"
|
|
112
|
+
model-url="/models/avatar.glb"
|
|
113
|
+
assistant-name="AI Assistant"
|
|
114
|
+
@close="isOpen = false"
|
|
115
|
+
/>
|
|
116
|
+
</template>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### AvatarScene
|
|
120
|
+
|
|
121
|
+
3D avatar scene component (Three.js).
|
|
122
|
+
|
|
123
|
+
```vue
|
|
124
|
+
<template>
|
|
125
|
+
<AvatarScene
|
|
126
|
+
model-url="/models/avatar.glb"
|
|
127
|
+
:width="400"
|
|
128
|
+
:height="500"
|
|
129
|
+
:is-speaking="isSpeaking"
|
|
130
|
+
:visemes="visemeData"
|
|
131
|
+
:current-time="audioTime"
|
|
132
|
+
/>
|
|
133
|
+
</template>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Avatar Models
|
|
137
|
+
|
|
138
|
+
The widget supports GLB/GLTF models with ARKit-compatible blend shapes for lip-sync:
|
|
139
|
+
|
|
140
|
+
- **Ready Player Me** avatars (recommended)
|
|
141
|
+
- Custom models with viseme morph targets
|
|
142
|
+
|
|
143
|
+
### Supported Viseme Morph Targets
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
viseme_PP, viseme_FF, viseme_TH, viseme_DD, viseme_kk,
|
|
147
|
+
viseme_CH, viseme_SS, viseme_nn, viseme_RR, viseme_aa,
|
|
148
|
+
viseme_E, viseme_I, viseme_O, viseme_U
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## API Functions
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
import {
|
|
155
|
+
generateAvatarSpeech,
|
|
156
|
+
textToSpeech,
|
|
157
|
+
sendMessage,
|
|
158
|
+
useChat,
|
|
159
|
+
useVoice
|
|
160
|
+
} from '@liyalabs/liya-3d-avatar-widget'
|
|
161
|
+
|
|
162
|
+
// Generate speech with viseme data
|
|
163
|
+
const result = await generateAvatarSpeech('Merhaba!', { voice: 'nova' })
|
|
164
|
+
console.log(result.visemes) // Lip-sync timing data
|
|
165
|
+
console.log(result.audio_base64) // Audio data
|
|
166
|
+
|
|
167
|
+
// Use chat composable
|
|
168
|
+
const { messages, sendMessage, isLoading } = useChat()
|
|
169
|
+
|
|
170
|
+
// Use voice composable
|
|
171
|
+
const { isRecording, transcript, startRecording, stopRecording } = useVoice()
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Backend Requirements
|
|
175
|
+
|
|
176
|
+
This widget requires the Liya AI backend with the following endpoints:
|
|
177
|
+
|
|
178
|
+
- `POST /api/v1/external/chat/` - Chat messages
|
|
179
|
+
- `POST /api/v1/external/avatar/speech/` - Avatar speech with visemes
|
|
180
|
+
- `POST /api/v1/external/tts/` - Text-to-speech
|
|
181
|
+
|
|
182
|
+
## Theme Customization
|
|
183
|
+
|
|
184
|
+
```vue
|
|
185
|
+
<LiyaAvatarWidget
|
|
186
|
+
:theme="{
|
|
187
|
+
primaryColor: '#6366f1',
|
|
188
|
+
backgroundColor: '#ffffff',
|
|
189
|
+
textColor: '#374151',
|
|
190
|
+
borderRadius: '16px',
|
|
191
|
+
fontFamily: 'Inter, sans-serif'
|
|
192
|
+
}"
|
|
193
|
+
/>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## GAR (Global Application Router)
|
|
197
|
+
|
|
198
|
+
Liya AI uses a distributed backend architecture. Each user is assigned to a specific backend instance.
|
|
199
|
+
|
|
200
|
+
### Finding Your Backend URL
|
|
201
|
+
|
|
202
|
+
Your backend URL is displayed in your Liya AI dashboard under **Settings > API Configuration**:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
https://app-{X}-ai.liyalabs.com
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Where `{X}` is your assigned instance number (1, 2, 3, etc.).
|
|
209
|
+
|
|
210
|
+
| Instance | Backend URL |
|
|
211
|
+
|----------|-------------|
|
|
212
|
+
| 1 | `https://app-1-ai.liyalabs.com` |
|
|
213
|
+
| 2 | `https://app-2-ai.liyalabs.com` |
|
|
214
|
+
| 3 | `https://app-3-ai.liyalabs.com` |
|
|
215
|
+
|
|
216
|
+
## License
|
|
217
|
+
|
|
218
|
+
MIT Β© Liya Labs
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export interface VisemeData {
|
|
2
|
+
time: number;
|
|
3
|
+
viseme: number;
|
|
4
|
+
duration: number;
|
|
5
|
+
}
|
|
6
|
+
export interface AvatarSpeechResponse {
|
|
7
|
+
visemes: VisemeData[];
|
|
8
|
+
duration: number;
|
|
9
|
+
text: string;
|
|
10
|
+
audio_base64?: string;
|
|
11
|
+
audio_format?: string;
|
|
12
|
+
audio_mime?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TextToSpeechOptions {
|
|
15
|
+
voice?: string;
|
|
16
|
+
speed?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Generate avatar speech with viseme timing data for lip-sync
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateAvatarSpeech(text: string, options?: TextToSpeechOptions): Promise<AvatarSpeechResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Generate text-to-speech audio only (no visemes)
|
|
24
|
+
*/
|
|
25
|
+
export declare function textToSpeech(text: string, options?: TextToSpeechOptions): Promise<Blob>;
|
|
26
|
+
/**
|
|
27
|
+
* Decode base64 audio to AudioBuffer
|
|
28
|
+
*/
|
|
29
|
+
export declare function decodeAudioBase64(base64Audio: string, audioContext: AudioContext): Promise<AudioBuffer>;
|
|
30
|
+
export interface AvatarModelResponse {
|
|
31
|
+
model_url: string;
|
|
32
|
+
model_type: string;
|
|
33
|
+
source: 'default' | 'assistant';
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Custom error class to preserve error code from API
|
|
37
|
+
*/
|
|
38
|
+
export declare class AvatarApiError extends Error {
|
|
39
|
+
code: string;
|
|
40
|
+
constructor(message: string, code: string);
|
|
41
|
+
}
|
|
42
|
+
export interface UserAccessResponse {
|
|
43
|
+
has_avatar_access: boolean;
|
|
44
|
+
account_type: 'standard' | 'premium' | 'premium_plus' | 'system_admin';
|
|
45
|
+
can_use_custom_avatar: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Check if user has access to 3D Avatar features
|
|
49
|
+
* This should be called before loading avatar model
|
|
50
|
+
*/
|
|
51
|
+
export declare function checkUserAccess(): Promise<UserAccessResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Get avatar model URL from backend
|
|
54
|
+
* Returns default avatar or assistant-specific avatar if available
|
|
55
|
+
*/
|
|
56
|
+
export declare function getAvatarModel(assistantId?: string): Promise<AvatarModelResponse>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SendMessageResponse, SessionHistoryResponse } from '../types';
|
|
2
|
+
export declare function sendMessage(message: string, sessionId?: string, fileIds?: string[]): Promise<SendMessageResponse>;
|
|
3
|
+
export declare function getSessionHistory(sessionId: string, limit?: number, offset?: number): Promise<SessionHistoryResponse>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { LiyaChatConfig } from '../types';
|
|
3
|
+
export declare function initializeClient(config: LiyaChatConfig): AxiosInstance;
|
|
4
|
+
export declare function getClient(): AxiosInstance;
|
|
5
|
+
export declare function getConfig(): LiyaChatConfig;
|
|
6
|
+
export declare function isInitialized(): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FileAttachment } from '../types';
|
|
2
|
+
export declare function uploadFile(sessionId: string, file: File): Promise<FileAttachment>;
|
|
3
|
+
export declare function formatFileSize(bytes: number): string;
|
|
4
|
+
export declare function isValidFileType(file: File, allowedTypes?: string[]): boolean;
|
|
5
|
+
export declare const DEFAULT_ALLOWED_FILE_TYPES: string[];
|
|
6
|
+
export declare const MAX_FILE_SIZE: number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ==================================================
|
|
3
|
+
* βββ ββββββ βββ ββββββ
|
|
4
|
+
* βββ βββββββ ββββββββββββ
|
|
5
|
+
* βββ βββ βββββββ ββββββββ
|
|
6
|
+
* βββ βββ βββββ ββββββββ
|
|
7
|
+
* βββββββββββ βββ βββ βββ
|
|
8
|
+
* βββββββββββ βββ βββ βββ
|
|
9
|
+
* AI Assistant
|
|
10
|
+
* ==================================================
|
|
11
|
+
* Author / Creator : Mahmut Denizli (With help of LiyaAi)
|
|
12
|
+
* License : MIT
|
|
13
|
+
* Connect : liyalabs.com, info@liyalabs.com
|
|
14
|
+
* ==================================================
|
|
15
|
+
*/
|
|
16
|
+
export { initializeClient, getClient, getConfig, isInitialized } from './client';
|
|
17
|
+
export { sendMessage, getSessionHistory } from './chat';
|
|
18
|
+
export { getSessions, createSession, getSession, deleteSession } from './sessions';
|
|
19
|
+
export { uploadFile, formatFileSize, isValidFileType, DEFAULT_ALLOWED_FILE_TYPES, MAX_FILE_SIZE } from './files';
|
|
20
|
+
export { getAssistants, getAssistant } from './assistants';
|
|
21
|
+
export { generateAvatarSpeech, textToSpeech, decodeAudioBase64, getAvatarModel, checkUserAccess } from './avatar';
|
|
22
|
+
export type { VisemeData, AvatarSpeechResponse, TextToSpeechOptions, AvatarModelResponse, UserAccessResponse } from './avatar';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Session, SessionListResponse } from '../types';
|
|
2
|
+
export declare function getSessions(limit?: number, offset?: number): Promise<SessionListResponse>;
|
|
3
|
+
export declare function createSession(sessionName?: string, externalSessionId?: string): Promise<Session>;
|
|
4
|
+
export declare function getSession(sessionId: string): Promise<Session>;
|
|
5
|
+
export declare function deleteSession(sessionId: string): Promise<void>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ThemeConfig, Session } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
theme?: ThemeConfig;
|
|
4
|
+
showSidebar?: boolean;
|
|
5
|
+
sidebarWidth?: string;
|
|
6
|
+
welcomeMessage?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
showVoice?: boolean;
|
|
9
|
+
voiceEnabled?: boolean;
|
|
10
|
+
showFileUpload?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
messageSent: (message: string) => any;
|
|
14
|
+
messageReceived: (message: string) => any;
|
|
15
|
+
sessionCreated: (session: Session) => any;
|
|
16
|
+
sessionSelected: (session: Session) => any;
|
|
17
|
+
sessionDeleted: (sessionId: string) => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
19
|
+
onMessageSent?: ((message: string) => any) | undefined;
|
|
20
|
+
onMessageReceived?: ((message: string) => any) | undefined;
|
|
21
|
+
onSessionCreated?: ((session: Session) => any) | undefined;
|
|
22
|
+
onSessionSelected?: ((session: Session) => any) | undefined;
|
|
23
|
+
onSessionDeleted?: ((sessionId: string) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
welcomeMessage: string;
|
|
26
|
+
placeholder: string;
|
|
27
|
+
showVoice: boolean;
|
|
28
|
+
voiceEnabled: boolean;
|
|
29
|
+
showFileUpload: boolean;
|
|
30
|
+
showSidebar: boolean;
|
|
31
|
+
sidebarWidth: string;
|
|
32
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Session } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
sessions: readonly Session[];
|
|
4
|
+
currentSessionId?: string | null;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
assistantName?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
selectSession: (session: Session) => any;
|
|
10
|
+
createSession: () => any;
|
|
11
|
+
deleteSession: (sessionId: string) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
13
|
+
onSelectSession?: ((session: Session) => any) | undefined;
|
|
14
|
+
onCreateSession?: (() => any) | undefined;
|
|
15
|
+
onDeleteSession?: ((sessionId: string) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
assistantName: string;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
currentSessionId: string | null;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ==================================================
|
|
3
|
+
* βββ ββββββ βββ ββββββ
|
|
4
|
+
* βββ βββββββ ββββββββββββ
|
|
5
|
+
* βββ βββ βββββββ ββββββββ
|
|
6
|
+
* βββ βββ βββββ ββββββββ
|
|
7
|
+
* βββββββββββ βββ βββ βββ
|
|
8
|
+
* βββββββββββ βββ βββ βββ
|
|
9
|
+
* AI Assistant
|
|
10
|
+
* ==================================================
|
|
11
|
+
* Author / Creator : Mahmut Denizli (With help of LiyaAi)
|
|
12
|
+
* License : MIT
|
|
13
|
+
* Connect : liyalabs.com, info@liyalabs.com
|
|
14
|
+
* ==================================================
|
|
15
|
+
*/
|
|
16
|
+
export { default as LiyaChatApp } from './LiyaChatApp.vue';
|
|
17
|
+
export { default as SessionSidebar } from './SessionSidebar.vue';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
modelUrl?: string;
|
|
4
|
+
assistantName?: string;
|
|
5
|
+
welcomeMessage?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
close: () => any;
|
|
9
|
+
messageSent: (message: string) => any;
|
|
10
|
+
messageReceived: (message: string) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
12
|
+
onClose?: (() => any) | undefined;
|
|
13
|
+
onMessageSent?: ((message: string) => any) | undefined;
|
|
14
|
+
onMessageReceived?: ((message: string) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
assistantName: string;
|
|
17
|
+
welcomeMessage: string;
|
|
18
|
+
modelUrl: string;
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
modelUrl?: string;
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
isSpeaking?: boolean;
|
|
7
|
+
visemes?: Array<{
|
|
8
|
+
time: number;
|
|
9
|
+
viseme: number;
|
|
10
|
+
duration: number;
|
|
11
|
+
}>;
|
|
12
|
+
currentTime?: number;
|
|
13
|
+
lipSyncSpeed?: number;
|
|
14
|
+
lipSyncIntensity?: number;
|
|
15
|
+
blinkSpeed?: number;
|
|
16
|
+
blinkIntervalMin?: number;
|
|
17
|
+
blinkIntervalMax?: number;
|
|
18
|
+
eyeMoveSpeed?: number;
|
|
19
|
+
eyeMoveIntervalMin?: number;
|
|
20
|
+
eyeMoveIntervalMax?: number;
|
|
21
|
+
eyeMoveRange?: number;
|
|
22
|
+
breathingSpeed?: number;
|
|
23
|
+
breathingIntensity?: number;
|
|
24
|
+
microExpressionSpeed?: number;
|
|
25
|
+
microExpressionIntensity?: number;
|
|
26
|
+
speakingBrowIntensity?: number;
|
|
27
|
+
speakingSmileIntensity?: number;
|
|
28
|
+
handGestureSpeed?: number;
|
|
29
|
+
handGestureIntensity?: number;
|
|
30
|
+
}
|
|
31
|
+
declare function applyOutfitColors(colors: {
|
|
32
|
+
top: string;
|
|
33
|
+
bottom: string;
|
|
34
|
+
footwear: string;
|
|
35
|
+
}): void;
|
|
36
|
+
declare const _default: import('vue').DefineComponent<Props, {
|
|
37
|
+
applyOutfitColors: typeof applyOutfitColors;
|
|
38
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
39
|
+
error: (error: Error) => any;
|
|
40
|
+
loaded: () => any;
|
|
41
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
42
|
+
onError?: ((error: Error) => any) | undefined;
|
|
43
|
+
onLoaded?: (() => any) | undefined;
|
|
44
|
+
}>, {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
modelUrl: string;
|
|
48
|
+
backgroundColor: string;
|
|
49
|
+
isSpeaking: boolean;
|
|
50
|
+
visemes: Array<{
|
|
51
|
+
time: number;
|
|
52
|
+
viseme: number;
|
|
53
|
+
duration: number;
|
|
54
|
+
}>;
|
|
55
|
+
currentTime: number;
|
|
56
|
+
lipSyncSpeed: number;
|
|
57
|
+
lipSyncIntensity: number;
|
|
58
|
+
blinkSpeed: number;
|
|
59
|
+
blinkIntervalMin: number;
|
|
60
|
+
blinkIntervalMax: number;
|
|
61
|
+
eyeMoveSpeed: number;
|
|
62
|
+
eyeMoveIntervalMin: number;
|
|
63
|
+
eyeMoveIntervalMax: number;
|
|
64
|
+
eyeMoveRange: number;
|
|
65
|
+
breathingSpeed: number;
|
|
66
|
+
breathingIntensity: number;
|
|
67
|
+
microExpressionSpeed: number;
|
|
68
|
+
microExpressionIntensity: number;
|
|
69
|
+
speakingBrowIntensity: number;
|
|
70
|
+
speakingSmileIntensity: number;
|
|
71
|
+
handGestureSpeed: number;
|
|
72
|
+
handGestureIntensity: number;
|
|
73
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
74
|
+
containerRef: HTMLDivElement;
|
|
75
|
+
}, HTMLDivElement>;
|
|
76
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ==================================================
|
|
3
|
+
* βββ ββββββ βββ ββββββ
|
|
4
|
+
* βββ βββββββ ββββββββββββ
|
|
5
|
+
* βββ βββ βββββββ ββββββββ
|
|
6
|
+
* βββ βββ βββββ ββββββββ
|
|
7
|
+
* βββββββββββ βββ βββ βββ
|
|
8
|
+
* βββββββββββ βββ βββ βββ
|
|
9
|
+
* AI Assistant
|
|
10
|
+
* ==================================================
|
|
11
|
+
* Author / Creator : Mahmut Denizli (With help of LiyaAi)
|
|
12
|
+
* License : MIT
|
|
13
|
+
* Connect : liyalabs.com, info@liyalabs.com
|
|
14
|
+
* ==================================================
|
|
15
|
+
*/
|
|
16
|
+
export { default as AvatarScene } from './AvatarScene.vue';
|
|
17
|
+
export { default as AvatarModal } from './AvatarModal.vue';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ==================================================
|
|
3
|
+
* βββ ββββββ βββ ββββββ
|
|
4
|
+
* βββ βββββββ ββββββββββββ
|
|
5
|
+
* βββ βββ βββββββ ββββββββ
|
|
6
|
+
* βββ βββ βββββ ββββββββ
|
|
7
|
+
* βββββββββββ βββ βββ βββ
|
|
8
|
+
* βββββββββββ βββ βββ βββ
|
|
9
|
+
* AI Assistant
|
|
10
|
+
* ==================================================
|
|
11
|
+
* Author / Creator : Mahmut Denizli (With help of LiyaAi)
|
|
12
|
+
* License : MIT
|
|
13
|
+
* Connect : liyalabs.com, info@liyalabs.com
|
|
14
|
+
* ==================================================
|
|
15
|
+
*/
|
|
16
|
+
export * from './widget';
|
|
17
|
+
export * from './avatar';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
placeholder?: string;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
showVoice?: boolean;
|
|
5
|
+
voiceEnabled?: boolean;
|
|
6
|
+
maxLength?: number;
|
|
7
|
+
sessionId?: string | null;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
send: (message: string, fileIds?: string[] | undefined) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
12
|
+
onSend?: ((message: string, fileIds?: string[] | undefined) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
placeholder: string;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
showVoice: boolean;
|
|
17
|
+
voiceEnabled: boolean;
|
|
18
|
+
maxLength: number;
|
|
19
|
+
sessionId: string | null;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
|
+
textareaRef: HTMLTextAreaElement;
|
|
22
|
+
}, HTMLDivElement>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Message } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
message: Message;
|
|
4
|
+
showAvatar?: boolean;
|
|
5
|
+
assistantName?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
8
|
+
"suggestion-click": (suggestion: string) => any;
|
|
9
|
+
"suggestion-edit": (suggestion: string) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
11
|
+
"onSuggestion-click"?: ((suggestion: string) => any) | undefined;
|
|
12
|
+
"onSuggestion-edit"?: ((suggestion: string) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
showAvatar: boolean;
|
|
15
|
+
assistantName: string;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Message } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
messages: readonly Message[];
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
assistantName?: string;
|
|
6
|
+
welcomeMessage?: string;
|
|
7
|
+
preparingText?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function scrollToBottom(): void;
|
|
10
|
+
declare const _default: import('vue').DefineComponent<Props, {
|
|
11
|
+
scrollToBottom: typeof scrollToBottom;
|
|
12
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
13
|
+
"suggestion-click": (suggestion: string) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
15
|
+
"onSuggestion-click"?: ((suggestion: string) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
assistantName: string;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
welcomeMessage: string;
|
|
20
|
+
preparingText: string;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
22
|
+
containerRef: HTMLDivElement;
|
|
23
|
+
}, HTMLDivElement>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ==================================================
|
|
3
|
+
* βββ ββββββ βββ ββββββ
|
|
4
|
+
* βββ βββββββ ββββββββββββ
|
|
5
|
+
* βββ βββ βββββββ ββββββββ
|
|
6
|
+
* βββ βββ βββββ ββββββββ
|
|
7
|
+
* βββββββββββ βββ βββ βββ
|
|
8
|
+
* βββββββββββ βββ βββ βββ
|
|
9
|
+
* AI Assistant
|
|
10
|
+
* ==================================================
|
|
11
|
+
* Author / Creator : Mahmut Denizli (With help of LiyaAi)
|
|
12
|
+
* License : MIT
|
|
13
|
+
* Connect : liyalabs.com, info@liyalabs.com
|
|
14
|
+
* ==================================================
|
|
15
|
+
*/
|
|
16
|
+
export { default as MessageBubble } from './MessageBubble.vue';
|
|
17
|
+
export { default as MessageList } from './MessageList.vue';
|
|
18
|
+
export { default as ChatInput } from './ChatInput.vue';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ==================================================
|
|
3
|
+
* βββ ββββββ βββ ββββββ
|
|
4
|
+
* βββ βββββββ ββββββββββββ
|
|
5
|
+
* βββ βββ βββββββ ββββββββ
|
|
6
|
+
* βββ βββ βββββ ββββββββ
|
|
7
|
+
* βββββββββββ βββ βββ βββ
|
|
8
|
+
* βββββββββββ βββ βββ βββ
|
|
9
|
+
* AI Assistant
|
|
10
|
+
* ==================================================
|
|
11
|
+
* Author / Creator : Mahmut Denizli (With help of LiyaAi)
|
|
12
|
+
* License : MIT
|
|
13
|
+
* Connect : liyalabs.com, info@liyalabs.com
|
|
14
|
+
* ==================================================
|
|
15
|
+
*/
|
|
16
|
+
export { default as LiyaAvatarWidget } from './LiyaAvatarWidget.vue';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ==================================================
|
|
3
|
+
* βββ ββββββ βββ ββββββ
|
|
4
|
+
* βββ βββββββ ββββββββββββ
|
|
5
|
+
* βββ βββ βββββββ ββββββββ
|
|
6
|
+
* βββ βββ βββββ ββββββββ
|
|
7
|
+
* βββββββββββ βββ βββ βββ
|
|
8
|
+
* βββββββββββ βββ βββ βββ
|
|
9
|
+
* AI Assistant
|
|
10
|
+
* ==================================================
|
|
11
|
+
* Author / Creator : Mahmut Denizli (With help of LiyaAi)
|
|
12
|
+
* License : MIT
|
|
13
|
+
* Connect : liyalabs.com, info@liyalabs.com
|
|
14
|
+
* ==================================================
|
|
15
|
+
*/
|
|
16
|
+
export { useChat } from './useChat';
|
|
17
|
+
export { useSessions } from './useSessions';
|
|
18
|
+
export { useVoice } from './useVoice';
|
|
19
|
+
export { useFileUpload } from './useFileUpload';
|
|
20
|
+
export { useBrowserCompat, checkBrowserCompatibility } from './useBrowserCompat';
|