@equinor/react-native-mad-tag-ocr 0.0.5 → 0.1.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @equinor/react-native-mad-ocr
2
2
 
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 75df020: Changed dependencies to require Expo 52 compatable versions
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [75df020]
12
+ - @equinor/mad-components@0.16.0
13
+
14
+ ## 0.0.6
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [c0aea8c]
19
+ - @equinor/mad-components@0.15.2
20
+
3
21
  ## 0.0.5
4
22
 
5
23
  ### Patch Changes
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-JE4UMMVX.js";
23
23
  import {
24
24
  __spreadValues
25
- } from "./chunk-ZSUG26OQ.js";
25
+ } from "./chunk-5JBD5THX.js";
26
26
 
27
27
  // src/components/Camera/OCRCamera.tsx
28
28
  import React, { useState } from "react";
@@ -66,11 +66,9 @@ var OCRCamera = ({
66
66
  };
67
67
  const setScannedTagOnJS = useRunOnJS(
68
68
  (text) => {
69
- if (!enableDialogShared.value)
70
- confirmSelection(text);
69
+ if (!enableDialogShared.value) confirmSelection(text);
71
70
  else {
72
- if (text)
73
- setShowDialog(true);
71
+ if (text) setShowDialog(true);
74
72
  setClickedText(text);
75
73
  }
76
74
  },
@@ -81,8 +79,7 @@ var OCRCamera = ({
81
79
  setShowDialog(false);
82
80
  };
83
81
  const confirmSelection = (text) => {
84
- if (onSelectTag)
85
- onSelectTag(text);
82
+ if (onSelectTag) onSelectTag(text);
86
83
  setShowDialog(false);
87
84
  };
88
85
  const format = useCameraFormat(device, [
@@ -117,8 +114,7 @@ var OCRCamera = ({
117
114
  clickedPointShared.value
118
115
  );
119
116
  for (const block of scannedOcr.result.blocks) {
120
- if (!(block == null ? void 0 : block.frame))
121
- continue;
117
+ if (!(block == null ? void 0 : block.frame)) continue;
122
118
  const boundingBox = getBoundingBox(
123
119
  block.frame.boundingCenterX,
124
120
  block.frame.boundingCenterY,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  OCRCamera
3
- } from "../../chunk-E2772BXG.js";
3
+ } from "../../chunk-IQVHXPCW.js";
4
4
  import "../../chunk-WA2RO7BG.js";
5
5
  import "../../chunk-JFXZ5SLD.js";
6
6
  import "../../chunk-XLETJGD5.js";
7
7
  import "../../chunk-GWY64QKM.js";
8
8
  import "../../chunk-JE4UMMVX.js";
9
- import "../../chunk-ZSUG26OQ.js";
9
+ import "../../chunk-5JBD5THX.js";
10
10
  export {
11
11
  OCRCamera
12
12
  };
@@ -1,4 +1,4 @@
1
- import "../../chunk-ZSUG26OQ.js";
1
+ import "../../chunk-5JBD5THX.js";
2
2
 
3
3
  // src/components/Camera/OCRCamera.web.tsx
4
4
  var OCRCamera = ({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  PopoverButton
3
3
  } from "../chunk-XLETJGD5.js";
4
- import "../chunk-ZSUG26OQ.js";
4
+ import "../chunk-5JBD5THX.js";
5
5
  export {
6
6
  PopoverButton
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SelectTagDialog
3
3
  } from "../chunk-GWY64QKM.js";
4
- import "../chunk-ZSUG26OQ.js";
4
+ import "../chunk-5JBD5THX.js";
5
5
  export {
6
6
  SelectTagDialog
7
7
  };
package/dist/consts.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  OcrUsageSteps,
6
6
  defaultButtonConfig
7
7
  } from "./chunk-JFXZ5SLD.js";
8
- import "./chunk-ZSUG26OQ.js";
8
+ import "./chunk-5JBD5THX.js";
9
9
  export {
10
10
  BoundingBoxPadding,
11
11
  MaxTagLength,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useStateToSharedValue
3
3
  } from "../chunk-JE4UMMVX.js";
4
- import "../chunk-ZSUG26OQ.js";
4
+ import "../chunk-5JBD5THX.js";
5
5
  export {
6
6
  useStateToSharedValue
7
7
  };
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import "./chunk-6F4PWJZI.js";
2
2
  import {
3
3
  OCRCamera
4
- } from "./chunk-E2772BXG.js";
4
+ } from "./chunk-IQVHXPCW.js";
5
5
  import "./chunk-WA2RO7BG.js";
6
6
  import "./chunk-JFXZ5SLD.js";
7
7
  import "./chunk-XLETJGD5.js";
8
8
  import "./chunk-GWY64QKM.js";
9
9
  import "./chunk-JE4UMMVX.js";
10
- import "./chunk-ZSUG26OQ.js";
10
+ import "./chunk-5JBD5THX.js";
11
11
  export {
12
12
  OCRCamera
13
13
  };
package/dist/utils.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  translatePointToFrame
8
8
  } from "./chunk-WA2RO7BG.js";
9
9
  import "./chunk-JFXZ5SLD.js";
10
- import "./chunk-ZSUG26OQ.js";
10
+ import "./chunk-5JBD5THX.js";
11
11
  export {
12
12
  formatTag,
13
13
  getBoundingBox,
package/package.json CHANGED
@@ -1,53 +1,55 @@
1
1
  {
2
2
  "name": "@equinor/react-native-mad-tag-ocr",
3
- "version": "0.0.5",
4
3
  "description": "A React Native library for scanning tags",
5
- "type": "module",
6
- "scripts": {
7
- "build": "tsup-node && echo '\n ⚙️ Generating typescript declarations..' && tsc --project tsconfig.json --emitDeclarationOnly --declaration",
8
- "dev": "tsup-node --watch --clean=false",
9
- "lint": "eslint src/",
10
- "clean": "rm -rf node_modules dist .turbo"
11
- },
12
- "keywords": [
13
- "react native",
14
- "OCR",
15
- "markup",
16
- "typescript"
17
- ],
4
+ "version": "0.1.0",
18
5
  "author": {
19
6
  "name": "Equinor Mobile App Delivery team (MAD)"
20
7
  },
21
- "license": "MIT",
22
- "bugs": {
23
- "url": "https://github.com/equinor/mad/issues"
24
- },
25
- "homepage": "https://github.com/equinor/mad/",
26
- "main": "./dist/index.js",
27
- "types": "./dist/index.d.ts",
8
+ "bugs": "https://github.com/equinor/mad/issues",
28
9
  "dependencies": {
29
10
  "@equinor/mad-components": "*"
30
11
  },
31
12
  "devDependencies": {
32
13
  "@equinor/eslint-config-mad": "*",
14
+ "@equinor/mad-tsconfig": "*",
33
15
  "@ismaelmoreiraa/vision-camera-ocr": "^3.0.1",
34
- "@types/react": "~18.2.45",
35
- "react-native-vision-camera": "^4.0.4",
36
- "react-native-worklets-core": "^1.3.3"
37
- },
38
- "peerDependencies": {
39
- "@ismaelmoreiraa/vision-camera-ocr": "^3.0.1",
40
- "@shopify/react-native-skia": "1.2.3",
41
- "react": ">=18.0",
42
- "react-native": ">=0.70",
43
- "react-native-gesture-handler": ">=2.14",
16
+ "@shopify/react-native-skia": "1.5.0",
17
+ "@types/react": "~18.3.12",
18
+ "eslint": "^8.46.0",
44
19
  "react-native-vision-camera": "^4.0.4",
45
- "react-native-worklets-core": "^1.3.3"
20
+ "react-native-worklets-core": "^1.3.3",
21
+ "tsup": "^8.3.5"
46
22
  },
47
23
  "files": [
48
24
  "CODE_OF_CONDUCT.md",
49
25
  "LICENSE",
50
26
  "CHANGELOG.md",
51
27
  "dist"
52
- ]
28
+ ],
29
+ "homepage": "https://github.com/equinor/mad/",
30
+ "keywords": [
31
+ "markup",
32
+ "OCR",
33
+ "react native",
34
+ "typescript"
35
+ ],
36
+ "license": "MIT",
37
+ "main": "./dist/index.js",
38
+ "peerDependencies": {
39
+ "@ismaelmoreiraa/vision-camera-ocr": "^3.0.1",
40
+ "@shopify/react-native-skia": "1.5.0",
41
+ "react": "18.3.1",
42
+ "react-native": "0.76.2",
43
+ "react-native-gesture-handler": "~2.20.2",
44
+ "react-native-vision-camera": "^4.0.4",
45
+ "react-native-worklets-core": "^1.3.3"
46
+ },
47
+ "scripts": {
48
+ "build": "tsup-node && echo '\n ⚙️ Generating typescript declarations..' && tsc --project tsconfig.json --emitDeclarationOnly --declaration",
49
+ "clean": "rm -rf node_modules dist .turbo",
50
+ "dev": "tsup-node --watch --clean=false",
51
+ "lint": "eslint src/"
52
+ },
53
+ "type": "module",
54
+ "types": "./dist/index.d.ts"
53
55
  }
File without changes