handy-uploader 2.0.3 → 3.1.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 (38) hide show
  1. package/README.md +290 -292
  2. package/dist/components/handyUploader.vue.d.ts +3 -3
  3. package/dist/composables/deprecation.d.ts +2 -0
  4. package/dist/composables/useErrorHandler.d.ts +4 -0
  5. package/dist/composables/useFileUpload.d.ts +5 -0
  6. package/dist/core/attachments.d.ts +91 -0
  7. package/dist/core/fileUtils.d.ts +56 -0
  8. package/dist/core/index.d.ts +3 -0
  9. package/dist/core/videoThumbnail.d.ts +32 -0
  10. package/dist/element/HandyUploaderElement.d.ts +20 -0
  11. package/dist/element/index.d.ts +21 -0
  12. package/dist/element/types.d.ts +108 -0
  13. package/dist/element.mjs +6178 -0
  14. package/dist/handy-uploader.cjs +1 -0
  15. package/dist/handy-uploader.css +1 -1
  16. package/dist/handy-uploader.mjs +1110 -0
  17. package/dist/language-CYpPw-mk.mjs +551 -0
  18. package/dist/language-fvWXvWRx.js +1 -0
  19. package/dist/lib/index.d.ts +8 -19
  20. package/dist/lib/language.d.ts +3 -0
  21. package/dist/lib/shared.d.ts +5 -0
  22. package/dist/lib/vuetify.d.ts +15 -0
  23. package/dist/types/index.d.ts +4 -0
  24. package/dist/utils/fileUtils.d.ts +1 -56
  25. package/dist/vue/components/HandyDialog.vue.d.ts +31 -0
  26. package/dist/vue/components/HandyDropzone.vue.d.ts +38 -0
  27. package/dist/vue/components/HandyFileIcon.vue.d.ts +9 -0
  28. package/dist/vue/components/HandyFileList.vue.d.ts +65 -0
  29. package/dist/vue/components/HandyIcon.vue.d.ts +10 -0
  30. package/dist/vue/components/HandyUploader.vue.d.ts +137 -0
  31. package/dist/vue/index.d.ts +9 -0
  32. package/dist/vue/types.d.ts +5 -0
  33. package/dist/vue/useUploader.d.ts +46 -0
  34. package/dist/vuetify.cjs +1 -0
  35. package/dist/vuetify.mjs +1875 -0
  36. package/package.json +59 -16
  37. package/dist/handy-uploader.es.js +0 -2308
  38. package/dist/handy-uploader.umd.js +0 -1
@@ -0,0 +1,551 @@
1
+ function M(i) {
2
+ const o = i / 1024, e = o / 1024;
3
+ return e >= 1 ? {
4
+ text: `${e.toFixed(2)} MB`,
5
+ color: e > 10 ? "red" : e > 5 ? "orange" : "green"
6
+ } : {
7
+ text: `${o.toFixed(2)} KB`,
8
+ color: o > 1e3 ? "orange" : "green"
9
+ };
10
+ }
11
+ function k(i, o) {
12
+ var t;
13
+ const e = ((t = i.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
14
+ return ["jpg", "jpeg", "png", "gif", "bmp", "svg", "webp", "tiff"].includes(e) || o != null && o.startsWith("image/") ? "image" : ["pdf", "doc", "docx", "txt", "rtf", "odt"].includes(e) ? "document" : ["xls", "xlsx", "csv", "ods"].includes(e) ? "spreadsheet" : ["ppt", "pptx", "odp"].includes(e) ? "presentation" : ["zip", "rar", "7z", "tar", "gz"].includes(e) ? "archive" : ["mp4", "avi", "mov", "wmv", "flv", "webm"].includes(e) ? "video" : ["mp3", "wav", "flac", "aac", "ogg"].includes(e) ? "audio" : "unknown";
15
+ }
16
+ const w = {
17
+ // PDF
18
+ pdf: { icon: "mdi-file-pdf-box", color: "red darken-1" },
19
+ // Word Documents
20
+ doc: { icon: "mdi-file-word-outline", color: "blue darken-1" },
21
+ docx: { icon: "mdi-file-word-outline", color: "blue darken-1" },
22
+ odt: { icon: "mdi-file-word-outline", color: "blue darken-1" },
23
+ // Images
24
+ jpg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
25
+ jpeg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
26
+ png: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
27
+ gif: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
28
+ bmp: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
29
+ tif: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
30
+ tiff: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
31
+ svg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
32
+ webp: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
33
+ // Excel/Spreadsheets
34
+ xls: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
35
+ xlsx: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
36
+ csv: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
37
+ ods: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
38
+ // PowerPoint/Presentations
39
+ ppt: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
40
+ pptx: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
41
+ pptm: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
42
+ odp: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
43
+ // Videos
44
+ mp4: { icon: "mdi-file-video-outline", color: "red lighten-1" },
45
+ mov: { icon: "mdi-file-video-outline", color: "red lighten-1" },
46
+ flv: { icon: "mdi-file-video-outline", color: "red lighten-1" },
47
+ wmv: { icon: "mdi-file-video-outline", color: "red lighten-1" },
48
+ avi: { icon: "mdi-file-video-outline", color: "red lighten-1" },
49
+ webm: { icon: "mdi-file-video-outline", color: "red lighten-1" },
50
+ // Audio
51
+ mp3: { icon: "mdi-file-music-outline", color: "purple darken-1" },
52
+ wav: { icon: "mdi-file-music-outline", color: "purple darken-1" },
53
+ flac: { icon: "mdi-file-music-outline", color: "purple darken-1" },
54
+ aac: { icon: "mdi-file-music-outline", color: "purple darken-1" },
55
+ ogg: { icon: "mdi-file-music-outline", color: "purple darken-1" },
56
+ // CAD
57
+ dwg: { icon: "mdi-file-cad", color: "indigo lighten-2" },
58
+ // Archives
59
+ zip: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
60
+ rar: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
61
+ "7z": { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
62
+ "7-zip": { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
63
+ tar: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
64
+ gz: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
65
+ // Text files
66
+ txt: { icon: "mdi-script-text-outline", color: "light-green darken-3" },
67
+ rtf: { icon: "mdi-script-text-outline", color: "light-green darken-3" },
68
+ // Unknown/Default file type
69
+ unknown: { icon: "mdi-file-question-outline", color: "grey darken-1" }
70
+ };
71
+ function U(i, o) {
72
+ const e = k(i, o), t = {
73
+ image: { icon: "mdi-file-image", color: "blue" },
74
+ document: { icon: "mdi-file-document", color: "red" },
75
+ spreadsheet: { icon: "mdi-file-excel", color: "green" },
76
+ presentation: { icon: "mdi-file-powerpoint", color: "orange" },
77
+ archive: { icon: "mdi-folder-zip", color: "purple" },
78
+ video: { icon: "mdi-file-video", color: "pink" },
79
+ audio: { icon: "mdi-file-music", color: "teal" },
80
+ file: { icon: "mdi-file", color: "grey" },
81
+ unknown: { icon: "mdi-file-question-outline", color: "grey darken-1" }
82
+ };
83
+ return t[e] || t.unknown;
84
+ }
85
+ function z(i) {
86
+ var e;
87
+ const o = (e = i.split(".").pop()) == null ? void 0 : e.toLowerCase();
88
+ return o && w[o] || w.unknown;
89
+ }
90
+ function R(i) {
91
+ return z(i).icon;
92
+ }
93
+ function W(i) {
94
+ return z(i).color;
95
+ }
96
+ function j(i, o) {
97
+ return k(i, o) === "image";
98
+ }
99
+ function K(i, o) {
100
+ return i <= o;
101
+ }
102
+ function P(i, o) {
103
+ return i < o;
104
+ }
105
+ function b(i) {
106
+ var t;
107
+ const o = ((t = i.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
108
+ return {
109
+ // Image types
110
+ jpg: "image/jpeg",
111
+ jpeg: "image/jpeg",
112
+ png: "image/png",
113
+ gif: "image/gif",
114
+ bmp: "image/bmp",
115
+ tiff: "image/tiff",
116
+ svg: "image/svg+xml",
117
+ webp: "image/webp",
118
+ // Video types
119
+ mp4: "video/mp4",
120
+ avi: "video/x-msvideo",
121
+ mov: "video/quicktime",
122
+ wmv: "video/x-ms-wmv",
123
+ flv: "video/x-flv",
124
+ webm: "video/webm",
125
+ // Document types
126
+ pdf: "application/pdf",
127
+ doc: "application/msword",
128
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
129
+ txt: "text/plain",
130
+ csv: "text/csv",
131
+ // Archive types
132
+ zip: "application/zip",
133
+ rar: "application/x-rar-compressed"
134
+ }[o] || "application/octet-stream";
135
+ }
136
+ function H(i, o) {
137
+ if (!i || !o)
138
+ return console.warn("constructImageDataUrl: missing base64 or format", { hasBase64: !!i, format: o }), "";
139
+ const e = i.replace(/^data:[^;]+;base64,/, ""), t = b(`file.${o}`);
140
+ return `data:${o.includes("/") ? o : t.startsWith("image/") ? t : `image/${o}`};base64,${e}`;
141
+ }
142
+ function V(i, o = 0.8, e = 1920, t = 1080) {
143
+ return new Promise((n, r) => {
144
+ const c = document.createElement("canvas"), l = c.getContext("2d"), a = new Image();
145
+ a.onload = () => {
146
+ let { width: m, height: d } = a;
147
+ if (m > e || d > t) {
148
+ const u = Math.min(e / m, t / d);
149
+ m *= u, d *= u;
150
+ }
151
+ c.width = m, c.height = d, l == null || l.drawImage(a, 0, 0, m, d);
152
+ const p = c.toDataURL("image/jpeg", o);
153
+ n(p);
154
+ }, a.onerror = () => r(new Error("Failed to load image for compression"));
155
+ const s = new FileReader();
156
+ s.onload = (m) => {
157
+ var d;
158
+ a.src = (d = m.target) == null ? void 0 : d.result;
159
+ }, s.onerror = () => r(new Error("Failed to read file")), s.readAsDataURL(i);
160
+ });
161
+ }
162
+ function q(i) {
163
+ return new Promise((o, e) => {
164
+ const t = new FileReader();
165
+ t.onload = () => {
166
+ const n = t.result, r = n.split(",")[1] || n;
167
+ o(r);
168
+ }, t.onerror = () => e(new Error("Failed to read file")), t.readAsDataURL(i);
169
+ });
170
+ }
171
+ const D = ["jpg", "jpeg", "png", "webp"];
172
+ function y(i) {
173
+ const o = i.lastIndexOf(".");
174
+ return o <= 0 ? { name: i, format: "" } : { name: i.substring(0, o), format: i.substring(o + 1) };
175
+ }
176
+ function F(i, o) {
177
+ return o ? `${i}.${o}` : i;
178
+ }
179
+ function T(i) {
180
+ const o = i.endsWith("==") ? 2 : i.endsWith("=") ? 1 : 0;
181
+ return Math.floor(i.length * 3 / 4) - o;
182
+ }
183
+ function E(i, o = "") {
184
+ const e = o.split(",").map((r) => r.trim().toLowerCase()).filter(Boolean);
185
+ if (e.length === 0 || e.includes("*") || e.includes("*/*")) return !0;
186
+ const t = `.${y(i.name).format.toLowerCase()}`, n = (i.type || "").toLowerCase();
187
+ return e.some((r) => r.startsWith(".") ? r === t : r.endsWith("/*") ? n.startsWith(r.slice(0, -1)) : r === n);
188
+ }
189
+ function O(i, o = "") {
190
+ const e = [], t = [];
191
+ for (const n of i)
192
+ E(n, o) ? e.push(n) : t.push({ code: "fileType", fileName: n.name });
193
+ return { accepted: e, errors: t };
194
+ }
195
+ function _(i, { currentCount: o, maxFileCount: e, maxFileSize: t }) {
196
+ const n = [], r = [];
197
+ for (const c of i) {
198
+ if (o + n.length >= e) {
199
+ r.push({ code: "maxFileCount", fileName: c.name, limit: e });
200
+ break;
201
+ }
202
+ if (c.size > t) {
203
+ r.push({ code: "maxFileSize", fileName: c.name, limit: t });
204
+ continue;
205
+ }
206
+ n.push(c);
207
+ }
208
+ return { accepted: n, errors: r };
209
+ }
210
+ function X(i, o = { kb: "KB", mb: "MB" }) {
211
+ const e = i / 1024;
212
+ return e < 1024 ? `${e.toFixed(1)} ${o.kb}` : `${(e / 1024).toFixed(1)} ${o.mb}`;
213
+ }
214
+ function I(i) {
215
+ return new Promise((o, e) => {
216
+ const t = new FileReader();
217
+ t.onload = () => o(t.result), t.onerror = () => e(t.error ?? new Error("Failed to read file")), t.readAsDataURL(i);
218
+ });
219
+ }
220
+ async function G(i) {
221
+ const o = [];
222
+ for (const e of i) {
223
+ let t;
224
+ try {
225
+ t = await I(e);
226
+ } catch (n) {
227
+ console.warn("handy-uploader: could not read file", e.name, n);
228
+ continue;
229
+ }
230
+ o.push({
231
+ file: {
232
+ ...y(e.name),
233
+ base64: t.split(",")[1] ?? "",
234
+ size: e.size,
235
+ tags: [],
236
+ description: null,
237
+ showDetailState: !1
238
+ }
239
+ });
240
+ }
241
+ return o;
242
+ }
243
+ function B(i, o) {
244
+ return new Promise((e, t) => {
245
+ const n = document.createElement("canvas"), r = document.createElement("img");
246
+ r.onload = () => {
247
+ n.width = r.width, n.height = r.height;
248
+ const c = n.getContext("2d");
249
+ if (!c) {
250
+ t(new Error("Canvas 2D context not available"));
251
+ return;
252
+ }
253
+ c.fillStyle = "#ffffff", c.fillRect(0, 0, r.width, r.height), c.drawImage(r, 0, 0, r.width, r.height);
254
+ const l = n.toDataURL("image/jpeg", o);
255
+ if (!l.startsWith("data:image/jpeg")) {
256
+ t(new Error("Canvas could not encode the image"));
257
+ return;
258
+ }
259
+ e(l);
260
+ }, r.onerror = () => t(new Error("Failed to load image for compression")), r.src = i;
261
+ });
262
+ }
263
+ async function J(i, o, e = B) {
264
+ const { currentCount: t, maxFileCount: n, maxFileSize: r, imageCompressor: c = !1 } = o, l = o.imageCompressLevel ?? 0.8, a = [], s = [];
265
+ for (const m of i) {
266
+ const d = m.file, p = F(d.name, d.format);
267
+ if (t + a.length >= n) {
268
+ s.push({ code: "maxFileCount", fileName: p, limit: n });
269
+ break;
270
+ }
271
+ if (d.size > r) {
272
+ s.push({ code: "maxFileSize", fileName: p, limit: r });
273
+ continue;
274
+ }
275
+ try {
276
+ let u = d.base64.replace(/\s/g, ""), f = d.format, g = d.size;
277
+ if (c && D.includes(f.toLowerCase())) {
278
+ const A = b(`file.${f}`), x = ((await e(`data:${A};base64,${u}`, l).catch((C) => (console.warn("handy-uploader: compression failed, keeping original", p, C), ""))).split(",")[1] ?? "").replace(/\s/g, ""), h = T(x);
279
+ h > 0 && h < g && (u = x, f = "jpg", g = h);
280
+ }
281
+ a.push({
282
+ file: {
283
+ base64: u,
284
+ size: g,
285
+ name: F(d.name, f),
286
+ tags: d.tags || [],
287
+ description: d.description || "",
288
+ showDetailState: !1,
289
+ format: f
290
+ }
291
+ });
292
+ } catch (u) {
293
+ console.error("handy-uploader: could not process file", p, u), s.push({ code: "invalidFormat", fileName: p });
294
+ }
295
+ }
296
+ return { accepted: a, errors: s };
297
+ }
298
+ function N(i) {
299
+ var t;
300
+ const o = ((t = i.base64) == null ? void 0 : t.replace(/^data:[^;]+;base64,/, "")) || "";
301
+ let e;
302
+ return i.format.startsWith("video/") ? e = i.format : (e = b(i.name), e.startsWith("video/") || (e = `video/${i.format}`)), `data:${e};base64,${o}`;
303
+ }
304
+ function S(i) {
305
+ return new Promise((o, e) => {
306
+ const t = document.createElement("video"), n = document.createElement("canvas"), r = n.getContext("2d");
307
+ if (!r) {
308
+ e(new Error("Canvas context not available"));
309
+ return;
310
+ }
311
+ t.crossOrigin = "anonymous", t.preload = "metadata", t.muted = !0, t.onloadedmetadata = () => {
312
+ if (t.duration === 0 || isNaN(t.duration)) {
313
+ e(new Error("Invalid video duration"));
314
+ return;
315
+ }
316
+ if (t.videoWidth === 0 || t.videoHeight === 0) {
317
+ e(new Error("Invalid video dimensions"));
318
+ return;
319
+ }
320
+ n.width = t.videoWidth, n.height = t.videoHeight, t.currentTime = Math.min(1, t.duration * 0.1);
321
+ }, t.onseeked = () => {
322
+ try {
323
+ r.drawImage(t, 0, 0, n.width, n.height), o(n.toDataURL("image/jpeg", 0.8));
324
+ } catch (c) {
325
+ e(c);
326
+ }
327
+ }, t.onabort = () => e(new Error("Video loading aborted")), t.onerror = () => e(new Error("Video failed to load for thumbnail generation")), t.src = N(i);
328
+ });
329
+ }
330
+ const $ = 1;
331
+ function v(i) {
332
+ const o = i.base64 ?? "";
333
+ return `${i.name}|${o.length}|${o.slice(-64)}`;
334
+ }
335
+ function Q(i, o = S) {
336
+ const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map(), r = (l) => n.set(l, (n.get(l) ?? 0) + 1), c = (l) => (n.get(l) ?? 0) > $;
337
+ return {
338
+ get(l) {
339
+ const a = v(l);
340
+ if (e.has(a)) return e.get(a);
341
+ t.has(a) || c(a) || (t.add(a), o(l).then((s) => {
342
+ e.set(a, s), i();
343
+ }).catch((s) => {
344
+ r(a), console.warn("handy-uploader: video thumbnail failed for", l.name, s);
345
+ }).finally(() => t.delete(a)));
346
+ },
347
+ invalidate(l) {
348
+ const a = v(l);
349
+ e.delete(a) && (r(a), i());
350
+ },
351
+ retain(l) {
352
+ const a = new Set(l.map(v));
353
+ for (const s of [...e.keys()]) a.has(s) || e.delete(s);
354
+ for (const s of [...n.keys()]) a.has(s) || n.delete(s);
355
+ }
356
+ };
357
+ }
358
+ const Y = {
359
+ en: {
360
+ insertFile: "Insert File",
361
+ insertNewFile: "Insert New File",
362
+ add: "Add",
363
+ delete: "Delete",
364
+ edit: "Edit",
365
+ deleteDialog: {
366
+ message: "Are you sure you want to delete the file?",
367
+ cancel: "cancel"
368
+ },
369
+ table: {
370
+ thumb: "Thumb",
371
+ name: "Name",
372
+ size: "Size",
373
+ tags: "tags",
374
+ action: {
375
+ action: "Action",
376
+ deleteTooltip: "Delete"
377
+ }
378
+ },
379
+ size: {
380
+ kb: "KB",
381
+ mb: "MB"
382
+ },
383
+ maxFileSizeAlert: "Max file Size is",
384
+ maxFileCountAlert: "Max file Count is",
385
+ fileTypeAlert: "File type is not allowed",
386
+ invalidFileAlert: "File could not be processed",
387
+ dropHint: "or drag and drop here",
388
+ fileName: "File Name",
389
+ fileDescription: "File Description",
390
+ fileTags: "File Tags"
391
+ },
392
+ fa: {
393
+ insertFile: "افزودن فایل",
394
+ insertNewFile: "افزودن فایل جدید",
395
+ add: "افزودن",
396
+ delete: "حذف",
397
+ edit: "ویرایش",
398
+ deleteDialog: {
399
+ message: "آیا برای حذف فایل اطمینان دارید؟",
400
+ cancel: "لغو"
401
+ },
402
+ table: {
403
+ thumb: "پیش نمایش",
404
+ name: "نام",
405
+ size: "حجم",
406
+ action: {
407
+ action: "عملیات",
408
+ deleteTooltip: "حذف"
409
+ }
410
+ },
411
+ size: {
412
+ kb: "کیلو بایت",
413
+ mb: "مگابایت"
414
+ },
415
+ maxFileSizeAlert: "حداکثر حجم فایل انتحابی ",
416
+ maxFileCountAlert: "حداکثر تعداد فایل انتخابی",
417
+ fileTypeAlert: "نوع فایل مجاز نیست",
418
+ invalidFileAlert: "فایل قابل پردازش نیست",
419
+ dropHint: "یا فایل را اینجا رها کنید",
420
+ fileName: "نام فایل",
421
+ fileDescription: "توضیحات فایل",
422
+ fileTags: "برچسب فایل"
423
+ },
424
+ fr: {
425
+ insertFile: "Insérer un fichier",
426
+ insertNewFile: "Insérer un nouveau fichier",
427
+ add: "Ajouter",
428
+ delete: "Supprimer",
429
+ edit: "Éditer",
430
+ deleteDialog: {
431
+ message: "Voulez-vous vraiment supprimer le fichier?",
432
+ cancel: "Annuler"
433
+ },
434
+ table: {
435
+ thumb: "la vignette",
436
+ name: "Nom",
437
+ size: "Taille",
438
+ action: {
439
+ action: "Action",
440
+ deleteTooltip: "Supprimer"
441
+ }
442
+ },
443
+ size: {
444
+ kb: "KB",
445
+ mb: "MB"
446
+ },
447
+ maxFileSizeAlert: "La taille maximale du fichier est",
448
+ maxFileCountAlert: "Le nombre maximal de fichiers est",
449
+ fileTypeAlert: "Ce type de fichier n'est pas autorisé",
450
+ invalidFileAlert: "Le fichier n’a pas pu être traité",
451
+ dropHint: "ou glissez-déposez ici",
452
+ fileName: "Nom de fichier",
453
+ fileDescription: "description du fichier",
454
+ fileTags: "Balises de fichier"
455
+ },
456
+ ch: {
457
+ insertFile: "插入档案",
458
+ insertNewFile: "插入新文件",
459
+ add: "加",
460
+ delete: "删除",
461
+ edit: "编辑",
462
+ deleteDialog: {
463
+ message: "您确定要删除文件吗?",
464
+ cancel: "取消"
465
+ },
466
+ table: {
467
+ thumb: "缩图",
468
+ name: "名称",
469
+ size: "尺寸",
470
+ action: {
471
+ action: "行动",
472
+ deleteTooltip: "删除"
473
+ }
474
+ },
475
+ size: {
476
+ kb: "KB",
477
+ mb: "MB"
478
+ },
479
+ maxFileSizeAlert: "档案大小上限为",
480
+ maxFileCountAlert: "现“最大文件数”为",
481
+ fileTypeAlert: "不允许的文件类型",
482
+ invalidFileAlert: "无法处理该文件",
483
+ dropHint: "或将文件拖放到此处",
484
+ fileName: "文档名称",
485
+ fileDescription: "文件描述",
486
+ fileTags: "文件标签"
487
+ },
488
+ ar: {
489
+ insertFile: "إدراج ملف",
490
+ insertNewFile: "إدراج ملف جديد",
491
+ add: "أضف",
492
+ delete: "حذف",
493
+ edit: "تعديل",
494
+ deleteDialog: {
495
+ message: "هل أنت متأكد أنك تريد حذف الملف؟",
496
+ cancel: "إلغاء"
497
+ },
498
+ table: {
499
+ thumb: "ظفري",
500
+ name: "اسم",
501
+ size: "بحجم",
502
+ action: {
503
+ action: "عمل",
504
+ deleteTooltip: "حذف"
505
+ }
506
+ },
507
+ size: {
508
+ kb: "کیلو بایت",
509
+ mb: "ميغا بايت"
510
+ },
511
+ maxFileSizeAlert: "الحجم الأقصى للملف هو",
512
+ maxFileCountAlert: "الحد الأقصى لعدد الملفات هو",
513
+ fileTypeAlert: "نوع الملف غير مسموح به",
514
+ invalidFileAlert: "تعذّرت معالجة الملف",
515
+ dropHint: "أو اسحب الملفات وأفلتها هنا",
516
+ fileName: "اسم الملف",
517
+ fileDescription: "وصف الملف",
518
+ fileTags: "علامات الملف"
519
+ }
520
+ };
521
+ export {
522
+ W as A,
523
+ R as B,
524
+ D as C,
525
+ J as a,
526
+ H as b,
527
+ Q as c,
528
+ X as d,
529
+ T as e,
530
+ O as f,
531
+ k as g,
532
+ B as h,
533
+ V as i,
534
+ F as j,
535
+ q as k,
536
+ Y as l,
537
+ M as m,
538
+ S as n,
539
+ U as o,
540
+ _ as p,
541
+ b as q,
542
+ G as r,
543
+ y as s,
544
+ N as t,
545
+ j as u,
546
+ E as v,
547
+ I as w,
548
+ P as x,
549
+ K as y,
550
+ z
551
+ };
@@ -0,0 +1 @@
1
+ "use strict";function L(i){const o=i/1024,e=o/1024;return e>=1?{text:`${e.toFixed(2)} MB`,color:e>10?"red":e>5?"orange":"green"}:{text:`${o.toFixed(2)} KB`,color:o>1e3?"orange":"green"}}function x(i,o){var t;const e=((t=i.split(".").pop())==null?void 0:t.toLowerCase())||"";return["jpg","jpeg","png","gif","bmp","svg","webp","tiff"].includes(e)||o!=null&&o.startsWith("image/")?"image":["pdf","doc","docx","txt","rtf","odt"].includes(e)?"document":["xls","xlsx","csv","ods"].includes(e)?"spreadsheet":["ppt","pptx","odp"].includes(e)?"presentation":["zip","rar","7z","tar","gz"].includes(e)?"archive":["mp4","avi","mov","wmv","flv","webm"].includes(e)?"video":["mp3","wav","flac","aac","ogg"].includes(e)?"audio":"unknown"}const v={pdf:{icon:"mdi-file-pdf-box",color:"red darken-1"},doc:{icon:"mdi-file-word-outline",color:"blue darken-1"},docx:{icon:"mdi-file-word-outline",color:"blue darken-1"},odt:{icon:"mdi-file-word-outline",color:"blue darken-1"},jpg:{icon:"mdi-file-image-outline",color:"deep-purple darken-1"},jpeg:{icon:"mdi-file-image-outline",color:"deep-purple darken-1"},png:{icon:"mdi-file-image-outline",color:"deep-purple darken-1"},gif:{icon:"mdi-file-image-outline",color:"deep-purple darken-1"},bmp:{icon:"mdi-file-image-outline",color:"deep-purple darken-1"},tif:{icon:"mdi-file-image-outline",color:"deep-purple darken-1"},tiff:{icon:"mdi-file-image-outline",color:"deep-purple darken-1"},svg:{icon:"mdi-file-image-outline",color:"deep-purple darken-1"},webp:{icon:"mdi-file-image-outline",color:"deep-purple darken-1"},xls:{icon:"mdi-file-excel-outline",color:"teal darken-1"},xlsx:{icon:"mdi-file-excel-outline",color:"teal darken-1"},csv:{icon:"mdi-file-excel-outline",color:"teal darken-1"},ods:{icon:"mdi-file-excel-outline",color:"teal darken-1"},ppt:{icon:"mdi-file-powerpoint-outline",color:"orange darken-3"},pptx:{icon:"mdi-file-powerpoint-outline",color:"orange darken-3"},pptm:{icon:"mdi-file-powerpoint-outline",color:"orange darken-3"},odp:{icon:"mdi-file-powerpoint-outline",color:"orange darken-3"},mp4:{icon:"mdi-file-video-outline",color:"red lighten-1"},mov:{icon:"mdi-file-video-outline",color:"red lighten-1"},flv:{icon:"mdi-file-video-outline",color:"red lighten-1"},wmv:{icon:"mdi-file-video-outline",color:"red lighten-1"},avi:{icon:"mdi-file-video-outline",color:"red lighten-1"},webm:{icon:"mdi-file-video-outline",color:"red lighten-1"},mp3:{icon:"mdi-file-music-outline",color:"purple darken-1"},wav:{icon:"mdi-file-music-outline",color:"purple darken-1"},flac:{icon:"mdi-file-music-outline",color:"purple darken-1"},aac:{icon:"mdi-file-music-outline",color:"purple darken-1"},ogg:{icon:"mdi-file-music-outline",color:"purple darken-1"},dwg:{icon:"mdi-file-cad",color:"indigo lighten-2"},zip:{icon:"mdi-folder-zip-outline",color:"lime lighten-1"},rar:{icon:"mdi-folder-zip-outline",color:"lime lighten-1"},"7z":{icon:"mdi-folder-zip-outline",color:"lime lighten-1"},"7-zip":{icon:"mdi-folder-zip-outline",color:"lime lighten-1"},tar:{icon:"mdi-folder-zip-outline",color:"lime lighten-1"},gz:{icon:"mdi-folder-zip-outline",color:"lime lighten-1"},txt:{icon:"mdi-script-text-outline",color:"light-green darken-3"},rtf:{icon:"mdi-script-text-outline",color:"light-green darken-3"},unknown:{icon:"mdi-file-question-outline",color:"grey darken-1"}};function M(i,o){const e=x(i,o),t={image:{icon:"mdi-file-image",color:"blue"},document:{icon:"mdi-file-document",color:"red"},spreadsheet:{icon:"mdi-file-excel",color:"green"},presentation:{icon:"mdi-file-powerpoint",color:"orange"},archive:{icon:"mdi-folder-zip",color:"purple"},video:{icon:"mdi-file-video",color:"pink"},audio:{icon:"mdi-file-music",color:"teal"},file:{icon:"mdi-file",color:"grey"},unknown:{icon:"mdi-file-question-outline",color:"grey darken-1"}};return t[e]||t.unknown}function k(i){var e;const o=(e=i.split(".").pop())==null?void 0:e.toLowerCase();return o&&v[o]||v.unknown}function $(i){return k(i).icon}function U(i){return k(i).color}function R(i,o){return x(i,o)==="image"}function W(i,o){return i<=o}function j(i,o){return i<o}function g(i){var t;const o=((t=i.split(".").pop())==null?void 0:t.toLowerCase())||"";return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp",mp4:"video/mp4",avi:"video/x-msvideo",mov:"video/quicktime",wmv:"video/x-ms-wmv",flv:"video/x-flv",webm:"video/webm",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",txt:"text/plain",csv:"text/csv",zip:"application/zip",rar:"application/x-rar-compressed"}[o]||"application/octet-stream"}function V(i,o){if(!i||!o)return console.warn("constructImageDataUrl: missing base64 or format",{hasBase64:!!i,format:o}),"";const e=i.replace(/^data:[^;]+;base64,/,""),t=g(`file.${o}`);return`data:${o.includes("/")?o:t.startsWith("image/")?t:`image/${o}`};base64,${e}`}function P(i,o=.8,e=1920,t=1080){return new Promise((n,r)=>{const c=document.createElement("canvas"),a=c.getContext("2d"),l=new Image;l.onload=()=>{let{width:m,height:d}=l;if(m>e||d>t){const u=Math.min(e/m,t/d);m*=u,d*=u}c.width=m,c.height=d,a==null||a.drawImage(l,0,0,m,d);const p=c.toDataURL("image/jpeg",o);n(p)},l.onerror=()=>r(new Error("Failed to load image for compression"));const s=new FileReader;s.onload=m=>{var d;l.src=(d=m.target)==null?void 0:d.result},s.onerror=()=>r(new Error("Failed to read file")),s.readAsDataURL(i)})}function K(i){return new Promise((o,e)=>{const t=new FileReader;t.onload=()=>{const n=t.result,r=n.split(",")[1]||n;o(r)},t.onerror=()=>e(new Error("Failed to read file")),t.readAsDataURL(i)})}const A=["jpg","jpeg","png","webp"];function z(i){const o=i.lastIndexOf(".");return o<=0?{name:i,format:""}:{name:i.substring(0,o),format:i.substring(o+1)}}function b(i,o){return o?`${i}.${o}`:i}function D(i){const o=i.endsWith("==")?2:i.endsWith("=")?1:0;return Math.floor(i.length*3/4)-o}function I(i,o=""){const e=o.split(",").map(r=>r.trim().toLowerCase()).filter(Boolean);if(e.length===0||e.includes("*")||e.includes("*/*"))return!0;const t=`.${z(i.name).format.toLowerCase()}`,n=(i.type||"").toLowerCase();return e.some(r=>r.startsWith(".")?r===t:r.endsWith("/*")?n.startsWith(r.slice(0,-1)):r===n)}function O(i,o=""){const e=[],t=[];for(const n of i)I(n,o)?e.push(n):t.push({code:"fileType",fileName:n.name});return{accepted:e,errors:t}}function H(i,{currentCount:o,maxFileCount:e,maxFileSize:t}){const n=[],r=[];for(const c of i){if(o+n.length>=e){r.push({code:"maxFileCount",fileName:c.name,limit:e});break}if(c.size>t){r.push({code:"maxFileSize",fileName:c.name,limit:t});continue}n.push(c)}return{accepted:n,errors:r}}function _(i,o={kb:"KB",mb:"MB"}){const e=i/1024;return e<1024?`${e.toFixed(1)} ${o.kb}`:`${(e/1024).toFixed(1)} ${o.mb}`}function T(i){return new Promise((o,e)=>{const t=new FileReader;t.onload=()=>o(t.result),t.onerror=()=>e(t.error??new Error("Failed to read file")),t.readAsDataURL(i)})}async function q(i){const o=[];for(const e of i){let t;try{t=await T(e)}catch(n){console.warn("handy-uploader: could not read file",e.name,n);continue}o.push({file:{...z(e.name),base64:t.split(",")[1]??"",size:e.size,tags:[],description:null,showDetailState:!1}})}return o}function C(i,o){return new Promise((e,t)=>{const n=document.createElement("canvas"),r=document.createElement("img");r.onload=()=>{n.width=r.width,n.height=r.height;const c=n.getContext("2d");if(!c){t(new Error("Canvas 2D context not available"));return}c.fillStyle="#ffffff",c.fillRect(0,0,r.width,r.height),c.drawImage(r,0,0,r.width,r.height);const a=n.toDataURL("image/jpeg",o);if(!a.startsWith("data:image/jpeg")){t(new Error("Canvas could not encode the image"));return}e(a)},r.onerror=()=>t(new Error("Failed to load image for compression")),r.src=i})}async function X(i,o,e=C){const{currentCount:t,maxFileCount:n,maxFileSize:r,imageCompressor:c=!1}=o,a=o.imageCompressLevel??.8,l=[],s=[];for(const m of i){const d=m.file,p=b(d.name,d.format);if(t+l.length>=n){s.push({code:"maxFileCount",fileName:p,limit:n});break}if(d.size>r){s.push({code:"maxFileSize",fileName:p,limit:r});continue}try{let u=d.base64.replace(/\s/g,""),f=d.format,h=d.size;if(c&&A.includes(f.toLowerCase())){const N=g(`file.${f}`),y=((await e(`data:${N};base64,${u}`,a).catch(B=>(console.warn("handy-uploader: compression failed, keeping original",p,B),""))).split(",")[1]??"").replace(/\s/g,""),w=D(y);w>0&&w<h&&(u=y,f="jpg",h=w)}l.push({file:{base64:u,size:h,name:b(d.name,f),tags:d.tags||[],description:d.description||"",showDetailState:!1,format:f}})}catch(u){console.error("handy-uploader: could not process file",p,u),s.push({code:"invalidFormat",fileName:p})}}return{accepted:l,errors:s}}function E(i){var t;const o=((t=i.base64)==null?void 0:t.replace(/^data:[^;]+;base64,/,""))||"";let e;return i.format.startsWith("video/")?e=i.format:(e=g(i.name),e.startsWith("video/")||(e=`video/${i.format}`)),`data:${e};base64,${o}`}function S(i){return new Promise((o,e)=>{const t=document.createElement("video"),n=document.createElement("canvas"),r=n.getContext("2d");if(!r){e(new Error("Canvas context not available"));return}t.crossOrigin="anonymous",t.preload="metadata",t.muted=!0,t.onloadedmetadata=()=>{if(t.duration===0||isNaN(t.duration)){e(new Error("Invalid video duration"));return}if(t.videoWidth===0||t.videoHeight===0){e(new Error("Invalid video dimensions"));return}n.width=t.videoWidth,n.height=t.videoHeight,t.currentTime=Math.min(1,t.duration*.1)},t.onseeked=()=>{try{r.drawImage(t,0,0,n.width,n.height),o(n.toDataURL("image/jpeg",.8))}catch(c){e(c)}},t.onabort=()=>e(new Error("Video loading aborted")),t.onerror=()=>e(new Error("Video failed to load for thumbnail generation")),t.src=E(i)})}const G=1;function F(i){const o=i.base64??"";return`${i.name}|${o.length}|${o.slice(-64)}`}function J(i,o=S){const e=new Map,t=new Set,n=new Map,r=a=>n.set(a,(n.get(a)??0)+1),c=a=>(n.get(a)??0)>G;return{get(a){const l=F(a);if(e.has(l))return e.get(l);t.has(l)||c(l)||(t.add(l),o(a).then(s=>{e.set(l,s),i()}).catch(s=>{r(l),console.warn("handy-uploader: video thumbnail failed for",a.name,s)}).finally(()=>t.delete(l)))},invalidate(a){const l=F(a);e.delete(l)&&(r(l),i())},retain(a){const l=new Set(a.map(F));for(const s of[...e.keys()])l.has(s)||e.delete(s);for(const s of[...n.keys()])l.has(s)||n.delete(s)}}}const Q={en:{insertFile:"Insert File",insertNewFile:"Insert New File",add:"Add",delete:"Delete",edit:"Edit",deleteDialog:{message:"Are you sure you want to delete the file?",cancel:"cancel"},table:{thumb:"Thumb",name:"Name",size:"Size",tags:"tags",action:{action:"Action",deleteTooltip:"Delete"}},size:{kb:"KB",mb:"MB"},maxFileSizeAlert:"Max file Size is",maxFileCountAlert:"Max file Count is",fileTypeAlert:"File type is not allowed",invalidFileAlert:"File could not be processed",dropHint:"or drag and drop here",fileName:"File Name",fileDescription:"File Description",fileTags:"File Tags"},fa:{insertFile:"افزودن فایل",insertNewFile:"افزودن فایل جدید",add:"افزودن",delete:"حذف",edit:"ویرایش",deleteDialog:{message:"آیا برای حذف فایل اطمینان دارید؟",cancel:"لغو"},table:{thumb:"پیش نمایش",name:"نام",size:"حجم",action:{action:"عملیات",deleteTooltip:"حذف"}},size:{kb:"کیلو بایت",mb:"مگابایت"},maxFileSizeAlert:"حداکثر حجم فایل انتحابی ",maxFileCountAlert:"حداکثر تعداد فایل انتخابی",fileTypeAlert:"نوع فایل مجاز نیست",invalidFileAlert:"فایل قابل پردازش نیست",dropHint:"یا فایل را اینجا رها کنید",fileName:"نام فایل",fileDescription:"توضیحات فایل",fileTags:"برچسب فایل"},fr:{insertFile:"Insérer un fichier",insertNewFile:"Insérer un nouveau fichier",add:"Ajouter",delete:"Supprimer",edit:"Éditer",deleteDialog:{message:"Voulez-vous vraiment supprimer le fichier?",cancel:"Annuler"},table:{thumb:"la vignette",name:"Nom",size:"Taille",action:{action:"Action",deleteTooltip:"Supprimer"}},size:{kb:"KB",mb:"MB"},maxFileSizeAlert:"La taille maximale du fichier est",maxFileCountAlert:"Le nombre maximal de fichiers est",fileTypeAlert:"Ce type de fichier n'est pas autorisé",invalidFileAlert:"Le fichier n’a pas pu être traité",dropHint:"ou glissez-déposez ici",fileName:"Nom de fichier",fileDescription:"description du fichier",fileTags:"Balises de fichier"},ch:{insertFile:"插入档案",insertNewFile:"插入新文件",add:"加",delete:"删除",edit:"编辑",deleteDialog:{message:"您确定要删除文件吗?",cancel:"取消"},table:{thumb:"缩图",name:"名称",size:"尺寸",action:{action:"行动",deleteTooltip:"删除"}},size:{kb:"KB",mb:"MB"},maxFileSizeAlert:"档案大小上限为",maxFileCountAlert:"现“最大文件数”为",fileTypeAlert:"不允许的文件类型",invalidFileAlert:"无法处理该文件",dropHint:"或将文件拖放到此处",fileName:"文档名称",fileDescription:"文件描述",fileTags:"文件标签"},ar:{insertFile:"إدراج ملف",insertNewFile:"إدراج ملف جديد",add:"أضف",delete:"حذف",edit:"تعديل",deleteDialog:{message:"هل أنت متأكد أنك تريد حذف الملف؟",cancel:"إلغاء"},table:{thumb:"ظفري",name:"اسم",size:"بحجم",action:{action:"عمل",deleteTooltip:"حذف"}},size:{kb:"کیلو بایت",mb:"ميغا بايت"},maxFileSizeAlert:"الحجم الأقصى للملف هو",maxFileCountAlert:"الحد الأقصى لعدد الملفات هو",fileTypeAlert:"نوع الملف غير مسموح به",invalidFileAlert:"تعذّرت معالجة الملف",dropHint:"أو اسحب الملفات وأفلتها هنا",fileName:"اسم الملف",fileDescription:"وصف الملف",fileTags:"علامات الملف"}};exports.COMPRESSIBLE_EXTENSIONS=A;exports.base64ByteLength=D;exports.compressDataUrl=C;exports.compressImage=P;exports.constructImageDataUrl=V;exports.createVideoThumbnailCache=J;exports.fileToBase64=K;exports.filterByAccept=O;exports.formatBytes=_;exports.formatFileSize=L;exports.generateVideoThumbnail=S;exports.getDetailedFileIcon=k;exports.getFileIcon=M;exports.getFileIconColor=U;exports.getFileIconName=$;exports.getFileType=x;exports.getMimeTypeFromExtension=g;exports.getVideoDataUrl=E;exports.isImageFile=R;exports.joinFileName=b;exports.languages=Q;exports.matchesAccept=I;exports.precheckFiles=H;exports.prepareAttachments=X;exports.readFileAsDataUrl=T;exports.readFiles=q;exports.splitFileName=z;exports.validateFileCount=j;exports.validateFileSize=W;
@@ -1,22 +1,11 @@
1
- import ThumbnailUploader from '../components/ThumbnailUploader.vue';
2
- import TableUploader from '../components/TableUploader.vue';
3
- import SimpleUploader from '../components/SimpleUploader.vue';
4
- import HandyUploader from '../components/handyUploader.vue';
5
- import InsertButton from '../components/InsertButton.vue';
6
- import SelectFileIconType from '../components/SelectFileIconType.vue';
7
- export type { FileData, DocumentAttachment, FileUploaderType, CardType, LanguageCode, FileSizeResult, FileIconProps, Translation, LanguageCollection, BaseUploaderProps, CardThemeProps, HandyUploaderProps, UploaderEvents, HandyUploaderEvents, MimeType, ProcessedFile, SnackbarConfig } from '../types';
8
- export { formatFileSize, getFileType, getFileIcon, isImageFile, validateFileSize, validateFileCount, getMimeTypeFromExtension, constructImageDataUrl, compressImage, fileToBase64 } from '../utils/fileUtils';
9
- export { useFileUpload } from '../composables/useFileUpload';
10
- export { useErrorHandler } from '../composables/useErrorHandler';
11
- export { languages as languageData } from './language';
12
- export { ThumbnailUploader, TableUploader, SimpleUploader, HandyUploader, InsertButton, SelectFileIconType };
13
- import type { Component } from 'vue';
1
+ import type { App, Component } from 'vue';
2
+ import { HandyUploader, HandyDropzone, HandyFileList } from '../vue';
3
+ export * from './shared';
4
+ export { HandyUploader, HandyDropzone, HandyFileList };
5
+ export { useUploader, DEFAULT_UPLOADER_OPTIONS } from '../vue';
6
+ export { HandyDialog, HandyFileIcon } from '../vue';
7
+ export type { UploaderOptions, EditableFields, FileUploaderView, CardStyle } from '../vue';
14
8
  declare const components: Record<string, Component>;
15
9
  export default components;
16
- import type { App } from 'vue';
10
+ /** Vue plugin: app.use(HandyUploaderPlugin) registers the components globally. */
17
11
  export declare function install(app: App): void;
18
- declare global {
19
- interface Window {
20
- Vue?: App;
21
- }
22
- }
@@ -24,6 +24,9 @@ interface Translation {
24
24
  };
25
25
  maxFileSizeAlert?: string;
26
26
  maxFileCountAlert: string;
27
+ fileTypeAlert?: string;
28
+ invalidFileAlert?: string;
29
+ dropHint?: string;
27
30
  fileName: string;
28
31
  fileDescription: string;
29
32
  fileTags: string;
@@ -0,0 +1,5 @@
1
+ export type { FileData, DocumentAttachment, FileUploaderType, CardType, LanguageCode, FileSizeResult, FileIconProps, Translation, LanguageCollection, BaseUploaderProps, CardThemeProps, HandyUploaderProps, UploaderEvents, HandyUploaderEvents, MimeType, ProcessedFile, SnackbarConfig } from '../types';
2
+ export { formatFileSize, getFileType, getFileIcon, isImageFile, validateFileSize, validateFileCount, getMimeTypeFromExtension, constructImageDataUrl, compressImage, fileToBase64 } from '../core/fileUtils';
3
+ export { readFiles, readFileAsDataUrl, prepareAttachments, compressDataUrl, splitFileName, joinFileName, base64ByteLength, COMPRESSIBLE_EXTENSIONS, matchesAccept, filterByAccept, precheckFiles, formatBytes, generateVideoThumbnail, getVideoDataUrl, createVideoThumbnailCache } from '../core';
4
+ export type { AttachmentError, AttachmentErrorCode, PrepareOptions, PrepareResult, CompressFn, VideoThumbnailCache } from '../core';
5
+ export { languages as languageData } from './language';
@@ -0,0 +1,15 @@
1
+ import type { App, Component } from 'vue';
2
+ import ThumbnailUploader from '../components/ThumbnailUploader.vue';
3
+ import TableUploader from '../components/TableUploader.vue';
4
+ import SimpleUploader from '../components/SimpleUploader.vue';
5
+ import HandyUploader from '../components/handyUploader.vue';
6
+ import InsertButton from '../components/InsertButton.vue';
7
+ import SelectFileIconType from '../components/SelectFileIconType.vue';
8
+ export * from './shared';
9
+ export { useFileUpload } from '../composables/useFileUpload';
10
+ export { useErrorHandler } from '../composables/useErrorHandler';
11
+ export { ThumbnailUploader, TableUploader, SimpleUploader, HandyUploader, InsertButton, SelectFileIconType };
12
+ declare const components: Record<string, Component>;
13
+ export default components;
14
+ /** Vue plugin: app.use(HandyUploaderVuetify) registers the components globally. */
15
+ export declare function install(app: App): void;
@@ -47,6 +47,10 @@ export interface Translation {
47
47
  };
48
48
  maxFileSizeAlert?: string;
49
49
  maxFileCountAlert: string;
50
+ /** Used by HandyUploader; falls back to English when missing. */
51
+ fileTypeAlert?: string;
52
+ invalidFileAlert?: string;
53
+ dropHint?: string;
50
54
  fileName: string;
51
55
  fileDescription: string;
52
56
  fileTags: string;