@uploadista/vue 0.0.3 → 0.0.4

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-B848U2ke.d.mts","names":[],"sources":["../src/composables/plugin.ts","../src/composables/useDragDrop.ts","../src/composables/useFlowUpload.ts","../src/composables/useMultiFlowUpload.ts","../src/composables/useUpload.ts","../src/composables/useMultiUpload.ts","../src/composables/useUploadistaClient.ts","../src/composables/useUploadMetrics.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UAQiB,uBAAA,SAAgC;;;;YAIrC;;cAGC,uBAAuB,aAClC,kBAAkB;AARH,cAWJ,gCAPD,EAOmC,YAXE,CAY/C,GAZ+C,CAY3C,GAZ2C,CAAA,CAAA,KAAA,EAY/B,eAZsD,EAAA,GAAA,IAAA,CAAA,CAAA,CAAA;AAOxE;;;;;AAIA;;;;;;AAiCA;;;;AClDA;AA0CA;AAmGA;;;;;;;;;;;;iBD3FgB,sBAAA,UAAgC;eAE/B;;;;UCpDA,eAAA;;;;;;;;;EDMA;AAOjB;;EACE,WAAA,CAAA,EAAA,MAAA;EADkC;;AAIpC;EACkB,QAAA,CAAA,EAAA,OAAA;EAAZ;;;EADqD,SAAA,CAAA,EAAA,CAAA,KAAA,ECOrC,IDPqC,EAAA,EAAA,GAAA,MAAA,EAAA,GAAA,IAAA;EAiC3C;;;4BCrBY;EA7BX;AA0CjB;AAmGA;EAAqC,iBAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,EAAA,GAAA,IAAA;EAAoB;;;EAgI5B,iBAAA,CAAA,EAAA,CAAA,UAAA,EAAA,OAAA,EAAA,GAAA,IAAA;;AAsBJ,UAzPR,aAAA,CAyPQ;EAgBO;;;EA1FG,UAAA,EAAA,OAAA;;;;EChMvB,MAAA,EAAA,OAAA;EAQK;;;EAKR,OAAA,EAAA,OAAA;EACC;;;EAUO,MAAA,EAAA,MAAA,EAA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AA;IAM5B,SAAA,UAAA,EAAA,MAAA;IACJ,SAAA,YAAA,EAAA,MAAA;IApCF,SAAA,YAAA,EAAA,MAAA;IAAI,SAAA,sBAAA,EAAA,MAAA,GAAA,IAAA;IAyCG,SAAA,UAAgB,EAAA,MAAA;IAgHjB,SAAA,cAAc,EAAA,MAAA;IAAU,SAAA,aAAA,EAAA,MAAA;IAAuB,SAAA,QAAA,EAAA,MAAA;;;;;uBE3FnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IFwSe,QAAA,EAAA,MAAA,GAAA,IAAA;IA4IS,UAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;gBEpbxB;sBAKM,QAAQ;oBAKV;;;;;;;;;;MDzDA,OAAA,EAAA,MAAmB,GAAA,IAAA;MAAA,QAAA,EAAA,MAAA,GAAA,IAAA"}
@@ -0,0 +1,254 @@
1
+ import { c as UploadItem, o as MultiUploadOptions } from "./index-B848U2ke.mjs";
2
+ import * as vue28 from "vue";
3
+ import { BrowserUploadInput, FlowUploadConfig, FlowUploadItem, FlowUploadOptions, UploadOptions } from "@uploadista/client-browser";
4
+
5
+ //#region src/components/FlowUploadList.vue.d.ts
6
+
7
+ /**
8
+ * Props for the FlowUploadList component
9
+ * @property {FlowUploadItem[]} uploads - Array of flow upload items to display
10
+ * @property {Function} filter - Optional filter for which items to display
11
+ * @property {Function} sortBy - Optional sorting function for items (a, b) => number
12
+ */
13
+ interface FlowUploadListProps {
14
+ /**
15
+ * Array of flow upload items to display
16
+ */
17
+ uploads: FlowUploadItem<BrowserUploadInput>[];
18
+ /**
19
+ * Optional filter for which items to display
20
+ */
21
+ filter?: (item: FlowUploadItem<BrowserUploadInput>) => boolean;
22
+ /**
23
+ * Optional sorting function for items
24
+ */
25
+ sortBy?: (a: FlowUploadItem<BrowserUploadInput>, b: FlowUploadItem<BrowserUploadInput>) => number;
26
+ }
27
+ type __VLS_Slots$3 = {
28
+ item(props: {
29
+ item: FlowUploadItem<BrowserUploadInput>;
30
+ index: number;
31
+ isPending: boolean;
32
+ isUploading: boolean;
33
+ isSuccess: boolean;
34
+ isError: boolean;
35
+ isAborted: boolean;
36
+ formatFileSize: (bytes: number) => string;
37
+ }): any;
38
+ default?(props: {
39
+ items: FlowUploadItem<BrowserUploadInput>[];
40
+ itemsByStatus: {
41
+ pending: FlowUploadItem<BrowserUploadInput>[];
42
+ uploading: FlowUploadItem<BrowserUploadInput>[];
43
+ success: FlowUploadItem<BrowserUploadInput>[];
44
+ error: FlowUploadItem<BrowserUploadInput>[];
45
+ aborted: FlowUploadItem<BrowserUploadInput>[];
46
+ };
47
+ }): any;
48
+ };
49
+ declare const __VLS_base$3: vue28.DefineComponent<FlowUploadListProps, {}, {}, {}, {}, vue28.ComponentOptionsMixin, vue28.ComponentOptionsMixin, {}, string, vue28.PublicProps, Readonly<FlowUploadListProps> & Readonly<{}>, {}, {}, {}, {}, string, vue28.ComponentProvideOptions, false, {}, any>;
50
+ declare const __VLS_export$3: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
51
+ declare const _default: typeof __VLS_export$3;
52
+ type __VLS_WithSlots$3<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
57
+ //# sourceMappingURL=FlowUploadList.vue.d.ts.map
58
+ //#endregion
59
+ //#region src/components/FlowUploadZone.vue.d.ts
60
+ /**
61
+ * Props for the FlowUploadZone component
62
+ * @property {FlowUploadConfig} flowConfig - Flow configuration with flowId
63
+ * @property {FlowUploadOptions} options - Additional flow upload options
64
+ * @property {string} accept - Accepted file types (single MIME type or extension string)
65
+ * @property {boolean} multiple - Allow multiple files (default: false, flow uploads are single-file)
66
+ * @property {boolean} disabled - Disable the upload zone (default: false)
67
+ * @property {number} maxFileSize - Maximum file size in bytes
68
+ */
69
+ interface FlowUploadZoneProps {
70
+ /**
71
+ * Flow configuration
72
+ */
73
+ flowConfig: FlowUploadConfig;
74
+ /**
75
+ * Additional flow upload options
76
+ */
77
+ options?: Omit<FlowUploadOptions, "flowConfig">;
78
+ /**
79
+ * Accepted file types (single MIME type or extension string)
80
+ */
81
+ accept?: string;
82
+ /**
83
+ * Whether to allow multiple files (currently only single file supported for flow uploads)
84
+ */
85
+ multiple?: boolean;
86
+ /**
87
+ * Whether the upload zone is disabled
88
+ */
89
+ disabled?: boolean;
90
+ /**
91
+ * Maximum file size in bytes
92
+ */
93
+ maxFileSize?: number;
94
+ }
95
+ type __VLS_Slots$2 = {
96
+ default(props: {
97
+ isDragging: boolean;
98
+ isOver: boolean;
99
+ isUploading: boolean;
100
+ isProcessing: boolean;
101
+ progress: number;
102
+ status: string;
103
+ errors: string[];
104
+ openFilePicker: () => void;
105
+ }): any;
106
+ };
107
+ declare const __VLS_base$2: vue28.DefineComponent<FlowUploadZoneProps, {}, {}, {}, {}, vue28.ComponentOptionsMixin, vue28.ComponentOptionsMixin, {
108
+ "upload-start": (file: File) => any;
109
+ "validation-error": (errors: string[]) => any;
110
+ "upload-complete": (result: any) => any;
111
+ "upload-error": (error: Error) => any;
112
+ }, string, vue28.PublicProps, Readonly<FlowUploadZoneProps> & Readonly<{
113
+ "onUpload-start"?: ((file: File) => any) | undefined;
114
+ "onValidation-error"?: ((errors: string[]) => any) | undefined;
115
+ "onUpload-complete"?: ((result: any) => any) | undefined;
116
+ "onUpload-error"?: ((error: Error) => any) | undefined;
117
+ }>, {
118
+ multiple: boolean;
119
+ disabled: boolean;
120
+ }, {}, {}, {}, string, vue28.ComponentProvideOptions, false, {}, any>;
121
+ declare const __VLS_export$2: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
122
+ declare const _default$1: typeof __VLS_export$2;
123
+ type __VLS_WithSlots$2<T, S> = T & {
124
+ new (): {
125
+ $slots: S;
126
+ };
127
+ };
128
+ //# sourceMappingURL=FlowUploadZone.vue.d.ts.map
129
+ //#endregion
130
+ //#region src/components/UploadList.vue.d.ts
131
+ /**
132
+ * Props for the UploadList component
133
+ * @property {UploadItem[]} uploads - Array of upload items to display
134
+ * @property {Function} filter - Optional filter for which items to display
135
+ * @property {Function} sortBy - Optional sorting function for items (a, b) => number
136
+ */
137
+ interface UploadListProps {
138
+ /**
139
+ * Array of upload items to display
140
+ */
141
+ uploads: UploadItem[];
142
+ /**
143
+ * Optional filter for which items to display
144
+ */
145
+ filter?: (item: UploadItem) => boolean;
146
+ /**
147
+ * Optional sorting function for items
148
+ */
149
+ sortBy?: (a: UploadItem, b: UploadItem) => number;
150
+ }
151
+ type __VLS_Slots$1 = {
152
+ item(props: {
153
+ item: UploadItem;
154
+ index: number;
155
+ isUploading: boolean;
156
+ isSuccess: boolean;
157
+ isError: boolean;
158
+ formatFileSize: (bytes: number) => string;
159
+ }): any;
160
+ default?(props: {
161
+ items: UploadItem[];
162
+ itemsByStatus: {
163
+ idle: UploadItem[];
164
+ uploading: UploadItem[];
165
+ success: UploadItem[];
166
+ error: UploadItem[];
167
+ aborted: UploadItem[];
168
+ };
169
+ }): any;
170
+ };
171
+ declare const __VLS_base$1: vue28.DefineComponent<UploadListProps, {}, {}, {}, {}, vue28.ComponentOptionsMixin, vue28.ComponentOptionsMixin, {}, string, vue28.PublicProps, Readonly<UploadListProps> & Readonly<{}>, {}, {}, {}, {}, string, vue28.ComponentProvideOptions, false, {}, any>;
172
+ declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
173
+ declare const _default$2: typeof __VLS_export$1;
174
+ type __VLS_WithSlots$1<T, S> = T & {
175
+ new (): {
176
+ $slots: S;
177
+ };
178
+ };
179
+ //# sourceMappingURL=UploadList.vue.d.ts.map
180
+ //#endregion
181
+ //#region src/components/UploadZone.vue.d.ts
182
+ /**
183
+ * Props for the UploadZone component
184
+ * @property {string[]} accept - Accepted file types (MIME types or file extensions)
185
+ * @property {boolean} multiple - Whether to allow multiple files (default: true)
186
+ * @property {boolean} disabled - Whether the upload zone is disabled (default: false)
187
+ * @property {number} maxFileSize - Maximum file size in bytes
188
+ * @property {Function} validator - Custom validation function for files
189
+ * @property {MultiUploadOptions} multiUploadOptions - Multi-upload options (only used when multiple=true)
190
+ * @property {UploadOptions} uploadOptions - Single upload options (only used when multiple=false)
191
+ */
192
+ interface UploadZoneProps {
193
+ /**
194
+ * Accepted file types (MIME types or file extensions)
195
+ */
196
+ accept?: string[];
197
+ /**
198
+ * Whether to allow multiple files
199
+ */
200
+ multiple?: boolean;
201
+ /**
202
+ * Whether the upload zone is disabled
203
+ */
204
+ disabled?: boolean;
205
+ /**
206
+ * Maximum file size in bytes
207
+ */
208
+ maxFileSize?: number;
209
+ /**
210
+ * Custom validation function for files
211
+ */
212
+ validator?: (files: File[]) => string[] | null;
213
+ /**
214
+ * Multi-upload options (only used when multiple=true)
215
+ */
216
+ multiUploadOptions?: MultiUploadOptions;
217
+ /**
218
+ * Single upload options (only used when multiple=false)
219
+ */
220
+ uploadOptions?: UploadOptions;
221
+ }
222
+ type __VLS_Slots = {
223
+ default(props: {
224
+ isDragging: boolean;
225
+ isOver: boolean;
226
+ isUploading: boolean;
227
+ errors: string[];
228
+ openFilePicker: () => void;
229
+ }): any;
230
+ };
231
+ declare const __VLS_base: vue28.DefineComponent<UploadZoneProps, {}, {}, {}, {}, vue28.ComponentOptionsMixin, vue28.ComponentOptionsMixin, {
232
+ "file-select": (files: File[]) => any;
233
+ "upload-start": (files: File[]) => any;
234
+ "validation-error": (errors: string[]) => any;
235
+ }, string, vue28.PublicProps, Readonly<UploadZoneProps> & Readonly<{
236
+ "onFile-select"?: ((files: File[]) => any) | undefined;
237
+ "onUpload-start"?: ((files: File[]) => any) | undefined;
238
+ "onValidation-error"?: ((errors: string[]) => any) | undefined;
239
+ }>, {
240
+ multiple: boolean;
241
+ disabled: boolean;
242
+ }, {}, {}, {}, string, vue28.ComponentProvideOptions, false, {}, any>;
243
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
244
+ declare const _default$3: typeof __VLS_export;
245
+ type __VLS_WithSlots<T, S> = T & {
246
+ new (): {
247
+ $slots: S;
248
+ };
249
+ };
250
+ //# sourceMappingURL=UploadZone.vue.d.ts.map
251
+
252
+ //#endregion
253
+ export { _default as i, _default$2 as n, _default$1 as r, _default$3 as t };
254
+ //# sourceMappingURL=index-Cg1-nrSi.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Cg1-nrSi.d.mts","names":[],"sources":["../src/components/FlowUploadList.vue","../src/components/FlowUploadZone.vue","../src/components/UploadList.vue","../src/components/UploadZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;AAgqBgB;;;;AAG0B,UAvRzB,mBAAA,CAuRyB;EAAA;AAC1C;;WApRW,eAAe;;ACxC1B;;EASiB,MAAA,CAAA,EAAA,CAAA,IAAA,EDoCC,cCpCD,CDoCgB,kBCpChB,CAAA,EAAA,GAAA,OAAA;EAAL;;AAqBX;EAgSK,MAAA,CAAA,EAAA,CAAA,CAAA,ED3QC,cC+QL,CD/QoB,kBC+QpB,CAAA,EAAA,CAAA,ED9QK,cC8QL,CD9QoB,kBC8QpB,CAAA,EAAA,GAAA,MAAA;;KDvQG,aAAA,GCmQW;EAAA,IAAA,CAAA,KAAA,EAAA;UDjQN,eAAe;;;;;;;;;SCiQT,EAAA,KAAA,EAAA;IAAA,KAAA,EDvPL,cCuPK,CDvPU,kBCuPV,CAAA,EAAA;IAKV,aAAoE,EAAA;MAAxB,OAAA,ED1PnC,cC0PmC,CD1PpB,kBC0PoB,CAAA,EAAA;MAAY,SAAA,EDzP7C,cCyP6C,CDzP9B,kBCyP8B,CAAA,EAAA;MAAnC,OAAA,EDxPZ,cCwPY,CDxPG,kBCwPH,CAAA,EAAA;MAAe,KAAA,EDvP7B,cCuP6B,CDvPd,kBCuPc,CAAA,EAAA;MAAA,OACF,EDvPzB,cCuPa,CDvPE,kBCuPU,CAAA,EAAA;IAWnC,CAAA;;;cDvBC,cAAU,KAAA,CAAA,gBAAA,qCAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,cA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OClC0B,YDkC1B;KCvBG,eDqBW,CAAA,CAAA,EAAA,CAAA,CAAA,GCrBa,CDqBb,GAAA;EAAA,MAAA,EAAA;IAAA,MAAA,ECnBN,CDmBM;EAAA,CAAA;CAAA"}
@@ -0,0 +1,62 @@
1
+ //#region src/utils/is-browser-file.d.ts
2
+ declare const isBrowserFile: (value: unknown) => value is File;
3
+ //#endregion
4
+ //#region src/utils/index.d.ts
5
+ /**
6
+ * Utility functions for the Vue upload client
7
+ */
8
+ /**
9
+ * Format file size in human-readable format
10
+ */
11
+ declare function formatFileSize(bytes: number): string;
12
+ /**
13
+ * Format upload speed in human-readable format
14
+ */
15
+ declare function formatSpeed(bytesPerSecond: number): string;
16
+ /**
17
+ * Format duration in human-readable format
18
+ */
19
+ declare function formatDuration(milliseconds: number): string;
20
+ /**
21
+ * Validate file type against accepted types
22
+ */
23
+ declare function validateFileType(file: File, accept: string[]): boolean;
24
+ /**
25
+ * Generate a unique ID for upload items
26
+ */
27
+ declare function generateUploadId(): string;
28
+ /**
29
+ * Get file extension from filename
30
+ */
31
+ declare function getFileExtension(filename: string): string;
32
+ /**
33
+ * Check if a file is an image
34
+ */
35
+ declare function isImageFile(file: File): boolean;
36
+ /**
37
+ * Check if a file is a video
38
+ */
39
+ declare function isVideoFile(file: File): boolean;
40
+ /**
41
+ * Check if a file is an audio file
42
+ */
43
+ declare function isAudioFile(file: File): boolean;
44
+ /**
45
+ * Check if a file is a document
46
+ */
47
+ declare function isDocumentFile(file: File): boolean;
48
+ /**
49
+ * Create a preview URL for a file (if supported)
50
+ */
51
+ declare function createFilePreview(file: File): string | null;
52
+ /**
53
+ * Clean up a preview URL created with createFilePreview
54
+ */
55
+ declare function revokeFilePreview(previewUrl: string): void;
56
+ /**
57
+ * Calculate progress percentage
58
+ */
59
+ declare function calculateProgress(current: number, total: number): number;
60
+ //#endregion
61
+ export { formatSpeed as a, isAudioFile as c, isVideoFile as d, revokeFilePreview as f, formatFileSize as i, isDocumentFile as l, isBrowserFile as m, createFilePreview as n, generateUploadId as o, validateFileType as p, formatDuration as r, getFileExtension as s, calculateProgress as t, isImageFile as u };
62
+ //# sourceMappingURL=index-CwuMGgQY.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CwuMGgQY.d.mts","names":[],"sources":["../src/utils/is-browser-file.ts","../src/utils/index.ts"],"sourcesContent":[],"mappings":";cAAa,4CAA2C;;;;AAAxD;;;;ACOA;AAWgB,iBAXA,cAAA,CAWW,KAAA,EAAA,MAAA,CAAA,EAAA,MAAA;AAW3B;AAuBA;AAsBA;AAOgB,iBA/DA,WAAA,CA+DgB,cAAA,EAAA,MAAA,CAAA,EAAA,MAAA;AAQhC;AAOA;AAOA;AAOgB,iBAjFA,cAAA,CAiFyB,YAAA,EAAA,MAAA,CAAA,EAAA,MAAA;AAoBzC;AAUA;AAOA;iBA/FgB,gBAAA,OAAuB;;;;iBAsBvB,gBAAA,CAAA;;;;iBAOA,gBAAA;;;;iBAQA,WAAA,OAAkB;;;;iBAOlB,WAAA,OAAkB;;;;iBAOlB,WAAA,OAAkB;;;;iBAOlB,cAAA,OAAqB;;;;iBAoBrB,iBAAA,OAAwB;;;;iBAUxB,iBAAA;;;;iBAOA,iBAAA"}
@@ -0,0 +1,39 @@
1
+ import * as vue23 from "vue";
2
+ import { UploadistaEvent } from "@uploadista/client-browser";
3
+
4
+ //#region src/providers/UploadistaProvider.vue.d.ts
5
+ type __VLS_Props = {
6
+ serverUrl: string;
7
+ storageId?: string;
8
+ uploadistaBasePath?: string;
9
+ chunkSize?: number;
10
+ parallelUploads?: number;
11
+ storeFingerprintForResuming?: boolean;
12
+ onEvent?: (event: UploadistaEvent) => void;
13
+ };
14
+ declare var __VLS_1: {};
15
+ type __VLS_Slots = {} & {
16
+ default?: (props: typeof __VLS_1) => any;
17
+ };
18
+ declare const __VLS_base: vue23.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue23.ComponentOptionsMixin, vue23.ComponentOptionsMixin, {} & {
19
+ event: (event: UploadistaEvent) => any;
20
+ }, string, vue23.PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ onEvent?: ((event: UploadistaEvent) => any) | undefined;
22
+ }>, {
23
+ uploadistaBasePath: string;
24
+ storageId: string;
25
+ chunkSize: number;
26
+ parallelUploads: number;
27
+ storeFingerprintForResuming: boolean;
28
+ }, {}, {}, {}, string, vue23.ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
36
+ //# sourceMappingURL=UploadistaProvider.vue.d.ts.map
37
+ //#endregion
38
+ export { _default as t };
39
+ //# sourceMappingURL=index-DbZiny0Q.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DbZiny0Q.d.mts","names":[],"sources":["../src/providers/UploadistaProvider.vue"],"sourcesContent":[],"mappings":";;;;KAiFK,WAAA;;;EAAA,kBAAW,CAAA,EAAA,MAOM;EA8ElB,SAAA,CAAkB,EAAA,MAAA;EACjB,eAAW,CAAA,EAAA,MAAA;EAKV,2BAIJ,CAAA,EAAA,OAAA;EAJc,OAAA,CAAA,EAAA,CAAA,KAAA,EApFM,eAoFN,EAAA,GAAA,IAAA;CAAA;YANZ,OAMY,EAAA,CAAA,CAAA;KALX,WAAA;2BACwB;;cAIvB,kBAAU,gBAAA,6BAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA;;;;;EAAA,kBAAA,EAAA,MAAA;EAKV,SAAA,EAAA,MAAoE;EAAxB,SAAA,EAAA,MAAA;EAAY,eAAA,EAAA,MAAA;EAAnC,2BAAA,EAAA,OAAA;CAAe,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,iCAAA,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;AAAA,cAApC,YACkC,EADb,eACa,CAAA,OADU,UACV,EADsB,WACtB,CAAA;AAAxC,cAD0C,QAYtB,EAAA,OAXQ,YAajB;KAFN,wBAAwB;;YAEnB"}
@@ -0,0 +1,5 @@
1
+ import { i as _default, n as _default$2, r as _default$1, t as _default$3 } from "./index-Cg1-nrSi.mjs";
2
+ import { C as DragDropState, D as UploadistaPluginOptions, E as UPLOADISTA_EVENT_SUBSCRIBERS_KEY, O as createUploadistaPlugin, S as DragDropOptions, T as UPLOADISTA_CLIENT_KEY, _ as useUpload, a as useUploadistaClient, b as FlowUploadStatus, c as UploadItem, d as PerformanceInsights, f as UploadInput, g as UploadStatus, h as UploadState, i as UseUploadistaClientReturn, l as useMultiUpload, m as UploadSessionMetrics, n as UseUploadMetricsOptions, o as MultiUploadOptions, p as UploadMetrics, r as useUploadMetrics, s as MultiUploadState, t as FileUploadMetrics, u as ChunkMetrics, v as useMultiFlowUpload, w as useDragDrop, x as useFlowUpload, y as FlowUploadState } from "./index-B848U2ke.mjs";
3
+ import { t as _default$4 } from "./index-DbZiny0Q.mjs";
4
+ import { a as formatSpeed, c as isAudioFile, d as isVideoFile, f as revokeFilePreview, i as formatFileSize, l as isDocumentFile, m as isBrowserFile, n as createFilePreview, o as generateUploadId, p as validateFileType, r as formatDuration, s as getFileExtension, t as calculateProgress, u as isImageFile } from "./index-CwuMGgQY.mjs";
5
+ export { ChunkMetrics, DragDropOptions, DragDropState, FileUploadMetrics, _default as FlowUploadList, FlowUploadState, FlowUploadStatus, _default$1 as FlowUploadZone, MultiUploadOptions, MultiUploadState, PerformanceInsights, UPLOADISTA_CLIENT_KEY, UPLOADISTA_EVENT_SUBSCRIBERS_KEY, UploadInput, UploadItem, _default$2 as UploadList, UploadMetrics, UploadSessionMetrics, UploadState, UploadStatus, _default$3 as UploadZone, UploadistaPluginOptions, _default$4 as UploadistaProvider, UseUploadMetricsOptions, UseUploadistaClientReturn, calculateProgress, createFilePreview, createUploadistaPlugin, formatDuration, formatFileSize, formatSpeed, generateUploadId, getFileExtension, isAudioFile, isBrowserFile, isDocumentFile, isImageFile, isVideoFile, revokeFilePreview, useDragDrop, useFlowUpload, useMultiFlowUpload, useMultiUpload, useUpload, useUploadMetrics, useUploadistaClient, validateFileType };
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./utils-BSoozMHK.mjs";import{i as m,n as h,r as g,t as _}from"./components-DjgxUKKp.mjs";import{n as v,r as y,t as b}from"./plugin-HH1lTjcq.mjs";import{a as x,i as S,n as C,o as w,r as T,s as E,t as D}from"./composables-Biblh8X9.mjs";import{t as O}from"./providers-BQhKoGMk.mjs";export{m as FlowUploadList,g as FlowUploadZone,b as UPLOADISTA_CLIENT_KEY,v as UPLOADISTA_EVENT_SUBSCRIBERS_KEY,h as UploadList,_ as UploadZone,O as UploadistaProvider,f as calculateProgress,s as createFilePreview,y as createUploadistaPlugin,u as formatDuration,i as formatFileSize,e as formatSpeed,c as generateUploadId,d as getFileExtension,t as isAudioFile,o as isBrowserFile,a as isDocumentFile,p as isImageFile,n as isVideoFile,r as revokeFilePreview,E as useDragDrop,x as useFlowUpload,S as useMultiFlowUpload,T as useMultiUpload,C as useUpload,D as useUploadMetrics,w as useUploadistaClient,l as validateFileType};
@@ -0,0 +1,2 @@
1
+ import{ref as e}from"vue";import{createUploadistaClient as t}from"@uploadista/client-browser";const n=Symbol(`uploadista-client`),r=Symbol(`uploadista-event-subscribers`);function i(i){return{install(a){let o=e(new Set),s=t({...i,onEvent:e=>{o.value.forEach(t=>{t(e)}),i.onEvent?.(e)}});a.provide(n,s),a.provide(r,o)}}}export{r as n,i as r,n as t};
2
+ //# sourceMappingURL=plugin-HH1lTjcq.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-HH1lTjcq.mjs","names":["UPLOADISTA_CLIENT_KEY: InjectionKey<\n ReturnType<typeof createUploadistaClient>\n>","UPLOADISTA_EVENT_SUBSCRIBERS_KEY: InjectionKey<\n Ref<Set<(event: UploadistaEvent) => void>>\n>"],"sources":["../src/composables/plugin.ts"],"sourcesContent":["import {\n createUploadistaClient,\n type UploadistaClientOptions,\n type UploadistaEvent,\n} from \"@uploadista/client-browser\";\nimport type { App, InjectionKey, Ref } from \"vue\";\nimport { ref } from \"vue\";\n\nexport interface UploadistaPluginOptions extends UploadistaClientOptions {\n /**\n * Global event handler for all upload and flow events from this client\n */\n onEvent?: UploadistaClientOptions[\"onEvent\"];\n}\n\nexport const UPLOADISTA_CLIENT_KEY: InjectionKey<\n ReturnType<typeof createUploadistaClient>\n> = Symbol(\"uploadista-client\");\n\nexport const UPLOADISTA_EVENT_SUBSCRIBERS_KEY: InjectionKey<\n Ref<Set<(event: UploadistaEvent) => void>>\n> = Symbol(\"uploadista-event-subscribers\");\n\n/**\n * Vue plugin for providing Uploadista client instance globally.\n * Uses Vue's provide/inject pattern to make the client available\n * throughout the component tree.\n *\n * @param options - Uploadista client configuration options\n * @returns Vue plugin object\n *\n * @example\n * ```typescript\n * import { createApp } from 'vue';\n * import { createUploadistaPlugin } from '@uploadista/vue';\n * import App from './App.vue';\n *\n * const app = createApp(App);\n *\n * app.use(createUploadistaPlugin({\n * baseUrl: 'https://api.example.com',\n * storageId: 'my-storage',\n * chunkSize: 1024 * 1024, // 1MB\n * storeFingerprintForResuming: true,\n * onEvent: (event) => {\n * console.log('Upload event:', event);\n * }\n * }));\n *\n * app.mount('#app');\n * ```\n */\nexport function createUploadistaPlugin(options: UploadistaPluginOptions) {\n return {\n install(app: App) {\n // Create a shared set of event subscribers\n const eventSubscribers = ref(new Set<(event: UploadistaEvent) => void>());\n\n const client = createUploadistaClient({\n ...options,\n onEvent: (event) => {\n // Dispatch to all subscribers registered via subscribeToEvents\n eventSubscribers.value.forEach((subscriber) => {\n subscriber(event);\n });\n\n // Call the original onEvent handler if provided\n options.onEvent?.(event);\n },\n });\n\n app.provide(UPLOADISTA_CLIENT_KEY, client);\n app.provide(UPLOADISTA_EVENT_SUBSCRIBERS_KEY, eventSubscribers);\n },\n };\n}\n"],"mappings":"8FAeA,MAAaA,EAET,OAAO,oBAAoB,CAElBC,EAET,OAAO,+BAA+B,CA+B1C,SAAgB,EAAuB,EAAkC,CACvE,MAAO,CACL,QAAQ,EAAU,CAEhB,IAAM,EAAmB,EAAI,IAAI,IAAwC,CAEnE,EAAS,EAAuB,CACpC,GAAG,EACH,QAAU,GAAU,CAElB,EAAiB,MAAM,QAAS,GAAe,CAC7C,EAAW,EAAM,EACjB,CAGF,EAAQ,UAAU,EAAM,EAE3B,CAAC,CAEF,EAAI,QAAQ,EAAuB,EAAO,CAC1C,EAAI,QAAQ,EAAkC,EAAiB,EAElE"}
@@ -0,0 +1,2 @@
1
+ import { t as _default } from "../index-DbZiny0Q.mjs";
2
+ export { _default as UploadistaProvider };
@@ -0,0 +1 @@
1
+ import"../plugin-HH1lTjcq.mjs";import{t as e}from"../providers-BQhKoGMk.mjs";export{e as UploadistaProvider};
@@ -0,0 +1,2 @@
1
+ import{n as e,t}from"./plugin-HH1lTjcq.mjs";import{defineComponent as n,onBeforeUnmount as r,provide as i,ref as a,renderSlot as o}from"vue";import{createUploadistaClient as s}from"@uploadista/client-browser";var c=n({__name:`UploadistaProvider`,props:{serverUrl:{},storageId:{default:`local`},uploadistaBasePath:{default:`uploadista`},chunkSize:{default:1024*1024},parallelUploads:{default:1},storeFingerprintForResuming:{type:Boolean,default:!0},onEvent:{}},emits:[`event`],setup(n,{emit:c}){let l=n,u=c,d=a(new Set),f=s({baseUrl:l.serverUrl,storageId:l.storageId,uploadistaBasePath:l.uploadistaBasePath,chunkSize:l.chunkSize,parallelUploads:l.parallelUploads,storeFingerprintForResuming:l.storeFingerprintForResuming,onEvent:e=>{d.value.forEach(t=>{t(e)}),l.onEvent?.(e),u(`event`,e)}});return i(t,f),i(e,d),r(()=>{f.closeAllWebSockets()}),(e,t)=>o(e.$slots,`default`)}});export{c as t};
2
+ //# sourceMappingURL=providers-BQhKoGMk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providers-BQhKoGMk.mjs","names":[],"sources":["../src/providers/UploadistaProvider.vue","../src/providers/UploadistaProvider.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n createUploadistaClient,\n type UploadistaEvent,\n} from \"@uploadista/client-browser\";\nimport { onBeforeUnmount, provide, ref } from \"vue\";\nimport {\n UPLOADISTA_CLIENT_KEY,\n UPLOADISTA_EVENT_SUBSCRIBERS_KEY,\n} from \"../composables/plugin\";\n\nconst props = withDefaults(\n defineProps<{\n serverUrl: string;\n storageId?: string;\n uploadistaBasePath?: string;\n chunkSize?: number;\n parallelUploads?: number;\n storeFingerprintForResuming?: boolean;\n onEvent?: (event: UploadistaEvent) => void;\n }>(),\n {\n storageId: \"local\",\n uploadistaBasePath: \"uploadista\",\n chunkSize: 1024 * 1024,\n parallelUploads: 1,\n storeFingerprintForResuming: true,\n },\n);\n\nconst emit = defineEmits<{\n /**\n * Emitted when the underlying client dispatches an event.\n */\n (e: \"event\", event: UploadistaEvent): void;\n}>();\n\n// Create a shared set of event subscribers\nconst eventSubscribers = ref(new Set<(event: UploadistaEvent) => void>());\n\nconst client = createUploadistaClient({\n baseUrl: props.serverUrl,\n storageId: props.storageId,\n uploadistaBasePath: props.uploadistaBasePath,\n chunkSize: props.chunkSize,\n parallelUploads: props.parallelUploads,\n storeFingerprintForResuming: props.storeFingerprintForResuming,\n onEvent: (event) => {\n // Dispatch to all subscribers registered via subscribeToEvents\n eventSubscribers.value.forEach((subscriber) => {\n subscriber(event);\n });\n\n props.onEvent?.(event);\n emit(\"event\", event);\n },\n});\n\nprovide(UPLOADISTA_CLIENT_KEY, client);\nprovide(UPLOADISTA_EVENT_SUBSCRIBERS_KEY, eventSubscribers);\n\nonBeforeUnmount(() => {\n client.closeAllWebSockets();\n});\n</script>\n\n<template>\n <slot />\n</template>\n","<script setup lang=\"ts\">\nimport {\n createUploadistaClient,\n type UploadistaEvent,\n} from \"@uploadista/client-browser\";\nimport { onBeforeUnmount, provide, ref } from \"vue\";\nimport {\n UPLOADISTA_CLIENT_KEY,\n UPLOADISTA_EVENT_SUBSCRIBERS_KEY,\n} from \"../composables/plugin\";\n\nconst props = withDefaults(\n defineProps<{\n serverUrl: string;\n storageId?: string;\n uploadistaBasePath?: string;\n chunkSize?: number;\n parallelUploads?: number;\n storeFingerprintForResuming?: boolean;\n onEvent?: (event: UploadistaEvent) => void;\n }>(),\n {\n storageId: \"local\",\n uploadistaBasePath: \"uploadista\",\n chunkSize: 1024 * 1024,\n parallelUploads: 1,\n storeFingerprintForResuming: true,\n },\n);\n\nconst emit = defineEmits<{\n /**\n * Emitted when the underlying client dispatches an event.\n */\n (e: \"event\", event: UploadistaEvent): void;\n}>();\n\n// Create a shared set of event subscribers\nconst eventSubscribers = ref(new Set<(event: UploadistaEvent) => void>());\n\nconst client = createUploadistaClient({\n baseUrl: props.serverUrl,\n storageId: props.storageId,\n uploadistaBasePath: props.uploadistaBasePath,\n chunkSize: props.chunkSize,\n parallelUploads: props.parallelUploads,\n storeFingerprintForResuming: props.storeFingerprintForResuming,\n onEvent: (event) => {\n // Dispatch to all subscribers registered via subscribeToEvents\n eventSubscribers.value.forEach((subscriber) => {\n subscriber(event);\n });\n\n props.onEvent?.(event);\n emit(\"event\", event);\n },\n});\n\nprovide(UPLOADISTA_CLIENT_KEY, client);\nprovide(UPLOADISTA_EVENT_SUBSCRIBERS_KEY, eventSubscribers);\n\nonBeforeUnmount(() => {\n client.closeAllWebSockets();\n});\n</script>\n\n<template>\n <slot />\n</template>\n"],"mappings":"8eCWA,IAAM,EAAQ,EAmBR,EAAO,EAQP,EAAmB,EAAI,IAAI,IAAwC,CAEnE,EAAS,EAAuB,CACpC,QAAS,EAAM,UACf,UAAW,EAAM,UACjB,mBAAoB,EAAM,mBAC1B,UAAW,EAAM,UACjB,gBAAiB,EAAM,gBACvB,4BAA6B,EAAM,4BACnC,QAAU,GAAU,CAElB,EAAiB,MAAM,QAAS,GAAe,CAC7C,EAAW,EAAM,EACjB,CAEF,EAAM,UAAU,EAAM,CACtB,EAAK,QAAS,EAAM,EAEvB,CAAC,QAEF,EAAQ,EAAuB,EAAO,CACtC,EAAQ,EAAkC,EAAiB,CAE3D,MAAsB,CACpB,EAAO,oBAAoB,EAC3B,QAIA,EAAQ,EAAA,OAAA,UAAA"}
@@ -0,0 +1,2 @@
1
+ import { a as formatSpeed, c as isAudioFile, d as isVideoFile, f as revokeFilePreview, i as formatFileSize, l as isDocumentFile, m as isBrowserFile, n as createFilePreview, o as generateUploadId, p as validateFileType, r as formatDuration, s as getFileExtension, t as calculateProgress, u as isImageFile } from "../index-CwuMGgQY.mjs";
2
+ export { calculateProgress, createFilePreview, formatDuration, formatFileSize, formatSpeed, generateUploadId, getFileExtension, isAudioFile, isBrowserFile, isDocumentFile, isImageFile, isVideoFile, revokeFilePreview, validateFileType };
@@ -0,0 +1 @@
1
+ import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"../utils-BSoozMHK.mjs";export{f as calculateProgress,s as createFilePreview,u as formatDuration,i as formatFileSize,e as formatSpeed,c as generateUploadId,d as getFileExtension,t as isAudioFile,o as isBrowserFile,a as isDocumentFile,p as isImageFile,n as isVideoFile,r as revokeFilePreview,l as validateFileType};
@@ -0,0 +1,2 @@
1
+ const e=e=>typeof File<`u`&&e instanceof File;function t(e){if(e===0)return`0 Bytes`;let t=1024,n=[`Bytes`,`KB`,`MB`,`GB`,`TB`],r=Math.floor(Math.log(e)/Math.log(t));return`${Number.parseFloat((e/t**r).toFixed(2))} ${n[r]}`}function n(e){if(e===0)return`0 B/s`;let t=1024,n=[`B/s`,`KB/s`,`MB/s`,`GB/s`],r=Math.floor(Math.log(e)/Math.log(t));return`${Number.parseFloat((e/t**r).toFixed(1))} ${n[r]}`}function r(e){if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${Math.round(e/1e3)}s`;if(e<36e5){let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return n>0?`${t}m ${n}s`:`${t}m`}let t=Math.floor(e/36e5),n=Math.round(e%36e5/6e4);return n>0?`${t}h ${n}m`:`${t}h`}function i(e,t){return!t||t.length===0?!0:t.some(t=>{if(t.startsWith(`.`))return e.name.toLowerCase().endsWith(t.toLowerCase());if(t.endsWith(`/*`)){let n=t.slice(0,-2);return e.type.startsWith(n)}return e.type===t})}function a(){return`upload-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}function o(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.substring(t+1).toLowerCase()}function s(e){return e.type.startsWith(`image/`)}function c(e){return e.type.startsWith(`video/`)}function l(e){return e.type.startsWith(`audio/`)}function u(e){return[`application/pdf`,`application/msword`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,`application/vnd.ms-excel`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,`application/vnd.ms-powerpoint`,`application/vnd.openxmlformats-officedocument.presentationml.presentation`,`text/plain`,`text/csv`,`application/rtf`].includes(e.type)}function d(e){return s(e)||c(e)||l(e)?URL.createObjectURL(e):null}function f(e){URL.revokeObjectURL(e)}function p(e,t){return t===0?0:Math.min(100,Math.max(0,Math.round(e/t*100)))}export{n as a,l as c,c as d,f,t as i,u as l,e as m,d as n,a as o,i as p,r,o as s,p as t,s as u};
2
+ //# sourceMappingURL=utils-BSoozMHK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-BSoozMHK.mjs","names":["minutes"],"sources":["../src/utils/is-browser-file.ts","../src/utils/index.ts"],"sourcesContent":["export const isBrowserFile = (value: unknown): value is File =>\n typeof File !== \"undefined\" && value instanceof File;\n","/**\n * Utility functions for the Vue upload client\n */\n\n/**\n * Format file size in human-readable format\n */\nexport function formatFileSize(bytes: number): string {\n if (bytes === 0) return \"0 Bytes\";\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return `${Number.parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;\n}\n\n/**\n * Format upload speed in human-readable format\n */\nexport function formatSpeed(bytesPerSecond: number): string {\n if (bytesPerSecond === 0) return \"0 B/s\";\n const k = 1024;\n const sizes = [\"B/s\", \"KB/s\", \"MB/s\", \"GB/s\"];\n const i = Math.floor(Math.log(bytesPerSecond) / Math.log(k));\n return `${Number.parseFloat((bytesPerSecond / k ** i).toFixed(1))} ${sizes[i]}`;\n}\n\n/**\n * Format duration in human-readable format\n */\nexport function formatDuration(milliseconds: number): string {\n if (milliseconds < 1000) {\n return `${Math.round(milliseconds)}ms`;\n }\n\n if (milliseconds < 60000) {\n return `${Math.round(milliseconds / 1000)}s`;\n }\n\n if (milliseconds < 3600000) {\n const minutes = Math.floor(milliseconds / 60000);\n const seconds = Math.round((milliseconds % 60000) / 1000);\n return seconds > 0 ? `${minutes}m ${seconds}s` : `${minutes}m`;\n }\n\n const hours = Math.floor(milliseconds / 3600000);\n const minutes = Math.round((milliseconds % 3600000) / 60000);\n return minutes > 0 ? `${hours}h ${minutes}m` : `${hours}h`;\n}\n\n/**\n * Validate file type against accepted types\n */\nexport function validateFileType(file: File, accept: string[]): boolean {\n if (!accept || accept.length === 0) return true;\n\n return accept.some((acceptType) => {\n if (acceptType.startsWith(\".\")) {\n // File extension check\n return file.name.toLowerCase().endsWith(acceptType.toLowerCase());\n }\n\n // MIME type check (supports wildcards like image/*)\n if (acceptType.endsWith(\"/*\")) {\n const baseType = acceptType.slice(0, -2);\n return file.type.startsWith(baseType);\n }\n\n return file.type === acceptType;\n });\n}\n\n/**\n * Generate a unique ID for upload items\n */\nexport function generateUploadId(): string {\n return `upload-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n}\n\n/**\n * Get file extension from filename\n */\nexport function getFileExtension(filename: string): string {\n const lastDot = filename.lastIndexOf(\".\");\n return lastDot !== -1 ? filename.substring(lastDot + 1).toLowerCase() : \"\";\n}\n\n/**\n * Check if a file is an image\n */\nexport function isImageFile(file: File): boolean {\n return file.type.startsWith(\"image/\");\n}\n\n/**\n * Check if a file is a video\n */\nexport function isVideoFile(file: File): boolean {\n return file.type.startsWith(\"video/\");\n}\n\n/**\n * Check if a file is an audio file\n */\nexport function isAudioFile(file: File): boolean {\n return file.type.startsWith(\"audio/\");\n}\n\n/**\n * Check if a file is a document\n */\nexport function isDocumentFile(file: File): boolean {\n const documentTypes = [\n \"application/pdf\",\n \"application/msword\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"application/vnd.ms-excel\",\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n \"application/vnd.ms-powerpoint\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"text/plain\",\n \"text/csv\",\n \"application/rtf\",\n ];\n\n return documentTypes.includes(file.type);\n}\n\n/**\n * Create a preview URL for a file (if supported)\n */\nexport function createFilePreview(file: File): string | null {\n if (isImageFile(file) || isVideoFile(file) || isAudioFile(file)) {\n return URL.createObjectURL(file);\n }\n return null;\n}\n\n/**\n * Clean up a preview URL created with createFilePreview\n */\nexport function revokeFilePreview(previewUrl: string): void {\n URL.revokeObjectURL(previewUrl);\n}\n\n/**\n * Calculate progress percentage\n */\nexport function calculateProgress(current: number, total: number): number {\n if (total === 0) return 0;\n return Math.min(100, Math.max(0, Math.round((current / total) * 100)));\n}\n\n/**\n * Check if a value is a browser file\n */\nexport * from \"./is-browser-file\";\n"],"mappings":"AAAA,MAAa,EAAiB,GAC5B,OAAO,KAAS,KAAe,aAAiB,KCMlD,SAAgB,EAAe,EAAuB,CACpD,GAAI,IAAU,EAAG,MAAO,UACxB,IAAM,EAAI,KACJ,EAAQ,CAAC,QAAS,KAAM,KAAM,KAAM,KAAK,CACzC,EAAI,KAAK,MAAM,KAAK,IAAI,EAAM,CAAG,KAAK,IAAI,EAAE,CAAC,CACnD,MAAO,GAAG,OAAO,YAAY,EAAQ,GAAK,GAAG,QAA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Q,CAAC,SAAS,GAAG,CAAC,OAAO,EAAG,EAAE,GAMxE,SAAgB,EAAiB,EAA0B,CACzD,IAAM,EAAU,EAAS,YAAY,IAAI,CACzC,OAAO,IAAY,GAAqD,GAAhD,EAAS,UAAU,EAAU,EAAE,CAAC,aAAa,CAMvE,SAAgB,EAAY,EAAqB,CAC/C,OAAO,EAAK,KAAK,WAAW,SAAS,CAMvC,SAAgB,EAAY,EAAqB,CAC/C,OAAO,EAAK,KAAK,WAAW,SAAS,CAMvC,SAAgB,EAAY,EAAqB,CAC/C,OAAO,EAAK,KAAK,WAAW,SAAS,CAMvC,SAAgB,EAAe,EAAqB,CAclD,MAbsB,CACpB,kBACA,qBACA,0EACA,2BACA,oEACA,gCACA,4EACA,aACA,WACA,kBACD,CAEoB,SAAS,EAAK,KAAK,CAM1C,SAAgB,EAAkB,EAA2B,CAI3D,OAHI,EAAY,EAAK,EAAI,EAAY,EAAK,EAAI,EAAY,EAAK,CACtD,IAAI,gBAAgB,EAAK,CAE3B,KAMT,SAAgB,EAAkB,EAA0B,CAC1D,IAAI,gBAAgB,EAAW,CAMjC,SAAgB,EAAkB,EAAiB,EAAuB,CAExE,OADI,IAAU,EAAU,EACjB,KAAK,IAAI,IAAK,KAAK,IAAI,EAAG,KAAK,MAAO,EAAU,EAAS,IAAI,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,31 +1,50 @@
1
1
  {
2
2
  "name": "@uploadista/vue",
3
3
  "type": "module",
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "description": "Vue client for Uploadista",
6
6
  "license": "MIT",
7
7
  "author": "Uploadista",
8
8
  "exports": {
9
- ".": "./src/index.ts",
10
- "./composables/*": "./src/composables/*.ts",
11
- "./components/*": "./src/components/*.vue",
12
- "./providers/*": "./src/providers/*.vue",
13
- "./utils/*": "./src/utils/*.ts"
9
+ ".": {
10
+ "types": "./dist/index.d.mts",
11
+ "import": "./dist/index.mjs"
12
+ },
13
+ "./composables": {
14
+ "types": "./dist/composables/index.d.mts",
15
+ "import": "./dist/composables/index.mjs"
16
+ },
17
+ "./components": {
18
+ "types": "./dist/components/index.d.mts",
19
+ "import": "./dist/components/index.mjs"
20
+ },
21
+ "./providers": {
22
+ "types": "./dist/providers/index.d.mts",
23
+ "import": "./dist/providers/index.mjs"
24
+ },
25
+ "./utils": {
26
+ "types": "./dist/utils/index.d.mts",
27
+ "import": "./dist/utils/index.mjs"
28
+ }
14
29
  },
15
30
  "peerDependencies": {
16
31
  "vue": "^3.3.0"
17
32
  },
18
33
  "dependencies": {
19
- "@uploadista/core": "0.0.3",
20
- "@uploadista/client-browser": "0.0.3"
34
+ "@uploadista/client-browser": "0.0.4",
35
+ "@uploadista/core": "0.0.4"
21
36
  },
22
37
  "devDependencies": {
23
38
  "@vue/test-utils": "^2.4.6",
39
+ "tsdown": "0.15.9",
40
+ "unplugin-vue": "^7.0.2",
24
41
  "vitest": "3.2.4",
25
42
  "vue": "^3.5.0",
26
- "@uploadista/typescript-config": "0.0.3"
43
+ "vue-tsc": "3.1.1",
44
+ "@uploadista/typescript-config": "0.0.4"
27
45
  },
28
46
  "scripts": {
47
+ "build": "tsdown",
29
48
  "format": "biome format --write ./src",
30
49
  "lint": "biome lint --write ./src",
31
50
  "check": "biome check --write ./src",
@@ -3,11 +3,11 @@ import {
3
3
  createUploadistaClient,
4
4
  type UploadistaEvent,
5
5
  } from "@uploadista/client-browser";
6
+ import { onBeforeUnmount, provide, ref } from "vue";
6
7
  import {
7
8
  UPLOADISTA_CLIENT_KEY,
8
9
  UPLOADISTA_EVENT_SUBSCRIBERS_KEY,
9
- } from "@uploadista/vue";
10
- import { onBeforeUnmount, provide, ref } from "vue";
10
+ } from "../composables/plugin";
11
11
 
12
12
  const props = withDefaults(
13
13
  defineProps<{
@@ -0,0 +1,20 @@
1
+ import { defineConfig } from "tsdown";
2
+ import Vue from "unplugin-vue/rolldown";
3
+
4
+ export default defineConfig({
5
+ entry: {
6
+ index: "src/index.ts",
7
+ "composables/index": "src/composables/index.ts",
8
+ "components/index": "src/components/index.ts",
9
+ "providers/index": "src/providers/index.ts",
10
+ "utils/index": "src/utils/index.ts",
11
+ },
12
+ platform: "neutral",
13
+ minify: true,
14
+ format: ["esm"],
15
+ plugins: [Vue({ isProduction: true })],
16
+ dts: { vue: true },
17
+ outDir: "dist",
18
+ external: ["vue"],
19
+ fixedExtension: true,
20
+ });