@dreamcommerce/aurora 2.8.8-5 → 2.8.8

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.
@@ -12,7 +12,7 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
12
12
  const [isDragOver, setDragOver] = React.useState(false);
13
13
  const [isPreview, setPreview] = React.useState(true);
14
14
  React.useEffect(() => {
15
- setFile(initialFile);
15
+ initialFile && setFile(initialFile);
16
16
  }, []);
17
17
  React.useEffect(() => {
18
18
  initialErrors && setErrors(initialErrors);
@@ -42,12 +42,10 @@ const ImagePicker = React.memo(({ id, onChange, onError, errors: initialErrors,
42
42
  onImageSizeUpdated === null || onImageSizeUpdated === void 0 ? void 0 : onImageSizeUpdated(imageSize);
43
43
  }, [imageSize]);
44
44
  React.useEffect(() => {
45
- console.log('useEffect - initialFile');
46
45
  initialFile && setImageSizeBasedOnUrl(initialFile === null || initialFile === void 0 ? void 0 : initialFile.fileUrl);
47
- }, []);
46
+ }, [initialFile]);
48
47
  const setImageSizeBasedOnUrl = (fileUrl) => {
49
48
  createImageFromUrl(fileUrl).then((image) => {
50
- console.log('setImageSizeBasedOnUrl', image.naturalWidth);
51
49
  setImageSize({ width: image.naturalWidth, height: image.naturalHeight });
52
50
  });
53
51
  };
@@ -78,7 +76,6 @@ const ImagePicker = React.memo(({ id, onChange, onError, errors: initialErrors,
78
76
  };
79
77
  const updateFile = (files) => {
80
78
  if (files === null || files === void 0 ? void 0 : files.length) {
81
- console.log('updateFile');
82
79
  setImageSizeBasedOnUrl(URL.createObjectURL(files === null || files === void 0 ? void 0 : files[0]));
83
80
  }
84
81
  };
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iEAAqE;AAClG,2BAA2B,yDAA6D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,iEAAqE;AAClG,2BAA2B,yDAA6D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -8,7 +8,7 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
8
8
  const [isDragOver, setDragOver] = useState(false);
9
9
  const [isPreview, setPreview] = useState(true);
10
10
  useEffect(() => {
11
- setFile(initialFile);
11
+ initialFile && setFile(initialFile);
12
12
  }, []);
13
13
  useEffect(() => {
14
14
  initialErrors && setErrors(initialErrors);
@@ -33,12 +33,10 @@ const ImagePicker = memo(({ id, onChange, onError, errors: initialErrors, allowe
33
33
  onImageSizeUpdated === null || onImageSizeUpdated === void 0 ? void 0 : onImageSizeUpdated(imageSize);
34
34
  }, [imageSize]);
35
35
  useEffect(() => {
36
- console.log('useEffect - initialFile');
37
36
  initialFile && setImageSizeBasedOnUrl(initialFile === null || initialFile === void 0 ? void 0 : initialFile.fileUrl);
38
- }, []);
37
+ }, [initialFile]);
39
38
  const setImageSizeBasedOnUrl = (fileUrl) => {
40
39
  createImageFromUrl(fileUrl).then((image) => {
41
- console.log('setImageSizeBasedOnUrl', image.naturalWidth);
42
40
  setImageSize({ width: image.naturalWidth, height: image.naturalHeight });
43
41
  });
44
42
  };
@@ -69,7 +67,6 @@ const ImagePicker = memo(({ id, onChange, onError, errors: initialErrors, allowe
69
67
  };
70
68
  const updateFile = (files) => {
71
69
  if (files === null || files === void 0 ? void 0 : files.length) {
72
- console.log('updateFile');
73
70
  setImageSizeBasedOnUrl(URL.createObjectURL(files === null || files === void 0 ? void 0 : files[0]));
74
71
  }
75
72
  };
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,iEAAqE;AACpG,gCAAgC,yDAA6D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,iEAAqE;AACpG,gCAAgC,yDAA6D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "2.8.8-5",
5
+ "version": "2.8.8",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",