@polyv/live-watch-ai-ui 1.0.0-rc-20250724.1 → 1.0.0-rc-20250814.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.
@@ -1,11 +1,308 @@
1
+ import { ComponentCustomProperties } from 'vue';
2
+ import { ComponentOptionsBase } from 'vue';
1
3
  import { ComponentOptionsMixin } from 'vue';
2
4
  import { DefineComponent } from 'vue';
5
+ import { ExtractComputedReturns } from 'vue/types/v3-component-options';
3
6
  import { ExtractPropTypes } from 'vue';
7
+ import { LangType } from '@polyv/live-watch-ai-sdk';
4
8
  import { PlaybackOutlineData } from '@polyv/live-watch-ai-sdk';
9
+ import { PolyvAIAssistantChatMsgType } from '@polyv/live-watch-ai-sdk';
10
+ import { PolyvWatchAICore } from '@polyv/live-watch-ai-sdk';
11
+ import { ShallowUnwrapRef } from 'vue';
12
+ import { Vue3Instance } from 'vue/types/v3-component-public-instance';
5
13
  import { VueTypeValidableDef } from 'vue-types';
6
14
 
15
+ export declare const AI_UI_INJECT_KEY = "AIUIGlobalConfig";
16
+
17
+ export declare const AiAssistantChat: DefineComponent< {
18
+ chatListProps: VueTypeValidableDef<Partial<Readonly<ExtractPropTypes< {
19
+ msgList: VueTypeValidableDef<PolyvAIAssistantChatMsgType[]> & {
20
+ default: () => PolyvAIAssistantChatMsgType[];
21
+ } & {
22
+ required: true;
23
+ };
24
+ hideUserInfo: VueTypeValidableDef<boolean> & {
25
+ default: boolean;
26
+ };
27
+ }>>>> & {
28
+ default: () => Partial<Readonly<ExtractPropTypes< {
29
+ msgList: VueTypeValidableDef<PolyvAIAssistantChatMsgType[]> & {
30
+ default: () => PolyvAIAssistantChatMsgType[];
31
+ } & {
32
+ required: true;
33
+ };
34
+ hideUserInfo: VueTypeValidableDef<boolean> & {
35
+ default: boolean;
36
+ };
37
+ }>>>;
38
+ };
39
+ direction: VueTypeValidableDef<string> & {
40
+ default: string;
41
+ };
42
+ audioRecognizeEnabled: VueTypeValidableDef<boolean> & {
43
+ default: boolean;
44
+ };
45
+ digitalEnabled: VueTypeValidableDef<boolean> & {
46
+ default: boolean;
47
+ };
48
+ digitalSpeakMaxDelay: VueTypeValidableDef<number> & {
49
+ default: number;
50
+ };
51
+ }, {
52
+ getDigitalPreviewInstance: typeof getDigitalPreviewInstance;
53
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
54
+ chatListProps: VueTypeValidableDef<Partial<Readonly<ExtractPropTypes< {
55
+ msgList: VueTypeValidableDef<PolyvAIAssistantChatMsgType[]> & {
56
+ default: () => PolyvAIAssistantChatMsgType[];
57
+ } & {
58
+ required: true;
59
+ };
60
+ hideUserInfo: VueTypeValidableDef<boolean> & {
61
+ default: boolean;
62
+ };
63
+ }>>>> & {
64
+ default: () => Partial<Readonly<ExtractPropTypes< {
65
+ msgList: VueTypeValidableDef<PolyvAIAssistantChatMsgType[]> & {
66
+ default: () => PolyvAIAssistantChatMsgType[];
67
+ } & {
68
+ required: true;
69
+ };
70
+ hideUserInfo: VueTypeValidableDef<boolean> & {
71
+ default: boolean;
72
+ };
73
+ }>>>;
74
+ };
75
+ direction: VueTypeValidableDef<string> & {
76
+ default: string;
77
+ };
78
+ audioRecognizeEnabled: VueTypeValidableDef<boolean> & {
79
+ default: boolean;
80
+ };
81
+ digitalEnabled: VueTypeValidableDef<boolean> & {
82
+ default: boolean;
83
+ };
84
+ digitalSpeakMaxDelay: VueTypeValidableDef<number> & {
85
+ default: number;
86
+ };
87
+ }>>, {
88
+ direction: string;
89
+ audioRecognizeEnabled: boolean;
90
+ chatListProps: Partial<Readonly<ExtractPropTypes< {
91
+ msgList: VueTypeValidableDef<PolyvAIAssistantChatMsgType[]> & {
92
+ default: () => PolyvAIAssistantChatMsgType[];
93
+ } & {
94
+ required: true;
95
+ };
96
+ hideUserInfo: VueTypeValidableDef<boolean> & {
97
+ default: boolean;
98
+ };
99
+ }>>>;
100
+ digitalEnabled: boolean;
101
+ digitalSpeakMaxDelay: number;
102
+ }>;
103
+
104
+ export declare const AiDigitalPreview: DefineComponent< {
105
+ /** 视频源 */
106
+ videoSource: VueTypeValidableDef< {
107
+ speakUrl: string;
108
+ noSpeakUrl: string;
109
+ }> & {
110
+ default: () => {
111
+ speakUrl: string;
112
+ noSpeakUrl: string;
113
+ };
114
+ };
115
+ /** 数字人语音Id */
116
+ ttsVoiceId: VueTypeValidableDef<string> & {
117
+ default: string;
118
+ };
119
+ /** 预览方向,默认是 row*/
120
+ direction: VueTypeValidableDef<string> & {
121
+ default: string;
122
+ };
123
+ /** 视频 object-fit 值,默认是 cover */
124
+ forceFitMode: VueTypeValidableDef<string> & {
125
+ default: string;
126
+ };
127
+ /** 是否使用 loading. 默认 true */
128
+ enabledLoading: VueTypeValidableDef<boolean> & {
129
+ default: boolean;
130
+ };
131
+ }, {
132
+ startSpeaking: (text: string, opts?: {
133
+ /** 自动播放 */
134
+ autoPlay: boolean;
135
+ }) => void;
136
+ manualPlaySpeaking: () => void;
137
+ togglePlaySpeaking: () => void;
138
+ stopSpeaking: () => void;
139
+ getVideoIsAutoPlay: typeof getVideoIsAutoPlay;
140
+ playVideo: () => void;
141
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
142
+ "video-first-load": (...args: any[]) => void;
143
+ }, string, Readonly<ExtractPropTypes< {
144
+ /** 视频源 */
145
+ videoSource: VueTypeValidableDef< {
146
+ speakUrl: string;
147
+ noSpeakUrl: string;
148
+ }> & {
149
+ default: () => {
150
+ speakUrl: string;
151
+ noSpeakUrl: string;
152
+ };
153
+ };
154
+ /** 数字人语音Id */
155
+ ttsVoiceId: VueTypeValidableDef<string> & {
156
+ default: string;
157
+ };
158
+ /** 预览方向,默认是 row*/
159
+ direction: VueTypeValidableDef<string> & {
160
+ default: string;
161
+ };
162
+ /** 视频 object-fit 值,默认是 cover */
163
+ forceFitMode: VueTypeValidableDef<string> & {
164
+ default: string;
165
+ };
166
+ /** 是否使用 loading. 默认 true */
167
+ enabledLoading: VueTypeValidableDef<boolean> & {
168
+ default: boolean;
169
+ };
170
+ }>>, {
171
+ videoSource: {
172
+ speakUrl: string;
173
+ noSpeakUrl: string;
174
+ };
175
+ ttsVoiceId: string;
176
+ direction: string;
177
+ forceFitMode: string;
178
+ enabledLoading: boolean;
179
+ }>;
180
+
7
181
  declare function closeMindMap(): void;
8
182
 
183
+ declare function getDigitalPreviewInstance(): (Vue3Instance< {}, Readonly<ExtractPropTypes< {
184
+ videoSource: VueTypeValidableDef< {
185
+ speakUrl: string;
186
+ noSpeakUrl: string;
187
+ }> & {
188
+ default: () => {
189
+ speakUrl: string;
190
+ noSpeakUrl: string;
191
+ };
192
+ };
193
+ ttsVoiceId: VueTypeValidableDef<string> & {
194
+ default: string;
195
+ };
196
+ direction: VueTypeValidableDef<string> & {
197
+ default: string;
198
+ };
199
+ forceFitMode: VueTypeValidableDef<string> & {
200
+ default: string;
201
+ };
202
+ enabledLoading: VueTypeValidableDef<boolean> & {
203
+ default: boolean;
204
+ };
205
+ }>>, Readonly<ExtractPropTypes< {
206
+ videoSource: VueTypeValidableDef< {
207
+ speakUrl: string;
208
+ noSpeakUrl: string;
209
+ }> & {
210
+ default: () => {
211
+ speakUrl: string;
212
+ noSpeakUrl: string;
213
+ };
214
+ };
215
+ ttsVoiceId: VueTypeValidableDef<string> & {
216
+ default: string;
217
+ };
218
+ direction: VueTypeValidableDef<string> & {
219
+ default: string;
220
+ };
221
+ forceFitMode: VueTypeValidableDef<string> & {
222
+ default: string;
223
+ };
224
+ enabledLoading: VueTypeValidableDef<boolean> & {
225
+ default: boolean;
226
+ };
227
+ }>>, {
228
+ "video-first-load": (...args: any[]) => void;
229
+ }, {
230
+ videoSource: {
231
+ speakUrl: string;
232
+ noSpeakUrl: string;
233
+ };
234
+ ttsVoiceId: string;
235
+ direction: string;
236
+ forceFitMode: string;
237
+ enabledLoading: boolean;
238
+ }, true, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<ExtractPropTypes< {
239
+ videoSource: VueTypeValidableDef< {
240
+ speakUrl: string;
241
+ noSpeakUrl: string;
242
+ }> & {
243
+ default: () => {
244
+ speakUrl: string;
245
+ noSpeakUrl: string;
246
+ };
247
+ };
248
+ ttsVoiceId: VueTypeValidableDef<string> & {
249
+ default: string;
250
+ };
251
+ direction: VueTypeValidableDef<string> & {
252
+ default: string;
253
+ };
254
+ forceFitMode: VueTypeValidableDef<string> & {
255
+ default: string;
256
+ };
257
+ enabledLoading: VueTypeValidableDef<boolean> & {
258
+ default: boolean;
259
+ };
260
+ }>>> & ShallowUnwrapRef< {
261
+ startSpeaking: (text: string, opts?: {
262
+ autoPlay: boolean;
263
+ }) => void;
264
+ manualPlaySpeaking: () => void;
265
+ togglePlaySpeaking: () => void;
266
+ stopSpeaking: () => void;
267
+ getVideoIsAutoPlay: () => boolean;
268
+ playVideo: () => void;
269
+ }> & ExtractComputedReturns< {}> & ComponentCustomProperties & Readonly<ExtractPropTypes< {
270
+ videoSource: VueTypeValidableDef< {
271
+ speakUrl: string;
272
+ noSpeakUrl: string;
273
+ }> & {
274
+ default: () => {
275
+ speakUrl: string;
276
+ noSpeakUrl: string;
277
+ };
278
+ };
279
+ ttsVoiceId: VueTypeValidableDef<string> & {
280
+ default: string;
281
+ };
282
+ direction: VueTypeValidableDef<string> & {
283
+ default: string;
284
+ };
285
+ forceFitMode: VueTypeValidableDef<string> & {
286
+ default: string;
287
+ };
288
+ enabledLoading: VueTypeValidableDef<boolean> & {
289
+ default: boolean;
290
+ };
291
+ }>>) | undefined;
292
+
293
+ declare function getVideoIsAutoPlay(): boolean;
294
+
295
+ declare interface GlobalInjectData {
296
+ /** 全局语言 */
297
+ globalLang: LangType | string;
298
+ /** 是否移动端 */
299
+ isMobile?: () => boolean;
300
+ /** 主题色 */
301
+ theme: 'dark' | 'light' | string;
302
+ /** 获取观看核心 */
303
+ getWatchAICore?: () => PolyvWatchAICore | undefined | null;
304
+ }
305
+
9
306
  declare function openMindMap(data: PlaybackOutlineData): void;
10
307
 
11
308
  export declare const OutlineMindMap: DefineComponent< {}, {
@@ -20,9 +317,6 @@ outlineData: VueTypeValidableDef<PlaybackOutlineData>;
20
317
  showColor: VueTypeValidableDef<boolean> & {
21
318
  default: boolean;
22
319
  };
23
- lang: VueTypeValidableDef<string> & {
24
- default: string;
25
- };
26
320
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
27
321
  "seek-video": (arg: number) => void;
28
322
  "open-mind-map": (arg: PlaybackOutlineData) => void;
@@ -33,12 +327,10 @@ outlineData: VueTypeValidableDef<PlaybackOutlineData>;
33
327
  showColor: VueTypeValidableDef<boolean> & {
34
328
  default: boolean;
35
329
  };
36
- lang: VueTypeValidableDef<string> & {
37
- default: string;
38
- };
39
330
  }>>, {
40
- lang: string;
41
331
  showColor: boolean;
42
332
  }>;
43
333
 
334
+ export declare const useAIGlobalProvider: (provideData: GlobalInjectData) => void;
335
+
44
336
  export { }