nuxt-ui-elements 0.1.33 → 0.1.34
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 +1 -1
- package/dist/module.mjs +1 -7
- package/dist/runtime/types/index.d.ts +0 -3
- package/dist/runtime/types/index.js +0 -3
- package/package.json +2 -17
- package/dist/runtime/composables/useFFMpeg.d.ts +0 -14
- package/dist/runtime/composables/useFFMpeg.js +0 -66
- package/dist/runtime/composables/useUploadManager/index.d.ts +0 -471
- package/dist/runtime/composables/useUploadManager/index.js +0 -486
- package/dist/runtime/composables/useUploadManager/plugins/image-compressor.d.ts +0 -56
- package/dist/runtime/composables/useUploadManager/plugins/image-compressor.js +0 -137
- package/dist/runtime/composables/useUploadManager/plugins/index.d.ts +0 -4
- package/dist/runtime/composables/useUploadManager/plugins/index.js +0 -4
- package/dist/runtime/composables/useUploadManager/plugins/storage/azure-datalake.d.ts +0 -55
- package/dist/runtime/composables/useUploadManager/plugins/storage/azure-datalake.js +0 -137
- package/dist/runtime/composables/useUploadManager/plugins/storage/index.d.ts +0 -10
- package/dist/runtime/composables/useUploadManager/plugins/storage/index.js +0 -1
- package/dist/runtime/composables/useUploadManager/plugins/thumbnail-generator.d.ts +0 -8
- package/dist/runtime/composables/useUploadManager/plugins/thumbnail-generator.js +0 -97
- package/dist/runtime/composables/useUploadManager/plugins/video-compressor.d.ts +0 -72
- package/dist/runtime/composables/useUploadManager/plugins/video-compressor.js +0 -109
- package/dist/runtime/composables/useUploadManager/types.d.ts +0 -488
- package/dist/runtime/composables/useUploadManager/types.js +0 -9
- package/dist/runtime/composables/useUploadManager/utils.d.ts +0 -23
- package/dist/runtime/composables/useUploadManager/utils.js +0 -45
- package/dist/runtime/composables/useUploadManager/validators/allowed-file-types.d.ts +0 -5
- package/dist/runtime/composables/useUploadManager/validators/allowed-file-types.js +0 -17
- package/dist/runtime/composables/useUploadManager/validators/duplicate-file.d.ts +0 -13
- package/dist/runtime/composables/useUploadManager/validators/duplicate-file.js +0 -27
- package/dist/runtime/composables/useUploadManager/validators/index.d.ts +0 -4
- package/dist/runtime/composables/useUploadManager/validators/index.js +0 -4
- package/dist/runtime/composables/useUploadManager/validators/max-file-size.d.ts +0 -5
- package/dist/runtime/composables/useUploadManager/validators/max-file-size.js +0 -17
- package/dist/runtime/composables/useUploadManager/validators/max-files.d.ts +0 -5
- package/dist/runtime/composables/useUploadManager/validators/max-files.js +0 -17
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addTemplate, defineNuxtModule, createResolver, addImportsDir
|
|
1
|
+
import { addTemplate, defineNuxtModule, createResolver, addImportsDir } from '@nuxt/kit';
|
|
2
2
|
import { kebabCase } from 'scule';
|
|
3
3
|
|
|
4
4
|
const dialogConfirm = (options) => ({
|
|
@@ -251,12 +251,6 @@ const module$1 = defineNuxtModule({
|
|
|
251
251
|
addTemplates(optionsWithTheme);
|
|
252
252
|
nuxt.options.css.push(resolver.resolve("./runtime/index.css"));
|
|
253
253
|
addImportsDir(resolver.resolve("./runtime/composables"));
|
|
254
|
-
addImports([
|
|
255
|
-
{
|
|
256
|
-
name: "useUploadManager",
|
|
257
|
-
from: resolver.resolve("./runtime/composables/useUploadManager")
|
|
258
|
-
}
|
|
259
|
-
]);
|
|
260
254
|
nuxt.options.alias["#std"] = resolver.resolve("./runtime/utils/std");
|
|
261
255
|
nuxt.options.alias["#ui-elements"] = resolver.resolve("./runtime");
|
|
262
256
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
export * from "../components/DialogConfirm.vue.js";
|
|
2
2
|
export * from "../components/DialogAlert.vue.js";
|
|
3
3
|
export * from "./tv.js";
|
|
4
|
-
export * from "../composables/useUploadManager/types.js";
|
|
5
|
-
export * from "../composables/useUploadManager/plugins/index.js";
|
|
6
|
-
export * from "../composables/useUploadManager/validators/index.js";
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
export * from "../components/DialogConfirm.vue";
|
|
2
2
|
export * from "../components/DialogAlert.vue";
|
|
3
3
|
export * from "./tv.js";
|
|
4
|
-
export * from "../composables/useUploadManager/types.js";
|
|
5
|
-
export * from "../composables/useUploadManager/plugins/index.js";
|
|
6
|
-
export * from "../composables/useUploadManager/validators/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-ui-elements",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34",
|
|
4
4
|
"description": "A collection of beautiful, animated UI components for Nuxt applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/genu/nuxt-ui-elements.git",
|
|
@@ -28,15 +28,11 @@
|
|
|
28
28
|
"@internationalized/date": "^3.10.1",
|
|
29
29
|
"@nuxt/kit": "^4.2.2",
|
|
30
30
|
"@sindresorhus/slugify": "^3.0.0",
|
|
31
|
-
"mitt": "^3.0.1",
|
|
32
31
|
"plur": "^6.0.0",
|
|
33
32
|
"scule": "^1.3.0",
|
|
34
33
|
"tailwind-variants": "^3.2.2"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"@azure/storage-file-datalake": "^12.28.1",
|
|
38
|
-
"@ffmpeg/ffmpeg": "0.12.15",
|
|
39
|
-
"@ffmpeg/util": "0.12.2",
|
|
40
36
|
"@nuxt/devtools": "^3.1.1",
|
|
41
37
|
"@nuxt/eslint-config": "^1.12.1",
|
|
42
38
|
"@nuxt/module-builder": "^1.0.2",
|
|
@@ -49,7 +45,7 @@
|
|
|
49
45
|
"changelogen": "^0.6.2",
|
|
50
46
|
"eslint": "^9.39.2",
|
|
51
47
|
"eslint-config-prettier": "10.1.8",
|
|
52
|
-
"eslint-plugin-prettier": "5.5.
|
|
48
|
+
"eslint-plugin-prettier": "5.5.5",
|
|
53
49
|
"nuxt": "^4.2.2",
|
|
54
50
|
"prettier": "^3.7.4",
|
|
55
51
|
"typescript": "~5.9.3",
|
|
@@ -59,17 +55,6 @@
|
|
|
59
55
|
"peerDependencies": {
|
|
60
56
|
"@nuxt/ui": "^4.0.0"
|
|
61
57
|
},
|
|
62
|
-
"peerDependenciesMeta": {
|
|
63
|
-
"@azure/storage-file-datalake": {
|
|
64
|
-
"optional": true
|
|
65
|
-
},
|
|
66
|
-
"@ffmpeg/ffmpeg": {
|
|
67
|
-
"optional": true
|
|
68
|
-
},
|
|
69
|
-
"@ffmpeg/util": {
|
|
70
|
-
"optional": true
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
58
|
"scripts": {
|
|
74
59
|
"dev": "pnpm dev:prepare && nuxi dev playground",
|
|
75
60
|
"dev:build": "nuxi build playground",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface FFMPegOptions {
|
|
2
|
-
inputUrl: string;
|
|
3
|
-
convertOptions?: string[];
|
|
4
|
-
}
|
|
5
|
-
export declare const useFFMpeg: (options: FFMPegOptions) => {
|
|
6
|
-
status: import("vue").Ref<"success" | "error" | "paused" | "converting", "success" | "error" | "paused" | "converting">;
|
|
7
|
-
progress: import("vue").Ref<number, number>;
|
|
8
|
-
convertedFile: import("vue").Ref<File | undefined, File | undefined>;
|
|
9
|
-
load: () => Promise<void>;
|
|
10
|
-
unload: () => void;
|
|
11
|
-
convert: (convertOptions: string[]) => Promise<File | undefined>;
|
|
12
|
-
onConvertSuccess: (callback: (updatedVideo: File) => void) => (updatedVideo: File) => void;
|
|
13
|
-
};
|
|
14
|
-
export {};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { FFmpeg } from "@ffmpeg/ffmpeg";
|
|
2
|
-
import { fetchFile, toBlobURL } from "@ffmpeg/util";
|
|
3
|
-
import { ref } from "vue";
|
|
4
|
-
const defaultOptions = {
|
|
5
|
-
convertOptions: []
|
|
6
|
-
};
|
|
7
|
-
const baseURL = "https://unpkg.com/@ffmpeg/core@0.12.6/dist/esm";
|
|
8
|
-
export const useFFMpeg = (options) => {
|
|
9
|
-
options = { ...defaultOptions, ...options };
|
|
10
|
-
const ffmpeg = new FFmpeg();
|
|
11
|
-
const status = ref("paused");
|
|
12
|
-
const progress = ref(0);
|
|
13
|
-
const originalFile = ref();
|
|
14
|
-
const convertedFile = ref();
|
|
15
|
-
let _onConvertSuccess;
|
|
16
|
-
ffmpeg.on("progress", ({ time }) => {
|
|
17
|
-
progress.value = time / 1e6;
|
|
18
|
-
});
|
|
19
|
-
const load = async () => {
|
|
20
|
-
await ffmpeg.load({
|
|
21
|
-
coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, "text/javascript"),
|
|
22
|
-
wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, "application/wasm")
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
const unload = () => ffmpeg.terminate();
|
|
26
|
-
const convert = async (convertOptions) => {
|
|
27
|
-
status.value = "converting";
|
|
28
|
-
const command = ["-i", "input.avi", ...options.convertOptions, ...convertOptions, "-c", "copy", "output.mp4"];
|
|
29
|
-
try {
|
|
30
|
-
originalFile.value = await fetchFile(options.inputUrl);
|
|
31
|
-
await ffmpeg.writeFile("input.avi", originalFile.value);
|
|
32
|
-
await ffmpeg.exec(command);
|
|
33
|
-
convertedFile.value = await getModifiedVideo();
|
|
34
|
-
await ffmpeg.deleteFile("input.avi");
|
|
35
|
-
status.value = "success";
|
|
36
|
-
if (_onConvertSuccess) _onConvertSuccess(convertedFile.value);
|
|
37
|
-
return convertedFile.value;
|
|
38
|
-
} catch (error) {
|
|
39
|
-
if (import.meta.env.DEV) console.error(error);
|
|
40
|
-
status.value = "error";
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const getModifiedVideo = async () => {
|
|
44
|
-
const data = await ffmpeg.readFile("output.mp4");
|
|
45
|
-
let bytes;
|
|
46
|
-
if (typeof data === "string") {
|
|
47
|
-
bytes = new TextEncoder().encode(data);
|
|
48
|
-
} else {
|
|
49
|
-
const buffer = new ArrayBuffer(data.byteLength);
|
|
50
|
-
new Uint8Array(buffer).set(data);
|
|
51
|
-
bytes = new Uint8Array(buffer);
|
|
52
|
-
}
|
|
53
|
-
const updatedFile = new File([bytes], "output.mp4", { type: "video/mp4" });
|
|
54
|
-
return updatedFile;
|
|
55
|
-
};
|
|
56
|
-
const onConvertSuccess = (callback) => _onConvertSuccess = callback;
|
|
57
|
-
return {
|
|
58
|
-
status,
|
|
59
|
-
progress,
|
|
60
|
-
convertedFile,
|
|
61
|
-
load,
|
|
62
|
-
unload,
|
|
63
|
-
convert,
|
|
64
|
-
onConvertSuccess
|
|
65
|
-
};
|
|
66
|
-
};
|
|
@@ -1,471 +0,0 @@
|
|
|
1
|
-
import type { UploaderEvents, UploadFile, UploadOptions, UploadStatus, UploadFn, GetRemoteFileFn, Plugin as UploaderPlugin } from "./types.js";
|
|
2
|
-
export declare const useUploadManager: <TUploadResult = any>(_options?: UploadOptions) => {
|
|
3
|
-
files: Readonly<import("vue").Ref<readonly ({
|
|
4
|
-
readonly source: "local";
|
|
5
|
-
readonly data: {
|
|
6
|
-
readonly lastModified: number;
|
|
7
|
-
readonly name: string;
|
|
8
|
-
readonly webkitRelativePath: string;
|
|
9
|
-
readonly size: number;
|
|
10
|
-
readonly type: string;
|
|
11
|
-
readonly arrayBuffer: {
|
|
12
|
-
(): Promise<ArrayBuffer>;
|
|
13
|
-
(): Promise<ArrayBuffer>;
|
|
14
|
-
};
|
|
15
|
-
readonly bytes: {
|
|
16
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
17
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
18
|
-
};
|
|
19
|
-
readonly slice: {
|
|
20
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
21
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
22
|
-
};
|
|
23
|
-
readonly stream: {
|
|
24
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
25
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
26
|
-
};
|
|
27
|
-
readonly text: {
|
|
28
|
-
(): Promise<string>;
|
|
29
|
-
(): Promise<string>;
|
|
30
|
-
};
|
|
31
|
-
} | {
|
|
32
|
-
readonly size: number;
|
|
33
|
-
readonly type: string;
|
|
34
|
-
readonly arrayBuffer: {
|
|
35
|
-
(): Promise<ArrayBuffer>;
|
|
36
|
-
(): Promise<ArrayBuffer>;
|
|
37
|
-
};
|
|
38
|
-
readonly bytes: {
|
|
39
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
40
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
41
|
-
};
|
|
42
|
-
readonly slice: {
|
|
43
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
44
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
45
|
-
};
|
|
46
|
-
readonly stream: {
|
|
47
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
48
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
49
|
-
};
|
|
50
|
-
readonly text: {
|
|
51
|
-
(): Promise<string>;
|
|
52
|
-
(): Promise<string>;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
readonly remoteUrl?: string | undefined;
|
|
56
|
-
readonly id: string;
|
|
57
|
-
readonly name: string;
|
|
58
|
-
readonly size: number;
|
|
59
|
-
readonly mimeType: string;
|
|
60
|
-
readonly status: import("./types.js").FileStatus;
|
|
61
|
-
readonly preview?: string | undefined;
|
|
62
|
-
readonly progress: {
|
|
63
|
-
readonly percentage: number;
|
|
64
|
-
};
|
|
65
|
-
readonly error?: {
|
|
66
|
-
readonly message: string;
|
|
67
|
-
readonly details?: Readonly<unknown> | undefined;
|
|
68
|
-
} | undefined;
|
|
69
|
-
readonly uploadResult?: import("vue").DeepReadonly<import("vue").UnwrapRef<TUploadResult>> | undefined;
|
|
70
|
-
readonly meta: {
|
|
71
|
-
readonly [x: string]: Readonly<unknown>;
|
|
72
|
-
};
|
|
73
|
-
} | {
|
|
74
|
-
readonly source: Exclude<import("./types.js").FileSource, "local">;
|
|
75
|
-
readonly data: null;
|
|
76
|
-
readonly remoteUrl: string;
|
|
77
|
-
readonly id: string;
|
|
78
|
-
readonly name: string;
|
|
79
|
-
readonly size: number;
|
|
80
|
-
readonly mimeType: string;
|
|
81
|
-
readonly status: import("./types.js").FileStatus;
|
|
82
|
-
readonly preview?: string | undefined;
|
|
83
|
-
readonly progress: {
|
|
84
|
-
readonly percentage: number;
|
|
85
|
-
};
|
|
86
|
-
readonly error?: {
|
|
87
|
-
readonly message: string;
|
|
88
|
-
readonly details?: Readonly<unknown> | undefined;
|
|
89
|
-
} | undefined;
|
|
90
|
-
readonly uploadResult?: import("vue").DeepReadonly<import("vue").UnwrapRef<TUploadResult>> | undefined;
|
|
91
|
-
readonly meta: {
|
|
92
|
-
readonly [x: string]: Readonly<unknown>;
|
|
93
|
-
};
|
|
94
|
-
})[], readonly ({
|
|
95
|
-
readonly source: "local";
|
|
96
|
-
readonly data: {
|
|
97
|
-
readonly lastModified: number;
|
|
98
|
-
readonly name: string;
|
|
99
|
-
readonly webkitRelativePath: string;
|
|
100
|
-
readonly size: number;
|
|
101
|
-
readonly type: string;
|
|
102
|
-
readonly arrayBuffer: {
|
|
103
|
-
(): Promise<ArrayBuffer>;
|
|
104
|
-
(): Promise<ArrayBuffer>;
|
|
105
|
-
};
|
|
106
|
-
readonly bytes: {
|
|
107
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
108
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
109
|
-
};
|
|
110
|
-
readonly slice: {
|
|
111
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
112
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
113
|
-
};
|
|
114
|
-
readonly stream: {
|
|
115
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
116
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
117
|
-
};
|
|
118
|
-
readonly text: {
|
|
119
|
-
(): Promise<string>;
|
|
120
|
-
(): Promise<string>;
|
|
121
|
-
};
|
|
122
|
-
} | {
|
|
123
|
-
readonly size: number;
|
|
124
|
-
readonly type: string;
|
|
125
|
-
readonly arrayBuffer: {
|
|
126
|
-
(): Promise<ArrayBuffer>;
|
|
127
|
-
(): Promise<ArrayBuffer>;
|
|
128
|
-
};
|
|
129
|
-
readonly bytes: {
|
|
130
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
131
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
132
|
-
};
|
|
133
|
-
readonly slice: {
|
|
134
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
135
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
136
|
-
};
|
|
137
|
-
readonly stream: {
|
|
138
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
139
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
140
|
-
};
|
|
141
|
-
readonly text: {
|
|
142
|
-
(): Promise<string>;
|
|
143
|
-
(): Promise<string>;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
readonly remoteUrl?: string | undefined;
|
|
147
|
-
readonly id: string;
|
|
148
|
-
readonly name: string;
|
|
149
|
-
readonly size: number;
|
|
150
|
-
readonly mimeType: string;
|
|
151
|
-
readonly status: import("./types.js").FileStatus;
|
|
152
|
-
readonly preview?: string | undefined;
|
|
153
|
-
readonly progress: {
|
|
154
|
-
readonly percentage: number;
|
|
155
|
-
};
|
|
156
|
-
readonly error?: {
|
|
157
|
-
readonly message: string;
|
|
158
|
-
readonly details?: Readonly<unknown> | undefined;
|
|
159
|
-
} | undefined;
|
|
160
|
-
readonly uploadResult?: import("vue").DeepReadonly<import("vue").UnwrapRef<TUploadResult>> | undefined;
|
|
161
|
-
readonly meta: {
|
|
162
|
-
readonly [x: string]: Readonly<unknown>;
|
|
163
|
-
};
|
|
164
|
-
} | {
|
|
165
|
-
readonly source: Exclude<import("./types.js").FileSource, "local">;
|
|
166
|
-
readonly data: null;
|
|
167
|
-
readonly remoteUrl: string;
|
|
168
|
-
readonly id: string;
|
|
169
|
-
readonly name: string;
|
|
170
|
-
readonly size: number;
|
|
171
|
-
readonly mimeType: string;
|
|
172
|
-
readonly status: import("./types.js").FileStatus;
|
|
173
|
-
readonly preview?: string | undefined;
|
|
174
|
-
readonly progress: {
|
|
175
|
-
readonly percentage: number;
|
|
176
|
-
};
|
|
177
|
-
readonly error?: {
|
|
178
|
-
readonly message: string;
|
|
179
|
-
readonly details?: Readonly<unknown> | undefined;
|
|
180
|
-
} | undefined;
|
|
181
|
-
readonly uploadResult?: import("vue").DeepReadonly<import("vue").UnwrapRef<TUploadResult>> | undefined;
|
|
182
|
-
readonly meta: {
|
|
183
|
-
readonly [x: string]: Readonly<unknown>;
|
|
184
|
-
};
|
|
185
|
-
})[]>>;
|
|
186
|
-
totalProgress: import("vue").ComputedRef<number>;
|
|
187
|
-
addFiles: (newFiles: File[]) => Promise<UploadFile[]>;
|
|
188
|
-
addFile: (file: File) => Promise<UploadFile>;
|
|
189
|
-
onGetRemoteFile: (fn: GetRemoteFileFn) => void;
|
|
190
|
-
onUpload: (fn: UploadFn<TUploadResult>) => void;
|
|
191
|
-
removeFile: (fileId: string) => Promise<void>;
|
|
192
|
-
removeFiles: (fileIds: string[]) => ({
|
|
193
|
-
source: "local";
|
|
194
|
-
data: {
|
|
195
|
-
readonly lastModified: number;
|
|
196
|
-
readonly name: string;
|
|
197
|
-
readonly webkitRelativePath: string;
|
|
198
|
-
readonly size: number;
|
|
199
|
-
readonly type: string;
|
|
200
|
-
arrayBuffer: {
|
|
201
|
-
(): Promise<ArrayBuffer>;
|
|
202
|
-
(): Promise<ArrayBuffer>;
|
|
203
|
-
};
|
|
204
|
-
bytes: {
|
|
205
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
206
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
207
|
-
};
|
|
208
|
-
slice: {
|
|
209
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
210
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
211
|
-
};
|
|
212
|
-
stream: {
|
|
213
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
214
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
215
|
-
};
|
|
216
|
-
text: {
|
|
217
|
-
(): Promise<string>;
|
|
218
|
-
(): Promise<string>;
|
|
219
|
-
};
|
|
220
|
-
} | {
|
|
221
|
-
readonly size: number;
|
|
222
|
-
readonly type: string;
|
|
223
|
-
arrayBuffer: {
|
|
224
|
-
(): Promise<ArrayBuffer>;
|
|
225
|
-
(): Promise<ArrayBuffer>;
|
|
226
|
-
};
|
|
227
|
-
bytes: {
|
|
228
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
229
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
230
|
-
};
|
|
231
|
-
slice: {
|
|
232
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
233
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
234
|
-
};
|
|
235
|
-
stream: {
|
|
236
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
237
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
238
|
-
};
|
|
239
|
-
text: {
|
|
240
|
-
(): Promise<string>;
|
|
241
|
-
(): Promise<string>;
|
|
242
|
-
};
|
|
243
|
-
};
|
|
244
|
-
remoteUrl?: string | undefined;
|
|
245
|
-
id: string;
|
|
246
|
-
name: string;
|
|
247
|
-
size: number;
|
|
248
|
-
mimeType: string;
|
|
249
|
-
status: import("./types.js").FileStatus;
|
|
250
|
-
preview?: string | undefined;
|
|
251
|
-
progress: {
|
|
252
|
-
percentage: number;
|
|
253
|
-
};
|
|
254
|
-
error?: {
|
|
255
|
-
message: string;
|
|
256
|
-
details?: unknown;
|
|
257
|
-
} | undefined;
|
|
258
|
-
uploadResult?: import("vue").UnwrapRef<TUploadResult> | undefined;
|
|
259
|
-
meta: Record<string, unknown>;
|
|
260
|
-
} | {
|
|
261
|
-
source: Exclude<import("./types.js").FileSource, "local">;
|
|
262
|
-
data: null;
|
|
263
|
-
remoteUrl: string;
|
|
264
|
-
id: string;
|
|
265
|
-
name: string;
|
|
266
|
-
size: number;
|
|
267
|
-
mimeType: string;
|
|
268
|
-
status: import("./types.js").FileStatus;
|
|
269
|
-
preview?: string | undefined;
|
|
270
|
-
progress: {
|
|
271
|
-
percentage: number;
|
|
272
|
-
};
|
|
273
|
-
error?: {
|
|
274
|
-
message: string;
|
|
275
|
-
details?: unknown;
|
|
276
|
-
} | undefined;
|
|
277
|
-
uploadResult?: import("vue").UnwrapRef<TUploadResult> | undefined;
|
|
278
|
-
meta: Record<string, unknown>;
|
|
279
|
-
})[];
|
|
280
|
-
clearFiles: () => ({
|
|
281
|
-
source: "local";
|
|
282
|
-
data: {
|
|
283
|
-
readonly lastModified: number;
|
|
284
|
-
readonly name: string;
|
|
285
|
-
readonly webkitRelativePath: string;
|
|
286
|
-
readonly size: number;
|
|
287
|
-
readonly type: string;
|
|
288
|
-
arrayBuffer: {
|
|
289
|
-
(): Promise<ArrayBuffer>;
|
|
290
|
-
(): Promise<ArrayBuffer>;
|
|
291
|
-
};
|
|
292
|
-
bytes: {
|
|
293
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
294
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
295
|
-
};
|
|
296
|
-
slice: {
|
|
297
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
298
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
299
|
-
};
|
|
300
|
-
stream: {
|
|
301
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
302
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
303
|
-
};
|
|
304
|
-
text: {
|
|
305
|
-
(): Promise<string>;
|
|
306
|
-
(): Promise<string>;
|
|
307
|
-
};
|
|
308
|
-
} | {
|
|
309
|
-
readonly size: number;
|
|
310
|
-
readonly type: string;
|
|
311
|
-
arrayBuffer: {
|
|
312
|
-
(): Promise<ArrayBuffer>;
|
|
313
|
-
(): Promise<ArrayBuffer>;
|
|
314
|
-
};
|
|
315
|
-
bytes: {
|
|
316
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
317
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
318
|
-
};
|
|
319
|
-
slice: {
|
|
320
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
321
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
322
|
-
};
|
|
323
|
-
stream: {
|
|
324
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
325
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
326
|
-
};
|
|
327
|
-
text: {
|
|
328
|
-
(): Promise<string>;
|
|
329
|
-
(): Promise<string>;
|
|
330
|
-
};
|
|
331
|
-
};
|
|
332
|
-
remoteUrl?: string | undefined;
|
|
333
|
-
id: string;
|
|
334
|
-
name: string;
|
|
335
|
-
size: number;
|
|
336
|
-
mimeType: string;
|
|
337
|
-
status: import("./types.js").FileStatus;
|
|
338
|
-
preview?: string | undefined;
|
|
339
|
-
progress: {
|
|
340
|
-
percentage: number;
|
|
341
|
-
};
|
|
342
|
-
error?: {
|
|
343
|
-
message: string;
|
|
344
|
-
details?: unknown;
|
|
345
|
-
} | undefined;
|
|
346
|
-
uploadResult?: import("vue").UnwrapRef<TUploadResult> | undefined;
|
|
347
|
-
meta: Record<string, unknown>;
|
|
348
|
-
} | {
|
|
349
|
-
source: Exclude<import("./types.js").FileSource, "local">;
|
|
350
|
-
data: null;
|
|
351
|
-
remoteUrl: string;
|
|
352
|
-
id: string;
|
|
353
|
-
name: string;
|
|
354
|
-
size: number;
|
|
355
|
-
mimeType: string;
|
|
356
|
-
status: import("./types.js").FileStatus;
|
|
357
|
-
preview?: string | undefined;
|
|
358
|
-
progress: {
|
|
359
|
-
percentage: number;
|
|
360
|
-
};
|
|
361
|
-
error?: {
|
|
362
|
-
message: string;
|
|
363
|
-
details?: unknown;
|
|
364
|
-
} | undefined;
|
|
365
|
-
uploadResult?: import("vue").UnwrapRef<TUploadResult> | undefined;
|
|
366
|
-
meta: Record<string, unknown>;
|
|
367
|
-
})[];
|
|
368
|
-
reorderFile: (oldIndex: number, newIndex: number) => void;
|
|
369
|
-
getFile: (fileId: string) => {
|
|
370
|
-
source: "local";
|
|
371
|
-
data: {
|
|
372
|
-
readonly lastModified: number;
|
|
373
|
-
readonly name: string;
|
|
374
|
-
readonly webkitRelativePath: string;
|
|
375
|
-
readonly size: number;
|
|
376
|
-
readonly type: string;
|
|
377
|
-
arrayBuffer: {
|
|
378
|
-
(): Promise<ArrayBuffer>;
|
|
379
|
-
(): Promise<ArrayBuffer>;
|
|
380
|
-
};
|
|
381
|
-
bytes: {
|
|
382
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
383
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
384
|
-
};
|
|
385
|
-
slice: {
|
|
386
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
387
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
388
|
-
};
|
|
389
|
-
stream: {
|
|
390
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
391
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
392
|
-
};
|
|
393
|
-
text: {
|
|
394
|
-
(): Promise<string>;
|
|
395
|
-
(): Promise<string>;
|
|
396
|
-
};
|
|
397
|
-
} | {
|
|
398
|
-
readonly size: number;
|
|
399
|
-
readonly type: string;
|
|
400
|
-
arrayBuffer: {
|
|
401
|
-
(): Promise<ArrayBuffer>;
|
|
402
|
-
(): Promise<ArrayBuffer>;
|
|
403
|
-
};
|
|
404
|
-
bytes: {
|
|
405
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
406
|
-
(): Promise<Uint8Array<ArrayBuffer>>;
|
|
407
|
-
};
|
|
408
|
-
slice: {
|
|
409
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
410
|
-
(start?: number, end?: number, contentType?: string): Blob;
|
|
411
|
-
};
|
|
412
|
-
stream: {
|
|
413
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
414
|
-
(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
415
|
-
};
|
|
416
|
-
text: {
|
|
417
|
-
(): Promise<string>;
|
|
418
|
-
(): Promise<string>;
|
|
419
|
-
};
|
|
420
|
-
};
|
|
421
|
-
remoteUrl?: string | undefined;
|
|
422
|
-
id: string;
|
|
423
|
-
name: string;
|
|
424
|
-
size: number;
|
|
425
|
-
mimeType: string;
|
|
426
|
-
status: import("./types.js").FileStatus;
|
|
427
|
-
preview?: string | undefined;
|
|
428
|
-
progress: {
|
|
429
|
-
percentage: number;
|
|
430
|
-
};
|
|
431
|
-
error?: {
|
|
432
|
-
message: string;
|
|
433
|
-
details?: unknown;
|
|
434
|
-
} | undefined;
|
|
435
|
-
uploadResult?: import("vue").UnwrapRef<TUploadResult> | undefined;
|
|
436
|
-
meta: Record<string, unknown>;
|
|
437
|
-
} | {
|
|
438
|
-
source: Exclude<import("./types.js").FileSource, "local">;
|
|
439
|
-
data: null;
|
|
440
|
-
remoteUrl: string;
|
|
441
|
-
id: string;
|
|
442
|
-
name: string;
|
|
443
|
-
size: number;
|
|
444
|
-
mimeType: string;
|
|
445
|
-
status: import("./types.js").FileStatus;
|
|
446
|
-
preview?: string | undefined;
|
|
447
|
-
progress: {
|
|
448
|
-
percentage: number;
|
|
449
|
-
};
|
|
450
|
-
error?: {
|
|
451
|
-
message: string;
|
|
452
|
-
details?: unknown;
|
|
453
|
-
} | undefined;
|
|
454
|
-
uploadResult?: import("vue").UnwrapRef<TUploadResult> | undefined;
|
|
455
|
-
meta: Record<string, unknown>;
|
|
456
|
-
};
|
|
457
|
-
upload: () => Promise<void>;
|
|
458
|
-
reset: () => void;
|
|
459
|
-
status: import("vue").Ref<UploadStatus, UploadStatus>;
|
|
460
|
-
getFileData: (fileId: string) => Promise<Blob>;
|
|
461
|
-
getFileURL: (fileId: string) => Promise<string>;
|
|
462
|
-
getFileStream: (fileId: string) => Promise<ReadableStream<Uint8Array>>;
|
|
463
|
-
replaceFileData: (fileId: string, newData: Blob, newName?: string, shouldAutoUpload?: boolean) => Promise<UploadFile>;
|
|
464
|
-
updateFile: (fileId: string, updatedFile: Partial<UploadFile<TUploadResult>>) => void;
|
|
465
|
-
initializeExistingFiles: (initialFiles: Array<Partial<UploadFile>>) => Promise<void>;
|
|
466
|
-
addPlugin: (plugin: UploaderPlugin<any, any>) => void;
|
|
467
|
-
on: {
|
|
468
|
-
<K extends keyof UploaderEvents<TUploadResult>>(type: K, handler: (event: UploaderEvents<TUploadResult>[K]) => void): void;
|
|
469
|
-
(type: string, handler: (event: any) => void): void;
|
|
470
|
-
};
|
|
471
|
-
};
|