@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.
Files changed (39) hide show
  1. package/components/SendOutlined.mjs +1319 -0
  2. package/components/avatar/index.d.ts +4 -0
  3. package/components/avatar/index.mjs +49 -0
  4. package/components/avatar/src/ctx.d.ts +18 -0
  5. package/components/avatar/src/index.vue.d.ts +180 -0
  6. package/components/avatar/src/types.d.ts +1 -0
  7. package/components/recorder-button/index.css +72 -0
  8. package/components/recorder-button/index.d.ts +4 -0
  9. package/components/recorder-button/index.mjs +319 -0
  10. package/components/recorder-button/src/ctx.d.ts +19 -0
  11. package/components/recorder-button/src/index.vue.d.ts +309 -0
  12. package/components/recorder-button/src/speech-to-text.d.ts +1 -0
  13. package/components/recorder-button/src/types.d.ts +6 -0
  14. package/components/sender/index.css +29 -0
  15. package/components/sender/index.d.ts +4 -0
  16. package/components/sender/index.mjs +172 -0
  17. package/components/sender/src/ctx.d.ts +21 -0
  18. package/components/sender/src/index.vue.d.ts +484 -0
  19. package/components/sender/src/types.d.ts +1 -0
  20. package/components/speech-button/index.css +10 -0
  21. package/components/speech-button/index.d.ts +4 -0
  22. package/components/speech-button/index.mjs +131 -0
  23. package/components/speech-button/src/RecordingIcon.vue.d.ts +2 -0
  24. package/components/speech-button/src/ctx.d.ts +10 -0
  25. package/components/speech-button/src/index.vue.d.ts +22 -0
  26. package/components/speech-button/src/types.d.ts +1 -0
  27. package/components/table-columns/src/ctx.d.ts +4 -4
  28. package/components/table-columns/src/el-ctx.d.ts +5 -5
  29. package/components/table-columns/src/index.vue.d.ts +21 -21
  30. package/components/tables-v1/src/ctx.d.ts +24 -24
  31. package/components/tables-v1/src/el-ctx.d.ts +10 -10
  32. package/components/tables-v1/src/index.vue.d.ts +103 -103
  33. package/components/tables-v1-checkbox/src/ctx.d.ts +22 -22
  34. package/components/tables-v1-checkbox/src/index.vue.d.ts +182 -170
  35. package/components/vditor/src/index.vue.d.ts +5 -5
  36. package/composables/recorder/index.d.ts +15 -0
  37. package/composables/recorder/index.mjs +14478 -0
  38. package/index.css +114 -0
  39. package/package.json +30 -1
@@ -0,0 +1,484 @@
1
+ /// <reference types="node" />
2
+ import type { AttachmentsProps } from 'ant-design-x-vue';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ modelValue: {
5
+ type: StringConstructor;
6
+ default: string;
7
+ };
8
+ loading: {
9
+ type: BooleanConstructor;
10
+ default: any;
11
+ };
12
+ }>, {
13
+ actionsRender: (_: any, info: any) => JSX.Element;
14
+ headerOpen: import("vue").Ref<boolean, boolean>;
15
+ attachmentsPlaceholder: (type: "drop" | "inline") => import("ant-design-x-vue/dist/typings/attachments/interface").PlaceholderType;
16
+ handlePasteFile: (file: File) => Promise<void>;
17
+ attachmentsResolve: import("@vunk/core").AnyFunc;
18
+ fileList: import("vue").Ref<{
19
+ readonly lastModified: number;
20
+ readonly name: string;
21
+ readonly webkitRelativePath: string;
22
+ readonly size: number;
23
+ readonly type: string;
24
+ arrayBuffer: {
25
+ (): Promise<ArrayBuffer>;
26
+ (): Promise<ArrayBuffer>;
27
+ };
28
+ slice: {
29
+ (start?: number, end?: number, contentType?: string): Blob;
30
+ (start?: number, end?: number, contentType?: string): Blob;
31
+ };
32
+ stream: {
33
+ (): ReadableStream<Uint8Array>;
34
+ (): NodeJS.ReadableStream;
35
+ };
36
+ text: {
37
+ (): Promise<string>;
38
+ (): Promise<string>;
39
+ };
40
+ }[], File[] | {
41
+ readonly lastModified: number;
42
+ readonly name: string;
43
+ readonly webkitRelativePath: string;
44
+ readonly size: number;
45
+ readonly type: string;
46
+ arrayBuffer: {
47
+ (): Promise<ArrayBuffer>;
48
+ (): Promise<ArrayBuffer>;
49
+ };
50
+ slice: {
51
+ (start?: number, end?: number, contentType?: string): Blob;
52
+ (start?: number, end?: number, contentType?: string): Blob;
53
+ };
54
+ stream: {
55
+ (): ReadableStream<Uint8Array>;
56
+ (): NodeJS.ReadableStream;
57
+ };
58
+ text: {
59
+ (): Promise<string>;
60
+ (): Promise<string>;
61
+ };
62
+ }[]>;
63
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
64
+ 'update:modelValue': (_: string) => boolean;
65
+ submit: (_: string) => boolean;
66
+ cancel: any;
67
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
68
+ modelValue: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ loading: {
73
+ type: BooleanConstructor;
74
+ default: any;
75
+ };
76
+ }>> & Readonly<{
77
+ "onUpdate:modelValue"?: (_: string) => any;
78
+ onSubmit?: (_: string) => any;
79
+ onCancel?: (...args: any[] | unknown[]) => any;
80
+ }>, {
81
+ modelValue: string;
82
+ loading: boolean;
83
+ }, {}, {
84
+ Sender: {
85
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("ant-design-x-vue").SenderProps> & Readonly<{
86
+ "onUpdate:value"?: (value: string) => any;
87
+ }>, {
88
+ nativeElement: HTMLDivElement;
89
+ focus: (opt: any) => any;
90
+ blur: () => any;
91
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
92
+ "update:value": (value: string) => any;
93
+ }, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
94
+ P: {};
95
+ B: {};
96
+ D: {};
97
+ C: {};
98
+ M: {};
99
+ Defaults: {};
100
+ }, Readonly<import("ant-design-x-vue").SenderProps> & Readonly<{
101
+ "onUpdate:value"?: (value: string) => any;
102
+ }>, {
103
+ nativeElement: HTMLDivElement;
104
+ focus: (opt: any) => any;
105
+ blur: () => any;
106
+ }, {}, {}, {}, {}>;
107
+ __isFragment?: never;
108
+ __isTeleport?: never;
109
+ __isSuspense?: never;
110
+ } & import("vue").ComponentOptionsBase<Readonly<import("ant-design-x-vue").SenderProps> & Readonly<{
111
+ "onUpdate:value"?: (value: string) => any;
112
+ }>, {
113
+ nativeElement: HTMLDivElement;
114
+ focus: (opt: any) => any;
115
+ blur: () => any;
116
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
117
+ "update:value": (value: string) => any;
118
+ }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
119
+ $slots: Readonly<{
120
+ header?(): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
121
+ [key: string]: any;
122
+ }>;
123
+ prefix?(): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
124
+ [key: string]: any;
125
+ }>;
126
+ actions?(props?: {
127
+ ori?: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
128
+ [key: string]: any;
129
+ }>;
130
+ info?: {
131
+ components: {
132
+ SendButton: import("vue").DefineComponent<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
133
+ ClearButton: import("vue").DefineComponent<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
134
+ LoadingButton: import("vue").DefineComponent<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
135
+ };
136
+ };
137
+ }): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
138
+ [key: string]: any;
139
+ }>;
140
+ }> & {
141
+ header?(): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
142
+ [key: string]: any;
143
+ }>;
144
+ prefix?(): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
145
+ [key: string]: any;
146
+ }>;
147
+ actions?(props?: {
148
+ ori?: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
149
+ [key: string]: any;
150
+ }>;
151
+ info?: {
152
+ components: {
153
+ SendButton: import("vue").DefineComponent<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
154
+ ClearButton: import("vue").DefineComponent<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
155
+ LoadingButton: import("vue").DefineComponent<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("ant-design-x-vue/dist/typings/sender/interface").AntdButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
156
+ };
157
+ };
158
+ }): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
159
+ [key: string]: any;
160
+ }>;
161
+ };
162
+ }) & {
163
+ Header: <T = any>(__VLS_props: {
164
+ forceRender?: boolean;
165
+ open?: boolean;
166
+ onOpenChange?: (open: boolean) => void;
167
+ title?: string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
168
+ [key: string]: any;
169
+ }>;
170
+ children?: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
171
+ [key: string]: any;
172
+ }>;
173
+ className?: string;
174
+ style?: import("vue").CSSProperties;
175
+ classNames?: Partial<Record<import("ant-design-x-vue/dist/typings/sender/interface").SemanticType, string>>;
176
+ styles?: Partial<Record<import("ant-design-x-vue/dist/typings/sender/interface").SemanticType, import("vue").CSSProperties>>;
177
+ closable?: boolean;
178
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
179
+ slots: Readonly<{
180
+ default(props?: any): any;
181
+ }> & {
182
+ default(props?: any): any;
183
+ };
184
+ attrs: any;
185
+ emit: {};
186
+ }, __VLS_expose?: (exposed: import("vue").ShallowUnwrapRef<{}>) => void, __VLS_setup?: Promise<{
187
+ props: {
188
+ forceRender?: boolean;
189
+ open?: boolean;
190
+ onOpenChange?: (open: boolean) => void;
191
+ title?: string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
192
+ [key: string]: any;
193
+ }>;
194
+ children?: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
195
+ [key: string]: any;
196
+ }>;
197
+ className?: string;
198
+ style?: import("vue").CSSProperties;
199
+ classNames?: Partial<Record<import("ant-design-x-vue/dist/typings/sender/interface").SemanticType, string>>;
200
+ styles?: Partial<Record<import("ant-design-x-vue/dist/typings/sender/interface").SemanticType, import("vue").CSSProperties>>;
201
+ closable?: boolean;
202
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
203
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
204
+ attrs: any;
205
+ slots: Readonly<{
206
+ default(props?: any): any;
207
+ }> & {
208
+ default(props?: any): any;
209
+ };
210
+ emit: {};
211
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
212
+ [key: string]: any;
213
+ }> & {
214
+ __ctx?: {
215
+ props: {
216
+ forceRender?: boolean;
217
+ open?: boolean;
218
+ onOpenChange?: (open: boolean) => void;
219
+ title?: string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
220
+ [key: string]: any;
221
+ }>;
222
+ children?: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
223
+ [key: string]: any;
224
+ }>;
225
+ className?: string;
226
+ style?: import("vue").CSSProperties;
227
+ classNames?: Partial<Record<import("ant-design-x-vue/dist/typings/sender/interface").SemanticType, string>>;
228
+ styles?: Partial<Record<import("ant-design-x-vue/dist/typings/sender/interface").SemanticType, import("vue").CSSProperties>>;
229
+ closable?: boolean;
230
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
231
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
232
+ attrs: any;
233
+ slots: Readonly<{
234
+ default(props?: any): any;
235
+ }> & {
236
+ default(props?: any): any;
237
+ };
238
+ emit: {};
239
+ };
240
+ };
241
+ };
242
+ LinkOutlined: import("@ant-design/icons-vue/lib/icons/LinkOutlined").LinkOutlinedIconType;
243
+ AntButton: {
244
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
245
+ prefixCls: StringConstructor;
246
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonType>;
247
+ htmlType: {
248
+ type: import("vue").PropType<import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType>;
249
+ default: string;
250
+ };
251
+ shape: {
252
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonShape>;
253
+ };
254
+ size: {
255
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
256
+ };
257
+ loading: {
258
+ type: import("vue").PropType<boolean | {
259
+ delay?: number;
260
+ }>;
261
+ default: () => boolean | {
262
+ delay?: number;
263
+ };
264
+ };
265
+ disabled: {
266
+ type: BooleanConstructor;
267
+ default: any;
268
+ };
269
+ ghost: {
270
+ type: BooleanConstructor;
271
+ default: any;
272
+ };
273
+ block: {
274
+ type: BooleanConstructor;
275
+ default: any;
276
+ };
277
+ danger: {
278
+ type: BooleanConstructor;
279
+ default: any;
280
+ };
281
+ icon: import("vue-types").VueTypeValidableDef<any>;
282
+ href: StringConstructor;
283
+ target: StringConstructor;
284
+ title: StringConstructor;
285
+ onClick: {
286
+ type: import("vue").PropType<import("ant-design-vue/es/_util/EventInterface").MouseEventHandler | import("ant-design-vue/es/_util/EventInterface").MouseEventHandler[]>;
287
+ };
288
+ onMousedown: {
289
+ type: import("vue").PropType<import("ant-design-vue/es/_util/EventInterface").MouseEventHandler | import("ant-design-vue/es/_util/EventInterface").MouseEventHandler[]>;
290
+ };
291
+ }>> & Readonly<{}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
292
+ block: boolean;
293
+ disabled: boolean;
294
+ danger: boolean;
295
+ ghost: boolean;
296
+ htmlType: import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType;
297
+ loading: boolean | {
298
+ delay?: number;
299
+ };
300
+ }, true, {}, import("ant-design-vue/es/_util/type").CustomSlotsType<{
301
+ icon: any;
302
+ default: any;
303
+ }>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
304
+ P: {};
305
+ B: {};
306
+ D: {};
307
+ C: {};
308
+ M: {};
309
+ Defaults: {};
310
+ }, Readonly<import("vue").ExtractPropTypes<{
311
+ prefixCls: StringConstructor;
312
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonType>;
313
+ htmlType: {
314
+ type: import("vue").PropType<import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType>;
315
+ default: string;
316
+ };
317
+ shape: {
318
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonShape>;
319
+ };
320
+ size: {
321
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
322
+ };
323
+ loading: {
324
+ type: import("vue").PropType<boolean | {
325
+ delay?: number;
326
+ }>;
327
+ default: () => boolean | {
328
+ delay?: number;
329
+ };
330
+ };
331
+ disabled: {
332
+ type: BooleanConstructor;
333
+ default: any;
334
+ };
335
+ ghost: {
336
+ type: BooleanConstructor;
337
+ default: any;
338
+ };
339
+ block: {
340
+ type: BooleanConstructor;
341
+ default: any;
342
+ };
343
+ danger: {
344
+ type: BooleanConstructor;
345
+ default: any;
346
+ };
347
+ icon: import("vue-types").VueTypeValidableDef<any>;
348
+ href: StringConstructor;
349
+ target: StringConstructor;
350
+ title: StringConstructor;
351
+ onClick: {
352
+ type: import("vue").PropType<import("ant-design-vue/es/_util/EventInterface").MouseEventHandler | import("ant-design-vue/es/_util/EventInterface").MouseEventHandler[]>;
353
+ };
354
+ onMousedown: {
355
+ type: import("vue").PropType<import("ant-design-vue/es/_util/EventInterface").MouseEventHandler | import("ant-design-vue/es/_util/EventInterface").MouseEventHandler[]>;
356
+ };
357
+ }>> & Readonly<{}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, {
358
+ block: boolean;
359
+ disabled: boolean;
360
+ danger: boolean;
361
+ ghost: boolean;
362
+ htmlType: import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType;
363
+ loading: boolean | {
364
+ delay?: number;
365
+ };
366
+ }>;
367
+ __isFragment?: never;
368
+ __isTeleport?: never;
369
+ __isSuspense?: never;
370
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
371
+ prefixCls: StringConstructor;
372
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonType>;
373
+ htmlType: {
374
+ type: import("vue").PropType<import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType>;
375
+ default: string;
376
+ };
377
+ shape: {
378
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonShape>;
379
+ };
380
+ size: {
381
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
382
+ };
383
+ loading: {
384
+ type: import("vue").PropType<boolean | {
385
+ delay?: number;
386
+ }>;
387
+ default: () => boolean | {
388
+ delay?: number;
389
+ };
390
+ };
391
+ disabled: {
392
+ type: BooleanConstructor;
393
+ default: any;
394
+ };
395
+ ghost: {
396
+ type: BooleanConstructor;
397
+ default: any;
398
+ };
399
+ block: {
400
+ type: BooleanConstructor;
401
+ default: any;
402
+ };
403
+ danger: {
404
+ type: BooleanConstructor;
405
+ default: any;
406
+ };
407
+ icon: import("vue-types").VueTypeValidableDef<any>;
408
+ href: StringConstructor;
409
+ target: StringConstructor;
410
+ title: StringConstructor;
411
+ onClick: {
412
+ type: import("vue").PropType<import("ant-design-vue/es/_util/EventInterface").MouseEventHandler | import("ant-design-vue/es/_util/EventInterface").MouseEventHandler[]>;
413
+ };
414
+ onMousedown: {
415
+ type: import("vue").PropType<import("ant-design-vue/es/_util/EventInterface").MouseEventHandler | import("ant-design-vue/es/_util/EventInterface").MouseEventHandler[]>;
416
+ };
417
+ }>> & Readonly<{}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
418
+ block: boolean;
419
+ disabled: boolean;
420
+ danger: boolean;
421
+ ghost: boolean;
422
+ htmlType: import("ant-design-vue/es/button/buttonTypes").ButtonHTMLType;
423
+ loading: boolean | {
424
+ delay?: number;
425
+ };
426
+ }, {}, string, import("ant-design-vue/es/_util/type").CustomSlotsType<{
427
+ icon: any;
428
+ default: any;
429
+ }>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[]> & {
430
+ readonly Group: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
431
+ prefixCls: StringConstructor;
432
+ size: {
433
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
434
+ };
435
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
436
+ prefixCls: StringConstructor;
437
+ size: {
438
+ type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
439
+ };
440
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
441
+ };
442
+ SenderHeader: never;
443
+ Attachments: {
444
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<AttachmentsProps> & Readonly<{}>, {
445
+ nativeElement: HTMLDivElement;
446
+ upload: (file: File) => void;
447
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
448
+ P: {};
449
+ B: {};
450
+ D: {};
451
+ C: {};
452
+ M: {};
453
+ Defaults: {};
454
+ }, Readonly<AttachmentsProps> & Readonly<{}>, {
455
+ nativeElement: HTMLDivElement;
456
+ upload: (file: File) => void;
457
+ }, {}, {}, {}, {}>;
458
+ __isFragment?: never;
459
+ __isTeleport?: never;
460
+ __isSuspense?: never;
461
+ } & import("vue").ComponentOptionsBase<Readonly<AttachmentsProps> & Readonly<{}>, {
462
+ nativeElement: HTMLDivElement;
463
+ upload: (file: File) => void;
464
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
465
+ $slots: Readonly<{
466
+ placeholder?(props?: {
467
+ type: "drop" | "inline";
468
+ }): string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
469
+ [key: string]: any;
470
+ }>;
471
+ }> & {
472
+ placeholder?(props?: {
473
+ type: "drop" | "inline";
474
+ }): string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
475
+ [key: string]: any;
476
+ }>;
477
+ };
478
+ }) & {
479
+ FileCard: import("vue").DefineComponent<import("ant-design-x-vue/dist/typings/attachments/interface").FileListCardProps, {
480
+ nativeElement: Readonly<import("vue").ShallowRef<HTMLDivElement, HTMLDivElement>>;
481
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("ant-design-x-vue/dist/typings/attachments/interface").FileListCardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
482
+ };
483
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
484
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ .vk-speech-button{
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ }
6
+ .vk-speech-button-recording-icon{
7
+ height: 1.2em;
8
+ width: 1.2em;
9
+ vertical-align: top;
10
+ }
@@ -0,0 +1,4 @@
1
+ import VkSpeechButton from './src/index.vue';
2
+ export * as __VkSpeechButton from './src/types';
3
+ export { VkSpeechButton, };
4
+ export default VkSpeechButton;
@@ -0,0 +1,131 @@
1
+ import { defineComponent, createVNode, createTextVNode } from 'vue';
2
+ import { useRecorder } from '@vunk/plus/composables/recorder';
3
+ import { Button } from 'ant-design-vue';
4
+ import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
5
+ import { A as AudioMutedOutlined, a as AudioOutlined } from '../SendOutlined.mjs';
6
+
7
+ const props = {
8
+ disabled: {
9
+ type: Boolean,
10
+ default: false
11
+ }
12
+ };
13
+ const emits = {
14
+ stop: (_) => true,
15
+ start: null
16
+ };
17
+
18
+ const SIZE = 1e3;
19
+ const COUNT = 4;
20
+ const RECT_WIDTH = 140;
21
+ const RECT_RADIUS = RECT_WIDTH / 2;
22
+ const RECT_HEIGHT_MIN = 250;
23
+ const RECT_HEIGHT_MAX = 500;
24
+ const DURATION = 0.8;
25
+ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
26
+ name: "AXSenderRecordingIcon",
27
+ setup() {
28
+ return () => {
29
+ return createVNode("svg", {
30
+ "color": "currentColor",
31
+ "viewBox": `0 0 ${SIZE} ${SIZE}`,
32
+ "xmlns": "http://www.w3.org/2000/svg",
33
+ "xmlnsXlink": "http://www.w3.org/1999/xlink"
34
+ }, [createVNode("title", null, [createTextVNode("Speech Recording")]), Array.from({
35
+ length: COUNT
36
+ }).map((_, index) => {
37
+ const dest = (SIZE - RECT_WIDTH * COUNT) / (COUNT - 1);
38
+ const x = index * (dest + RECT_WIDTH);
39
+ const yMin = SIZE / 2 - RECT_HEIGHT_MIN / 2;
40
+ const yMax = SIZE / 2 - RECT_HEIGHT_MAX / 2;
41
+ return createVNode("rect", {
42
+ "fill": "currentColor",
43
+ "rx": RECT_RADIUS,
44
+ "ry": RECT_RADIUS,
45
+ "height": RECT_HEIGHT_MIN,
46
+ "width": RECT_WIDTH,
47
+ "x": x,
48
+ "y": yMin,
49
+ "key": index
50
+ }, [createVNode("animate", {
51
+ "attributeName": "height",
52
+ "values": `${RECT_HEIGHT_MIN}; ${RECT_HEIGHT_MAX}; ${RECT_HEIGHT_MIN}`,
53
+ "keyTimes": "0; 0.5; 1",
54
+ "dur": `${DURATION}s`,
55
+ "begin": `${DURATION / COUNT * index}s`,
56
+ "repeatCount": "indefinite"
57
+ }, null), createVNode("animate", {
58
+ "attributeName": "y",
59
+ "values": `${yMin}; ${yMax}; ${yMin}`,
60
+ "keyTimes": "0; 0.5; 1",
61
+ "dur": `${DURATION}s`,
62
+ "begin": `${DURATION / COUNT * index}s`,
63
+ "repeatCount": "indefinite"
64
+ }, null)]);
65
+ })]);
66
+ };
67
+ }
68
+ });
69
+
70
+ var RecordingIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/speech-button/src/RecordingIcon.vue"]]);
71
+
72
+ var _sfc_main = /* @__PURE__ */ defineComponent({
73
+ name: "VkSpeechButton",
74
+ components: {
75
+ RecordingIcon
76
+ },
77
+ props,
78
+ emits,
79
+ setup(props2, {
80
+ emit
81
+ }) {
82
+ const {
83
+ openOrStart,
84
+ recording,
85
+ stop,
86
+ opening
87
+ } = useRecorder();
88
+ const handleClick = () => {
89
+ if (props2.disabled || opening.value) return;
90
+ if (recording.value) {
91
+ stop().then(blob => {
92
+ emit("stop", blob);
93
+ });
94
+ } else {
95
+ openOrStart().then(v => {
96
+ if (v) emit("start");
97
+ });
98
+ }
99
+ };
100
+ const iconRender = () => {
101
+ if (props2.disabled) return createVNode(AudioMutedOutlined, null, null);
102
+ if (opening.value) return createVNode(AudioOutlined, {
103
+ "spin": true
104
+ }, null);
105
+ if (recording.value) {
106
+ return createVNode(RecordingIcon, {
107
+ "class": "vk-speech-button-recording-icon"
108
+ }, null);
109
+ }
110
+ return createVNode(AudioOutlined, null, null);
111
+ };
112
+ return () => createVNode(Button, {
113
+ "onClick": handleClick,
114
+ "class": "vk-speech-button"
115
+ }, {
116
+ icon: iconRender
117
+ });
118
+ }
119
+ });
120
+
121
+ var VkSpeechButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/speech-button/src/index.vue"]]);
122
+
123
+ var types = /*#__PURE__*/Object.freeze({
124
+ __proto__: null
125
+ });
126
+
127
+ VkSpeechButton.install = (app) => {
128
+ app.component(VkSpeechButton.name || "VkSpeechButton", VkSpeechButton);
129
+ };
130
+
131
+ export { VkSpeechButton, types as __VkSpeechButton, VkSpeechButton as default };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export declare const props: {
2
+ disabled: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ };
7
+ export declare const emits: {
8
+ stop: (_: Blob) => boolean;
9
+ start: any;
10
+ };