@nyris/nyris-webapp 0.3.72 → 0.3.73
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/build/asset-manifest.json +3 -3
- package/build/index.html +1 -1
- package/build/static/js/{main.e782b5e7.js → main.cba627ca.js} +3 -3
- package/build/static/js/{main.e782b5e7.js.map → main.cba627ca.js.map} +1 -1
- package/package.json +3 -3
- package/src/helpers/CommonHelper.ts +17 -0
- package/src/hooks/useImageSearch.ts +3 -1
- /package/build/static/js/{main.e782b5e7.js.LICENSE.txt → main.cba627ca.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nyris/nyris-webapp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.73",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@auth0/auth0-react": "^2.2.4",
|
|
6
6
|
"@emailjs/browser": "^4.3.3",
|
|
7
7
|
"@material-ui/core": "^4.12.4",
|
|
8
8
|
"@material-ui/icons": "^4.11.3",
|
|
9
9
|
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
10
|
-
"@nyris/nyris-api": "^0.3.
|
|
11
|
-
"@nyris/nyris-react-components": "^0.3.
|
|
10
|
+
"@nyris/nyris-api": "^0.3.73",
|
|
11
|
+
"@nyris/nyris-react-components": "^0.3.73",
|
|
12
12
|
"@reduxjs/toolkit": "^2.2.1",
|
|
13
13
|
"@splidejs/react-splide": "^0.7.12",
|
|
14
14
|
"@testing-library/jest-dom": "^5.17.0",
|
|
@@ -32,3 +32,20 @@ export const prepareImageList = (dataItem: any) => {
|
|
|
32
32
|
}
|
|
33
33
|
return valueKey;
|
|
34
34
|
};
|
|
35
|
+
|
|
36
|
+
export const isHEIC = (file: File) => {
|
|
37
|
+
if (!file) return false;
|
|
38
|
+
if (!file.name) return false;
|
|
39
|
+
// Check extension (case insensitive)
|
|
40
|
+
const ext =
|
|
41
|
+
file.name.toLowerCase().endsWith('.heic') ||
|
|
42
|
+
file.name.toLowerCase().endsWith('.heif');
|
|
43
|
+
|
|
44
|
+
// Check MIME type
|
|
45
|
+
const mime =
|
|
46
|
+
file.type === 'image/heic' ||
|
|
47
|
+
file.type === 'image/heif' ||
|
|
48
|
+
file.type === 'image/heic-sequence';
|
|
49
|
+
|
|
50
|
+
return ext || mime;
|
|
51
|
+
};
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { RectCoords } from '@nyris/nyris-api';
|
|
4
4
|
import { isEmpty } from 'lodash';
|
|
5
|
+
|
|
5
6
|
import { useCallback } from 'react';
|
|
6
7
|
import { createImage, find, findMulti, findRegions } from 'services/image';
|
|
8
|
+
import { isHEIC } from 'helpers/CommonHelper';
|
|
7
9
|
import useRequestStore from 'Store/requestStore';
|
|
8
10
|
import useResultStore from 'Store/resultStore';
|
|
9
11
|
import {
|
|
@@ -65,7 +67,7 @@ export const useImageSearch = () => {
|
|
|
65
67
|
|
|
66
68
|
let blob = image;
|
|
67
69
|
|
|
68
|
-
if (
|
|
70
|
+
if (isHEIC(image)) {
|
|
69
71
|
const blobTemp = new Blob([image], { type: 'image/heif' });
|
|
70
72
|
const buffer = new Uint8Array(await blobTemp.arrayBuffer());
|
|
71
73
|
|
|
File without changes
|