@susonwaiba/react-media-uploader 0.1.1 → 0.1.2
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/NEXTJS_INTEGRATION.md +128 -102
- package/README.md +106 -62
- package/bun.lock +1 -0
- package/dist/hooks/use-media-uploader.d.ts +11 -1
- package/dist/hooks/use-media-uploader.js +20 -9
- package/dist/lib/media-helper.d.ts +14 -6
- package/dist/lib/media-helper.js +26 -14
- package/package.json +40 -40
- package/src/hooks/use-media-uploader.ts +261 -237
- package/src/index.ts +3 -3
- package/src/lib/media-helper.ts +153 -119
- package/src/types/media.ts +47 -47
- package/tsconfig.json +19 -19
package/package.json
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@susonwaiba/react-media-uploader",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"source": "src/index.ts",
|
|
5
|
-
"module": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "rm -rf dist && tsc && tsc-alias"
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/susonwaiba/react-media-uploader.git"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"react",
|
|
17
|
-
"media",
|
|
18
|
-
"uploader",
|
|
19
|
-
"nextjs",
|
|
20
|
-
"media-uploader",
|
|
21
|
-
"react-media-uploader"
|
|
22
|
-
],
|
|
23
|
-
"author": "Suson Waiba <susonwaiba@gmail.com> (https://susonwaiba.github.io)",
|
|
24
|
-
"license": "MIT",
|
|
25
|
-
"bugs": {
|
|
26
|
-
"url": "https://github.com/susonwaiba/react-media-uploader/issues"
|
|
27
|
-
},
|
|
28
|
-
"homepage": "https://github.com/susonwaiba/react-media-uploader#readme",
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"axios": ">=1",
|
|
31
|
-
"react": ">=18",
|
|
32
|
-
"react-dom": ">=18"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@types/react": "^18",
|
|
36
|
-
"@types/react-dom": "^18",
|
|
37
|
-
"tsc-alias": "^1",
|
|
38
|
-
"typescript": "^5"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@susonwaiba/react-media-uploader",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"source": "src/index.ts",
|
|
5
|
+
"module": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "rm -rf dist && tsc && tsc-alias"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/susonwaiba/react-media-uploader.git"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"react",
|
|
17
|
+
"media",
|
|
18
|
+
"uploader",
|
|
19
|
+
"nextjs",
|
|
20
|
+
"media-uploader",
|
|
21
|
+
"react-media-uploader"
|
|
22
|
+
],
|
|
23
|
+
"author": "Suson Waiba <susonwaiba@gmail.com> (https://susonwaiba.github.io)",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/susonwaiba/react-media-uploader/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/susonwaiba/react-media-uploader#readme",
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"axios": ">=1",
|
|
31
|
+
"react": ">=18",
|
|
32
|
+
"react-dom": ">=18"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/react": "^18",
|
|
36
|
+
"@types/react-dom": "^18",
|
|
37
|
+
"tsc-alias": "^1",
|
|
38
|
+
"typescript": "^5"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,237 +1,261 @@
|
|
|
1
|
-
import {
|
|
2
|
-
markMediaAsCanceled,
|
|
3
|
-
generateFileHash,
|
|
4
|
-
generateUploadUrl,
|
|
5
|
-
uploadToStorage,
|
|
6
|
-
markMediaAsTemp,
|
|
7
|
-
markMediaAsActive,
|
|
8
|
-
generateMediaType,
|
|
9
|
-
} from "@/lib/media-helper";
|
|
10
|
-
import { type Media, MediaStatusEnum, type MediaItem } from "@/types/media";
|
|
11
|
-
import { type AxiosProgressEvent } from "axios";
|
|
12
|
-
import { useState } from "react";
|
|
13
|
-
|
|
14
|
-
export interface UploadMediaInfo extends Omit<AxiosProgressEvent, "event"> {
|
|
15
|
-
event?: undefined;
|
|
16
|
-
cancel?: () => Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface UseMediaUploaderProps<T extends object> {
|
|
20
|
-
defaultValues?: T;
|
|
21
|
-
mediaUploadSuccessStatus?: MediaStatusEnum;
|
|
22
|
-
enableManualUpload?: boolean;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
if (
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
1
|
+
import {
|
|
2
|
+
markMediaAsCanceled,
|
|
3
|
+
generateFileHash,
|
|
4
|
+
generateUploadUrl,
|
|
5
|
+
uploadToStorage,
|
|
6
|
+
markMediaAsTemp,
|
|
7
|
+
markMediaAsActive,
|
|
8
|
+
generateMediaType,
|
|
9
|
+
} from "@/lib/media-helper";
|
|
10
|
+
import { type Media, MediaStatusEnum, type MediaItem } from "@/types/media";
|
|
11
|
+
import { type AxiosProgressEvent } from "axios";
|
|
12
|
+
import { useState } from "react";
|
|
13
|
+
|
|
14
|
+
export interface UploadMediaInfo extends Omit<AxiosProgressEvent, "event"> {
|
|
15
|
+
event?: undefined;
|
|
16
|
+
cancel?: () => Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UseMediaUploaderProps<T extends object> {
|
|
20
|
+
defaultValues?: T;
|
|
21
|
+
mediaUploadSuccessStatus?: MediaStatusEnum;
|
|
22
|
+
enableManualUpload?: boolean;
|
|
23
|
+
serverConfig?: {
|
|
24
|
+
additionalHeaders?: Record<string, string>;
|
|
25
|
+
generateUploadUrl?: string;
|
|
26
|
+
markMediaAsTemp?: string;
|
|
27
|
+
markMediaAsActive?: string;
|
|
28
|
+
markMediaAsCanceled?: string;
|
|
29
|
+
};
|
|
30
|
+
onUploadSuccess?: (currentValues: any) => Promise<void>;
|
|
31
|
+
onUploadFailure?: (uploadRes: any) => Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface UseMediaUploaderResponse<T extends object> {
|
|
35
|
+
values: T;
|
|
36
|
+
setValues: (val: T) => void;
|
|
37
|
+
enableManualUpload?: boolean;
|
|
38
|
+
uploadManually: () => Promise<T>;
|
|
39
|
+
mediaItems: Record<string, MediaItem>;
|
|
40
|
+
setMediaItems: (items: Record<string, MediaItem>) => void;
|
|
41
|
+
uploadInfos: Record<string, UploadMediaInfo>;
|
|
42
|
+
onFileInputChange: (e: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
43
|
+
onFileChange: (file: File, name: string, multiple?: boolean) => Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function useMediaUploader<T extends object>({
|
|
47
|
+
defaultValues,
|
|
48
|
+
mediaUploadSuccessStatus = MediaStatusEnum.TEMP,
|
|
49
|
+
enableManualUpload = false,
|
|
50
|
+
serverConfig,
|
|
51
|
+
onUploadSuccess,
|
|
52
|
+
onUploadFailure,
|
|
53
|
+
}: UseMediaUploaderProps<T> = {}): UseMediaUploaderResponse<T> {
|
|
54
|
+
const [values, setValues] = useState<T>(defaultValues ?? ({} as T));
|
|
55
|
+
const [mediaItems, setMediaItems] = useState<Record<string, MediaItem>>({});
|
|
56
|
+
const [uploadInfos, setUploadInfos] = useState<
|
|
57
|
+
Record<string, UploadMediaInfo>
|
|
58
|
+
>({});
|
|
59
|
+
|
|
60
|
+
const onFileInputChange = async (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
61
|
+
const target = e.target as any;
|
|
62
|
+
const name = target.name;
|
|
63
|
+
const multiple = target.multiple || false;
|
|
64
|
+
if (target.files && target.files.length) {
|
|
65
|
+
for (const file of target.files) {
|
|
66
|
+
onFileChange(file, name, multiple);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const onFileChange = async (
|
|
72
|
+
file: File,
|
|
73
|
+
name: string,
|
|
74
|
+
multiple: boolean = false,
|
|
75
|
+
) => {
|
|
76
|
+
const localId = crypto.randomUUID();
|
|
77
|
+
const item: MediaItem = {
|
|
78
|
+
localId,
|
|
79
|
+
name,
|
|
80
|
+
multiple,
|
|
81
|
+
file,
|
|
82
|
+
tempPreviewUrl: URL.createObjectURL(file),
|
|
83
|
+
media: {
|
|
84
|
+
type: await generateMediaType(file),
|
|
85
|
+
name: file.name,
|
|
86
|
+
mimeType: file.type,
|
|
87
|
+
size: file.size,
|
|
88
|
+
checksum: await generateFileHash(file),
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
setMediaItems((previous) => {
|
|
92
|
+
const newState = { ...previous };
|
|
93
|
+
newState[localId] = item;
|
|
94
|
+
return newState;
|
|
95
|
+
});
|
|
96
|
+
if (!enableManualUpload) {
|
|
97
|
+
uploadMediaFile(item);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const uploadMediaFile = async (item: MediaItem): Promise<T | undefined> => {
|
|
102
|
+
const sasUrlRes = await generateUploadUrl({
|
|
103
|
+
url: serverConfig?.generateUploadUrl,
|
|
104
|
+
additionalHeaders: serverConfig?.additionalHeaders,
|
|
105
|
+
media: item?.media,
|
|
106
|
+
});
|
|
107
|
+
if (sasUrlRes?.data?.item && sasUrlRes?.data?.sasUrl) {
|
|
108
|
+
item["media"] = sasUrlRes?.data?.item;
|
|
109
|
+
setMediaItems((previous) => {
|
|
110
|
+
const newState = { ...previous };
|
|
111
|
+
newState[item.localId] = item;
|
|
112
|
+
return newState;
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const abortController = new AbortController();
|
|
116
|
+
const uploadRes = await uploadToStorage({
|
|
117
|
+
uploadUrl: sasUrlRes?.data?.uploadUrl,
|
|
118
|
+
file: item.file,
|
|
119
|
+
onUploadProgress: (progressEvent) => {
|
|
120
|
+
const currentUploadInfo = {
|
|
121
|
+
...progressEvent,
|
|
122
|
+
event: undefined,
|
|
123
|
+
cancel: async () => {
|
|
124
|
+
abortController.abort();
|
|
125
|
+
setUploadInfos((previous) => {
|
|
126
|
+
const newState = { ...previous };
|
|
127
|
+
if (newState[item.localId]) {
|
|
128
|
+
delete newState[item.localId];
|
|
129
|
+
}
|
|
130
|
+
return newState;
|
|
131
|
+
});
|
|
132
|
+
await markMediaAsCanceled({
|
|
133
|
+
url: serverConfig?.markMediaAsCanceled,
|
|
134
|
+
additionalHeaders: serverConfig?.additionalHeaders,
|
|
135
|
+
mediaIds: [sasUrlRes?.data?.item?.id],
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
setUploadInfos((previous) => {
|
|
140
|
+
const newState = { ...previous };
|
|
141
|
+
newState[item.localId] = currentUploadInfo;
|
|
142
|
+
return newState;
|
|
143
|
+
});
|
|
144
|
+
},
|
|
145
|
+
abortController,
|
|
146
|
+
});
|
|
147
|
+
if (uploadRes?.status === 201 || uploadRes?.status === 200) {
|
|
148
|
+
return await onMediaUploadSuccess(item);
|
|
149
|
+
} else if (onUploadFailure) {
|
|
150
|
+
onUploadFailure(uploadRes);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return undefined;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const onMediaUploadSuccess = async (
|
|
157
|
+
item: MediaItem,
|
|
158
|
+
): Promise<T | undefined> => {
|
|
159
|
+
if (item.media.id) {
|
|
160
|
+
let markRes:
|
|
161
|
+
| {
|
|
162
|
+
data?: {
|
|
163
|
+
items?: Array<Media>;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
| undefined;
|
|
167
|
+
if (mediaUploadSuccessStatus === MediaStatusEnum.TEMP) {
|
|
168
|
+
markRes = await markMediaAsTemp({
|
|
169
|
+
url: serverConfig?.markMediaAsTemp,
|
|
170
|
+
additionalHeaders: serverConfig?.additionalHeaders,
|
|
171
|
+
mediaIds: [item.media.id],
|
|
172
|
+
});
|
|
173
|
+
} else if (mediaUploadSuccessStatus === MediaStatusEnum.ACTIVE) {
|
|
174
|
+
markRes = await markMediaAsActive({
|
|
175
|
+
url: serverConfig?.markMediaAsActive,
|
|
176
|
+
additionalHeaders: serverConfig?.additionalHeaders,
|
|
177
|
+
mediaIds: [item.media.id],
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
if (markRes?.data?.items?.length && markRes.data.items[0]) {
|
|
181
|
+
const newMedia = markRes.data.items[0];
|
|
182
|
+
|
|
183
|
+
item["media"] = newMedia;
|
|
184
|
+
setMediaItems((previous) => {
|
|
185
|
+
const newState = { ...previous };
|
|
186
|
+
newState[item.localId] = item;
|
|
187
|
+
return newState;
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
const currentValues: any = {};
|
|
191
|
+
if (item.multiple) {
|
|
192
|
+
currentValues[item.name] = [newMedia.id];
|
|
193
|
+
} else {
|
|
194
|
+
currentValues[item.name] = newMedia.id;
|
|
195
|
+
}
|
|
196
|
+
setValues((previous: T) => {
|
|
197
|
+
const newState: any = { ...previous };
|
|
198
|
+
if (item.multiple) {
|
|
199
|
+
if (Array.isArray(newState[item.name])) {
|
|
200
|
+
newState[item.name].push(currentValues[item.name]);
|
|
201
|
+
} else {
|
|
202
|
+
newState[item.name] = [currentValues[item.name]];
|
|
203
|
+
}
|
|
204
|
+
} else {
|
|
205
|
+
newState[item.name] = currentValues[item.name];
|
|
206
|
+
}
|
|
207
|
+
return newState;
|
|
208
|
+
});
|
|
209
|
+
if (onUploadSuccess) {
|
|
210
|
+
onUploadSuccess(currentValues);
|
|
211
|
+
}
|
|
212
|
+
return currentValues;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return undefined;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const uploadManually = async () => {
|
|
219
|
+
const uploadInfoIds = Object.keys(uploadInfos);
|
|
220
|
+
const mediaItemsToBeUploaded = Object.values(mediaItems).filter(
|
|
221
|
+
(item) => !uploadInfoIds?.includes(item.localId),
|
|
222
|
+
);
|
|
223
|
+
const uploadResponses = await Promise.all(
|
|
224
|
+
mediaItemsToBeUploaded?.map(async (item) => await uploadMediaFile(item)),
|
|
225
|
+
);
|
|
226
|
+
const result: any = { ...values };
|
|
227
|
+
for (const uploadResponse of uploadResponses.filter(
|
|
228
|
+
(item) => item !== undefined,
|
|
229
|
+
)) {
|
|
230
|
+
for (const key in uploadResponse) {
|
|
231
|
+
if (Array.isArray(result[key])) {
|
|
232
|
+
if (
|
|
233
|
+
Array.isArray(uploadResponse[key]) &&
|
|
234
|
+
uploadResponse[key]?.length
|
|
235
|
+
) {
|
|
236
|
+
for (const mediaId of uploadResponse[key]) {
|
|
237
|
+
if (!result[key]?.includes(mediaId)) {
|
|
238
|
+
result[key].push(mediaId);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
} else {
|
|
243
|
+
result[key] = uploadResponse[key];
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return result;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
return {
|
|
251
|
+
values,
|
|
252
|
+
setValues,
|
|
253
|
+
enableManualUpload,
|
|
254
|
+
uploadManually,
|
|
255
|
+
mediaItems,
|
|
256
|
+
setMediaItems,
|
|
257
|
+
uploadInfos,
|
|
258
|
+
onFileInputChange,
|
|
259
|
+
onFileChange,
|
|
260
|
+
};
|
|
261
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "@/hooks/use-media-uploader";
|
|
2
|
-
export * from "@/lib/media-helper";
|
|
3
|
-
export * from "@/types/media";
|
|
1
|
+
export * from "@/hooks/use-media-uploader";
|
|
2
|
+
export * from "@/lib/media-helper";
|
|
3
|
+
export * from "@/types/media";
|