expo-ocr-kit 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/README.md +143 -0
- package/android/build/.transforms/0ccd80621f9d41140b150fb1d1a89374/results.bin +1 -0
- package/android/build/.transforms/0ccd80621f9d41140b150fb1d1a89374/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/results.bin +1 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/BuildConfig.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$Companion.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$DecodedBitmap.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$PreparedImage.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$await$2$1.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$await$2$2.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$await$2$3.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$definition$1$2$1.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$$inlined$Coroutine$1.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$$inlined$Coroutine$2.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$$inlined$View$1.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$lambda$1$$inlined$Prop$1.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$recognizeText$1.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$recognizeText$preparedImage$1.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule$sam$com_google_android_gms_tasks_OnSuccessListener$0.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitModule.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitView$webView$1$1.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/ocrkit/ExpoOcrKitView.dex +0 -0
- package/android/build/.transforms/e1d05a683f9f90125c897565d1f6e5cb/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/generated/source/buildConfig/debug/expo/modules/ocrkit/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/expo-ocr-kit_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/expo/modules/ocrkit/BuildConfig.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/expo-ocr-kit_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$DecodedBitmap.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$PreparedImage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$await$2$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$await$2$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$await$2$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$definition$1$2$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$$inlined$Coroutine$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$$inlined$Coroutine$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$$inlined$View$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$lambda$1$$inlined$Prop$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$recognizeText$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$recognizeText$preparedImage$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule$sam$com_google_android_gms_tasks_OnSuccessListener$0.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitView$webView$1$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/ocrkit/ExpoOcrKitView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +14 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/expo-ocr-kit_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$DecodedBitmap.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$PreparedImage.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$await$2$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$await$2$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$await$2$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$definition$1$2$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$$inlined$Coroutine$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$$inlined$Coroutine$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$$inlined$View$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$definition$lambda$2$lambda$1$$inlined$Prop$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$recognizeText$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$recognizeText$preparedImage$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$sam$com_google_android_gms_tasks_OnSuccessListener$0.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitView$webView$1$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitView.class +0 -0
- package/android/build.gradle +23 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/expo/modules/ocrkit/ExpoOcrKitModule.kt +185 -0
- package/android/src/main/java/expo/modules/ocrkit/ExpoOcrKitView.kt +30 -0
- package/app.plugin.js +21 -0
- package/build/ExpoOcrKit.types.d.ts +32 -0
- package/build/ExpoOcrKit.types.d.ts.map +1 -0
- package/build/ExpoOcrKit.types.js +2 -0
- package/build/ExpoOcrKit.types.js.map +1 -0
- package/build/ExpoOcrKitModule.d.ts +8 -0
- package/build/ExpoOcrKitModule.d.ts.map +1 -0
- package/build/ExpoOcrKitModule.js +4 -0
- package/build/ExpoOcrKitModule.js.map +1 -0
- package/build/ExpoOcrKitModule.web.d.ts +8 -0
- package/build/ExpoOcrKitModule.web.d.ts.map +1 -0
- package/build/ExpoOcrKitModule.web.js +8 -0
- package/build/ExpoOcrKitModule.web.js.map +1 -0
- package/build/ExpoOcrKitView.d.ts +4 -0
- package/build/ExpoOcrKitView.d.ts.map +1 -0
- package/build/ExpoOcrKitView.js +7 -0
- package/build/ExpoOcrKitView.js.map +1 -0
- package/build/ExpoOcrKitView.web.d.ts +4 -0
- package/build/ExpoOcrKitView.web.d.ts.map +1 -0
- package/build/ExpoOcrKitView.web.js +7 -0
- package/build/ExpoOcrKitView.web.js.map +1 -0
- package/build/index.d.ts +8 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +9 -0
- package/build/index.js.map +1 -0
- package/expo-module.config.json +9 -0
- package/ios/ExpoOcrKit.podspec +29 -0
- package/ios/ExpoOcrKitModule.swift +176 -0
- package/ios/ExpoOcrKitView.swift +38 -0
- package/package.json +61 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import ExpoModulesCore
|
|
2
|
+
import ImageIO
|
|
3
|
+
import UIKit
|
|
4
|
+
import Vision
|
|
5
|
+
|
|
6
|
+
public class ExpoOcrKitModule: Module {
|
|
7
|
+
private let maxImageDimension = 2000
|
|
8
|
+
|
|
9
|
+
public func definition() -> ModuleDefinition {
|
|
10
|
+
Name("ExpoOcrKit")
|
|
11
|
+
|
|
12
|
+
AsyncFunction("recognizeText") { (uri: String) throws -> [String: Any] in
|
|
13
|
+
try self.recognizeText(uri: uri)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
View(ExpoOcrKitView.self) {
|
|
17
|
+
Prop("url") { (view: ExpoOcrKitView, url: URL) in
|
|
18
|
+
if view.webView.url != url {
|
|
19
|
+
view.webView.load(URLRequest(url: url))
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Events("onLoad")
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
private func recognizeText(uri: String) throws -> [String: Any] {
|
|
28
|
+
let trimmedUri = uri.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
29
|
+
guard !trimmedUri.isEmpty else {
|
|
30
|
+
throw OcrError.invalidUri("Image URI must not be empty.")
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let imageURL = try resolveImageURL(from: trimmedUri)
|
|
34
|
+
let imageSource = try loadImageSource(from: imageURL)
|
|
35
|
+
let cgImage = try loadDownsampledCGImage(from: imageSource, url: imageURL)
|
|
36
|
+
let imageOrientation = cgImageOrientation(from: imageSource)
|
|
37
|
+
let imageSize = resolvedImageSize(from: imageSource, orientation: imageOrientation, fallbackImage: cgImage)
|
|
38
|
+
|
|
39
|
+
let request = VNRecognizeTextRequest()
|
|
40
|
+
request.recognitionLevel = .accurate
|
|
41
|
+
request.usesLanguageCorrection = true
|
|
42
|
+
|
|
43
|
+
let handler = VNImageRequestHandler(cgImage: cgImage, orientation: imageOrientation, options: [:])
|
|
44
|
+
try handler.perform([request])
|
|
45
|
+
|
|
46
|
+
let observations = (request.results as? [VNRecognizedTextObservation] ?? [])
|
|
47
|
+
.sorted(by: compareObservations)
|
|
48
|
+
|
|
49
|
+
let blocks: [[String: Any]] = observations.compactMap { observation in
|
|
50
|
+
guard let candidate = observation.topCandidates(1).first else {
|
|
51
|
+
return nil
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return [
|
|
55
|
+
"text": candidate.string,
|
|
56
|
+
"boundingBox": boundingBoxMap(for: observation.boundingBox, imageSize: imageSize)
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let fullText = blocks
|
|
61
|
+
.compactMap { $0["text"] as? String }
|
|
62
|
+
.joined(separator: "\n")
|
|
63
|
+
|
|
64
|
+
return [
|
|
65
|
+
"text": fullText,
|
|
66
|
+
"blocks": blocks
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private func resolveImageURL(from uri: String) throws -> URL {
|
|
71
|
+
if let url = URL(string: uri), url.scheme != nil {
|
|
72
|
+
return url
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let fileURL = URL(fileURLWithPath: uri)
|
|
76
|
+
guard FileManager.default.fileExists(atPath: fileURL.path) else {
|
|
77
|
+
throw OcrError.invalidUri("Unable to resolve image URL from URI: \(uri)")
|
|
78
|
+
}
|
|
79
|
+
return fileURL
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
private func loadImageSource(from url: URL) throws -> CGImageSource {
|
|
83
|
+
guard let imageSource = CGImageSourceCreateWithURL(url as CFURL, nil) else {
|
|
84
|
+
throw OcrError.unreadableImage("Failed to create an image source for URL: \(url.absoluteString)")
|
|
85
|
+
}
|
|
86
|
+
return imageSource
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
private func loadCGImage(from imageSource: CGImageSource, url: URL) throws -> CGImage {
|
|
90
|
+
guard let cgImage = CGImageSourceCreateImageAtIndex(imageSource, 0, nil) else {
|
|
91
|
+
throw OcrError.unreadableImage("Failed to decode image data at URL: \(url.absoluteString)")
|
|
92
|
+
}
|
|
93
|
+
return cgImage
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private func loadDownsampledCGImage(from imageSource: CGImageSource, url: URL) throws -> CGImage {
|
|
97
|
+
let options: CFDictionary = [
|
|
98
|
+
kCGImageSourceCreateThumbnailFromImageAlways: true,
|
|
99
|
+
kCGImageSourceCreateThumbnailWithTransform: true,
|
|
100
|
+
kCGImageSourceShouldCacheImmediately: false,
|
|
101
|
+
kCGImageSourceThumbnailMaxPixelSize: maxImageDimension
|
|
102
|
+
] as CFDictionary
|
|
103
|
+
|
|
104
|
+
guard let cgImage = CGImageSourceCreateThumbnailAtIndex(imageSource, 0, options) else {
|
|
105
|
+
return try loadCGImage(from: imageSource, url: url)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return cgImage
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
private func cgImageOrientation(from imageSource: CGImageSource) -> CGImagePropertyOrientation {
|
|
112
|
+
guard
|
|
113
|
+
let properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, nil) as? [CFString: Any],
|
|
114
|
+
let orientationValue = properties[kCGImagePropertyOrientation] as? UInt32,
|
|
115
|
+
let orientation = CGImagePropertyOrientation(rawValue: orientationValue)
|
|
116
|
+
else {
|
|
117
|
+
return .up
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return orientation
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
private func resolvedImageSize(from imageSource: CGImageSource, orientation: CGImagePropertyOrientation, fallbackImage: CGImage) -> CGSize {
|
|
124
|
+
guard
|
|
125
|
+
let properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, nil) as? [CFString: Any],
|
|
126
|
+
let pixelWidth = properties[kCGImagePropertyPixelWidth] as? CGFloat,
|
|
127
|
+
let pixelHeight = properties[kCGImagePropertyPixelHeight] as? CGFloat
|
|
128
|
+
else {
|
|
129
|
+
return CGSize(width: fallbackImage.width, height: fallbackImage.height)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
switch orientation {
|
|
133
|
+
case .left, .leftMirrored, .right, .rightMirrored:
|
|
134
|
+
return CGSize(width: pixelHeight, height: pixelWidth)
|
|
135
|
+
default:
|
|
136
|
+
return CGSize(width: pixelWidth, height: pixelHeight)
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
private func compareObservations(_ lhs: VNRecognizedTextObservation, _ rhs: VNRecognizedTextObservation) -> Bool {
|
|
141
|
+
let rowTolerance: CGFloat = 0.02
|
|
142
|
+
let verticalDelta = abs(lhs.boundingBox.midY - rhs.boundingBox.midY)
|
|
143
|
+
|
|
144
|
+
if verticalDelta <= rowTolerance {
|
|
145
|
+
return lhs.boundingBox.minX < rhs.boundingBox.minX
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return lhs.boundingBox.maxY > rhs.boundingBox.maxY
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
private func boundingBoxMap(for boundingBox: CGRect, imageSize: CGSize) -> [String: Double] {
|
|
152
|
+
let x = boundingBox.origin.x * imageSize.width
|
|
153
|
+
let y = (1 - boundingBox.origin.y - boundingBox.height) * imageSize.height
|
|
154
|
+
let width = boundingBox.width * imageSize.width
|
|
155
|
+
let height = boundingBox.height * imageSize.height
|
|
156
|
+
|
|
157
|
+
return [
|
|
158
|
+
"x": x,
|
|
159
|
+
"y": y,
|
|
160
|
+
"width": width,
|
|
161
|
+
"height": height
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
private enum OcrError: LocalizedError {
|
|
167
|
+
case invalidUri(String)
|
|
168
|
+
case unreadableImage(String)
|
|
169
|
+
|
|
170
|
+
var errorDescription: String? {
|
|
171
|
+
switch self {
|
|
172
|
+
case .invalidUri(let message), .unreadableImage(let message):
|
|
173
|
+
return message
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import ExpoModulesCore
|
|
2
|
+
import WebKit
|
|
3
|
+
|
|
4
|
+
// This view will be used as a native component. Make sure to inherit from `ExpoView`
|
|
5
|
+
// to apply the proper styling (e.g. border radius and shadows).
|
|
6
|
+
class ExpoOcrKitView: ExpoView {
|
|
7
|
+
let webView = WKWebView()
|
|
8
|
+
let onLoad = EventDispatcher()
|
|
9
|
+
var delegate: WebViewDelegate?
|
|
10
|
+
|
|
11
|
+
required init(appContext: AppContext? = nil) {
|
|
12
|
+
super.init(appContext: appContext)
|
|
13
|
+
clipsToBounds = true
|
|
14
|
+
delegate = WebViewDelegate { url in
|
|
15
|
+
self.onLoad(["url": url])
|
|
16
|
+
}
|
|
17
|
+
webView.navigationDelegate = delegate
|
|
18
|
+
addSubview(webView)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
override func layoutSubviews() {
|
|
22
|
+
webView.frame = bounds
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
class WebViewDelegate: NSObject, WKNavigationDelegate {
|
|
27
|
+
let onUrlChange: (String) -> Void
|
|
28
|
+
|
|
29
|
+
init(onUrlChange: @escaping (String) -> Void) {
|
|
30
|
+
self.onUrlChange = onUrlChange
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation) {
|
|
34
|
+
if let url = webView.url {
|
|
35
|
+
onUrlChange(url.absoluteString)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "expo-ocr-kit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "On-device OCR module for Expo and React Native using ML Kit (Android) and Vision (iOS)",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"types": "build/index.d.ts",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"files": [
|
|
9
|
+
"android",
|
|
10
|
+
"ios",
|
|
11
|
+
"build",
|
|
12
|
+
"expo-module.config.json",
|
|
13
|
+
"app.plugin.js",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./build/index.d.ts",
|
|
19
|
+
"default": "./build/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "expo-module build",
|
|
24
|
+
"clean": "expo-module clean",
|
|
25
|
+
"lint": "expo-module lint",
|
|
26
|
+
"test": "expo-module test",
|
|
27
|
+
"prepare": "expo-module prepare",
|
|
28
|
+
"prepublishOnly": "expo-module prepublishOnly",
|
|
29
|
+
"expo-module": "expo-module",
|
|
30
|
+
"open:ios": "xed example/ios",
|
|
31
|
+
"open:android": "open -a \"Android Studio\" example/android"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"react-native",
|
|
35
|
+
"expo",
|
|
36
|
+
"ocr",
|
|
37
|
+
"text-recognition",
|
|
38
|
+
"mlkit",
|
|
39
|
+
"vision",
|
|
40
|
+
"expo-module"
|
|
41
|
+
],
|
|
42
|
+
"repository": "https://github.com/ManojKanth/expo-ocr-kit",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/ManojKanth/expo-ocr-kit/issues"
|
|
45
|
+
},
|
|
46
|
+
"author": "ManojkanthR <manojkanthr@gmail.com> (https://github.com/ManojKanth)",
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"homepage": "https://github.com/ManojKanth/expo-ocr-kit#readme",
|
|
49
|
+
"dependencies": {},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/react": "~19.1.1",
|
|
52
|
+
"expo-module-scripts": "^55.0.2",
|
|
53
|
+
"expo": "55.0.10-canary-20260327-0789fbc",
|
|
54
|
+
"react-native": "0.82.1"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"expo": "*",
|
|
58
|
+
"react": "*",
|
|
59
|
+
"react-native": "*"
|
|
60
|
+
}
|
|
61
|
+
}
|