@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";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@vunk/core/components/strategy-renderer"),e=require("vue"),u=require("@vunk/markdown"),o="vk-bubble-template-renderer",{Templates:b,Template:n,Data:s,Renderer:c,useData:d}=l.createStrategyRenderer(o),t=e.defineComponent({name:"VkBubbleTemplates",__name:"index",props:{markdownProps:{type:Object,default:()=>({containers:["thinking","echarts"]})}},setup(r){return(k,m)=>(e.openBlock(),e.createBlock(e.unref(n),{type:"VkMarkdown"},{default:e.withCtx(({props:a})=>[e.createVNode(e.unref(u.VkMarkdown),e.mergeProps({source:a.content},r.markdownProps),null,16,["source"])]),_:1}))}}),p=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));t.install=r=>{r.component(t.name||"VkBubbleTemplates",t)};exports.VkBubbleData=s;exports.VkBubbleRenderTemplate=n;exports.VkBubbleRenderTemplates=b;exports.VkBubbleRenderer=c;exports.VkBubbleTemplates=t;exports.__VkBubbleTemplates=p;exports.default=t;exports.useBubbleData=d;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import { createStrategyRenderer } from
|
|
2
|
-
import { defineComponent, openBlock,
|
|
3
|
-
import { VkMarkdown } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
useData: useBubbleData
|
|
13
|
-
} = createStrategyRenderer(key);
|
|
14
|
-
|
|
15
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
|
-
...{
|
|
17
|
-
name: "VkBubbleTemplates"
|
|
18
|
-
},
|
|
1
|
+
import { createStrategyRenderer as n } from "@vunk/core/components/strategy-renderer";
|
|
2
|
+
import { defineComponent as o, createBlock as l, openBlock as p, unref as r, withCtx as s, createVNode as b, mergeProps as m } from "vue";
|
|
3
|
+
import { VkMarkdown as u } from "@vunk/markdown";
|
|
4
|
+
const c = "vk-bubble-template-renderer", {
|
|
5
|
+
Templates: V,
|
|
6
|
+
Template: k,
|
|
7
|
+
Data: T,
|
|
8
|
+
Renderer: y,
|
|
9
|
+
useData: g
|
|
10
|
+
} = n(c), t = /* @__PURE__ */ o({
|
|
11
|
+
name: "VkBubbleTemplates",
|
|
19
12
|
__name: "index",
|
|
20
13
|
props: {
|
|
21
14
|
markdownProps: {
|
|
@@ -25,37 +18,29 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
18
|
})
|
|
26
19
|
}
|
|
27
20
|
},
|
|
28
|
-
setup(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
21
|
+
setup(e) {
|
|
22
|
+
return (d, i) => (p(), l(r(k), { type: "VkMarkdown" }, {
|
|
23
|
+
default: s(({ props: a }) => [
|
|
24
|
+
b(r(u), m({
|
|
25
|
+
source: a.content
|
|
26
|
+
}, e.markdownProps), null, 16, ["source"])
|
|
27
|
+
]),
|
|
28
|
+
_: 1
|
|
29
|
+
}));
|
|
37
30
|
}
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
41
|
-
return openBlock(), createBlock($setup["VkBubbleRenderTemplate"], { type: "VkMarkdown" }, {
|
|
42
|
-
default: withCtx(({ props }) => [
|
|
43
|
-
createVNode($setup["VkMarkdown"], mergeProps({
|
|
44
|
-
source: props.content
|
|
45
|
-
}, $props.markdownProps), null, 16, ["source"])
|
|
46
|
-
]),
|
|
47
|
-
_: 1
|
|
48
|
-
/* STABLE */
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
var VkBubbleTemplates = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/bubble-templates/src/index.vue"]]);
|
|
52
|
-
|
|
53
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
31
|
+
}), w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
54
32
|
__proto__: null
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
33
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
34
|
+
t.install = (e) => {
|
|
35
|
+
e.component(t.name || "VkBubbleTemplates", t);
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
T as VkBubbleData,
|
|
39
|
+
k as VkBubbleRenderTemplate,
|
|
40
|
+
V as VkBubbleRenderTemplates,
|
|
41
|
+
y as VkBubbleRenderer,
|
|
42
|
+
t as VkBubbleTemplates,
|
|
43
|
+
w as __VkBubbleTemplates,
|
|
44
|
+
t as default,
|
|
45
|
+
g as useBubbleData
|
|
59
46
|
};
|
|
60
|
-
|
|
61
|
-
export { VkBubbleData, VkBubbleRenderTemplate, VkBubbleRenderTemplates, VkBubbleRenderer, VkBubbleTemplates, types as __VkBubbleTemplates, VkBubbleTemplates as default, useBubbleData };
|
|
@@ -1,235 +1,13 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { MarkdownProps } from './types';
|
|
3
|
-
declare const
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
4
|
markdownProps: {
|
|
5
5
|
type: PropType<Partial<MarkdownProps>>;
|
|
6
6
|
default: () => {
|
|
7
7
|
containers: string[];
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
}>, {
|
|
11
|
-
readonly VkMarkdown: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
12
|
-
source: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
default: string;
|
|
15
|
-
};
|
|
16
|
-
containers: {
|
|
17
|
-
type: {
|
|
18
|
-
(arrayLength: number): string[];
|
|
19
|
-
(...items: string[]): string[];
|
|
20
|
-
new (arrayLength: number): string[];
|
|
21
|
-
new (...items: string[]): string[];
|
|
22
|
-
isArray(arg: any): arg is any[];
|
|
23
|
-
readonly prototype: any[];
|
|
24
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
25
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
26
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
27
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
28
|
-
of<T>(...items: T[]): T[];
|
|
29
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
30
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
31
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
32
|
-
};
|
|
33
|
-
default: () => string[];
|
|
34
|
-
};
|
|
35
|
-
fences: {
|
|
36
|
-
type: {
|
|
37
|
-
(arrayLength: number): string[];
|
|
38
|
-
(...items: string[]): string[];
|
|
39
|
-
new (arrayLength: number): string[];
|
|
40
|
-
new (...items: string[]): string[];
|
|
41
|
-
isArray(arg: any): arg is any[];
|
|
42
|
-
readonly prototype: any[];
|
|
43
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
44
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
45
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
46
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
47
|
-
of<T>(...items: T[]): T[];
|
|
48
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
49
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
50
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
51
|
-
};
|
|
52
|
-
default: () => string[];
|
|
53
|
-
};
|
|
54
|
-
tags: {
|
|
55
|
-
type: {
|
|
56
|
-
(arrayLength: number): string[];
|
|
57
|
-
(...items: string[]): string[];
|
|
58
|
-
new (arrayLength: number): string[];
|
|
59
|
-
new (...items: string[]): string[];
|
|
60
|
-
isArray(arg: any): arg is any[];
|
|
61
|
-
readonly prototype: any[];
|
|
62
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
63
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
64
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
65
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
66
|
-
of<T>(...items: T[]): T[];
|
|
67
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
68
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
69
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
70
|
-
};
|
|
71
|
-
default: () => never[];
|
|
72
|
-
};
|
|
73
|
-
markdownItOptions: {
|
|
74
|
-
type: import("vue").PropType<import("markdown-it").Options>;
|
|
75
|
-
default: () => {};
|
|
76
|
-
};
|
|
77
|
-
markdownItSetup: {
|
|
78
|
-
type: import("vue").PropType<import("@vunk/shared").AnyFunc>;
|
|
79
|
-
default: import("@vunk/shared").AnyFunc;
|
|
80
|
-
};
|
|
81
|
-
dev: {
|
|
82
|
-
type: BooleanConstructor;
|
|
83
|
-
default: boolean;
|
|
84
|
-
};
|
|
85
|
-
}>, {
|
|
86
|
-
items: import("vue").ComputedRef<import("@vunk/markdown/components/markdown/src/types").RendererToken[]>;
|
|
87
|
-
handlelog: () => void;
|
|
88
|
-
md: import("markdown-it");
|
|
89
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
90
|
-
source: {
|
|
91
|
-
type: StringConstructor;
|
|
92
|
-
default: string;
|
|
93
|
-
};
|
|
94
|
-
containers: {
|
|
95
|
-
type: {
|
|
96
|
-
(arrayLength: number): string[];
|
|
97
|
-
(...items: string[]): string[];
|
|
98
|
-
new (arrayLength: number): string[];
|
|
99
|
-
new (...items: string[]): string[];
|
|
100
|
-
isArray(arg: any): arg is any[];
|
|
101
|
-
readonly prototype: any[];
|
|
102
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
103
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
104
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
105
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
106
|
-
of<T>(...items: T[]): T[];
|
|
107
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
108
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
109
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
110
|
-
};
|
|
111
|
-
default: () => string[];
|
|
112
|
-
};
|
|
113
|
-
fences: {
|
|
114
|
-
type: {
|
|
115
|
-
(arrayLength: number): string[];
|
|
116
|
-
(...items: string[]): string[];
|
|
117
|
-
new (arrayLength: number): string[];
|
|
118
|
-
new (...items: string[]): string[];
|
|
119
|
-
isArray(arg: any): arg is any[];
|
|
120
|
-
readonly prototype: any[];
|
|
121
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
122
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
123
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
124
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
125
|
-
of<T>(...items: T[]): T[];
|
|
126
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
127
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
128
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
129
|
-
};
|
|
130
|
-
default: () => string[];
|
|
131
|
-
};
|
|
132
|
-
tags: {
|
|
133
|
-
type: {
|
|
134
|
-
(arrayLength: number): string[];
|
|
135
|
-
(...items: string[]): string[];
|
|
136
|
-
new (arrayLength: number): string[];
|
|
137
|
-
new (...items: string[]): string[];
|
|
138
|
-
isArray(arg: any): arg is any[];
|
|
139
|
-
readonly prototype: any[];
|
|
140
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
141
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
142
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
143
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
144
|
-
of<T>(...items: T[]): T[];
|
|
145
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
146
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
147
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
148
|
-
};
|
|
149
|
-
default: () => never[];
|
|
150
|
-
};
|
|
151
|
-
markdownItOptions: {
|
|
152
|
-
type: import("vue").PropType<import("markdown-it").Options>;
|
|
153
|
-
default: () => {};
|
|
154
|
-
};
|
|
155
|
-
markdownItSetup: {
|
|
156
|
-
type: import("vue").PropType<import("@vunk/shared").AnyFunc>;
|
|
157
|
-
default: import("@vunk/shared").AnyFunc;
|
|
158
|
-
};
|
|
159
|
-
dev: {
|
|
160
|
-
type: BooleanConstructor;
|
|
161
|
-
default: boolean;
|
|
162
|
-
};
|
|
163
|
-
}>> & Readonly<{}>, {
|
|
164
|
-
source: string;
|
|
165
|
-
containers: string[];
|
|
166
|
-
fences: string[];
|
|
167
|
-
tags: string[];
|
|
168
|
-
markdownItOptions: import("markdown-it").Options;
|
|
169
|
-
markdownItSetup: import("@vunk/shared").AnyFunc;
|
|
170
|
-
dev: boolean;
|
|
171
|
-
}, {}, {
|
|
172
|
-
VkRenderer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
173
|
-
source: {
|
|
174
|
-
type: import("vue").PropType<import("@vunk/core/components/renderer/src/types").SourceItem[]>;
|
|
175
|
-
default: () => any[];
|
|
176
|
-
};
|
|
177
|
-
templateInstances: {
|
|
178
|
-
type: import("vue").PropType<Record<string, import("vue").ComponentInternalInstance>>;
|
|
179
|
-
default: any;
|
|
180
|
-
};
|
|
181
|
-
k: {
|
|
182
|
-
type: import("vue").PropType<(string | number)[]>;
|
|
183
|
-
default: () => any[];
|
|
184
|
-
};
|
|
185
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
186
|
-
[key: string]: any;
|
|
187
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
188
|
-
source: {
|
|
189
|
-
type: import("vue").PropType<import("@vunk/core/components/renderer/src/types").SourceItem[]>;
|
|
190
|
-
default: () => any[];
|
|
191
|
-
};
|
|
192
|
-
templateInstances: {
|
|
193
|
-
type: import("vue").PropType<Record<string, import("vue").ComponentInternalInstance>>;
|
|
194
|
-
default: any;
|
|
195
|
-
};
|
|
196
|
-
k: {
|
|
197
|
-
type: import("vue").PropType<(string | number)[]>;
|
|
198
|
-
default: () => any[];
|
|
199
|
-
};
|
|
200
|
-
}>> & Readonly<{}>, {
|
|
201
|
-
source: import("@vunk/core/components/renderer/src/types").SourceItem[];
|
|
202
|
-
templateInstances: Record<string, import("vue").ComponentInternalInstance>;
|
|
203
|
-
k: (string | number)[];
|
|
204
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
205
|
-
VkTemplatesDefault: {
|
|
206
|
-
new (...args: any[]): any;
|
|
207
|
-
__isFragment?: never;
|
|
208
|
-
__isTeleport?: never;
|
|
209
|
-
__isSuspense?: never;
|
|
210
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<Record<string | symbol, any>>>, Record<string | symbol, any>, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
211
|
-
[x: string]: any;
|
|
212
|
-
[x: symbol]: any;
|
|
213
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
214
|
-
install(app: import("vue").App): void;
|
|
215
|
-
};
|
|
216
|
-
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
217
|
-
readonly VkBubbleRenderTemplate: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
218
|
-
type: {
|
|
219
|
-
type: StringConstructor;
|
|
220
|
-
required: boolean;
|
|
221
|
-
default: string;
|
|
222
|
-
};
|
|
223
|
-
}>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
224
|
-
type: {
|
|
225
|
-
type: StringConstructor;
|
|
226
|
-
required: boolean;
|
|
227
|
-
default: string;
|
|
228
|
-
};
|
|
229
|
-
}>> & Readonly<{}>, {
|
|
230
|
-
type: string;
|
|
231
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
232
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
233
11
|
markdownProps: {
|
|
234
12
|
type: PropType<Partial<MarkdownProps>>;
|
|
235
13
|
default: () => {
|
|
@@ -239,4 +17,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
239
17
|
}>> & Readonly<{}>, {
|
|
240
18
|
markdownProps: Partial<MarkdownProps>;
|
|
241
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
242
21
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var N=Object.create;var T=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var A=(t,r,u,b)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of E(r))!j.call(t,l)&&l!==u&&T(t,l,{get:()=>r[l],enumerable:!(b=q(r,l))||b.enumerable});return t};var I=(t,r,u)=>(u=t!=null?N(R(t)):{},A(r||!t||!t.__esModule?T(u,"default",{value:t,enumerable:!0}):u,t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),L=require("@vunk/plus/components/agent-chat-provider"),O=require("@vunk/plus/components/bubble-list"),P=require("@vunk/plus/components/bubble-templates"),$=require("@vunk/plus/components/sender"),z=require("@vunk/plus/icons/keyboard"),F=require("@vunk/plus/icons/voice"),M=require("@vunk/core"),_=require("@vunk/core/composables"),K=require("@vunk/shared/object"),U=require("@vunk/shared/promise");var a=(t=>(t.Voice="voice",t.Text="text",t))(a||{});const G={data:{type:Object},speechToText:{type:Function},textToSpeech:{type:Function}},H={setData:t=>t},J={class:"vk-chat-independent"},Q={class:"vk-chat-independent-main__bubbles"},W={class:"vk-chat-independent-footer"},X={class:"vk-chat-independent-background"},d=e.defineComponent({name:"VkChatIndependent",__name:"index",props:G,emits:H,setup(t,{emit:r}){const u=t,b=r,l=e.defineAsyncComponent(()=>import("@vunk/plus/components/recorder-button")),[i,y]=_.useDataComputed({},u,b),f=e.ref(),s=e.ref(a.Text),m=e.ref(""),h=_.useDeferred(),C=h.resolve,{simplicity:S}=L.useAgentChat(),{items:p,onRequest:g}=S,k=e.computed(()=>p.value.at(-1)),v=e.computed(()=>B(-1)),D=e.computed(()=>!!(k.value?.loading===!0||K.isNotEmptyObject(v.value)&&v.value.completed!==!0)),V=e.computed(()=>v.value.error===!0?!1:k.value?.loading===!0||v.value.completed===!1);function x(n){n&&(g(n),e.nextTick(()=>{m.value=""}),setTimeout(()=>{h.value?.scrollToBottom()},400))}function w(){const n=p.value.at(-1);n&&(n.abortController?.abort(),U.waiting(()=>i.value[n.key],60).then(o=>{o.elRef?.interrupt(),i.value[n.key].completed=!0}))}function B(n){const o=p.value.at(n);return o?.key&&i.value[o.key]?i.value[o.key]:{}}return(n,o)=>(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",{ref_key:"mainRef",ref:f,class:"vk-chat-independent-main"},[e.createVNode(e.unref(M.VkDuplex),{"with-flex":"one",class:"vk-chat-independent-main__duplex"},{one:e.withCtx(()=>[e.createVNode(e.unref(P.VkBubbleData),{data:e.unref(i),onSetData:e.unref(y)},{default:e.withCtx(()=>[e.createElementVNode("div",Q,[e.createVNode(e.unref(O.VkBubbleList),{"el-ref":e.unref(C),items:e.unref(p),"text-to-speech":n.textToSpeech},{renderer:e.withCtx(()=>[e.renderSlot(n.$slots,"bubble_renderer")]),footer:e.withCtx(c=>[e.renderSlot(n.$slots,"bubble_footer",e.normalizeProps(e.guardReactiveProps(c)))]),_:3},8,["el-ref","items","text-to-speech"])])]),_:3},8,["data","onSetData"])]),two:e.withCtx(()=>[e.createElementVNode("div",W,[n.speechToText?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createVNode(e.unref(z.VkKeyboardAvatar),{size:40,onClick:o[0]||(o[0]=c=>s.value=e.unref(a).Text)},null,512),[[e.vShow,s.value===e.unref(a).Voice]]),e.withDirectives(e.createVNode(e.unref(l),{"append-to":f.value,disabled:V.value,"speech-to-text":n.speechToText,"submit-to-text":!0,onSubmitText:x},null,8,["append-to","disabled","speech-to-text"]),[[e.vShow,s.value===e.unref(a).Voice]]),e.withDirectives(e.createVNode(e.unref(F.VkVoiceAvatar),{size:40,onClick:o[1]||(o[1]=c=>s.value=e.unref(a).Voice)},null,512),[[e.vShow,s.value===e.unref(a).Text]])],64)):e.createCommentVNode("",!0),e.withDirectives(e.createVNode(e.unref($.VkSender),{modelValue:m.value,"onUpdate:modelValue":o[2]||(o[2]=c=>m.value=c),placeholder:"请输入内容","send-disabled":V.value,loading:D.value,onSubmit:x,onCancel:w},null,8,["modelValue","send-disabled","loading"]),[[e.vShow,s.value===e.unref(a).Text]])])]),_:3})],512),e.createElementVNode("div",X,[e.renderSlot(n.$slots,"background")])]))}}),Y=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));d.install=t=>{t.component(d.name||"VkChatIndependent",d)};exports.VkChatIndependent=d;exports.__VkChatIndependent=Y;exports.default=d;
|