react-native-text-reader 1.3.0 → 1.5.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/android/build.gradle
CHANGED
|
@@ -8,7 +8,7 @@ buildscript {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
dependencies {
|
|
11
|
-
classpath "com.android.tools.build:gradle:
|
|
11
|
+
classpath "com.android.tools.build:gradle:8.5.1"
|
|
12
12
|
// noinspection DifferentKotlinGradleVersion
|
|
13
13
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
14
|
}
|
|
@@ -71,6 +71,9 @@ android {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
// Optimized for 16KB page size - AGP 8.5.1 handles alignment automatically
|
|
75
|
+
// Removed useLegacyPackaging to use modern packaging with better performance
|
|
76
|
+
|
|
74
77
|
lintOptions {
|
|
75
78
|
disable "GradleCompatible"
|
|
76
79
|
abortOnError false
|
|
@@ -96,6 +99,7 @@ dependencies {
|
|
|
96
99
|
implementation "com.facebook.react:react-native:+"
|
|
97
100
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
98
101
|
|
|
102
|
+
// ML Kit Text Recognition - Latest versions (2024)
|
|
99
103
|
// To recognize Latin script
|
|
100
104
|
implementation 'com.google.mlkit:text-recognition:16.0.1'
|
|
101
105
|
// To recognize Chinese script
|
|
@@ -105,6 +109,9 @@ dependencies {
|
|
|
105
109
|
// To recognize Japanese script
|
|
106
110
|
implementation 'com.google.mlkit:text-recognition-japanese:16.0.1'
|
|
107
111
|
// To recognize Korean script
|
|
108
|
-
implementation 'com.google.mlkit:text-recognition-korean:16.0.1'
|
|
112
|
+
implementation 'com.google.mlkit:text-recognition-korean:16.0.1'
|
|
113
|
+
|
|
114
|
+
// ML Kit Common library for better performance
|
|
115
|
+
implementation 'com.google.mlkit:common:18.11.0'
|
|
109
116
|
}
|
|
110
117
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
TextReader_kotlinVersion=1.
|
|
1
|
+
TextReader_kotlinVersion=1.9.10
|
|
2
2
|
TextReader_minSdkVersion=21
|
|
3
|
-
TextReader_targetSdkVersion=
|
|
4
|
-
TextReader_compileSdkVersion=
|
|
5
|
-
TextReader_ndkversion=
|
|
3
|
+
TextReader_targetSdkVersion=34
|
|
4
|
+
TextReader_compileSdkVersion=34
|
|
5
|
+
TextReader_ndkversion=25.1.8937393
|
|
@@ -118,7 +118,8 @@ class TextReaderModule(reactContext: ReactApplicationContext) :
|
|
|
118
118
|
else -> TextRecognizerOptions.DEFAULT_OPTIONS
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
|
|
122
|
+
@ReactMethod
|
|
122
123
|
fun read(url: String, options: ReadableMap?, promise: Promise) {
|
|
123
124
|
try {
|
|
124
125
|
val script = options?.getString("script")
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-text-reader",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "A React Native library for OCR (Optical Character Recognition) using Vision Framework on iOS and Firebase ML Kit on Android.",
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "A React Native library for OCR (Optical Character Recognition) using Vision Framework on iOS and Firebase ML Kit on Android. Optimized for Android 16KB page size compatibility.",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
7
7
|
"module": "./lib/module/index.js",
|
|
@@ -64,12 +64,15 @@
|
|
|
64
64
|
"registry": "https://registry.npmjs.org/"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
68
|
+
"@babel/plugin-transform-class-properties": "^7.27.1",
|
|
69
|
+
"@babel/preset-env": "^7.28.3",
|
|
67
70
|
"@commitlint/config-conventional": "^17.0.2",
|
|
68
71
|
"@evilmartians/lefthook": "^1.5.0",
|
|
69
72
|
"@react-native/eslint-config": "^0.73.1",
|
|
70
73
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
71
74
|
"@types/jest": "^29.5.5",
|
|
72
|
-
"@types/react": "^
|
|
75
|
+
"@types/react": "^19.0.0",
|
|
73
76
|
"commitlint": "^17.0.2",
|
|
74
77
|
"del-cli": "^5.1.0",
|
|
75
78
|
"eslint": "^8.51.0",
|
|
@@ -77,15 +80,15 @@
|
|
|
77
80
|
"eslint-plugin-prettier": "^5.0.1",
|
|
78
81
|
"jest": "^29.7.0",
|
|
79
82
|
"prettier": "^3.0.3",
|
|
80
|
-
"react": "
|
|
81
|
-
"react-native": "0.
|
|
83
|
+
"react": "19.1.1",
|
|
84
|
+
"react-native": "0.81.4",
|
|
82
85
|
"react-native-builder-bob": "^0.30.2",
|
|
83
86
|
"release-it": "^15.0.0",
|
|
84
87
|
"turbo": "^1.10.7",
|
|
85
88
|
"typescript": "^5.2.2"
|
|
86
89
|
},
|
|
87
90
|
"resolutions": {
|
|
88
|
-
"@types/react": "^
|
|
91
|
+
"@types/react": "^19.0.0"
|
|
89
92
|
},
|
|
90
93
|
"peerDependencies": {
|
|
91
94
|
"react": "*",
|
|
@@ -100,6 +103,9 @@
|
|
|
100
103
|
"modulePathIgnorePatterns": [
|
|
101
104
|
"<rootDir>/example/node_modules",
|
|
102
105
|
"<rootDir>/lib/"
|
|
106
|
+
],
|
|
107
|
+
"transformIgnorePatterns": [
|
|
108
|
+
"node_modules/(?!(react-native|@react-native|react-native-.*)/)"
|
|
103
109
|
]
|
|
104
110
|
},
|
|
105
111
|
"commitlint": {
|
|
@@ -185,4 +191,4 @@
|
|
|
185
191
|
"languages": "kotlin-swift",
|
|
186
192
|
"version": "0.42.0"
|
|
187
193
|
}
|
|
188
|
-
}
|
|
194
|
+
}
|