@bigbinary/neeto-image-uploader-frontend 1.4.2 → 1.4.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.
- package/README.md +36 -21
- package/dist/index.cjs.js +2019 -929
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +2020 -931
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/types.d.ts +23 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-image-uploader-frontend",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/bigbinary/neeto-image-uploader-nano/issues"
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"os-browserify": "^0.3.0",
|
|
116
116
|
"path-browserify": "^1.0.1",
|
|
117
117
|
"perf_hooks": "^0.0.1",
|
|
118
|
-
"postcss": "8.4.
|
|
118
|
+
"postcss": "8.4.31",
|
|
119
119
|
"postcss-import": "15.1.0",
|
|
120
120
|
"postcss-loader": "7.3.0",
|
|
121
121
|
"postcss-preset-env": "8.3.2",
|
package/types.d.ts
CHANGED
|
@@ -4,8 +4,15 @@ interface Image {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
interface AssetLibraryProps {
|
|
7
|
-
assets?: Image[];
|
|
8
7
|
isOpen?: boolean;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
onUploadComplete?: ({ url: string, signedId: string }) => void
|
|
10
|
+
uploadConfig?: {
|
|
11
|
+
maxImageSize: number;
|
|
12
|
+
allowedImageTypes: {
|
|
13
|
+
[mimeType: string]: string[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
9
16
|
}
|
|
10
17
|
|
|
11
18
|
interface ImageTransformations {
|
|
@@ -30,9 +37,23 @@ interface VideoProps {
|
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
interface ImageUploaderProps {
|
|
33
|
-
|
|
40
|
+
onUploadComplete?: ({ url: string, signedId: string }) => void
|
|
41
|
+
src?: string;
|
|
42
|
+
className?: string;
|
|
43
|
+
uploadConfig?: {
|
|
44
|
+
maxImageSize: number;
|
|
45
|
+
allowedImageTypes: {
|
|
46
|
+
[mimeType: string]: string[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
34
49
|
}
|
|
35
50
|
|
|
51
|
+
export function useImageUpload(): {
|
|
52
|
+
uploadImage: (file: File, onUploadComplete: (url: string) => void) => void;
|
|
53
|
+
uploadProgress: number;
|
|
54
|
+
isUploading: boolean;
|
|
55
|
+
};
|
|
56
|
+
|
|
36
57
|
export function ImageUploader(props: ImageUploaderProps): JSX.Element;
|
|
37
58
|
|
|
38
59
|
export function AssetLibrary(props: AssetLibraryProps): JSX.Element;
|