@vunk/plus 1.3.11 → 1.3.13
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/SharedSystems.mjs +3195 -0
- package/components/WebGLRenderer.mjs +3617 -0
- package/components/WebGPURenderer.mjs +2103 -0
- package/components/_commonjsHelpers.mjs +7 -0
- package/components/agent-chat-provider/src/types.d.ts +2 -1
- package/components/broadcasting-markdown/index.d.ts +2 -0
- package/components/broadcasting-markdown/index.mjs +238 -306
- package/components/broadcasting-markdown/src/const.d.ts +2 -7
- package/components/broadcasting-markdown/src/ctx.d.ts +28 -15
- package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +24 -44
- package/components/broadcasting-markdown/src/index.vue.d.ts +31 -167
- package/components/broadcasting-markdown/src/paragraph.vue.d.ts +1 -14
- package/components/broadcasting-markdown/src/types.d.ts +10 -2
- package/components/broadcasting-markdown/src/use.d.ts +18 -0
- package/components/browserAll.mjs +3187 -0
- package/components/bubble-list/index.mjs +2 -1
- package/components/bubble-list/src/index.vue.d.ts +27 -161
- package/components/bubble-templates/src/index.vue.d.ts +27 -161
- package/components/bubble-templates/src/types.d.ts +6 -0
- package/components/chat-independent/index.mjs +3 -0
- package/components/chat-independent/src/index.vue.d.ts +27 -161
- package/components/colorToUniform.mjs +266 -0
- package/components/index2.mjs +21220 -0
- package/components/init.mjs +3779 -0
- package/components/pixi-frame/index.css +4 -0
- package/components/pixi-frame/index.d.ts +8 -0
- package/components/pixi-frame/index.mjs +6 -0
- package/components/pixi-frame/src/core.vue.d.ts +122 -0
- package/components/pixi-frame/src/ctx.d.ts +40 -0
- package/components/pixi-frame/src/index.vue.d.ts +215 -0
- package/components/pixi-frame/src/provider.vue.d.ts +2 -0
- package/components/pixi-frame/src/types.d.ts +1 -0
- package/components/pixi-frame/src/use.d.ts +3 -0
- package/components/pixi-frame/src/view.vue.d.ts +25 -0
- package/components/tables-v1/src/ctx.d.ts +1 -1
- package/components/tables-v1/src/el-ctx.d.ts +1 -1
- package/components/tables-v1-checkbox/src/ctx.d.ts +1 -1
- package/components/tables-v1-checkbox/src/index.vue.d.ts +1 -1
- package/components/webworkerAll.mjs +8 -0
- package/index.css +5 -4
- package/package.json +8 -4
- package/components/broadcasting-markdown/index.css +0 -3
- package/components/broadcasting-markdown/src/custom-speech.vue.d.ts +0 -117
- package/components/broadcasting-markdown/src/web-speech.vue.d.ts +0 -110
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TickerStatus } from '@vunk/shared/enum';
|
|
1
2
|
export declare function defaultRender(mdText: string): string;
|
|
2
3
|
export declare enum ParagraphStatus {
|
|
3
4
|
initial = "initial",
|
|
@@ -9,10 +10,4 @@ export declare enum ParagraphStatus {
|
|
|
9
10
|
fulfilled = "fulfilled",
|
|
10
11
|
rejected = "rejected"
|
|
11
12
|
}
|
|
12
|
-
export declare
|
|
13
|
-
initial = "initial",
|
|
14
|
-
playing = "playing",
|
|
15
|
-
ended = "ended",
|
|
16
|
-
paused = "paused",
|
|
17
|
-
failed = "failed"
|
|
18
|
-
}
|
|
13
|
+
export declare const Broadcast: typeof TickerStatus;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SetDataEvent } from '@vunk/core';
|
|
2
|
+
import type { Deferred } from '@vunk/shared/promise';
|
|
2
3
|
import type { PropType } from 'vue';
|
|
3
|
-
import type { Paragraph, TextToSpeech } from './types';
|
|
4
|
+
import type { Paragraph, ParagraphLoadEvent, TextToSpeech } from './types';
|
|
4
5
|
import { defaultRender } from './const';
|
|
5
6
|
export declare const props: {
|
|
6
7
|
/**
|
|
@@ -64,13 +65,6 @@ export declare const props: {
|
|
|
64
65
|
};
|
|
65
66
|
default: () => string[];
|
|
66
67
|
};
|
|
67
|
-
/**
|
|
68
|
-
* @description 暂停的
|
|
69
|
-
*/
|
|
70
|
-
pause: {
|
|
71
|
-
type: BooleanConstructor;
|
|
72
|
-
default: boolean;
|
|
73
|
-
};
|
|
74
68
|
/**
|
|
75
69
|
* @description 组件内会根据当前游标是否和 source 长度一致来判断,是否持续阅读, 当一致时,会关闭阅读状态。但若设置为 true,则会持续阅读, 这在动态接收数据时会有用
|
|
76
70
|
*/
|
|
@@ -78,13 +72,6 @@ export declare const props: {
|
|
|
78
72
|
type: BooleanConstructor;
|
|
79
73
|
default: boolean;
|
|
80
74
|
};
|
|
81
|
-
/**
|
|
82
|
-
* @description 是否使用 web speech api
|
|
83
|
-
*/
|
|
84
|
-
webSpeech: {
|
|
85
|
-
type: BooleanConstructor;
|
|
86
|
-
default: boolean;
|
|
87
|
-
};
|
|
88
75
|
/**
|
|
89
76
|
* @description 是否使用自定义语音合成
|
|
90
77
|
*/
|
|
@@ -92,6 +79,13 @@ export declare const props: {
|
|
|
92
79
|
type: PropType<TextToSpeech>;
|
|
93
80
|
default: undefined;
|
|
94
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* @description 段落处理函数
|
|
84
|
+
*/
|
|
85
|
+
processing: {
|
|
86
|
+
type: PropType<(paragraph: Paragraph) => void>;
|
|
87
|
+
default: import("@vunk/shared").AnyFunc;
|
|
88
|
+
};
|
|
95
89
|
};
|
|
96
90
|
export declare const emits: {
|
|
97
91
|
setData: (e: SetDataEvent) => SetDataEvent;
|
|
@@ -99,4 +93,23 @@ export declare const emits: {
|
|
|
99
93
|
'update:broadcasting': (_: boolean) => boolean;
|
|
100
94
|
'update:completed': (_: boolean) => boolean;
|
|
101
95
|
'update:error': (_: boolean) => boolean;
|
|
96
|
+
paragraphLoad: (_: ParagraphLoadEvent) => boolean;
|
|
97
|
+
};
|
|
98
|
+
export declare const paragraphProps: {
|
|
99
|
+
data: {
|
|
100
|
+
type: PropType<Paragraph>;
|
|
101
|
+
default: () => {};
|
|
102
|
+
};
|
|
103
|
+
deferred: {
|
|
104
|
+
type: PropType<Deferred<any>>;
|
|
105
|
+
required: true;
|
|
106
|
+
};
|
|
107
|
+
render: {
|
|
108
|
+
type: PropType<(text: string) => string>;
|
|
109
|
+
default: typeof defaultRender;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export declare const paragraphEmits: {
|
|
113
|
+
setData: (e: SetDataEvent<keyof Paragraph>) => SetDataEvent<keyof Paragraph>;
|
|
114
|
+
load: (_: ParagraphLoadEvent) => boolean;
|
|
102
115
|
};
|
|
@@ -1,71 +1,51 @@
|
|
|
1
|
-
import type { Deferred } from '@vunk/shared/promise';
|
|
2
|
-
import type { PropType } from 'vue';
|
|
3
|
-
import type { Paragraph } from './types';
|
|
4
1
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
2
|
data: {
|
|
6
|
-
type: PropType<Paragraph>;
|
|
3
|
+
type: import("vue").PropType<import("./types").Paragraph>;
|
|
7
4
|
default: () => {};
|
|
8
5
|
};
|
|
9
6
|
deferred: {
|
|
10
|
-
type: PropType<Deferred<any>>;
|
|
7
|
+
type: import("vue").PropType<import("@vunk/shared/promise").Deferred<any>>;
|
|
11
8
|
required: true;
|
|
12
9
|
};
|
|
13
|
-
pause: {
|
|
14
|
-
type: BooleanConstructor;
|
|
15
|
-
default: boolean;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @description 语音资源路径
|
|
19
|
-
*/
|
|
20
|
-
url: {
|
|
21
|
-
type: StringConstructor;
|
|
22
|
-
default: string;
|
|
23
|
-
};
|
|
24
10
|
render: {
|
|
25
|
-
type: PropType<(text: string) => string>;
|
|
26
|
-
|
|
11
|
+
type: import("vue").PropType<(text: string) => string>;
|
|
12
|
+
default: typeof import("./const").defaultRender;
|
|
27
13
|
};
|
|
28
|
-
}>, (() => null) | (() => JSX.Element), {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
}>, (() => null) | (() => JSX.Element), {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
setData: (e: import("@vunk/core").SetDataEvent<keyof import("./types").Paragraph>) => import("@vunk/core").SetDataEvent<keyof import("./types").Paragraph>;
|
|
16
|
+
load: (_: import("./types").ParagraphLoadEvent) => boolean;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
18
|
data: {
|
|
30
|
-
type: PropType<Paragraph>;
|
|
19
|
+
type: import("vue").PropType<import("./types").Paragraph>;
|
|
31
20
|
default: () => {};
|
|
32
21
|
};
|
|
33
22
|
deferred: {
|
|
34
|
-
type: PropType<Deferred<any>>;
|
|
23
|
+
type: import("vue").PropType<import("@vunk/shared/promise").Deferred<any>>;
|
|
35
24
|
required: true;
|
|
36
25
|
};
|
|
37
|
-
pause: {
|
|
38
|
-
type: BooleanConstructor;
|
|
39
|
-
default: boolean;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* @description 语音资源路径
|
|
43
|
-
*/
|
|
44
|
-
url: {
|
|
45
|
-
type: StringConstructor;
|
|
46
|
-
default: string;
|
|
47
|
-
};
|
|
48
26
|
render: {
|
|
49
|
-
type: PropType<(text: string) => string>;
|
|
50
|
-
|
|
27
|
+
type: import("vue").PropType<(text: string) => string>;
|
|
28
|
+
default: typeof import("./const").defaultRender;
|
|
51
29
|
};
|
|
52
|
-
}>> & Readonly<{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
30
|
+
}>> & Readonly<{
|
|
31
|
+
onSetData?: ((e: import("@vunk/core").SetDataEvent<keyof import("./types").Paragraph>) => any) | undefined;
|
|
32
|
+
onLoad?: ((_: import("./types").ParagraphLoadEvent) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
render: (text: string) => string;
|
|
35
|
+
data: import("./types").Paragraph;
|
|
56
36
|
}, {}, {
|
|
57
37
|
SpeechError: import("vue").DefineComponent<{}, {
|
|
58
38
|
readonly CloseBold: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
59
39
|
readonly ElIcon: import("element-plus/es/utils").SFCWithInstall<{
|
|
60
40
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
61
41
|
readonly size: {
|
|
62
|
-
readonly type: PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
42
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
63
43
|
readonly required: false;
|
|
64
44
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
65
45
|
__epPropKey: true;
|
|
66
46
|
};
|
|
67
47
|
readonly color: {
|
|
68
|
-
readonly type: PropType<string>;
|
|
48
|
+
readonly type: import("vue").PropType<string>;
|
|
69
49
|
readonly required: false;
|
|
70
50
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
71
51
|
__epPropKey: true;
|
|
@@ -79,13 +59,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
79
59
|
Defaults: {};
|
|
80
60
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
81
61
|
readonly size: {
|
|
82
|
-
readonly type: PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
62
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
83
63
|
readonly required: false;
|
|
84
64
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
85
65
|
__epPropKey: true;
|
|
86
66
|
};
|
|
87
67
|
readonly color: {
|
|
88
|
-
readonly type: PropType<string>;
|
|
68
|
+
readonly type: import("vue").PropType<string>;
|
|
89
69
|
readonly required: false;
|
|
90
70
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
91
71
|
__epPropKey: true;
|
|
@@ -96,13 +76,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
96
76
|
__isSuspense?: undefined;
|
|
97
77
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
98
78
|
readonly size: {
|
|
99
|
-
readonly type: PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
79
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
100
80
|
readonly required: false;
|
|
101
81
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
102
82
|
__epPropKey: true;
|
|
103
83
|
};
|
|
104
84
|
readonly color: {
|
|
105
|
-
readonly type: PropType<string>;
|
|
85
|
+
readonly type: import("vue").PropType<string>;
|
|
106
86
|
readonly required: false;
|
|
107
87
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
108
88
|
__epPropKey: true;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { SetDataEvent } from '@vunk/core';
|
|
2
|
-
import type { Ref } from 'vue';
|
|
3
1
|
import type { Paragraph } from './types';
|
|
4
2
|
import { ParagraphStatus } from './const';
|
|
5
3
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -49,22 +47,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
49
47
|
};
|
|
50
48
|
default: () => string[];
|
|
51
49
|
};
|
|
52
|
-
pause: {
|
|
53
|
-
type: BooleanConstructor;
|
|
54
|
-
default: boolean;
|
|
55
|
-
};
|
|
56
50
|
keepRead: {
|
|
57
51
|
type: BooleanConstructor;
|
|
58
52
|
default: boolean;
|
|
59
53
|
};
|
|
60
|
-
webSpeech: {
|
|
61
|
-
type: BooleanConstructor;
|
|
62
|
-
default: boolean;
|
|
63
|
-
};
|
|
64
54
|
textToSpeech: {
|
|
65
55
|
type: import("vue").PropType<import("./types").TextToSpeech>;
|
|
66
56
|
default: undefined;
|
|
67
57
|
};
|
|
58
|
+
processing: {
|
|
59
|
+
type: import("vue").PropType<(paragraph: Paragraph) => void>;
|
|
60
|
+
default: import("@vunk/shared").AnyFunc;
|
|
61
|
+
};
|
|
68
62
|
}>, {
|
|
69
63
|
theData: import("vue").ComputedRef<Paragraph[]>;
|
|
70
64
|
ParagraphStatus: typeof ParagraphStatus;
|
|
@@ -72,13 +66,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
72
66
|
isPrevParagraphFulfilled: (currentIndex: number) => boolean;
|
|
73
67
|
isParagraphEnabled: (currentIndex: number) => boolean;
|
|
74
68
|
processingParagraph: (paragraph: Paragraph) => Promise<void> | undefined;
|
|
75
|
-
|
|
69
|
+
isInterrupted: import("vue").Ref<boolean, boolean>;
|
|
70
|
+
setData: (obj: any, e: import("@vunk/core").SetDataEvent) => void;
|
|
71
|
+
Broadcast: typeof import("@vunk/shared/enum").TickerStatus;
|
|
72
|
+
isPaused: import("vue").ComputedRef<boolean>;
|
|
76
73
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
77
|
-
setData: (e: SetDataEvent) => SetDataEvent;
|
|
74
|
+
setData: (e: import("@vunk/core").SetDataEvent) => import("@vunk/core").SetDataEvent;
|
|
78
75
|
interrupt: null;
|
|
79
76
|
'update:broadcasting': (_: boolean) => boolean;
|
|
80
77
|
'update:completed': (_: boolean) => boolean;
|
|
81
78
|
'update:error': (_: boolean) => boolean;
|
|
79
|
+
paragraphLoad: (_: import("./types").ParagraphLoadEvent) => boolean;
|
|
82
80
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
83
81
|
render: {
|
|
84
82
|
type: import("vue").PropType<(text: string) => string>;
|
|
@@ -126,37 +124,33 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
126
124
|
};
|
|
127
125
|
default: () => string[];
|
|
128
126
|
};
|
|
129
|
-
pause: {
|
|
130
|
-
type: BooleanConstructor;
|
|
131
|
-
default: boolean;
|
|
132
|
-
};
|
|
133
127
|
keepRead: {
|
|
134
128
|
type: BooleanConstructor;
|
|
135
129
|
default: boolean;
|
|
136
130
|
};
|
|
137
|
-
webSpeech: {
|
|
138
|
-
type: BooleanConstructor;
|
|
139
|
-
default: boolean;
|
|
140
|
-
};
|
|
141
131
|
textToSpeech: {
|
|
142
132
|
type: import("vue").PropType<import("./types").TextToSpeech>;
|
|
143
133
|
default: undefined;
|
|
144
134
|
};
|
|
135
|
+
processing: {
|
|
136
|
+
type: import("vue").PropType<(paragraph: Paragraph) => void>;
|
|
137
|
+
default: import("@vunk/shared").AnyFunc;
|
|
138
|
+
};
|
|
145
139
|
}>> & Readonly<{
|
|
146
|
-
onSetData?: ((e: SetDataEvent) => any) | undefined;
|
|
140
|
+
onSetData?: ((e: import("@vunk/core").SetDataEvent) => any) | undefined;
|
|
147
141
|
onInterrupt?: ((...args: any[]) => any) | undefined;
|
|
148
142
|
"onUpdate:broadcasting"?: ((_: boolean) => any) | undefined;
|
|
149
143
|
"onUpdate:completed"?: ((_: boolean) => any) | undefined;
|
|
150
144
|
"onUpdate:error"?: ((_: boolean) => any) | undefined;
|
|
145
|
+
onParagraphLoad?: ((_: import("./types").ParagraphLoadEvent) => any) | undefined;
|
|
151
146
|
}>, {
|
|
147
|
+
processing: (paragraph: Paragraph) => void;
|
|
152
148
|
source: string;
|
|
153
149
|
delay: number;
|
|
154
|
-
pause: boolean;
|
|
155
150
|
render: (text: string) => string;
|
|
156
151
|
data: Paragraph[];
|
|
157
152
|
separators: string[];
|
|
158
153
|
keepRead: boolean;
|
|
159
|
-
webSpeech: boolean;
|
|
160
154
|
textToSpeech: import("./types").TextToSpeech;
|
|
161
155
|
}, {}, {
|
|
162
156
|
ParagraphView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -168,10 +162,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
168
162
|
type: import("vue").PropType<ParagraphStatus>;
|
|
169
163
|
default: ParagraphStatus;
|
|
170
164
|
};
|
|
171
|
-
pause: {
|
|
172
|
-
type: BooleanConstructor;
|
|
173
|
-
default: boolean;
|
|
174
|
-
};
|
|
175
165
|
processing: {
|
|
176
166
|
type: import("vue").PropType<import("@vunk/shared").AnyFunc>;
|
|
177
167
|
default: import("@vunk/shared").AnyFunc;
|
|
@@ -190,10 +180,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
190
180
|
type: import("vue").PropType<ParagraphStatus>;
|
|
191
181
|
default: ParagraphStatus;
|
|
192
182
|
};
|
|
193
|
-
pause: {
|
|
194
|
-
type: BooleanConstructor;
|
|
195
|
-
default: boolean;
|
|
196
|
-
};
|
|
197
183
|
processing: {
|
|
198
184
|
type: import("vue").PropType<import("@vunk/shared").AnyFunc>;
|
|
199
185
|
default: import("@vunk/shared").AnyFunc;
|
|
@@ -225,10 +211,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
225
211
|
type: import("vue").PropType<ParagraphStatus>;
|
|
226
212
|
default: ParagraphStatus;
|
|
227
213
|
};
|
|
228
|
-
pause: {
|
|
229
|
-
type: BooleanConstructor;
|
|
230
|
-
default: boolean;
|
|
231
|
-
};
|
|
232
214
|
processing: {
|
|
233
215
|
type: import("vue").PropType<import("@vunk/shared").AnyFunc>;
|
|
234
216
|
default: import("@vunk/shared").AnyFunc;
|
|
@@ -241,9 +223,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
241
223
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
242
224
|
}>, {
|
|
243
225
|
processing: import("@vunk/shared").AnyFunc;
|
|
244
|
-
pause: boolean;
|
|
245
|
-
enable: boolean;
|
|
246
226
|
status: ParagraphStatus;
|
|
227
|
+
enable: boolean;
|
|
247
228
|
retryTimes: number;
|
|
248
229
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
249
230
|
VkTypingMarkdown: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -268,8 +249,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
268
249
|
default: null;
|
|
269
250
|
};
|
|
270
251
|
}>, {
|
|
271
|
-
htmlText: Ref<string, string>;
|
|
272
|
-
isDebouncedTyping: Readonly<Ref<boolean, boolean>>;
|
|
252
|
+
htmlText: import("vue").Ref<string, string>;
|
|
253
|
+
isDebouncedTyping: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
273
254
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
274
255
|
typing: null;
|
|
275
256
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -302,112 +283,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
302
283
|
disabled: boolean;
|
|
303
284
|
markdownItSetup: (md: import("markdown-it-async").MarkdownItAsync) => void;
|
|
304
285
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
305
|
-
WebSpeechView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
306
|
-
voice: {
|
|
307
|
-
type: import("vue").PropType<SpeechSynthesisVoice>;
|
|
308
|
-
required: false;
|
|
309
|
-
};
|
|
310
|
-
data: {
|
|
311
|
-
type: import("vue").PropType<Paragraph>;
|
|
312
|
-
default: () => {};
|
|
313
|
-
};
|
|
314
|
-
deferred: {
|
|
315
|
-
type: import("vue").PropType<import("@vunk/shared/promise").Deferred<any>>;
|
|
316
|
-
required: true;
|
|
317
|
-
};
|
|
318
|
-
pause: {
|
|
319
|
-
type: BooleanConstructor;
|
|
320
|
-
default: boolean;
|
|
321
|
-
};
|
|
322
|
-
render: {
|
|
323
|
-
type: import("vue").PropType<(text: string) => string>;
|
|
324
|
-
required: true;
|
|
325
|
-
};
|
|
326
|
-
}>, (() => null) | (() => false | JSX.Element), {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
327
|
-
voice: {
|
|
328
|
-
type: import("vue").PropType<SpeechSynthesisVoice>;
|
|
329
|
-
required: false;
|
|
330
|
-
};
|
|
331
|
-
data: {
|
|
332
|
-
type: import("vue").PropType<Paragraph>;
|
|
333
|
-
default: () => {};
|
|
334
|
-
};
|
|
335
|
-
deferred: {
|
|
336
|
-
type: import("vue").PropType<import("@vunk/shared/promise").Deferred<any>>;
|
|
337
|
-
required: true;
|
|
338
|
-
};
|
|
339
|
-
pause: {
|
|
340
|
-
type: BooleanConstructor;
|
|
341
|
-
default: boolean;
|
|
342
|
-
};
|
|
343
|
-
render: {
|
|
344
|
-
type: import("vue").PropType<(text: string) => string>;
|
|
345
|
-
required: true;
|
|
346
|
-
};
|
|
347
|
-
}>> & Readonly<{}>, {
|
|
348
|
-
pause: boolean;
|
|
349
|
-
data: Paragraph;
|
|
350
|
-
}, {}, {
|
|
351
|
-
SpeechError: import("vue").DefineComponent<{}, {
|
|
352
|
-
readonly CloseBold: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
353
|
-
readonly ElIcon: import("element-plus/es/utils").SFCWithInstall<{
|
|
354
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
355
|
-
readonly size: {
|
|
356
|
-
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
357
|
-
readonly required: false;
|
|
358
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
359
|
-
__epPropKey: true;
|
|
360
|
-
};
|
|
361
|
-
readonly color: {
|
|
362
|
-
readonly type: import("vue").PropType<string>;
|
|
363
|
-
readonly required: false;
|
|
364
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
365
|
-
__epPropKey: true;
|
|
366
|
-
};
|
|
367
|
-
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
368
|
-
P: {};
|
|
369
|
-
B: {};
|
|
370
|
-
D: {};
|
|
371
|
-
C: {};
|
|
372
|
-
M: {};
|
|
373
|
-
Defaults: {};
|
|
374
|
-
}, Readonly<import("vue").ExtractPropTypes<{
|
|
375
|
-
readonly size: {
|
|
376
|
-
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
377
|
-
readonly required: false;
|
|
378
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
379
|
-
__epPropKey: true;
|
|
380
|
-
};
|
|
381
|
-
readonly color: {
|
|
382
|
-
readonly type: import("vue").PropType<string>;
|
|
383
|
-
readonly required: false;
|
|
384
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
385
|
-
__epPropKey: true;
|
|
386
|
-
};
|
|
387
|
-
}>>, {}, {}, {}, {}, {}>;
|
|
388
|
-
__isFragment?: undefined;
|
|
389
|
-
__isTeleport?: undefined;
|
|
390
|
-
__isSuspense?: undefined;
|
|
391
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
392
|
-
readonly size: {
|
|
393
|
-
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
|
|
394
|
-
readonly required: false;
|
|
395
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
396
|
-
__epPropKey: true;
|
|
397
|
-
};
|
|
398
|
-
readonly color: {
|
|
399
|
-
readonly type: import("vue").PropType<string>;
|
|
400
|
-
readonly required: false;
|
|
401
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
402
|
-
__epPropKey: true;
|
|
403
|
-
};
|
|
404
|
-
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
405
|
-
$slots: {
|
|
406
|
-
default?(_: {}): any;
|
|
407
|
-
};
|
|
408
|
-
})>;
|
|
409
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
410
|
-
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
411
286
|
HowlerSpeechView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
412
287
|
data: {
|
|
413
288
|
type: import("vue").PropType<Paragraph>;
|
|
@@ -417,19 +292,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
417
292
|
type: import("vue").PropType<import("@vunk/shared/promise").Deferred<any>>;
|
|
418
293
|
required: true;
|
|
419
294
|
};
|
|
420
|
-
pause: {
|
|
421
|
-
type: BooleanConstructor;
|
|
422
|
-
default: boolean;
|
|
423
|
-
};
|
|
424
|
-
url: {
|
|
425
|
-
type: StringConstructor;
|
|
426
|
-
default: string;
|
|
427
|
-
};
|
|
428
295
|
render: {
|
|
429
296
|
type: import("vue").PropType<(text: string) => string>;
|
|
430
|
-
|
|
297
|
+
default: typeof import("./const").defaultRender;
|
|
431
298
|
};
|
|
432
|
-
}>, (() => null) | (() => JSX.Element), {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
299
|
+
}>, (() => null) | (() => JSX.Element), {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
300
|
+
setData: (e: import("@vunk/core").SetDataEvent<keyof Paragraph>) => import("@vunk/core").SetDataEvent<keyof Paragraph>;
|
|
301
|
+
load: (_: import("./types").ParagraphLoadEvent) => boolean;
|
|
302
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
433
303
|
data: {
|
|
434
304
|
type: import("vue").PropType<Paragraph>;
|
|
435
305
|
default: () => {};
|
|
@@ -438,22 +308,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
438
308
|
type: import("vue").PropType<import("@vunk/shared/promise").Deferred<any>>;
|
|
439
309
|
required: true;
|
|
440
310
|
};
|
|
441
|
-
pause: {
|
|
442
|
-
type: BooleanConstructor;
|
|
443
|
-
default: boolean;
|
|
444
|
-
};
|
|
445
|
-
url: {
|
|
446
|
-
type: StringConstructor;
|
|
447
|
-
default: string;
|
|
448
|
-
};
|
|
449
311
|
render: {
|
|
450
312
|
type: import("vue").PropType<(text: string) => string>;
|
|
451
|
-
|
|
313
|
+
default: typeof import("./const").defaultRender;
|
|
452
314
|
};
|
|
453
|
-
}>> & Readonly<{
|
|
454
|
-
|
|
315
|
+
}>> & Readonly<{
|
|
316
|
+
onSetData?: ((e: import("@vunk/core").SetDataEvent<keyof Paragraph>) => any) | undefined;
|
|
317
|
+
onLoad?: ((_: import("./types").ParagraphLoadEvent) => any) | undefined;
|
|
318
|
+
}>, {
|
|
319
|
+
render: (text: string) => string;
|
|
455
320
|
data: Paragraph;
|
|
456
|
-
url: string;
|
|
457
321
|
}, {}, {
|
|
458
322
|
SpeechError: import("vue").DefineComponent<{}, {
|
|
459
323
|
readonly CloseBold: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -11,10 +11,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
11
11
|
type: PropType<ParagraphStatus>;
|
|
12
12
|
default: ParagraphStatus;
|
|
13
13
|
};
|
|
14
|
-
pause: {
|
|
15
|
-
type: BooleanConstructor;
|
|
16
|
-
default: boolean;
|
|
17
|
-
};
|
|
18
14
|
processing: {
|
|
19
15
|
type: PropType<AnyFunc>;
|
|
20
16
|
default: AnyFunc;
|
|
@@ -33,10 +29,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
33
29
|
type: PropType<ParagraphStatus>;
|
|
34
30
|
default: ParagraphStatus;
|
|
35
31
|
};
|
|
36
|
-
pause: {
|
|
37
|
-
type: BooleanConstructor;
|
|
38
|
-
default: boolean;
|
|
39
|
-
};
|
|
40
32
|
processing: {
|
|
41
33
|
type: PropType<AnyFunc>;
|
|
42
34
|
default: AnyFunc;
|
|
@@ -68,10 +60,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
68
60
|
type: PropType<ParagraphStatus>;
|
|
69
61
|
default: ParagraphStatus;
|
|
70
62
|
};
|
|
71
|
-
pause: {
|
|
72
|
-
type: BooleanConstructor;
|
|
73
|
-
default: boolean;
|
|
74
|
-
};
|
|
75
63
|
processing: {
|
|
76
64
|
type: PropType<AnyFunc>;
|
|
77
65
|
default: AnyFunc;
|
|
@@ -84,9 +72,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
84
72
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
85
73
|
}>, {
|
|
86
74
|
processing: AnyFunc;
|
|
87
|
-
pause: boolean;
|
|
88
|
-
enable: boolean;
|
|
89
75
|
status: ParagraphStatus;
|
|
76
|
+
enable: boolean;
|
|
90
77
|
retryTimes: number;
|
|
91
78
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
92
79
|
export default _default;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReturnVoid } from '@vunk/shared';
|
|
2
|
+
import type { TickerStatus } from '@vunk/shared/enum';
|
|
3
|
+
import type { Deferred } from '@vunk/shared/promise';
|
|
4
|
+
import type { ParagraphStatus } from './const';
|
|
2
5
|
export interface Paragraph {
|
|
3
6
|
value: string;
|
|
4
7
|
status: ParagraphStatus;
|
|
5
8
|
start: number;
|
|
6
9
|
end: number;
|
|
7
10
|
separator: string;
|
|
8
|
-
broadcast:
|
|
11
|
+
broadcast: TickerStatus;
|
|
9
12
|
/**
|
|
10
13
|
* @description 语音合成的 url
|
|
11
14
|
*/
|
|
@@ -15,3 +18,8 @@ export interface Paragraph {
|
|
|
15
18
|
* @returns Audio URL
|
|
16
19
|
*/
|
|
17
20
|
export type TextToSpeech = (text: string) => Promise<string>;
|
|
21
|
+
export interface ParagraphLoadEvent {
|
|
22
|
+
data: Paragraph;
|
|
23
|
+
deferred: Deferred<any>;
|
|
24
|
+
}
|
|
25
|
+
export type ParagraphOnLoad = (event: ParagraphLoadEvent) => ReturnVoid;
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
import type { SetDataEvent } from '@vunk/core';
|
|
2
|
+
import type { Deferred } from '@vunk/shared/promise';
|
|
3
|
+
import type { Paragraph } from './types';
|
|
4
|
+
import { Howl } from 'howler';
|
|
5
|
+
/**
|
|
6
|
+
* @description 使用 Howler.js 播放段落
|
|
7
|
+
*/
|
|
8
|
+
export declare function useHowlerParagraph(props: {
|
|
9
|
+
data: Paragraph;
|
|
10
|
+
deferred: Deferred<any>;
|
|
11
|
+
}, emit: (e: 'setData', data: SetDataEvent<keyof Paragraph>) => void): {
|
|
12
|
+
url: import("vue").ComputedRef<string | undefined>;
|
|
13
|
+
broadcast: import("vue").ComputedRef<import("@vunk/shared/enum").TickerStatus>;
|
|
14
|
+
sound: import("vue").ShallowRef<Howl | null, Howl | null>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @description 获取浏览器语音列表
|
|
18
|
+
*/
|
|
1
19
|
export declare function useVoices(): {
|
|
2
20
|
voices: import("vue").ShallowRef<SpeechSynthesisVoice[], SpeechSynthesisVoice[]>;
|
|
3
21
|
};
|