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,14 @@
|
|
|
1
|
+
-- Merging decision tree log ---
|
|
2
|
+
manifest
|
|
3
|
+
ADDED from /Users/manojkanth/Desktop/Projects/mine/npm packages/Expo-ocr-kit/expo-ocr-kit/android/src/main/AndroidManifest.xml:1:1-2:12
|
|
4
|
+
INJECTED from /Users/manojkanth/Desktop/Projects/mine/npm packages/Expo-ocr-kit/expo-ocr-kit/android/src/main/AndroidManifest.xml:1:1-2:12
|
|
5
|
+
package
|
|
6
|
+
INJECTED from /Users/manojkanth/Desktop/Projects/mine/npm packages/Expo-ocr-kit/expo-ocr-kit/android/src/main/AndroidManifest.xml
|
|
7
|
+
uses-sdk
|
|
8
|
+
INJECTED from /Users/manojkanth/Desktop/Projects/mine/npm packages/Expo-ocr-kit/expo-ocr-kit/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
|
|
9
|
+
INJECTED from /Users/manojkanth/Desktop/Projects/mine/npm packages/Expo-ocr-kit/expo-ocr-kit/android/src/main/AndroidManifest.xml
|
|
10
|
+
INJECTED from /Users/manojkanth/Desktop/Projects/mine/npm packages/Expo-ocr-kit/expo-ocr-kit/android/src/main/AndroidManifest.xml
|
|
11
|
+
android:targetSdkVersion
|
|
12
|
+
INJECTED from /Users/manojkanth/Desktop/Projects/mine/npm packages/Expo-ocr-kit/expo-ocr-kit/android/src/main/AndroidManifest.xml
|
|
13
|
+
android:minSdkVersion
|
|
14
|
+
INJECTED from /Users/manojkanth/Desktop/Projects/mine/npm packages/Expo-ocr-kit/expo-ocr-kit/android/src/main/AndroidManifest.xml
|
|
Binary file
|
package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$Companion.class
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$await$2$1.class
ADDED
|
Binary file
|
package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$await$2$2.class
ADDED
|
Binary file
|
package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitModule$await$2$3.class
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/tmp/kotlin-classes/debug/expo/modules/ocrkit/ExpoOcrKitView$webView$1$1.class
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
plugins {
|
|
2
|
+
id 'com.android.library'
|
|
3
|
+
id 'expo-module-gradle-plugin'
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
group = 'expo.modules.ocrkit'
|
|
7
|
+
version = '0.1.0'
|
|
8
|
+
|
|
9
|
+
android {
|
|
10
|
+
namespace "expo.modules.ocrkit"
|
|
11
|
+
defaultConfig {
|
|
12
|
+
versionCode 1
|
|
13
|
+
versionName "0.1.0"
|
|
14
|
+
}
|
|
15
|
+
lintOptions {
|
|
16
|
+
abortOnError false
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
dependencies {
|
|
21
|
+
implementation("androidx.exifinterface:exifinterface:1.3.7")
|
|
22
|
+
implementation("com.google.mlkit:text-recognition:16.0.1")
|
|
23
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
package expo.modules.ocrkit
|
|
2
|
+
|
|
3
|
+
import android.graphics.Bitmap
|
|
4
|
+
import android.graphics.BitmapFactory
|
|
5
|
+
import android.graphics.Rect
|
|
6
|
+
import android.net.Uri
|
|
7
|
+
import androidx.exifinterface.media.ExifInterface
|
|
8
|
+
import com.google.android.gms.tasks.Task
|
|
9
|
+
import com.google.mlkit.vision.common.InputImage
|
|
10
|
+
import com.google.mlkit.vision.text.Text
|
|
11
|
+
import com.google.mlkit.vision.text.TextRecognition
|
|
12
|
+
import com.google.mlkit.vision.text.latin.TextRecognizerOptions
|
|
13
|
+
import expo.modules.kotlin.functions.Coroutine
|
|
14
|
+
import expo.modules.kotlin.modules.Module
|
|
15
|
+
import expo.modules.kotlin.modules.ModuleDefinition
|
|
16
|
+
import kotlinx.coroutines.Dispatchers
|
|
17
|
+
import kotlinx.coroutines.suspendCancellableCoroutine
|
|
18
|
+
import kotlinx.coroutines.withContext
|
|
19
|
+
import java.net.URL
|
|
20
|
+
import kotlin.math.max
|
|
21
|
+
import kotlin.coroutines.resume
|
|
22
|
+
import kotlin.coroutines.resumeWithException
|
|
23
|
+
|
|
24
|
+
class ExpoOcrKitModule : Module() {
|
|
25
|
+
private data class PreparedImage(
|
|
26
|
+
val image: InputImage,
|
|
27
|
+
val scaleFactor: Int
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
companion object {
|
|
31
|
+
private const val MAX_IMAGE_DIMENSION = 2000
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
override fun definition() = ModuleDefinition {
|
|
35
|
+
Name("ExpoOcrKit")
|
|
36
|
+
|
|
37
|
+
AsyncFunction("recognizeText") Coroutine { uri: String ->
|
|
38
|
+
recognizeText(uri)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
View(ExpoOcrKitView::class) {
|
|
42
|
+
Prop("url") { view: ExpoOcrKitView, url: URL ->
|
|
43
|
+
view.webView.loadUrl(url.toString())
|
|
44
|
+
}
|
|
45
|
+
Events("onLoad")
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
private suspend fun recognizeText(uri: String): Map<String, Any> {
|
|
50
|
+
val normalizedUri = uri.trim()
|
|
51
|
+
require(normalizedUri.isNotEmpty()) {
|
|
52
|
+
"Image URI must not be empty."
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
val context = requireNotNull(appContext.reactContext) {
|
|
56
|
+
"React context is unavailable."
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
val imageUri = Uri.parse(normalizedUri)
|
|
60
|
+
val preparedImage = withContext(Dispatchers.IO) { createInputImage(context.contentResolver, imageUri) }
|
|
61
|
+
|
|
62
|
+
val recognizer = TextRecognition.getClient(TextRecognizerOptions.DEFAULT_OPTIONS)
|
|
63
|
+
|
|
64
|
+
return try {
|
|
65
|
+
val result = recognizer.process(preparedImage.image).await()
|
|
66
|
+
mapRecognitionResult(result, preparedImage.scaleFactor)
|
|
67
|
+
} finally {
|
|
68
|
+
recognizer.close()
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private fun mapRecognitionResult(result: Text, scaleFactor: Int): Map<String, Any> {
|
|
73
|
+
return mapOf(
|
|
74
|
+
"text" to result.text,
|
|
75
|
+
"blocks" to result.textBlocks.map { block ->
|
|
76
|
+
mapOf(
|
|
77
|
+
"text" to block.text,
|
|
78
|
+
"boundingBox" to rectToMap(block.boundingBox, scaleFactor)
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private fun createInputImage(contentResolver: android.content.ContentResolver, imageUri: Uri): PreparedImage {
|
|
85
|
+
val decodedBitmap = decodeScaledBitmap(contentResolver, imageUri)
|
|
86
|
+
|
|
87
|
+
return if (decodedBitmap != null) {
|
|
88
|
+
PreparedImage(
|
|
89
|
+
image = InputImage.fromBitmap(decodedBitmap.bitmap, resolveRotationDegrees(contentResolver, imageUri)),
|
|
90
|
+
scaleFactor = decodedBitmap.sampleSize
|
|
91
|
+
)
|
|
92
|
+
} else {
|
|
93
|
+
PreparedImage(
|
|
94
|
+
image = InputImage.fromFilePath(requireNotNull(appContext.reactContext), imageUri),
|
|
95
|
+
scaleFactor = 1
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private data class DecodedBitmap(
|
|
101
|
+
val bitmap: Bitmap,
|
|
102
|
+
val sampleSize: Int
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
private fun decodeScaledBitmap(contentResolver: android.content.ContentResolver, imageUri: Uri): DecodedBitmap? {
|
|
106
|
+
val bounds = BitmapFactory.Options().apply {
|
|
107
|
+
inJustDecodeBounds = true
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
contentResolver.openInputStream(imageUri)?.use { stream ->
|
|
111
|
+
BitmapFactory.decodeStream(stream, null, bounds)
|
|
112
|
+
} ?: return null
|
|
113
|
+
|
|
114
|
+
if (bounds.outWidth <= 0 || bounds.outHeight <= 0) {
|
|
115
|
+
return null
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
val sampleSize = calculateInSampleSize(bounds.outWidth, bounds.outHeight)
|
|
119
|
+
val decodeOptions = BitmapFactory.Options().apply {
|
|
120
|
+
inSampleSize = sampleSize
|
|
121
|
+
inPreferredConfig = Bitmap.Config.ARGB_8888
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
val bitmap = contentResolver.openInputStream(imageUri)?.use { stream ->
|
|
125
|
+
BitmapFactory.decodeStream(stream, null, decodeOptions)
|
|
126
|
+
} ?: return null
|
|
127
|
+
|
|
128
|
+
return DecodedBitmap(bitmap = bitmap, sampleSize = sampleSize)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
private fun calculateInSampleSize(width: Int, height: Int): Int {
|
|
132
|
+
var sampleSize = 1
|
|
133
|
+
var currentWidth = width
|
|
134
|
+
var currentHeight = height
|
|
135
|
+
|
|
136
|
+
while (max(currentWidth, currentHeight) > MAX_IMAGE_DIMENSION) {
|
|
137
|
+
currentWidth /= 2
|
|
138
|
+
currentHeight /= 2
|
|
139
|
+
sampleSize *= 2
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return sampleSize
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
private fun resolveRotationDegrees(contentResolver: android.content.ContentResolver, imageUri: Uri): Int {
|
|
146
|
+
return contentResolver.openInputStream(imageUri)?.use { stream ->
|
|
147
|
+
when (ExifInterface(stream).getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL)) {
|
|
148
|
+
ExifInterface.ORIENTATION_ROTATE_90 -> 90
|
|
149
|
+
ExifInterface.ORIENTATION_ROTATE_180 -> 180
|
|
150
|
+
ExifInterface.ORIENTATION_ROTATE_270 -> 270
|
|
151
|
+
else -> 0
|
|
152
|
+
}
|
|
153
|
+
} ?: 0
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
private fun rectToMap(rect: Rect?, scaleFactor: Int): Map<String, Int> {
|
|
157
|
+
if (rect == null) {
|
|
158
|
+
return mapOf(
|
|
159
|
+
"x" to 0,
|
|
160
|
+
"y" to 0,
|
|
161
|
+
"width" to 0,
|
|
162
|
+
"height" to 0
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return mapOf(
|
|
167
|
+
"x" to rect.left * scaleFactor,
|
|
168
|
+
"y" to rect.top * scaleFactor,
|
|
169
|
+
"width" to rect.width() * scaleFactor,
|
|
170
|
+
"height" to rect.height() * scaleFactor
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
private suspend fun <T> Task<T>.await(): T = suspendCancellableCoroutine { continuation ->
|
|
175
|
+
addOnSuccessListener { result ->
|
|
176
|
+
continuation.resume(result)
|
|
177
|
+
}
|
|
178
|
+
addOnFailureListener { exception ->
|
|
179
|
+
continuation.resumeWithException(exception)
|
|
180
|
+
}
|
|
181
|
+
addOnCanceledListener {
|
|
182
|
+
continuation.cancel()
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
package expo.modules.ocrkit
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import android.webkit.WebView
|
|
5
|
+
import android.webkit.WebViewClient
|
|
6
|
+
import expo.modules.kotlin.AppContext
|
|
7
|
+
import expo.modules.kotlin.viewevent.EventDispatcher
|
|
8
|
+
import expo.modules.kotlin.views.ExpoView
|
|
9
|
+
|
|
10
|
+
class ExpoOcrKitView(context: Context, appContext: AppContext) : ExpoView(context, appContext) {
|
|
11
|
+
// Creates and initializes an event dispatcher for the `onLoad` event.
|
|
12
|
+
// The name of the event is inferred from the value and needs to match the event name defined in the module.
|
|
13
|
+
private val onLoad by EventDispatcher()
|
|
14
|
+
|
|
15
|
+
// Defines a WebView that will be used as the root subview.
|
|
16
|
+
internal val webView = WebView(context).apply {
|
|
17
|
+
layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
18
|
+
webViewClient = object : WebViewClient() {
|
|
19
|
+
override fun onPageFinished(view: WebView, url: String) {
|
|
20
|
+
// Sends an event to JavaScript. Triggers a callback defined on the view component in JavaScript.
|
|
21
|
+
onLoad(mapOf("url" to url))
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
init {
|
|
27
|
+
// Adds the WebView to the view hierarchy.
|
|
28
|
+
addView(webView)
|
|
29
|
+
}
|
|
30
|
+
}
|
package/app.plugin.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const { AndroidConfig, createRunOncePlugin, withInfoPlist } = require('expo/config-plugins');
|
|
2
|
+
|
|
3
|
+
const pkg = require('./package.json');
|
|
4
|
+
|
|
5
|
+
const DEFAULT_CAMERA_PERMISSION = 'Allow this app to capture receipts for OCR scanning.';
|
|
6
|
+
|
|
7
|
+
function withExpoOcrKit(config, props = {}) {
|
|
8
|
+
const cameraPermission = props.cameraPermission || DEFAULT_CAMERA_PERMISSION;
|
|
9
|
+
|
|
10
|
+
config = withInfoPlist(config, (modConfig) => {
|
|
11
|
+
modConfig.modResults.NSCameraUsageDescription =
|
|
12
|
+
modConfig.modResults.NSCameraUsageDescription || cameraPermission;
|
|
13
|
+
return modConfig;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
config = AndroidConfig.Permissions.withPermissions(config, ['android.permission.CAMERA']);
|
|
17
|
+
|
|
18
|
+
return config;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
module.exports = createRunOncePlugin(withExpoOcrKit, pkg.name, pkg.version);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export type OcrBoundingBox = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
export type OcrBlock = {
|
|
9
|
+
text: string;
|
|
10
|
+
boundingBox: OcrBoundingBox;
|
|
11
|
+
};
|
|
12
|
+
export type OcrResult = {
|
|
13
|
+
text: string;
|
|
14
|
+
blocks: OcrBlock[];
|
|
15
|
+
};
|
|
16
|
+
export type OnLoadEventPayload = {
|
|
17
|
+
url: string;
|
|
18
|
+
};
|
|
19
|
+
export type ExpoOcrKitModuleEvents = {
|
|
20
|
+
onChange: (params: ChangeEventPayload) => void;
|
|
21
|
+
};
|
|
22
|
+
export type ChangeEventPayload = {
|
|
23
|
+
value: string;
|
|
24
|
+
};
|
|
25
|
+
export type ExpoOcrKitViewProps = {
|
|
26
|
+
url: string;
|
|
27
|
+
onLoad: (event: {
|
|
28
|
+
nativeEvent: OnLoadEventPayload;
|
|
29
|
+
}) => void;
|
|
30
|
+
style?: StyleProp<ViewStyle>;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=ExpoOcrKit.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOcrKit.types.d.ts","sourceRoot":"","sources":["../src/ExpoOcrKit.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,kBAAkB,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7D,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOcrKit.types.js","sourceRoot":"","sources":["../src/ExpoOcrKit.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nexport type OcrBoundingBox = {\n x: number;\n y: number;\n width: number;\n height: number;\n};\n\nexport type OcrBlock = {\n text: string;\n boundingBox: OcrBoundingBox;\n};\n\nexport type OcrResult = {\n text: string;\n blocks: OcrBlock[];\n};\n\nexport type OnLoadEventPayload = {\n url: string;\n};\n\nexport type ExpoOcrKitModuleEvents = {\n onChange: (params: ChangeEventPayload) => void;\n};\n\nexport type ChangeEventPayload = {\n value: string;\n};\n\nexport type ExpoOcrKitViewProps = {\n url: string;\n onLoad: (event: { nativeEvent: OnLoadEventPayload }) => void;\n style?: StyleProp<ViewStyle>;\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NativeModule } from 'expo';
|
|
2
|
+
import { ExpoOcrKitModuleEvents, OcrResult } from './ExpoOcrKit.types';
|
|
3
|
+
declare class ExpoOcrKitModule extends NativeModule<ExpoOcrKitModuleEvents> {
|
|
4
|
+
recognizeText(uri: string): Promise<OcrResult>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: ExpoOcrKitModule;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=ExpoOcrKitModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOcrKitModule.d.ts","sourceRoot":"","sources":["../src/ExpoOcrKitModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,OAAO,gBAAiB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IACzE,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAC/C;;AAGD,wBAAmE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOcrKitModule.js","sourceRoot":"","sources":["../src/ExpoOcrKitModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAQzD,yDAAyD;AACzD,eAAe,mBAAmB,CAAmB,YAAY,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo';\n\nimport { ExpoOcrKitModuleEvents, OcrResult } from './ExpoOcrKit.types';\n\ndeclare class ExpoOcrKitModule extends NativeModule<ExpoOcrKitModuleEvents> {\n recognizeText(uri: string): Promise<OcrResult>;\n}\n\n// This call loads the native module object from the JSI.\nexport default requireNativeModule<ExpoOcrKitModule>('ExpoOcrKit');\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NativeModule } from 'expo';
|
|
2
|
+
import { ExpoOcrKitModuleEvents, OcrResult } from './ExpoOcrKit.types';
|
|
3
|
+
declare class ExpoOcrKitModule extends NativeModule<ExpoOcrKitModuleEvents> {
|
|
4
|
+
recognizeText(_uri: string): Promise<OcrResult>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: typeof ExpoOcrKitModule;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=ExpoOcrKitModule.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOcrKitModule.web.d.ts","sourceRoot":"","sources":["../src/ExpoOcrKitModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAE,MAAM,MAAM,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEvE,cAAM,gBAAiB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IAC3D,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAGtD;;AAED,wBAAuE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { registerWebModule, NativeModule } from 'expo';
|
|
2
|
+
class ExpoOcrKitModule extends NativeModule {
|
|
3
|
+
async recognizeText(_uri) {
|
|
4
|
+
throw new Error('ExpoOcrKit.recognizeText is only available on Android and iOS native builds.');
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export default registerWebModule(ExpoOcrKitModule, 'ExpoOcrKitModule');
|
|
8
|
+
//# sourceMappingURL=ExpoOcrKitModule.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOcrKitModule.web.js","sourceRoot":"","sources":["../src/ExpoOcrKitModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIvD,MAAM,gBAAiB,SAAQ,YAAoC;IACjE,KAAK,CAAC,aAAa,CAAC,IAAY;QAC9B,MAAM,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAC;IAClG,CAAC;CACF;AAED,eAAe,iBAAiB,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { registerWebModule, NativeModule } from 'expo';\n\nimport { ExpoOcrKitModuleEvents, OcrResult } from './ExpoOcrKit.types';\n\nclass ExpoOcrKitModule extends NativeModule<ExpoOcrKitModuleEvents> {\n async recognizeText(_uri: string): Promise<OcrResult> {\n throw new Error('ExpoOcrKit.recognizeText is only available on Android and iOS native builds.');\n }\n}\n\nexport default registerWebModule(ExpoOcrKitModule, 'ExpoOcrKitModule');\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOcrKitView.d.ts","sourceRoot":"","sources":["../src/ExpoOcrKitView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAKzD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAEhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOcrKitView.js","sourceRoot":"","sources":["../src/ExpoOcrKitView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,UAAU,GACd,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAElC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAA0B;IAC/D,OAAO,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACnC,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport * as React from 'react';\n\nimport { ExpoOcrKitViewProps } from './ExpoOcrKit.types';\n\nconst NativeView: React.ComponentType<ExpoOcrKitViewProps> =\n requireNativeView('ExpoOcrKit');\n\nexport default function ExpoOcrKitView(props: ExpoOcrKitViewProps) {\n return <NativeView {...props} />;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOcrKitView.web.d.ts","sourceRoot":"","sources":["../src/ExpoOcrKitView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAUhE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export default function ExpoOcrKitView(props) {
|
|
3
|
+
return (<div>
|
|
4
|
+
<iframe style={{ flex: 1 }} src={props.url} onLoad={() => props.onLoad({ nativeEvent: { url: props.url } })}/>
|
|
5
|
+
</div>);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ExpoOcrKitView.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOcrKitView.web.js","sourceRoot":"","sources":["../src/ExpoOcrKitView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAA0B;IAC/D,OAAO,CACL,CAAC,GAAG,CACF;MAAA,CAAC,MAAM,CACL,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CACnB,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CACf,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAEpE;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import * as React from 'react';\n\nimport { ExpoOcrKitViewProps } from './ExpoOcrKit.types';\n\nexport default function ExpoOcrKitView(props: ExpoOcrKitViewProps) {\n return (\n <div>\n <iframe\n style={{ flex: 1 }}\n src={props.url}\n onLoad={() => props.onLoad({ nativeEvent: { url: props.url } })}\n />\n </div>\n );\n}\n"]}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import ExpoOcrKitModule from './ExpoOcrKitModule';
|
|
2
|
+
import type { OcrResult } from './ExpoOcrKit.types';
|
|
3
|
+
export declare function recognizeText(uri: string): Promise<OcrResult>;
|
|
4
|
+
export { ExpoOcrKitModule };
|
|
5
|
+
export default ExpoOcrKitModule;
|
|
6
|
+
export { default as ExpoOcrKitView } from './ExpoOcrKitView';
|
|
7
|
+
export * from './ExpoOcrKit.types';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAEnE;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,eAAe,gBAAgB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,oBAAoB,CAAC"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import ExpoOcrKitModule from './ExpoOcrKitModule';
|
|
2
|
+
export async function recognizeText(uri) {
|
|
3
|
+
return ExpoOcrKitModule.recognizeText(uri);
|
|
4
|
+
}
|
|
5
|
+
export { ExpoOcrKitModule };
|
|
6
|
+
export default ExpoOcrKitModule;
|
|
7
|
+
export { default as ExpoOcrKitView } from './ExpoOcrKitView';
|
|
8
|
+
export * from './ExpoOcrKit.types';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAIlD,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAW;IAC7C,OAAO,gBAAgB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;AAC7C,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,eAAe,gBAAgB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,oBAAoB,CAAC","sourcesContent":["import ExpoOcrKitModule from './ExpoOcrKitModule';\n\nimport type { OcrResult } from './ExpoOcrKit.types';\n\nexport async function recognizeText(uri: string): Promise<OcrResult> {\n return ExpoOcrKitModule.recognizeText(uri);\n}\n\nexport { ExpoOcrKitModule };\nexport default ExpoOcrKitModule;\nexport { default as ExpoOcrKitView } from './ExpoOcrKitView';\nexport * from './ExpoOcrKit.types';\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'ExpoOcrKit'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.description = package['description']
|
|
10
|
+
s.license = package['license']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.homepage = package['homepage']
|
|
13
|
+
s.platforms = {
|
|
14
|
+
:ios => '15.1',
|
|
15
|
+
:tvos => '15.1'
|
|
16
|
+
}
|
|
17
|
+
s.swift_version = '5.9'
|
|
18
|
+
s.source = { git: 'https://github.com/ManojKanth/expo-ocr-kit' }
|
|
19
|
+
s.static_framework = true
|
|
20
|
+
|
|
21
|
+
s.dependency 'ExpoModulesCore'
|
|
22
|
+
|
|
23
|
+
# Swift/Objective-C compatibility
|
|
24
|
+
s.pod_target_xcconfig = {
|
|
25
|
+
'DEFINES_MODULE' => 'YES',
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
s.source_files = "**/*.{h,m,mm,swift,hpp,cpp}"
|
|
29
|
+
end
|