nuxt-ui-elements 0.1.26 → 0.1.27
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/dist/module.json
CHANGED
|
@@ -1,146 +1,142 @@
|
|
|
1
1
|
import type { UploaderEvents, UploadFile, UploadOptions, UploadStatus, UploadFn, GetRemoteFileFn, Plugin as UploaderPlugin } from "./types.js";
|
|
2
2
|
export declare const useUploadManager: <TUploadResult = any>(_options?: UploadOptions) => {
|
|
3
|
-
files:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
files: import("vue").Ref<{
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
size: number;
|
|
7
|
+
mimeType: string;
|
|
8
|
+
data: {
|
|
9
9
|
readonly lastModified: number;
|
|
10
10
|
readonly name: string;
|
|
11
11
|
readonly webkitRelativePath: string;
|
|
12
12
|
readonly size: number;
|
|
13
13
|
readonly type: string;
|
|
14
|
-
|
|
14
|
+
arrayBuffer: {
|
|
15
15
|
(): Promise<ArrayBuffer>;
|
|
16
16
|
(): Promise<ArrayBuffer>;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
bytes: {
|
|
19
19
|
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
20
20
|
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
slice: {
|
|
23
23
|
(start?: number, end?: number, contentType?: string): Blob;
|
|
24
24
|
(start?: number, end?: number, contentType?: string): Blob;
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
stream: {
|
|
27
27
|
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
28
28
|
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
text: {
|
|
31
31
|
(): Promise<string>;
|
|
32
32
|
(): Promise<string>;
|
|
33
33
|
};
|
|
34
34
|
} | {
|
|
35
35
|
readonly size: number;
|
|
36
36
|
readonly type: string;
|
|
37
|
-
|
|
37
|
+
arrayBuffer: {
|
|
38
38
|
(): Promise<ArrayBuffer>;
|
|
39
39
|
(): Promise<ArrayBuffer>;
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
bytes: {
|
|
42
42
|
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
43
43
|
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
slice: {
|
|
46
46
|
(start?: number, end?: number, contentType?: string): Blob;
|
|
47
47
|
(start?: number, end?: number, contentType?: string): Blob;
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
stream: {
|
|
50
50
|
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
51
51
|
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
text: {
|
|
54
54
|
(): Promise<string>;
|
|
55
55
|
(): Promise<string>;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
status: import("./types.js").FileStatus;
|
|
59
|
+
preview?: string | undefined;
|
|
60
|
+
progress: {
|
|
61
|
+
percentage: number;
|
|
62
62
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
error?: {
|
|
64
|
+
message: string;
|
|
65
|
+
details?: unknown;
|
|
66
66
|
} | undefined;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
readonly mimeType: string;
|
|
78
|
-
readonly data: {
|
|
67
|
+
uploadResult?: import("vue").UnwrapRef<TUploadResult> | undefined;
|
|
68
|
+
isRemote?: boolean | undefined;
|
|
69
|
+
remoteUrl?: string | undefined;
|
|
70
|
+
meta: Record<string, unknown>;
|
|
71
|
+
}[], UploadFile<TUploadResult>[] | {
|
|
72
|
+
id: string;
|
|
73
|
+
name: string;
|
|
74
|
+
size: number;
|
|
75
|
+
mimeType: string;
|
|
76
|
+
data: {
|
|
79
77
|
readonly lastModified: number;
|
|
80
78
|
readonly name: string;
|
|
81
79
|
readonly webkitRelativePath: string;
|
|
82
80
|
readonly size: number;
|
|
83
81
|
readonly type: string;
|
|
84
|
-
|
|
82
|
+
arrayBuffer: {
|
|
85
83
|
(): Promise<ArrayBuffer>;
|
|
86
84
|
(): Promise<ArrayBuffer>;
|
|
87
85
|
};
|
|
88
|
-
|
|
86
|
+
bytes: {
|
|
89
87
|
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
90
88
|
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
91
89
|
};
|
|
92
|
-
|
|
90
|
+
slice: {
|
|
93
91
|
(start?: number, end?: number, contentType?: string): Blob;
|
|
94
92
|
(start?: number, end?: number, contentType?: string): Blob;
|
|
95
93
|
};
|
|
96
|
-
|
|
94
|
+
stream: {
|
|
97
95
|
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
98
96
|
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
99
97
|
};
|
|
100
|
-
|
|
98
|
+
text: {
|
|
101
99
|
(): Promise<string>;
|
|
102
100
|
(): Promise<string>;
|
|
103
101
|
};
|
|
104
102
|
} | {
|
|
105
103
|
readonly size: number;
|
|
106
104
|
readonly type: string;
|
|
107
|
-
|
|
105
|
+
arrayBuffer: {
|
|
108
106
|
(): Promise<ArrayBuffer>;
|
|
109
107
|
(): Promise<ArrayBuffer>;
|
|
110
108
|
};
|
|
111
|
-
|
|
109
|
+
bytes: {
|
|
112
110
|
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
113
111
|
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
114
112
|
};
|
|
115
|
-
|
|
113
|
+
slice: {
|
|
116
114
|
(start?: number, end?: number, contentType?: string): Blob;
|
|
117
115
|
(start?: number, end?: number, contentType?: string): Blob;
|
|
118
116
|
};
|
|
119
|
-
|
|
117
|
+
stream: {
|
|
120
118
|
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
121
119
|
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
122
120
|
};
|
|
123
|
-
|
|
121
|
+
text: {
|
|
124
122
|
(): Promise<string>;
|
|
125
123
|
(): Promise<string>;
|
|
126
124
|
};
|
|
127
125
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
126
|
+
status: import("./types.js").FileStatus;
|
|
127
|
+
preview?: string | undefined;
|
|
128
|
+
progress: {
|
|
129
|
+
percentage: number;
|
|
132
130
|
};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
error?: {
|
|
132
|
+
message: string;
|
|
133
|
+
details?: unknown;
|
|
136
134
|
} | undefined;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
};
|
|
143
|
-
}[]>>;
|
|
135
|
+
uploadResult?: import("vue").UnwrapRef<TUploadResult> | undefined;
|
|
136
|
+
isRemote?: boolean | undefined;
|
|
137
|
+
remoteUrl?: string | undefined;
|
|
138
|
+
meta: Record<string, unknown>;
|
|
139
|
+
}[]>;
|
|
144
140
|
totalProgress: import("vue").ComputedRef<number>;
|
|
145
141
|
addFiles: (newFiles: File[]) => Promise<(UploadFile<any> | null)[]>;
|
|
146
142
|
addFile: (file: File) => Promise<UploadFile<any> | null>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import mitt from "mitt";
|
|
2
|
-
import { computed,
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
3
|
import { ValidatorAllowedFileTypes, ValidatorMaxfileSize, ValidatorMaxFiles } from "./validators/index.js";
|
|
4
4
|
import { PluginThumbnailGenerator, PluginImageCompressor } from "./plugins/index.js";
|
|
5
5
|
function getExtension(fullFileName) {
|
|
@@ -344,7 +344,7 @@ The LAST storage plugin ("${plugin.id}") will be used for uploads.
|
|
|
344
344
|
}
|
|
345
345
|
return {
|
|
346
346
|
// State
|
|
347
|
-
files
|
|
347
|
+
files,
|
|
348
348
|
totalProgress,
|
|
349
349
|
// Core Methods
|
|
350
350
|
addFiles,
|
package/package.json
CHANGED