@vunk/plus 1.3.4 → 1.3.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.
- package/components/broadcasting-markdown/index.mjs +3398 -138
- package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +117 -0
- package/components/broadcasting-markdown/src/index.vue.d.ts +1 -1
- package/components/bubble-list/src/index.vue.d.ts +1 -1
- package/components/bubble-templates/src/index.vue.d.ts +1 -1
- package/components/chat-independent/src/index.vue.d.ts +17 -17
- package/components/recorder-button/index.mjs +22 -34
- package/components/recorder-button/src/index.vue.d.ts +15 -15
- package/components/sender/index.mjs +4 -8
- package/components/sender/src/SenderHeader.vue.d.ts +1 -1
- package/components/sender/src/index.vue.d.ts +1 -1
- package/components/speech-button/src/index.vue.d.ts +1 -1
- package/components/tables-v1/src/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 +2 -2
- package/composables/recorder/index.d.ts +18 -5
- package/composables/recorder/index.mjs +30 -14
- package/package.json +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { Deferred } from '@vunk/shared/promise';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { Paragraph } from './types';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
data: {
|
|
6
|
+
type: PropType<Paragraph>;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
deferred: {
|
|
10
|
+
type: PropType<Deferred<any>>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
pause: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @description 语音资源路径
|
|
19
|
+
*/
|
|
20
|
+
url: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
render: {
|
|
25
|
+
type: PropType<(text: string) => string>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
}>, (() => null) | (() => JSX.Element), {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
data: {
|
|
30
|
+
type: PropType<Paragraph>;
|
|
31
|
+
default: () => {};
|
|
32
|
+
};
|
|
33
|
+
deferred: {
|
|
34
|
+
type: PropType<Deferred<any>>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
pause: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* @description 语音资源路径
|
|
43
|
+
*/
|
|
44
|
+
url: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
render: {
|
|
49
|
+
type: PropType<(text: string) => string>;
|
|
50
|
+
required: true;
|
|
51
|
+
};
|
|
52
|
+
}>> & Readonly<{}>, {
|
|
53
|
+
pause: boolean;
|
|
54
|
+
data: Paragraph;
|
|
55
|
+
url: string;
|
|
56
|
+
}, {}, {
|
|
57
|
+
SpeechError: import("vue").DefineComponent<{}, {
|
|
58
|
+
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
|
+
readonly ElIcon: import("element-plus/es/utils").SFCWithInstall<{
|
|
60
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
61
|
+
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>>;
|
|
63
|
+
readonly required: false;
|
|
64
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
65
|
+
__epPropKey: true;
|
|
66
|
+
};
|
|
67
|
+
readonly color: {
|
|
68
|
+
readonly type: PropType<string>;
|
|
69
|
+
readonly required: false;
|
|
70
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
71
|
+
__epPropKey: true;
|
|
72
|
+
};
|
|
73
|
+
}>>, {}, 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, {
|
|
74
|
+
P: {};
|
|
75
|
+
B: {};
|
|
76
|
+
D: {};
|
|
77
|
+
C: {};
|
|
78
|
+
M: {};
|
|
79
|
+
Defaults: {};
|
|
80
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
81
|
+
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>>;
|
|
83
|
+
readonly required: false;
|
|
84
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
85
|
+
__epPropKey: true;
|
|
86
|
+
};
|
|
87
|
+
readonly color: {
|
|
88
|
+
readonly type: PropType<string>;
|
|
89
|
+
readonly required: false;
|
|
90
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
91
|
+
__epPropKey: true;
|
|
92
|
+
};
|
|
93
|
+
}>>, {}, {}, {}, {}, {}>;
|
|
94
|
+
__isFragment?: undefined;
|
|
95
|
+
__isTeleport?: undefined;
|
|
96
|
+
__isSuspense?: undefined;
|
|
97
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
98
|
+
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>>;
|
|
100
|
+
readonly required: false;
|
|
101
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
102
|
+
__epPropKey: true;
|
|
103
|
+
};
|
|
104
|
+
readonly color: {
|
|
105
|
+
readonly type: PropType<string>;
|
|
106
|
+
readonly required: false;
|
|
107
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
108
|
+
__epPropKey: true;
|
|
109
|
+
};
|
|
110
|
+
}>>, {}, 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 () => {
|
|
111
|
+
$slots: {
|
|
112
|
+
default?(_: {}): any;
|
|
113
|
+
};
|
|
114
|
+
})>;
|
|
115
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
116
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
117
|
+
export default _default;
|
|
@@ -405,7 +405,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
405
405
|
})>;
|
|
406
406
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
407
407
|
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
408
|
-
|
|
408
|
+
HowlerSpeechView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
409
409
|
data: {
|
|
410
410
|
type: import("vue").PropType<Paragraph>;
|
|
411
411
|
default: () => {};
|
|
@@ -438,7 +438,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
438
438
|
})>;
|
|
439
439
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
440
440
|
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
441
|
-
|
|
441
|
+
HowlerSpeechView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
442
442
|
data: {
|
|
443
443
|
type: import("vue").PropType<import("../../broadcasting-markdown/src/types").Paragraph>;
|
|
444
444
|
default: () => {};
|
|
@@ -416,7 +416,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
416
416
|
})>;
|
|
417
417
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
418
418
|
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
419
|
-
|
|
419
|
+
HowlerSpeechView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
420
420
|
data: {
|
|
421
421
|
type: PropType<__VkBroadcastingMarkdown.Paragraph>;
|
|
422
422
|
default: () => {};
|
|
@@ -495,7 +495,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
495
495
|
})>;
|
|
496
496
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
497
497
|
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
498
|
-
|
|
498
|
+
HowlerSpeechView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
499
499
|
data: {
|
|
500
500
|
type: import("vue").PropType<import("../../broadcasting-markdown/src/types").Paragraph>;
|
|
501
501
|
default: () => {};
|
|
@@ -1094,7 +1094,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1094
1094
|
__epPropKey: true;
|
|
1095
1095
|
};
|
|
1096
1096
|
readonly disabled: BooleanConstructor;
|
|
1097
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
1097
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
1098
1098
|
readonly icon: {
|
|
1099
1099
|
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown>>;
|
|
1100
1100
|
readonly required: false;
|
|
@@ -1120,7 +1120,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1120
1120
|
}, {
|
|
1121
1121
|
ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
1122
1122
|
size: import("vue").ComputedRef<"" | "small" | "default" | "large">;
|
|
1123
|
-
type: import("vue").ComputedRef<"" | "default" | "
|
|
1123
|
+
type: import("vue").ComputedRef<"" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger">;
|
|
1124
1124
|
disabled: import("vue").ComputedRef<boolean>;
|
|
1125
1125
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
1126
1126
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -1132,7 +1132,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1132
1132
|
readonly disabled: boolean;
|
|
1133
1133
|
readonly round: boolean;
|
|
1134
1134
|
readonly dark: boolean;
|
|
1135
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
1135
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
1136
1136
|
readonly bg: boolean;
|
|
1137
1137
|
readonly loading: boolean;
|
|
1138
1138
|
readonly autofocus: boolean;
|
|
@@ -1156,7 +1156,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1156
1156
|
__epPropKey: true;
|
|
1157
1157
|
};
|
|
1158
1158
|
readonly disabled: BooleanConstructor;
|
|
1159
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
1159
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
1160
1160
|
readonly icon: {
|
|
1161
1161
|
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown>>;
|
|
1162
1162
|
readonly required: false;
|
|
@@ -1182,7 +1182,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1182
1182
|
}, {
|
|
1183
1183
|
ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
1184
1184
|
size: import("vue").ComputedRef<"" | "small" | "default" | "large">;
|
|
1185
|
-
type: import("vue").ComputedRef<"" | "default" | "
|
|
1185
|
+
type: import("vue").ComputedRef<"" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger">;
|
|
1186
1186
|
disabled: import("vue").ComputedRef<boolean>;
|
|
1187
1187
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
1188
1188
|
}, {}, {}, {}, {
|
|
@@ -1192,7 +1192,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1192
1192
|
readonly disabled: boolean;
|
|
1193
1193
|
readonly round: boolean;
|
|
1194
1194
|
readonly dark: boolean;
|
|
1195
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
1195
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
1196
1196
|
readonly bg: boolean;
|
|
1197
1197
|
readonly loading: boolean;
|
|
1198
1198
|
readonly autofocus: boolean;
|
|
@@ -1213,7 +1213,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1213
1213
|
__epPropKey: true;
|
|
1214
1214
|
};
|
|
1215
1215
|
readonly disabled: BooleanConstructor;
|
|
1216
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
1216
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
1217
1217
|
readonly icon: {
|
|
1218
1218
|
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown>>;
|
|
1219
1219
|
readonly required: false;
|
|
@@ -1239,7 +1239,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1239
1239
|
}, {
|
|
1240
1240
|
ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
1241
1241
|
size: import("vue").ComputedRef<"" | "small" | "default" | "large">;
|
|
1242
|
-
type: import("vue").ComputedRef<"" | "default" | "
|
|
1242
|
+
type: import("vue").ComputedRef<"" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger">;
|
|
1243
1243
|
disabled: import("vue").ComputedRef<boolean>;
|
|
1244
1244
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
1245
1245
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -1251,7 +1251,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1251
1251
|
readonly disabled: boolean;
|
|
1252
1252
|
readonly round: boolean;
|
|
1253
1253
|
readonly dark: boolean;
|
|
1254
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
1254
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
1255
1255
|
readonly bg: boolean;
|
|
1256
1256
|
readonly loading: boolean;
|
|
1257
1257
|
readonly autofocus: boolean;
|
|
@@ -1275,9 +1275,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1275
1275
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
1276
1276
|
__epPropKey: true;
|
|
1277
1277
|
};
|
|
1278
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
1278
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
1279
1279
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, {
|
|
1280
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
1280
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
1281
1281
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
1282
1282
|
P: {};
|
|
1283
1283
|
B: {};
|
|
@@ -1292,9 +1292,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1292
1292
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
1293
1293
|
__epPropKey: true;
|
|
1294
1294
|
};
|
|
1295
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
1295
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
1296
1296
|
}>>, {}, {}, {}, {}, {
|
|
1297
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
1297
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
1298
1298
|
}>;
|
|
1299
1299
|
__isFragment?: undefined;
|
|
1300
1300
|
__isTeleport?: undefined;
|
|
@@ -1306,9 +1306,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1306
1306
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
1307
1307
|
__epPropKey: true;
|
|
1308
1308
|
};
|
|
1309
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
1309
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
1310
1310
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
1311
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
1311
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
1312
1312
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
1313
1313
|
$slots: {
|
|
1314
1314
|
default?(_: {}): any;
|
|
@@ -1866,8 +1866,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1866
1866
|
}>> & Readonly<{
|
|
1867
1867
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
1868
1868
|
}>, {
|
|
1869
|
-
title: string;
|
|
1870
1869
|
modelValue: boolean;
|
|
1870
|
+
title: string;
|
|
1871
1871
|
contentRef: import("@vunk/shared").AnyFunc;
|
|
1872
1872
|
}, {}, {
|
|
1873
1873
|
ElCollapseTransition: import("element-plus/es/utils").SFCWithInstall<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { useRecorder } from '@vunk/plus/composables/recorder';
|
|
1
2
|
import { ElButton, ElMessage } from 'element-plus';
|
|
2
|
-
import
|
|
3
|
-
import { defineComponent, ref, shallowRef, onUnmounted, resolveComponent, createElementBlock, openBlock, createCommentVNode, createBlock, createVNode, Teleport, createElementVNode, toDisplayString, normalizeClass, mergeProps, withCtx } from 'vue';
|
|
3
|
+
import { defineComponent, ref, onUnmounted, resolveComponent, createElementBlock, openBlock, createCommentVNode, createBlock, createVNode, Teleport, createElementVNode, toDisplayString, normalizeClass, mergeProps, withCtx } from 'vue';
|
|
4
4
|
import 'recorder-core/src/engine/mp3';
|
|
5
5
|
import 'recorder-core/src/engine/wav';
|
|
6
6
|
import 'recorder-core/src/engine/mp3-engine';
|
|
@@ -70,52 +70,40 @@ var _sfc_main = defineComponent({
|
|
|
70
70
|
props,
|
|
71
71
|
emits,
|
|
72
72
|
setup(props2, { emit }) {
|
|
73
|
-
const supported = ref(false);
|
|
74
|
-
const recording = ref(false);
|
|
75
73
|
const recordingNode = ref();
|
|
76
|
-
const wave =
|
|
74
|
+
const { openOrStart, recording, recorder, wave } = useRecorder({
|
|
75
|
+
waveViewRef: recordingNode,
|
|
76
|
+
defaultOptions: {
|
|
77
|
+
onProcess
|
|
78
|
+
}
|
|
79
|
+
});
|
|
77
80
|
const blobUrl = ref("");
|
|
78
81
|
let pressTimer = null;
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return new Promise((resolve, reject) => {
|
|
88
|
-
rec.open(() => {
|
|
89
|
-
supported.value = true;
|
|
90
|
-
if (Recorder.WaveView) {
|
|
91
|
-
wave.value = Recorder.WaveView({
|
|
92
|
-
elem: recordingNode.value
|
|
93
|
-
});
|
|
82
|
+
const isDragging = ref(false);
|
|
83
|
+
const startRecording = async () => {
|
|
84
|
+
try {
|
|
85
|
+
await openOrStart({
|
|
86
|
+
// 授权时, 取消弹窗
|
|
87
|
+
openThen: () => {
|
|
88
|
+
isDragging.value = false;
|
|
89
|
+
return false;
|
|
94
90
|
}
|
|
95
|
-
resolve(true);
|
|
96
|
-
}, (msg, isUserNotAllow) => {
|
|
97
|
-
ElMessage.error(`${isUserNotAllow ? "\u7528\u6237\u672A\u6388\u6743, " : ""}\u65E0\u6CD5\u5F55\u97F3:${msg}`);
|
|
98
|
-
reject(new Error(msg));
|
|
99
91
|
});
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
const startRecording = async () => {
|
|
103
|
-
await recOpen();
|
|
104
|
-
if (!supported.value)
|
|
92
|
+
} catch (e) {
|
|
93
|
+
ElMessage.error(`\u5F55\u97F3\u5931\u8D25:${e}`);
|
|
105
94
|
return;
|
|
106
|
-
|
|
95
|
+
}
|
|
107
96
|
recording.value = true;
|
|
108
97
|
};
|
|
109
|
-
const isDragging = ref(false);
|
|
110
98
|
const dragPosition = ref({ x: 0, y: 0 });
|
|
111
99
|
const cancelZone = ref(false);
|
|
112
100
|
const isTextZone = ref(false);
|
|
113
101
|
let isMouseDown = false;
|
|
114
102
|
const stopRecording = () => {
|
|
115
103
|
const theTextZone = isTextZone.value;
|
|
116
|
-
|
|
104
|
+
recorder.stop(async (blob) => {
|
|
117
105
|
blobUrl.value = (window.URL || webkitURL).createObjectURL(blob);
|
|
118
|
-
|
|
106
|
+
recorder.close();
|
|
119
107
|
recording.value = false;
|
|
120
108
|
emit("submit", {
|
|
121
109
|
blob,
|
|
@@ -189,7 +177,7 @@ var _sfc_main = defineComponent({
|
|
|
189
177
|
clearTimeout(pressTimer);
|
|
190
178
|
if (isDragging.value) {
|
|
191
179
|
if (cancelZone.value) {
|
|
192
|
-
|
|
180
|
+
recorder.close();
|
|
193
181
|
} else {
|
|
194
182
|
stopRecording();
|
|
195
183
|
}
|
|
@@ -78,7 +78,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
78
78
|
__epPropKey: true;
|
|
79
79
|
};
|
|
80
80
|
readonly disabled: BooleanConstructor;
|
|
81
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
81
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
82
82
|
readonly icon: {
|
|
83
83
|
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown>>;
|
|
84
84
|
readonly required: false;
|
|
@@ -104,7 +104,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
104
104
|
}, {
|
|
105
105
|
ref: Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
106
106
|
size: import("vue").ComputedRef<"" | "small" | "default" | "large">;
|
|
107
|
-
type: import("vue").ComputedRef<"" | "default" | "
|
|
107
|
+
type: import("vue").ComputedRef<"" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger">;
|
|
108
108
|
disabled: import("vue").ComputedRef<boolean>;
|
|
109
109
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
110
110
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -116,7 +116,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
116
116
|
readonly disabled: boolean;
|
|
117
117
|
readonly round: boolean;
|
|
118
118
|
readonly dark: boolean;
|
|
119
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
119
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
120
120
|
readonly bg: boolean;
|
|
121
121
|
readonly loading: boolean;
|
|
122
122
|
readonly autofocus: boolean;
|
|
@@ -140,7 +140,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
140
140
|
__epPropKey: true;
|
|
141
141
|
};
|
|
142
142
|
readonly disabled: BooleanConstructor;
|
|
143
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
143
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
144
144
|
readonly icon: {
|
|
145
145
|
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown>>;
|
|
146
146
|
readonly required: false;
|
|
@@ -166,7 +166,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
166
166
|
}, {
|
|
167
167
|
ref: Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
168
168
|
size: import("vue").ComputedRef<"" | "small" | "default" | "large">;
|
|
169
|
-
type: import("vue").ComputedRef<"" | "default" | "
|
|
169
|
+
type: import("vue").ComputedRef<"" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger">;
|
|
170
170
|
disabled: import("vue").ComputedRef<boolean>;
|
|
171
171
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
172
172
|
}, {}, {}, {}, {
|
|
@@ -176,7 +176,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
176
176
|
readonly disabled: boolean;
|
|
177
177
|
readonly round: boolean;
|
|
178
178
|
readonly dark: boolean;
|
|
179
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
179
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
180
180
|
readonly bg: boolean;
|
|
181
181
|
readonly loading: boolean;
|
|
182
182
|
readonly autofocus: boolean;
|
|
@@ -197,7 +197,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
197
197
|
__epPropKey: true;
|
|
198
198
|
};
|
|
199
199
|
readonly disabled: BooleanConstructor;
|
|
200
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
200
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
201
201
|
readonly icon: {
|
|
202
202
|
readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown>>;
|
|
203
203
|
readonly required: false;
|
|
@@ -223,7 +223,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
223
223
|
}, {
|
|
224
224
|
ref: Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
225
225
|
size: import("vue").ComputedRef<"" | "small" | "default" | "large">;
|
|
226
|
-
type: import("vue").ComputedRef<"" | "default" | "
|
|
226
|
+
type: import("vue").ComputedRef<"" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger">;
|
|
227
227
|
disabled: import("vue").ComputedRef<boolean>;
|
|
228
228
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
229
229
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -235,7 +235,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
235
235
|
readonly disabled: boolean;
|
|
236
236
|
readonly round: boolean;
|
|
237
237
|
readonly dark: boolean;
|
|
238
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
238
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
239
239
|
readonly bg: boolean;
|
|
240
240
|
readonly loading: boolean;
|
|
241
241
|
readonly autofocus: boolean;
|
|
@@ -259,9 +259,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
259
259
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
260
260
|
__epPropKey: true;
|
|
261
261
|
};
|
|
262
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
262
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
263
263
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, {
|
|
264
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
264
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
265
265
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
266
266
|
P: {};
|
|
267
267
|
B: {};
|
|
@@ -276,9 +276,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
276
276
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
277
277
|
__epPropKey: true;
|
|
278
278
|
};
|
|
279
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
279
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
280
280
|
}>>, {}, {}, {}, {}, {
|
|
281
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
281
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
282
282
|
}>;
|
|
283
283
|
__isFragment?: undefined;
|
|
284
284
|
__isTeleport?: undefined;
|
|
@@ -290,9 +290,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
290
290
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
291
291
|
__epPropKey: true;
|
|
292
292
|
};
|
|
293
|
-
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "
|
|
293
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown, "", boolean>;
|
|
294
294
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
295
|
-
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "
|
|
295
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "info" | "success" | "text" | "warning" | "primary" | "danger", unknown>;
|
|
296
296
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
297
297
|
$slots: {
|
|
298
298
|
default?(_: {}): any;
|
|
@@ -175,14 +175,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
175
175
|
});
|
|
176
176
|
};
|
|
177
177
|
const sendRender = () => {
|
|
178
|
-
return createVNode(
|
|
179
|
-
"
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"type": "text",
|
|
183
|
-
"icon": createVNode(SendOutlined, null, null)
|
|
184
|
-
}, null)]
|
|
185
|
-
});
|
|
178
|
+
return createVNode(SendButton, {
|
|
179
|
+
"type": "text",
|
|
180
|
+
"icon": createVNode(SendOutlined, null, null)
|
|
181
|
+
}, null);
|
|
186
182
|
};
|
|
187
183
|
const sendAction = () => loading.value ? loadingRender() : sendRender();
|
|
188
184
|
return createVNode("div", {
|
|
@@ -31,8 +31,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
31
31
|
}>> & Readonly<{
|
|
32
32
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
33
33
|
}>, {
|
|
34
|
-
title: string;
|
|
35
34
|
modelValue: boolean;
|
|
35
|
+
title: string;
|
|
36
36
|
contentRef: AnyFunc;
|
|
37
37
|
}, {}, {
|
|
38
38
|
ElCollapseTransition: import("element-plus/es/utils").SFCWithInstall<{
|
|
@@ -552,8 +552,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
552
552
|
}>> & Readonly<{
|
|
553
553
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
554
554
|
}>, {
|
|
555
|
-
title: string;
|
|
556
555
|
modelValue: boolean;
|
|
556
|
+
title: string;
|
|
557
557
|
contentRef: import("@vunk/shared").AnyFunc;
|
|
558
558
|
}, {}, {
|
|
559
559
|
ElCollapseTransition: import("element-plus/es/utils").SFCWithInstall<{
|
|
@@ -12,8 +12,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
12
12
|
default: boolean;
|
|
13
13
|
};
|
|
14
14
|
}>> & Readonly<{
|
|
15
|
-
onStop?: ((_: Blob) => any) | undefined;
|
|
16
15
|
onStart?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
onStop?: ((_: Blob) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
18
|
disabled: boolean;
|
|
19
19
|
}, {}, {
|