@vunk/plus 1.12.2 → 1.13.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/components/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/components/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/components/agent-chat-provider/index.cjs +1 -0
- package/components/agent-chat-provider/index.mjs +113 -187
- package/components/agent-chat-provider/src/index.vue.d.ts +3 -2
- package/components/avatar/index.cjs +1 -0
- package/components/avatar/index.mjs +25 -31
- package/components/avatar/src/index.vue.d.ts +40 -39
- package/components/broadcasting-markdown/__tests__/const.test.d.ts +1 -0
- package/components/broadcasting-markdown/__tests__/utils.test.d.ts +1 -0
- package/components/broadcasting-markdown/index.cjs +5 -0
- package/components/broadcasting-markdown/index.mjs +346 -4376
- package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +18 -24
- package/components/broadcasting-markdown/src/index.vue.d.ts +101 -51
- package/components/broadcasting-markdown/src/paragraph.vue.d.ts +17 -29
- package/components/broadcasting-markdown/src/speech-error.vue.d.ts +2 -59
- package/components/bubble-list/index.cjs +1 -0
- package/components/bubble-list/index.mjs +220 -302
- package/components/bubble-list/src/core/index.vue.d.ts +40 -885
- package/components/bubble-list/src/core/loading.vue.d.ts +3 -0
- package/components/bubble-list/src/index.vue.d.ts +29 -1321
- package/components/bubble-templates/index.cjs +1 -0
- package/components/bubble-templates/index.mjs +34 -49
- package/components/bubble-templates/src/index.vue.d.ts +3 -224
- package/components/chat-independent/index.cjs +1 -0
- package/components/chat-independent/index.mjs +105 -212
- package/components/chat-independent/src/index.vue.d.ts +20 -2712
- package/components/components.css +1 -0
- package/components/drawer/index.cjs +1 -0
- package/components/drawer/index.mjs +53 -94
- package/components/drawer/src/ctx.d.ts +22 -22
- package/components/drawer/src/index.vue.d.ts +84 -557
- package/components/index.cjs +1 -0
- package/components/index.d.ts +1 -0
- package/components/lottie-animation/index.cjs +1 -0
- package/components/lottie-animation/index.mjs +36 -55
- package/components/lottie-animation/src/index.vue.d.ts +3 -2
- package/components/metahuman-broadcasting/index.cjs +1 -0
- package/components/metahuman-broadcasting/index.mjs +89 -140
- package/components/metahuman-broadcasting/src/index.vue.d.ts +16 -718
- package/components/monaco-editor/index.cjs +1 -0
- package/components/monaco-editor/index.mjs +68 -95
- package/components/monaco-editor/src/index.vue.d.ts +3 -2
- package/components/monaco-environment/index.cjs +1 -0
- package/components/monaco-environment/index.mjs +23 -38
- package/components/monaco-environment/src/index.vue.d.ts +2 -1
- package/components/pixi-frame/index.cjs +1 -0
- package/components/pixi-frame/index.mjs +941 -1969
- package/components/pixi-frame/src/apng.vue.d.ts +17 -73
- package/components/pixi-frame/src/bitmap-generator.vue.d.ts +24 -66
- package/components/pixi-frame/src/bitmap.vue.d.ts +28 -80
- package/components/pixi-frame/src/buffer-image.vue.d.ts +29 -97
- package/components/pixi-frame/src/core.vue.d.ts +20 -75
- package/components/pixi-frame/src/index.vue.d.ts +302 -237
- package/components/pixi-frame/src/provider.vue.d.ts +12 -1
- package/components/pixi-frame/src/video.vue.d.ts +17 -71
- package/components/pixi-frame/src/view.vue.d.ts +4 -16
- package/components/recorder-button/index.cjs +1 -0
- package/components/recorder-button/index.mjs +140 -269
- package/components/recorder-button/src/index.vue.d.ts +67 -66
- package/components/routes-menu-content/index.cjs +1 -0
- package/components/routes-menu-content/index.mjs +150 -229
- package/components/routes-menu-content/src/index.vue.d.ts +27 -26
- package/components/routes-menu-content/src/item/core/index.vue.d.ts +27 -26
- package/components/routes-menu-content/src/item/index.vue.d.ts +27 -26
- package/components/scrollbar/index.cjs +1 -0
- package/components/scrollbar/index.mjs +288 -567
- package/components/scrollbar/src/bar.vue.d.ts +6 -133
- package/components/scrollbar/src/index.vue.d.ts +66 -337
- package/components/scrollbar/src/thumb.vue.d.ts +3 -80
- package/components/sender/index.cjs +1 -0
- package/components/sender/index.mjs +156 -285
- package/components/sender/src/SenderHeader.vue.d.ts +14 -221
- package/components/sender/src/index.vue.d.ts +16 -505
- package/components/speech-button/index.cjs +1 -0
- package/components/speech-button/index.mjs +98 -144
- package/components/speech-button/src/LoadingIcon.vue.d.ts +2 -1
- package/components/speech-button/src/RecordingIcon.vue.d.ts +2 -1
- package/components/speech-button/src/index.vue.d.ts +6 -5
- package/components/table-columns/index.cjs +1 -0
- package/components/table-columns/index.mjs +48 -78
- package/components/table-columns/src/ctx.d.ts +10 -10
- package/components/table-columns/src/el-ctx.d.ts +1 -1
- package/components/table-columns/src/index.vue.d.ts +24 -23
- package/components/tables-v1/index.cjs +1 -0
- package/components/tables-v1/index.mjs +99 -160
- package/components/tables-v1/src/ctx.d.ts +28 -28
- package/components/tables-v1/src/el-ctx.d.ts +2 -2
- package/components/tables-v1/src/index.vue.d.ts +88 -2243
- package/components/tables-v1-checkbox/index.cjs +98 -0
- package/components/tables-v1-checkbox/index.mjs +1594 -3735
- package/components/tables-v1-checkbox/src/ctx.d.ts +26 -26
- package/components/tables-v1-checkbox/src/index.vue.d.ts +176 -2330
- package/components/text/index.cjs +1 -0
- package/components/text/index.mjs +70 -108
- package/components/text/src/ctx.d.ts +31 -31
- package/components/text/src/index.vue.d.ts +92 -1819
- package/components/thinking/index.cjs +1 -0
- package/components/thinking/index.mjs +127 -227
- package/components/thinking/src/index.vue.d.ts +22 -2044
- package/components/typing-markdown/index.cjs +1 -0
- package/components/typing-markdown/index.mjs +61 -201
- package/components/typing-markdown/src/index.vue.d.ts +3 -2
- package/components/vditor/index.cjs +1 -0
- package/components/vditor/index.mjs +121 -195
- package/components/vditor/src/ctx.d.ts +2 -2
- package/components/vditor/src/handle-fullscreen.vue.d.ts +3 -2
- package/components/vditor/src/handle-value.vue.d.ts +3 -2
- package/components/vditor/src/index.vue.d.ts +5 -4
- package/components/xgplayer/index.cjs +1 -0
- package/components/xgplayer/index.mjs +49 -90
- package/components/xgplayer/src/core.vue.d.ts +13 -18
- package/components/xgplayer/src/index.vue.d.ts +13 -67
- package/composables/el-breakpoints/index.cjs +1 -0
- package/composables/el-breakpoints/index.d.ts +10 -10
- package/composables/el-breakpoints/index.mjs +10 -12
- package/composables/index.cjs +1 -0
- package/composables/index.d.ts +1 -0
- package/composables/recorder/index.cjs +1 -0
- package/composables/recorder/index.mjs +9172 -14803
- package/element/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/element/bubble/index.cjs +3 -0
- package/element/bubble/index.d.ts +1 -1
- package/element/bubble/index.mjs +1 -1
- package/element/bubble/src/index.vue.d.ts +22 -22
- package/element/index.css +1 -1
- package/element/thinking/index.cjs +1 -0
- package/element/thinking/index.d.ts +1 -1
- package/element/thinking/index.mjs +1 -1
- package/element/thinking/src/index.vue.d.ts +26 -26
- package/element/thinking/src/types.d.ts +10 -0
- package/icons/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/icons/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/icons/end/index.cjs +1 -0
- package/icons/end/index.mjs +21 -26
- package/icons/end/src/index.vue.d.ts +3 -0
- package/icons/keyboard/index.cjs +1 -0
- package/icons/keyboard/index.mjs +21 -26
- package/icons/keyboard/src/index.vue.d.ts +3 -0
- package/icons/start/index.cjs +1 -0
- package/icons/start/index.mjs +21 -26
- package/icons/start/src/index.vue.d.ts +3 -0
- package/icons/voice/index.cjs +1 -0
- package/icons/voice/index.mjs +26 -44
- package/icons/voice/src/index.vue.d.ts +2 -3
- package/index.css +2 -558
- package/index.d.ts +1 -0
- package/package.json +78 -87
- package/shared/data/index.cjs +1 -0
- package/shared/data/index.mjs +16 -22
- package/shared/types/index.cjs +1 -0
- package/shared/types/index.d.ts +1 -0
- package/components/LinkOutlined.mjs +0 -1321
- package/components/_commonjsHelpers.mjs +0 -7
- package/components/_plugin-vue_export-helper.mjs +0 -9
- package/components/bubble-list/index.css +0 -70
- package/components/bubble-templates/index.css +0 -4
- package/components/chat-independent/index.css +0 -47
- package/components/drawer/index.css +0 -124
- package/components/index2.mjs +0 -78
- package/components/lottie-animation/index.css +0 -4
- package/components/monaco-editor/index.css +0 -4
- package/components/pixi-frame/index.css +0 -4
- package/components/recorder-button/index.css +0 -69
- package/components/sender/index.css +0 -22
- package/components/speech-button/index.css +0 -10
- package/components/tables-v1/index.css +0 -7
- package/components/tables-v1-checkbox/index.css +0 -8
- package/components/thinking/index.css +0 -125
- package/components/typing-markdown/index.css +0 -31
- package/components/vditor/index.css +0 -12
- package/components/xgplayer/index.css +0 -1
- package/icons/_plugin-vue_export-helper.mjs +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/components/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("lottie-web"),l=require("../_plugin-vue_export-helper-BHFhmbuH.js"),s={path:{type:String,default:""}},u={load:t=>t},c=e.defineComponent({name:"VkLottieAnimation",props:s,emits:u,setup(t,{emit:r}){const n=e.ref();return e.onMounted(()=>{const i=a.loadAnimation({container:n.value,renderer:"svg",loop:!0,autoplay:!0,path:t.path});i.addEventListener("complete",()=>{r("load",{animation:i})})}),{lottieNode:n}}}),d={ref:"lottieNode",class:"vk-lottie-animation"};function p(t,r,n,i,_,f){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",d,null,512),e.renderSlot(t.$slots,"default")],64)}const o=l._export_sfc(c,[["render",p]]),m=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));o.install=t=>{t.component(o.name||"VkLottieAnimation",o)};exports.VkLottieAnimation=o;exports.__VkLottieAnimation=m;exports.default=o;
|
|
@@ -1,71 +1,52 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted
|
|
2
|
-
import
|
|
3
|
-
import { _
|
|
4
|
-
|
|
5
|
-
const props = {
|
|
1
|
+
import { defineComponent as i, ref as r, onMounted as l, createElementBlock as s, openBlock as p, Fragment as c, createElementVNode as m, renderSlot as d } from "vue";
|
|
2
|
+
import u from "lottie-web";
|
|
3
|
+
import { _ } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const f = {
|
|
6
5
|
path: {
|
|
7
6
|
type: String,
|
|
8
7
|
default: ""
|
|
9
8
|
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
var _sfc_main = defineComponent({
|
|
9
|
+
}, k = {
|
|
10
|
+
load: (t) => t
|
|
11
|
+
}, v = i({
|
|
16
12
|
name: "VkLottieAnimation",
|
|
17
|
-
props,
|
|
18
|
-
emits,
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
container:
|
|
13
|
+
props: f,
|
|
14
|
+
emits: k,
|
|
15
|
+
setup(t, { emit: a }) {
|
|
16
|
+
const e = r();
|
|
17
|
+
return l(() => {
|
|
18
|
+
const o = u.loadAnimation({
|
|
19
|
+
container: e.value,
|
|
24
20
|
renderer: "svg",
|
|
25
|
-
loop:
|
|
26
|
-
autoplay:
|
|
27
|
-
path:
|
|
21
|
+
loop: !0,
|
|
22
|
+
autoplay: !0,
|
|
23
|
+
path: t.path
|
|
28
24
|
});
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
o.addEventListener("complete", () => {
|
|
26
|
+
a("load", { animation: o });
|
|
31
27
|
});
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
lottieNode
|
|
28
|
+
}), {
|
|
29
|
+
lottieNode: e
|
|
35
30
|
};
|
|
36
31
|
}
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
const _hoisted_1 = {
|
|
32
|
+
}), g = {
|
|
40
33
|
ref: "lottieNode",
|
|
41
34
|
class: "vk-lottie-animation"
|
|
42
35
|
};
|
|
43
|
-
function
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
createElementVNode(
|
|
49
|
-
"div",
|
|
50
|
-
_hoisted_1,
|
|
51
|
-
null,
|
|
52
|
-
512
|
|
53
|
-
/* NEED_PATCH */
|
|
54
|
-
),
|
|
55
|
-
renderSlot(_ctx.$slots, "default")
|
|
56
|
-
],
|
|
57
|
-
64
|
|
58
|
-
/* STABLE_FRAGMENT */
|
|
59
|
-
);
|
|
36
|
+
function h(t, a, e, o, y, A) {
|
|
37
|
+
return p(), s(c, null, [
|
|
38
|
+
m("div", g, null, 512),
|
|
39
|
+
d(t.$slots, "default")
|
|
40
|
+
], 64);
|
|
60
41
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
42
|
+
const n = /* @__PURE__ */ _(v, [["render", h]]), S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
64
43
|
__proto__: null
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
44
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
45
|
+
n.install = (t) => {
|
|
46
|
+
t.component(n.name || "VkLottieAnimation", n);
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
n as VkLottieAnimation,
|
|
50
|
+
S as __VkLottieAnimation,
|
|
51
|
+
n as default
|
|
69
52
|
};
|
|
70
|
-
|
|
71
|
-
export { VkLottieAnimation, types as __VkLottieAnimation, VkLottieAnimation as default };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
declare const _default:
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
5
|
path: {
|
|
4
6
|
type: StringConstructor;
|
|
5
7
|
default: string;
|
|
@@ -18,4 +20,3 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
18
20
|
}>, {
|
|
19
21
|
path: string;
|
|
20
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
21
|
-
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("@vunk/plus/components/broadcasting-markdown"),m=require("@vunk/plus/components/pixi-frame"),M=require("@vunk/plus/shared/data"),T=require("@vunk/core/composables"),g=require("@vunk/core/shared"),o=require("@vunk/shared/enum"),f=require("sophontalk-services"),U={source:{type:String,default:""},textToSpeech:{type:Function,required:!0},modelUrl:{type:String,required:!0},datasetUrl:{type:String,required:!0},sourceUrl:{type:String,required:!0},status:{type:String,default:void 0},playAfterCache:{type:Number,default:100},disabled:{type:Boolean,default:!1}},V={"update:status":null},i=e.defineComponent({name:"VkMetahumanBroadcasting",inheritAttrs:!1,__name:"index",props:U,emits:V,setup(d,{emit:S}){const s=d,y=S,c=e.ref([]),v=new f.FeatureExtractor,u=new f.InferenceEngine({onFrame:q,onError(t){console.error("Inference engine error:",t)},onProgress:B}),b=u.createSilentFrameGenerator(),p=e.ref(o.TickerStatus.pending),l=e.ref([]),n=T.useModelComputed({default:o.TickerStatus.pending,key:"status"},s,y);e.onMounted(async()=>{const{dataset:t,zipBuffer:r}=await f.loadDataset({jsonUrl:s.datasetUrl,zipUrl:s.sourceUrl});u.init({modelPath:s.modelUrl,dataset:t,zipBuffer:r}),await u.when(),p.value=o.TickerStatus.play});async function h(t){if(t.blob)try{const r=await M.blobToAudioBuffer(t.blob),{dimensions:a,features:w}=await v.process(r);await u.when(),u.run({audioFeatures:w,audioDimensions:a,reset:!1})}catch(r){console.error("Error processing paragraph:",r)}}function k(){c.value.length&&(n.value=o.TickerStatus.stop,l.value.length=0)}function B(t,r){(r<s.playAfterCache&&t===r||t===s.playAfterCache)&&(n.value=o.TickerStatus.play)}function q(t){l.value.push(t)}return(t,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(F.VkBroadcastingMarkdown),e.mergeProps(t.$attrs,{status:e.unref(n),data:c.value,"text-to-speech":t.textToSpeech,source:t.source,processing:h,disabled:t.disabled,onSetData:r[0]||(r[0]=a=>e.unref(g.setData)(c.value,a)),onComplete:k}),{default:e.withCtx(({paragraphs:a})=>[e.renderSlot(t.$slots,"default",{paragraphs:a})]),_:3},16,["status","data","text-to-speech","source","disabled"]),e.createVNode(e.unref(m.VkPixiFrameBitmap),{status:e.unref(n),"onUpdate:status":r[1]||(r[1]=a=>e.isRef(n)?n.value=a:null),data:l.value,onSetData:r[2]||(r[2]=a=>e.unref(g.setData)(l.value,a))},null,8,["status","data"]),e.createVNode(e.unref(m.VkPixiFrameBitmapGenerator),{status:p.value,"onUpdate:status":r[3]||(r[3]=a=>p.value=a),generator:e.unref(b),visible:e.unref(n)!==e.unref(o.TickerStatus).playing},null,8,["status","generator","visible"])],64))}}),P=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));i.install=d=>{d.component(i.name||"VkMetahumanBroadcasting",i)};exports.VkMetahumanBroadcasting=i;exports.__VkMetahumanBroadcasting=P;exports.default=i;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted
|
|
2
|
-
import { VkBroadcastingMarkdown } from
|
|
3
|
-
import { VkPixiFrameBitmap, VkPixiFrameBitmapGenerator } from
|
|
4
|
-
import { blobToAudioBuffer } from
|
|
5
|
-
import { useModelComputed } from
|
|
6
|
-
import { setData } from
|
|
7
|
-
import { TickerStatus } from
|
|
8
|
-
import { FeatureExtractor, InferenceEngine, loadDataset } from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const props = {
|
|
1
|
+
import { defineComponent as U, ref as m, onMounted as C, createElementBlock as M, openBlock as P, Fragment as V, createVNode as f, unref as r, mergeProps as x, withCtx as D, renderSlot as A, isRef as E } from "vue";
|
|
2
|
+
import { VkBroadcastingMarkdown as T } from "@vunk/plus/components/broadcasting-markdown";
|
|
3
|
+
import { VkPixiFrameBitmap as q, VkPixiFrameBitmapGenerator as j } from "@vunk/plus/components/pixi-frame";
|
|
4
|
+
import { blobToAudioBuffer as z } from "@vunk/plus/shared/data";
|
|
5
|
+
import { useModelComputed as G } from "@vunk/core/composables";
|
|
6
|
+
import { setData as g } from "@vunk/core/shared";
|
|
7
|
+
import { TickerStatus as s } from "@vunk/shared/enum";
|
|
8
|
+
import { FeatureExtractor as I, InferenceEngine as N, loadDataset as O } from "sophontalk-services";
|
|
9
|
+
const $ = {
|
|
12
10
|
/**
|
|
13
11
|
* @description 传入文本
|
|
14
12
|
*/
|
|
@@ -21,28 +19,28 @@ const props = {
|
|
|
21
19
|
*/
|
|
22
20
|
textToSpeech: {
|
|
23
21
|
type: Function,
|
|
24
|
-
required:
|
|
22
|
+
required: !0
|
|
25
23
|
},
|
|
26
24
|
/**
|
|
27
25
|
* @description 模型地址
|
|
28
26
|
*/
|
|
29
27
|
modelUrl: {
|
|
30
28
|
type: String,
|
|
31
|
-
required:
|
|
29
|
+
required: !0
|
|
32
30
|
},
|
|
33
31
|
/**
|
|
34
32
|
* @description 数据集地址
|
|
35
33
|
*/
|
|
36
34
|
datasetUrl: {
|
|
37
35
|
type: String,
|
|
38
|
-
required:
|
|
36
|
+
required: !0
|
|
39
37
|
},
|
|
40
38
|
/**
|
|
41
39
|
* @description zip 资源包地址
|
|
42
40
|
*/
|
|
43
41
|
sourceUrl: {
|
|
44
42
|
type: String,
|
|
45
|
-
required:
|
|
43
|
+
required: !0
|
|
46
44
|
},
|
|
47
45
|
/**
|
|
48
46
|
* @description 播报状态
|
|
@@ -61,147 +59,98 @@ const props = {
|
|
|
61
59
|
},
|
|
62
60
|
disabled: {
|
|
63
61
|
type: Boolean,
|
|
64
|
-
default:
|
|
62
|
+
default: !1
|
|
65
63
|
}
|
|
66
|
-
}
|
|
67
|
-
const emits = {
|
|
64
|
+
}, R = {
|
|
68
65
|
"update:status": null
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
...{
|
|
73
|
-
name: "VkMetahumanBroadcasting",
|
|
74
|
-
inheritAttrs: false
|
|
75
|
-
},
|
|
66
|
+
}, c = /* @__PURE__ */ U({
|
|
67
|
+
name: "VkMetahumanBroadcasting",
|
|
68
|
+
inheritAttrs: !1,
|
|
76
69
|
__name: "index",
|
|
77
|
-
props:
|
|
78
|
-
emits,
|
|
79
|
-
setup(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const extractor = new FeatureExtractor();
|
|
85
|
-
const engine = new InferenceEngine({
|
|
86
|
-
onFrame,
|
|
87
|
-
onError(error) {
|
|
88
|
-
console.error("Inference engine error:", error);
|
|
70
|
+
props: $,
|
|
71
|
+
emits: R,
|
|
72
|
+
setup(l, { emit: y }) {
|
|
73
|
+
const n = l, h = y, p = m([]), v = new I(), u = new N({
|
|
74
|
+
onFrame: w,
|
|
75
|
+
onError(e) {
|
|
76
|
+
console.error("Inference engine error:", e);
|
|
89
77
|
},
|
|
90
|
-
onProgress
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
const slientFrameStatus = ref(TickerStatus.pending);
|
|
94
|
-
const frames = ref([]);
|
|
95
|
-
const frameStatus = useModelComputed({
|
|
96
|
-
default: TickerStatus.pending,
|
|
78
|
+
onProgress: k
|
|
79
|
+
}), b = u.createSilentFrameGenerator(), d = m(s.pending), i = m([]), o = G({
|
|
80
|
+
default: s.pending,
|
|
97
81
|
key: "status"
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
const { dataset, zipBuffer } = await
|
|
101
|
-
jsonUrl:
|
|
102
|
-
zipUrl:
|
|
82
|
+
}, n, h);
|
|
83
|
+
C(async () => {
|
|
84
|
+
const { dataset: e, zipBuffer: t } = await O({
|
|
85
|
+
jsonUrl: n.datasetUrl,
|
|
86
|
+
zipUrl: n.sourceUrl
|
|
103
87
|
});
|
|
104
|
-
|
|
105
|
-
modelPath:
|
|
106
|
-
dataset,
|
|
107
|
-
zipBuffer
|
|
108
|
-
});
|
|
109
|
-
await engine.when();
|
|
110
|
-
slientFrameStatus.value = TickerStatus.play;
|
|
88
|
+
u.init({
|
|
89
|
+
modelPath: n.modelUrl,
|
|
90
|
+
dataset: e,
|
|
91
|
+
zipBuffer: t
|
|
92
|
+
}), await u.when(), d.value = s.play;
|
|
111
93
|
});
|
|
112
|
-
async function
|
|
113
|
-
if (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
});
|
|
125
|
-
} catch (error) {
|
|
126
|
-
console.error("Error processing paragraph:", error);
|
|
127
|
-
}
|
|
94
|
+
async function S(e) {
|
|
95
|
+
if (e.blob)
|
|
96
|
+
try {
|
|
97
|
+
const t = await z(e.blob), { dimensions: a, features: F } = await v.process(t);
|
|
98
|
+
await u.when(), u.run({
|
|
99
|
+
audioFeatures: F,
|
|
100
|
+
audioDimensions: a,
|
|
101
|
+
reset: !1
|
|
102
|
+
});
|
|
103
|
+
} catch (t) {
|
|
104
|
+
console.error("Error processing paragraph:", t);
|
|
105
|
+
}
|
|
128
106
|
}
|
|
129
|
-
function
|
|
130
|
-
|
|
131
|
-
frameStatus.value = TickerStatus.stop;
|
|
132
|
-
frames.value.length = 0;
|
|
133
|
-
}
|
|
107
|
+
function B() {
|
|
108
|
+
p.value.length && (o.value = s.stop, i.value.length = 0);
|
|
134
109
|
}
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
frameStatus.value = TickerStatus.play;
|
|
138
|
-
}
|
|
110
|
+
function k(e, t) {
|
|
111
|
+
(t < n.playAfterCache && e === t || e === n.playAfterCache) && (o.value = s.play);
|
|
139
112
|
}
|
|
140
|
-
function
|
|
141
|
-
|
|
113
|
+
function w(e) {
|
|
114
|
+
i.value.push(e);
|
|
142
115
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
} };
|
|
154
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
155
|
-
return __returned__;
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
160
|
-
return openBlock(), createElementBlock(
|
|
161
|
-
Fragment,
|
|
162
|
-
null,
|
|
163
|
-
[
|
|
164
|
-
createVNode($setup["VkBroadcastingMarkdown"], mergeProps(_ctx.$attrs, {
|
|
165
|
-
status: $setup.frameStatus,
|
|
166
|
-
data: $setup.paragraphData,
|
|
167
|
-
"text-to-speech": _ctx.textToSpeech,
|
|
168
|
-
source: _ctx.source,
|
|
169
|
-
processing: $setup.processingParagraph,
|
|
170
|
-
disabled: _ctx.disabled,
|
|
171
|
-
onSetData: _cache[0] || (_cache[0] = ($event) => $setup.setData($setup.paragraphData, $event)),
|
|
172
|
-
onComplete: $setup.allParagraphCompleted
|
|
116
|
+
return (e, t) => (P(), M(V, null, [
|
|
117
|
+
f(r(T), x(e.$attrs, {
|
|
118
|
+
status: r(o),
|
|
119
|
+
data: p.value,
|
|
120
|
+
"text-to-speech": e.textToSpeech,
|
|
121
|
+
source: e.source,
|
|
122
|
+
processing: S,
|
|
123
|
+
disabled: e.disabled,
|
|
124
|
+
onSetData: t[0] || (t[0] = (a) => r(g)(p.value, a)),
|
|
125
|
+
onComplete: B
|
|
173
126
|
}), {
|
|
174
|
-
default:
|
|
175
|
-
|
|
127
|
+
default: D(({ paragraphs: a }) => [
|
|
128
|
+
A(e.$slots, "default", { paragraphs: a })
|
|
176
129
|
]),
|
|
177
130
|
_: 3
|
|
178
|
-
/* FORWARDED */
|
|
179
131
|
}, 16, ["status", "data", "text-to-speech", "source", "disabled"]),
|
|
180
|
-
|
|
181
|
-
status:
|
|
182
|
-
"onUpdate:status":
|
|
183
|
-
data:
|
|
184
|
-
onSetData:
|
|
132
|
+
f(r(q), {
|
|
133
|
+
status: r(o),
|
|
134
|
+
"onUpdate:status": t[1] || (t[1] = (a) => E(o) ? o.value = a : null),
|
|
135
|
+
data: i.value,
|
|
136
|
+
onSetData: t[2] || (t[2] = (a) => r(g)(i.value, a))
|
|
185
137
|
}, null, 8, ["status", "data"]),
|
|
186
|
-
|
|
187
|
-
status:
|
|
188
|
-
"onUpdate:status":
|
|
189
|
-
generator:
|
|
190
|
-
visible:
|
|
138
|
+
f(r(j), {
|
|
139
|
+
status: d.value,
|
|
140
|
+
"onUpdate:status": t[3] || (t[3] = (a) => d.value = a),
|
|
141
|
+
generator: r(b),
|
|
142
|
+
visible: r(o) !== r(s).playing
|
|
191
143
|
}, null, 8, ["status", "generator", "visible"])
|
|
192
|
-
],
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
var VkMetahumanBroadcasting = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/metahuman-broadcasting/src/index.vue"]]);
|
|
198
|
-
|
|
199
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
144
|
+
], 64));
|
|
145
|
+
}
|
|
146
|
+
}), Z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
200
147
|
__proto__: null
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
148
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
149
|
+
c.install = (l) => {
|
|
150
|
+
l.component(c.name || "VkMetahumanBroadcasting", c);
|
|
151
|
+
};
|
|
152
|
+
export {
|
|
153
|
+
c as VkMetahumanBroadcasting,
|
|
154
|
+
Z as __VkMetahumanBroadcasting,
|
|
155
|
+
c as default
|
|
205
156
|
};
|
|
206
|
-
|
|
207
|
-
export { VkMetahumanBroadcasting, types as __VkMetahumanBroadcasting, VkMetahumanBroadcasting as default };
|