@vunk/plus 1.1.4 → 1.2.0
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/SendOutlined.mjs +1319 -0
- package/components/avatar/index.d.ts +4 -0
- package/components/avatar/index.mjs +49 -0
- package/components/avatar/src/ctx.d.ts +18 -0
- package/components/avatar/src/index.vue.d.ts +180 -0
- package/components/avatar/src/types.d.ts +1 -0
- package/components/recorder-button/index.css +72 -0
- package/components/recorder-button/index.d.ts +4 -0
- package/components/recorder-button/index.mjs +319 -0
- package/components/recorder-button/src/ctx.d.ts +19 -0
- package/components/recorder-button/src/index.vue.d.ts +309 -0
- package/components/recorder-button/src/speech-to-text.d.ts +1 -0
- package/components/recorder-button/src/types.d.ts +6 -0
- package/components/sender/index.css +29 -0
- package/components/sender/index.d.ts +4 -0
- package/components/sender/index.mjs +172 -0
- package/components/sender/src/ctx.d.ts +21 -0
- package/components/sender/src/index.vue.d.ts +484 -0
- package/components/sender/src/types.d.ts +1 -0
- package/components/speech-button/index.css +10 -0
- package/components/speech-button/index.d.ts +4 -0
- package/components/speech-button/index.mjs +131 -0
- package/components/speech-button/src/RecordingIcon.vue.d.ts +2 -0
- package/components/speech-button/src/ctx.d.ts +10 -0
- package/components/speech-button/src/index.vue.d.ts +22 -0
- package/components/speech-button/src/types.d.ts +1 -0
- package/components/table-columns/src/ctx.d.ts +4 -4
- package/components/table-columns/src/el-ctx.d.ts +5 -5
- package/components/table-columns/src/index.vue.d.ts +21 -21
- package/components/tables-v1/src/ctx.d.ts +24 -24
- package/components/tables-v1/src/el-ctx.d.ts +10 -10
- package/components/tables-v1/src/index.vue.d.ts +103 -103
- package/components/tables-v1-checkbox/src/ctx.d.ts +22 -22
- package/components/tables-v1-checkbox/src/index.vue.d.ts +182 -170
- package/components/vditor/src/index.vue.d.ts +5 -5
- package/composables/recorder/index.d.ts +15 -0
- package/composables/recorder/index.mjs +14478 -0
- package/index.css +114 -0
- package/package.json +30 -1
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import 'recorder-core/src/engine/mp3';
|
|
3
|
+
import 'recorder-core/src/engine/wav';
|
|
4
|
+
import 'recorder-core/src/engine/mp3-engine';
|
|
5
|
+
import 'recorder-core/src/extensions/waveview';
|
|
6
|
+
import 'recorder-core/src/app-support/app';
|
|
7
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
speenchToTextUrl: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
onTextZone: {
|
|
13
|
+
type: import("vue").PropType<import("./types").OnTextZone>;
|
|
14
|
+
default: any;
|
|
15
|
+
};
|
|
16
|
+
}>, {
|
|
17
|
+
onmousedown: (e: MouseEvent | TouchEvent) => void;
|
|
18
|
+
onmousemove: (e: MouseEvent | TouchEvent) => void;
|
|
19
|
+
onmouseup: (e: MouseEvent | TouchEvent) => void;
|
|
20
|
+
recording: Ref<boolean, boolean>;
|
|
21
|
+
recordingNode: Ref<HTMLSpanElement, HTMLSpanElement>;
|
|
22
|
+
blobUrl: Ref<string, string>;
|
|
23
|
+
isDragging: Ref<boolean, boolean>;
|
|
24
|
+
cancelZone: Ref<boolean, boolean>;
|
|
25
|
+
isTextZone: Ref<boolean, boolean>;
|
|
26
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
submitText: (text: string) => boolean;
|
|
28
|
+
submit: (_: import("./types").SubmitRawEvent) => boolean;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
speenchToTextUrl: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
onTextZone: {
|
|
35
|
+
type: import("vue").PropType<import("./types").OnTextZone>;
|
|
36
|
+
default: any;
|
|
37
|
+
};
|
|
38
|
+
}>> & Readonly<{
|
|
39
|
+
onSubmit?: (_: import("./types").SubmitRawEvent) => any;
|
|
40
|
+
onSubmitText?: (text: string) => any;
|
|
41
|
+
}>, {
|
|
42
|
+
speenchToTextUrl: string;
|
|
43
|
+
onTextZone: import("./types").OnTextZone;
|
|
44
|
+
}, {}, {
|
|
45
|
+
ElButton: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
46
|
+
readonly size: {
|
|
47
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
48
|
+
readonly required: false;
|
|
49
|
+
readonly validator: (val: unknown) => boolean;
|
|
50
|
+
__epPropKey: true;
|
|
51
|
+
};
|
|
52
|
+
readonly disabled: BooleanConstructor;
|
|
53
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
54
|
+
readonly icon: {
|
|
55
|
+
readonly type: import("vue").PropType<unknown>;
|
|
56
|
+
readonly required: false;
|
|
57
|
+
readonly validator: (val: unknown) => boolean;
|
|
58
|
+
__epPropKey: true;
|
|
59
|
+
};
|
|
60
|
+
readonly nativeType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
61
|
+
readonly loading: BooleanConstructor;
|
|
62
|
+
readonly loadingIcon: import("element-plus/es/utils").EpPropFinalized<(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, () => any, boolean>;
|
|
63
|
+
readonly plain: BooleanConstructor;
|
|
64
|
+
readonly text: BooleanConstructor;
|
|
65
|
+
readonly link: BooleanConstructor;
|
|
66
|
+
readonly bg: BooleanConstructor;
|
|
67
|
+
readonly autofocus: BooleanConstructor;
|
|
68
|
+
readonly round: BooleanConstructor;
|
|
69
|
+
readonly circle: BooleanConstructor;
|
|
70
|
+
readonly color: StringConstructor;
|
|
71
|
+
readonly dark: BooleanConstructor;
|
|
72
|
+
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
73
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(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, "button", boolean>;
|
|
74
|
+
}, {
|
|
75
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
76
|
+
readonly size: {
|
|
77
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
78
|
+
readonly required: false;
|
|
79
|
+
readonly validator: (val: unknown) => boolean;
|
|
80
|
+
__epPropKey: true;
|
|
81
|
+
};
|
|
82
|
+
readonly disabled: BooleanConstructor;
|
|
83
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
84
|
+
readonly icon: {
|
|
85
|
+
readonly type: import("vue").PropType<unknown>;
|
|
86
|
+
readonly required: false;
|
|
87
|
+
readonly validator: (val: unknown) => boolean;
|
|
88
|
+
__epPropKey: true;
|
|
89
|
+
};
|
|
90
|
+
readonly nativeType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
91
|
+
readonly loading: BooleanConstructor;
|
|
92
|
+
readonly loadingIcon: import("element-plus/es/utils").EpPropFinalized<(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, () => any, boolean>;
|
|
93
|
+
readonly plain: BooleanConstructor;
|
|
94
|
+
readonly text: BooleanConstructor;
|
|
95
|
+
readonly link: BooleanConstructor;
|
|
96
|
+
readonly bg: BooleanConstructor;
|
|
97
|
+
readonly autofocus: BooleanConstructor;
|
|
98
|
+
readonly round: BooleanConstructor;
|
|
99
|
+
readonly circle: BooleanConstructor;
|
|
100
|
+
readonly color: StringConstructor;
|
|
101
|
+
readonly dark: BooleanConstructor;
|
|
102
|
+
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
103
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(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, "button", boolean>;
|
|
104
|
+
}>> & {
|
|
105
|
+
onClick?: (evt: MouseEvent) => any;
|
|
106
|
+
}>>;
|
|
107
|
+
emit: (event: "click", evt: MouseEvent) => void;
|
|
108
|
+
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
109
|
+
ns: {
|
|
110
|
+
namespace: import("vue").ComputedRef<string>;
|
|
111
|
+
b: (blockSuffix?: string) => string;
|
|
112
|
+
e: (element?: string) => string;
|
|
113
|
+
m: (modifier?: string) => string;
|
|
114
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
115
|
+
em: (element?: string, modifier?: string) => string;
|
|
116
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
117
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
118
|
+
is: {
|
|
119
|
+
(name: string, state: boolean): string;
|
|
120
|
+
(name: string): string;
|
|
121
|
+
};
|
|
122
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
123
|
+
cssVarName: (name: string) => string;
|
|
124
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
125
|
+
cssVarBlockName: (name: string) => string;
|
|
126
|
+
};
|
|
127
|
+
_ref: Ref<HTMLButtonElement, HTMLButtonElement>;
|
|
128
|
+
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
129
|
+
_type: import("vue").ComputedRef<"" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger">;
|
|
130
|
+
_disabled: import("vue").ComputedRef<boolean>;
|
|
131
|
+
_props: import("vue").ComputedRef<{
|
|
132
|
+
ariaDisabled: boolean;
|
|
133
|
+
disabled: boolean;
|
|
134
|
+
autofocus: boolean;
|
|
135
|
+
type: import("element-plus").ButtonType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
136
|
+
} | {
|
|
137
|
+
ariaDisabled?: undefined;
|
|
138
|
+
disabled?: undefined;
|
|
139
|
+
autofocus?: undefined;
|
|
140
|
+
type?: undefined;
|
|
141
|
+
}>;
|
|
142
|
+
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
143
|
+
handleClick: (evt: MouseEvent) => void;
|
|
144
|
+
buttonKls: import("vue").ComputedRef<string[]>;
|
|
145
|
+
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
146
|
+
readonly size: {
|
|
147
|
+
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>>;
|
|
148
|
+
readonly required: false;
|
|
149
|
+
readonly validator: (val: unknown) => boolean;
|
|
150
|
+
__epPropKey: true;
|
|
151
|
+
};
|
|
152
|
+
readonly color: {
|
|
153
|
+
readonly type: import("vue").PropType<string>;
|
|
154
|
+
readonly required: false;
|
|
155
|
+
readonly validator: (val: unknown) => boolean;
|
|
156
|
+
__epPropKey: true;
|
|
157
|
+
};
|
|
158
|
+
}, {
|
|
159
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
160
|
+
readonly size: {
|
|
161
|
+
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>>;
|
|
162
|
+
readonly required: false;
|
|
163
|
+
readonly validator: (val: unknown) => boolean;
|
|
164
|
+
__epPropKey: true;
|
|
165
|
+
};
|
|
166
|
+
readonly color: {
|
|
167
|
+
readonly type: import("vue").PropType<string>;
|
|
168
|
+
readonly required: false;
|
|
169
|
+
readonly validator: (val: unknown) => boolean;
|
|
170
|
+
__epPropKey: true;
|
|
171
|
+
};
|
|
172
|
+
}>> & {
|
|
173
|
+
[x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
|
|
174
|
+
}>>;
|
|
175
|
+
ns: {
|
|
176
|
+
namespace: import("vue").ComputedRef<string>;
|
|
177
|
+
b: (blockSuffix?: string) => string;
|
|
178
|
+
e: (element?: string) => string;
|
|
179
|
+
m: (modifier?: string) => string;
|
|
180
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
181
|
+
em: (element?: string, modifier?: string) => string;
|
|
182
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
183
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
184
|
+
is: {
|
|
185
|
+
(name: string, state: boolean): string;
|
|
186
|
+
(name: string): string;
|
|
187
|
+
};
|
|
188
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
189
|
+
cssVarName: (name: string) => string;
|
|
190
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
191
|
+
cssVarBlockName: (name: string) => string;
|
|
192
|
+
};
|
|
193
|
+
style: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
194
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
195
|
+
readonly size: {
|
|
196
|
+
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>>;
|
|
197
|
+
readonly required: false;
|
|
198
|
+
readonly validator: (val: unknown) => boolean;
|
|
199
|
+
__epPropKey: true;
|
|
200
|
+
};
|
|
201
|
+
readonly color: {
|
|
202
|
+
readonly type: import("vue").PropType<string>;
|
|
203
|
+
readonly required: false;
|
|
204
|
+
readonly validator: (val: unknown) => boolean;
|
|
205
|
+
__epPropKey: true;
|
|
206
|
+
};
|
|
207
|
+
}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
208
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
209
|
+
click: (evt: MouseEvent) => boolean;
|
|
210
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
211
|
+
readonly size: {
|
|
212
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
213
|
+
readonly required: false;
|
|
214
|
+
readonly validator: (val: unknown) => boolean;
|
|
215
|
+
__epPropKey: true;
|
|
216
|
+
};
|
|
217
|
+
readonly disabled: BooleanConstructor;
|
|
218
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
219
|
+
readonly icon: {
|
|
220
|
+
readonly type: import("vue").PropType<unknown>;
|
|
221
|
+
readonly required: false;
|
|
222
|
+
readonly validator: (val: unknown) => boolean;
|
|
223
|
+
__epPropKey: true;
|
|
224
|
+
};
|
|
225
|
+
readonly nativeType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "button" | "reset" | "submit", unknown, "button", boolean>;
|
|
226
|
+
readonly loading: BooleanConstructor;
|
|
227
|
+
readonly loadingIcon: import("element-plus/es/utils").EpPropFinalized<(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, () => any, boolean>;
|
|
228
|
+
readonly plain: BooleanConstructor;
|
|
229
|
+
readonly text: BooleanConstructor;
|
|
230
|
+
readonly link: BooleanConstructor;
|
|
231
|
+
readonly bg: BooleanConstructor;
|
|
232
|
+
readonly autofocus: BooleanConstructor;
|
|
233
|
+
readonly round: BooleanConstructor;
|
|
234
|
+
readonly circle: BooleanConstructor;
|
|
235
|
+
readonly color: StringConstructor;
|
|
236
|
+
readonly dark: BooleanConstructor;
|
|
237
|
+
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
238
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(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, "button", boolean>;
|
|
239
|
+
}>> & {
|
|
240
|
+
onClick?: (evt: MouseEvent) => any;
|
|
241
|
+
}, {
|
|
242
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
243
|
+
readonly link: boolean;
|
|
244
|
+
readonly dark: boolean;
|
|
245
|
+
readonly disabled: boolean;
|
|
246
|
+
readonly text: boolean;
|
|
247
|
+
readonly autofocus: boolean;
|
|
248
|
+
readonly round: boolean;
|
|
249
|
+
readonly circle: boolean;
|
|
250
|
+
readonly tag: unknown;
|
|
251
|
+
readonly loading: boolean;
|
|
252
|
+
readonly nativeType: import("element-plus").ButtonType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
253
|
+
readonly loadingIcon: unknown;
|
|
254
|
+
readonly autoInsertSpace: import("element-plus").ButtonType<BooleanConstructor, unknown, unknown>;
|
|
255
|
+
readonly plain: boolean;
|
|
256
|
+
readonly bg: boolean;
|
|
257
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & {
|
|
258
|
+
ButtonGroup: import("vue").DefineComponent<{
|
|
259
|
+
readonly size: {
|
|
260
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
261
|
+
readonly required: false;
|
|
262
|
+
readonly validator: (val: unknown) => boolean;
|
|
263
|
+
__epPropKey: true;
|
|
264
|
+
};
|
|
265
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
266
|
+
}, {
|
|
267
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
268
|
+
readonly size: {
|
|
269
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
270
|
+
readonly required: false;
|
|
271
|
+
readonly validator: (val: unknown) => boolean;
|
|
272
|
+
__epPropKey: true;
|
|
273
|
+
};
|
|
274
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
275
|
+
}>> & {
|
|
276
|
+
[x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
|
|
277
|
+
}>>;
|
|
278
|
+
ns: {
|
|
279
|
+
namespace: import("vue").ComputedRef<string>;
|
|
280
|
+
b: (blockSuffix?: string) => string;
|
|
281
|
+
e: (element?: string) => string;
|
|
282
|
+
m: (modifier?: string) => string;
|
|
283
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
284
|
+
em: (element?: string, modifier?: string) => string;
|
|
285
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
286
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
287
|
+
is: {
|
|
288
|
+
(name: string, state: boolean): string;
|
|
289
|
+
(name: string): string;
|
|
290
|
+
};
|
|
291
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
292
|
+
cssVarName: (name: string) => string;
|
|
293
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
294
|
+
cssVarBlockName: (name: string) => string;
|
|
295
|
+
};
|
|
296
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
297
|
+
readonly size: {
|
|
298
|
+
readonly type: import("vue").PropType<import("element-plus").ButtonType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
299
|
+
readonly required: false;
|
|
300
|
+
readonly validator: (val: unknown) => boolean;
|
|
301
|
+
__epPropKey: true;
|
|
302
|
+
};
|
|
303
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
304
|
+
}>>, {
|
|
305
|
+
readonly type: import("element-plus").ButtonType<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown>;
|
|
306
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
307
|
+
};
|
|
308
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
309
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function speechToText(url: string, blob: Blob): Promise<string>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.vk-sender .ant-sender-content{
|
|
2
|
+
display: grid;
|
|
3
|
+
/* 两列 auto 1fr */
|
|
4
|
+
grid-template-columns: auto 1fr;
|
|
5
|
+
}
|
|
6
|
+
.vk-sender .ant-sender-actions-list {
|
|
7
|
+
margin-top: 1em;
|
|
8
|
+
/* 独占两列 */
|
|
9
|
+
grid-column: 1 / -1;
|
|
10
|
+
}
|
|
11
|
+
.vk-sender .ant-sender-prefix {
|
|
12
|
+
/* 要素考上 */
|
|
13
|
+
align-self: start;
|
|
14
|
+
}
|
|
15
|
+
.vk-sender-actions{
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
align-items: center;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
.vk-sender-actions__before,
|
|
22
|
+
.vk-sender-actions__after {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
}
|
|
26
|
+
.vk-sender-actions__before > * + *,
|
|
27
|
+
.vk-sender-actions__after > * + * {
|
|
28
|
+
margin-left: 8px;
|
|
29
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { defineComponent, ref, createVNode, resolveComponent, openBlock, createBlock, withCtx } from 'vue';
|
|
2
|
+
import { useModelComputed, useDeferred } from '@vunk/core/composables';
|
|
3
|
+
import { Button, Tooltip } from 'ant-design-vue';
|
|
4
|
+
import { Sender, Attachments } from 'ant-design-x-vue';
|
|
5
|
+
import { L as LinkOutlined, C as CloudUploadOutlined, S as SendOutlined } from '../SendOutlined.mjs';
|
|
6
|
+
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
7
|
+
|
|
8
|
+
const props = {
|
|
9
|
+
/**
|
|
10
|
+
* @description v-model 绑定文本
|
|
11
|
+
*/
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* @description 是否加载中,表现在发送按钮上
|
|
18
|
+
*/
|
|
19
|
+
loading: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: void 0
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const emits = {
|
|
25
|
+
"update:modelValue": (_) => true,
|
|
26
|
+
"submit": (_) => true,
|
|
27
|
+
"cancel": null
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
31
|
+
name: "VkSender",
|
|
32
|
+
components: {
|
|
33
|
+
Sender,
|
|
34
|
+
LinkOutlined,
|
|
35
|
+
AntButton: Button,
|
|
36
|
+
SenderHeader: Sender.Header,
|
|
37
|
+
Attachments
|
|
38
|
+
},
|
|
39
|
+
props,
|
|
40
|
+
emits,
|
|
41
|
+
setup(props2, {
|
|
42
|
+
emit,
|
|
43
|
+
slots
|
|
44
|
+
}) {
|
|
45
|
+
const loading = useModelComputed({
|
|
46
|
+
key: "loading",
|
|
47
|
+
default: false
|
|
48
|
+
}, props2, emit);
|
|
49
|
+
const headerOpen = ref(false);
|
|
50
|
+
const actionsRender = (_, info) => {
|
|
51
|
+
const {
|
|
52
|
+
SendButton,
|
|
53
|
+
LoadingButton
|
|
54
|
+
} = info.components;
|
|
55
|
+
const loadingRender = () => {
|
|
56
|
+
return createVNode(Tooltip, {
|
|
57
|
+
"title": "\u70B9\u51FB\u53D6\u6D88"
|
|
58
|
+
}, {
|
|
59
|
+
default: () => [createVNode(LoadingButton, null, null)]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
const sendRender = () => {
|
|
63
|
+
return createVNode(Tooltip, {
|
|
64
|
+
"title": props2.modelValue ? "\u70B9\u51FB\u53D1\u9001" : "\u8BF7\u8F93\u5165\u5185\u5BB9"
|
|
65
|
+
}, {
|
|
66
|
+
default: () => [createVNode(SendButton, {
|
|
67
|
+
"type": "text",
|
|
68
|
+
"icon": createVNode(SendOutlined, null, null)
|
|
69
|
+
}, null)]
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
const sendAction = () => loading.value ? loadingRender() : sendRender();
|
|
73
|
+
return createVNode("div", {
|
|
74
|
+
"class": "vk-sender-actions"
|
|
75
|
+
}, [createVNode("div", {
|
|
76
|
+
"class": "vk-sender-actions__before"
|
|
77
|
+
}, [slots.actions_before?.()]), createVNode("div", {
|
|
78
|
+
"class": "vk-sender-actions__after"
|
|
79
|
+
}, [slots.actions_after?.(), sendAction()])]);
|
|
80
|
+
};
|
|
81
|
+
const attachmentsPlaceholder = type => {
|
|
82
|
+
if (type === "drop") {
|
|
83
|
+
return {
|
|
84
|
+
title: "\u8BF7\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904"
|
|
85
|
+
};
|
|
86
|
+
} else {
|
|
87
|
+
return {
|
|
88
|
+
icon: createVNode(CloudUploadOutlined, null, null),
|
|
89
|
+
title: "\u4E0A\u4F20\u6587\u4EF6",
|
|
90
|
+
description: "\u70B9\u51FB\u4E0A\u4F20\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u5904"
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const fileList = ref([]);
|
|
95
|
+
const attachmentsDef = useDeferred();
|
|
96
|
+
const handlePasteFile = async file => {
|
|
97
|
+
headerOpen.value = true;
|
|
98
|
+
const attachmentsNode = await attachmentsDef.promise;
|
|
99
|
+
attachmentsNode.upload(file);
|
|
100
|
+
};
|
|
101
|
+
return {
|
|
102
|
+
actionsRender,
|
|
103
|
+
headerOpen,
|
|
104
|
+
attachmentsPlaceholder,
|
|
105
|
+
handlePasteFile,
|
|
106
|
+
attachmentsResolve: attachmentsDef.resolve,
|
|
107
|
+
fileList
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
113
|
+
const _component_Attachments = resolveComponent("Attachments");
|
|
114
|
+
const _component_SenderHeader = resolveComponent("SenderHeader");
|
|
115
|
+
const _component_LinkOutlined = resolveComponent("LinkOutlined");
|
|
116
|
+
const _component_AntButton = resolveComponent("AntButton");
|
|
117
|
+
const _component_Sender = resolveComponent("Sender");
|
|
118
|
+
return openBlock(), createBlock(_component_Sender, {
|
|
119
|
+
class: "vk-sender",
|
|
120
|
+
value: _ctx.modelValue,
|
|
121
|
+
loading: _ctx.loading,
|
|
122
|
+
"allow-speech": true,
|
|
123
|
+
actions: _ctx.actionsRender,
|
|
124
|
+
"on-submit": (e) => _ctx.$emit("submit", e),
|
|
125
|
+
"on-cancel": () => _ctx.$emit("cancel"),
|
|
126
|
+
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:modelValue", $event)),
|
|
127
|
+
onPasteFile: _ctx.handlePasteFile
|
|
128
|
+
}, {
|
|
129
|
+
header: withCtx(() => [
|
|
130
|
+
createVNode(_component_SenderHeader, {
|
|
131
|
+
open: _ctx.headerOpen,
|
|
132
|
+
title: "\u6DFB\u52A0\u9644\u4EF6",
|
|
133
|
+
onOpenChange: _cache[0] || (_cache[0] = (v) => _ctx.headerOpen = v)
|
|
134
|
+
}, {
|
|
135
|
+
default: withCtx(() => [
|
|
136
|
+
createVNode(_component_Attachments, {
|
|
137
|
+
ref: _ctx.attachmentsResolve,
|
|
138
|
+
placeholder: _ctx.attachmentsPlaceholder,
|
|
139
|
+
"file-list": _ctx.fileList
|
|
140
|
+
}, null, 8, ["placeholder", "file-list"])
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
/* STABLE */
|
|
144
|
+
}, 8, ["open"])
|
|
145
|
+
]),
|
|
146
|
+
prefix: withCtx(() => [
|
|
147
|
+
createVNode(_component_AntButton, {
|
|
148
|
+
type: "text",
|
|
149
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.headerOpen = !_ctx.headerOpen)
|
|
150
|
+
}, {
|
|
151
|
+
icon: withCtx(() => [
|
|
152
|
+
createVNode(_component_LinkOutlined)
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
/* STABLE */
|
|
156
|
+
})
|
|
157
|
+
]),
|
|
158
|
+
_: 1
|
|
159
|
+
/* STABLE */
|
|
160
|
+
}, 8, ["value", "loading", "actions", "on-submit", "on-cancel", "onPasteFile"]);
|
|
161
|
+
}
|
|
162
|
+
var VkSender = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/sender/src/index.vue"]]);
|
|
163
|
+
|
|
164
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
165
|
+
__proto__: null
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
VkSender.install = (app) => {
|
|
169
|
+
app.component(VkSender.name || "VkSender", VkSender);
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export { VkSender, types as __VkSender, VkSender as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const props: {
|
|
2
|
+
/**
|
|
3
|
+
* @description v-model 绑定文本
|
|
4
|
+
*/
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @description 是否加载中,表现在发送按钮上
|
|
11
|
+
*/
|
|
12
|
+
loading: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: any;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const emits: {
|
|
18
|
+
'update:modelValue': (_: string) => boolean;
|
|
19
|
+
submit: (_: string) => boolean;
|
|
20
|
+
cancel: any;
|
|
21
|
+
};
|