@bigbinary/neeto-image-uploader-frontend 1.4.17 → 1.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-image-uploader-frontend",
3
- "version": "1.4.17",
3
+ "version": "1.5.1",
4
4
  "license": "UNLICENSED",
5
5
  "bugs": {
6
6
  "url": "https://github.com/bigbinary/neeto-image-uploader-nano/issues"
package/types.d.ts CHANGED
@@ -1,8 +1,3 @@
1
- interface Image {
2
- id: number;
3
- url: string;
4
- }
5
-
6
1
  interface AssetLibraryProps {
7
2
  isOpen?: boolean;
8
3
  onClose?: () => void;
@@ -15,38 +10,31 @@ interface AssetLibraryProps {
15
10
  };
16
11
  }
17
12
 
18
- interface ImageTransformations {
19
- height?: number;
20
- width?: number;
21
- }
22
-
23
- interface ImageProps {
24
- size?: string;
25
- src: string;
26
- alt?: string;
27
- blurrredFallback?: boolean;
28
- imageTransformations?: ImageTransformations;
29
- className?: string;
30
- }
31
-
32
- interface VideoProps {
33
- size?: string;
34
- src: string;
35
- videoTransformations?: string;
13
+ interface ImageUploaderProps {
14
+ onUploadComplete?: ({ url: string, signedId: string }) => void
15
+ src?: string;
36
16
  className?: string;
17
+ uploadConfig?: {
18
+ maxImageSize: number;
19
+ allowedImageTypes: {
20
+ [mimeType: string]: string[];
21
+ };
22
+ };
37
23
  }
38
24
 
39
- interface ImageUploaderProps {
40
- onUploadComplete?: ({ url: string, signedId: string }) => void
25
+ interface BasicImageUploaderProps {
41
26
  src?: string;
42
27
  className?: string;
28
+ onRemove?: () => void;
29
+ onDrop?: (file: File, setUploadProgress: () => void) => void;
30
+ isDisabled?: boolean;
31
+ imageFallbackProps?: { alt: string; className: string };
43
32
  uploadConfig?: {
44
33
  maxImageSize: number;
45
34
  allowedImageTypes: {
46
35
  [mimeType: string]: string[];
47
36
  };
48
37
  };
49
- isUploadIconEnabled?: boolean;
50
38
  }
51
39
 
52
40
  export function useImageUpload(): {
@@ -55,10 +43,8 @@ export function useImageUpload(): {
55
43
  isUploading: boolean;
56
44
  };
57
45
 
46
+ export function BasicImageUploader(props: BasicImageUploaderProps): JSX.Element;
47
+
58
48
  export function ImageUploader(props: ImageUploaderProps): JSX.Element;
59
49
 
60
50
  export function AssetLibrary(props: AssetLibraryProps): JSX.Element;
61
-
62
- export function Image(props: ImageProps): JSX.Element;
63
-
64
- export function Video(props: VideoProps): JSX.Element;