react-native-customizable-image-crop-picker 1.0.1

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.
Files changed (176) hide show
  1. package/LICENSE +44 -0
  2. package/README.md +479 -0
  3. package/RNCustomizableImageCropPicker.podspec +26 -0
  4. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  5. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  6. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  7. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  8. package/android/.gradle/8.9/gc.properties +0 -0
  9. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  10. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  11. package/android/.gradle/vcs-1/gc.properties +0 -0
  12. package/android/build/.transforms/a34a6297c7e9b65c987429ecd018e9a9/results.bin +1 -0
  13. package/android/build/.transforms/a34a6297c7e9b65c987429ecd018e9a9/transformed/classes/classes_dex/classes.dex +0 -0
  14. package/android/build/.transforms/d07257a7807cb64bf14f5adb0f98ee25/results.bin +1 -0
  15. package/android/build/.transforms/d07257a7807cb64bf14f5adb0f98ee25/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/rncustomizableimagecroppicker/BuildConfig.dex +0 -0
  16. package/android/build/.transforms/d07257a7807cb64bf14f5adb0f98ee25/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/rncustomizableimagecroppicker/NativeImageCropperActivity$Companion.dex +0 -0
  17. package/android/build/.transforms/d07257a7807cb64bf14f5adb0f98ee25/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/rncustomizableimagecroppicker/NativeImageCropperActivity.dex +0 -0
  18. package/android/build/.transforms/d07257a7807cb64bf14f5adb0f98ee25/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/rncustomizableimagecroppicker/NativeImageCropperModule$Companion.dex +0 -0
  19. package/android/build/.transforms/d07257a7807cb64bf14f5adb0f98ee25/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/rncustomizableimagecroppicker/NativeImageCropperModule.dex +0 -0
  20. package/android/build/.transforms/d07257a7807cb64bf14f5adb0f98ee25/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/rncustomizableimagecroppicker/NativeImageCropperPackage.dex +0 -0
  21. package/android/build/.transforms/d07257a7807cb64bf14f5adb0f98ee25/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/rncustomizableimagecroppicker/NativeImagePickerFileProvider.dex +0 -0
  22. package/android/build/.transforms/d07257a7807cb64bf14f5adb0f98ee25/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  23. package/android/build/generated/source/buildConfig/debug/com/rncustomizableimagecroppicker/BuildConfig.java +10 -0
  24. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +26 -0
  25. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  26. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  27. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  28. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  29. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  30. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +1 -0
  31. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_nativeimagepicker_file_paths.xml.flat +0 -0
  32. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -0
  33. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  34. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
  35. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  36. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  37. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-native-customizable-image-crop-picker_debug.kotlin_module +0 -0
  38. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/rncustomizableimagecroppicker/BuildConfig.class +0 -0
  39. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +3 -0
  40. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +41 -0
  41. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +26 -0
  42. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  43. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  44. package/android/build/intermediates/packaged_res/debug/packageDebugResources/xml/nativeimagepicker_file_paths.xml +6 -0
  45. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-native-customizable-image-crop-picker_debug.kotlin_module +0 -0
  46. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/rncustomizableimagecroppicker/BuildConfig.class +0 -0
  47. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/rncustomizableimagecroppicker/NativeImageCropperActivity$Companion.class +0 -0
  48. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/rncustomizableimagecroppicker/NativeImageCropperActivity.class +0 -0
  49. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/rncustomizableimagecroppicker/NativeImageCropperModule$Companion.class +0 -0
  50. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/rncustomizableimagecroppicker/NativeImageCropperModule.class +0 -0
  51. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/rncustomizableimagecroppicker/NativeImageCropperPackage.class +0 -0
  52. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/rncustomizableimagecroppicker/NativeImagePickerFileProvider.class +0 -0
  53. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  54. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +2 -0
  55. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  56. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  57. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  58. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  59. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  60. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  61. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  62. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  63. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  64. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  65. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  66. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  67. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  68. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  69. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.s +1 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s +1 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s +1 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  149. package/android/build/outputs/logs/manifest-merger-debug-report.txt +46 -0
  150. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  151. package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-customizable-image-crop-picker_debug.kotlin_module +0 -0
  152. package/android/build/tmp/kotlin-classes/debug/com/rncustomizableimagecroppicker/NativeImageCropperActivity$Companion.class +0 -0
  153. package/android/build/tmp/kotlin-classes/debug/com/rncustomizableimagecroppicker/NativeImageCropperActivity.class +0 -0
  154. package/android/build/tmp/kotlin-classes/debug/com/rncustomizableimagecroppicker/NativeImageCropperModule$Companion.class +0 -0
  155. package/android/build/tmp/kotlin-classes/debug/com/rncustomizableimagecroppicker/NativeImageCropperModule.class +0 -0
  156. package/android/build/tmp/kotlin-classes/debug/com/rncustomizableimagecroppicker/NativeImageCropperPackage.class +0 -0
  157. package/android/build/tmp/kotlin-classes/debug/com/rncustomizableimagecroppicker/NativeImagePickerFileProvider.class +0 -0
  158. package/android/build.gradle +49 -0
  159. package/android/consumer-rules.pro +3 -0
  160. package/android/src/main/AndroidManifest.xml +23 -0
  161. package/android/src/main/java/com/rncustomizableimagecroppicker/NativeImageCropperActivity.kt +1009 -0
  162. package/android/src/main/java/com/rncustomizableimagecroppicker/NativeImageCropperModule.kt +684 -0
  163. package/android/src/main/java/com/rncustomizableimagecroppicker/NativeImageCropperPackage.kt +17 -0
  164. package/android/src/main/java/com/rncustomizableimagecroppicker/NativeImagePickerFileProvider.kt +6 -0
  165. package/android/src/main/res/xml/nativeimagepicker_file_paths.xml +6 -0
  166. package/ios/NativeImageCropperModule.m +13 -0
  167. package/ios/NativeImageCropperModule.swift +1400 -0
  168. package/package.json +116 -0
  169. package/react-native.config.js +13 -0
  170. package/src/api.ts +41 -0
  171. package/src/errors.ts +39 -0
  172. package/src/index.ts +4 -0
  173. package/src/native/NativeImageCropperModule.ts +34 -0
  174. package/src/native/mapOptions.ts +164 -0
  175. package/src/types.ts +258 -0
  176. package/src/ui/ImageCropPickerModal.tsx +322 -0
package/LICENSE ADDED
@@ -0,0 +1,44 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ MIT License
24
+
25
+ Copyright (c) 2026
26
+
27
+ Permission is hereby granted, free of charge, to any person obtaining a copy
28
+ of this software and associated documentation files (the "Software"), to deal
29
+ in the Software without restriction, including without limitation the rights
30
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31
+ copies of the Software, and to permit persons to whom the Software is
32
+ furnished to do so, subject to the following conditions:
33
+
34
+ The above copyright notice and this permission notice shall be included in all
35
+ copies or substantial portions of the Software.
36
+
37
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
42
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
43
+ SOFTWARE.
44
+
package/README.md ADDED
@@ -0,0 +1,479 @@
1
+ # react-native-customizable-image-crop-picker
2
+
3
+ [![License](https://img.shields.io/npm/l/react-native-customizable-image-crop-picker)](./LICENSE)
4
+ [![NPM](https://img.shields.io/badge/npm-package-CB3837?logo=npm&logoColor=white)](https://www.npmjs.com/package/react-native-customizable-image-crop-picker)
5
+ [![Downloads](https://img.shields.io/npm/dm/react-native-customizable-image-crop-picker)](https://www.npmjs.com/package/react-native-customizable-image-crop-picker)
6
+ ![Platform - Android](https://img.shields.io/badge/platform-android-3DDC84?logo=android&logoColor=white)
7
+ ![Platform - iOS](https://img.shields.io/badge/platform-iOS-000000?logo=apple&logoColor=white)
8
+
9
+ This library is developed by **Amit Kumar**.
10
+
11
+ A high performance, beautiful and fully customizable **image crop picker** for React Native.
12
+
13
+ iOS/Android image picker + cropper with support for **camera**, **gallery**, optional **base64**, and a **highly customizable native full-screen crop UI** (header/footer/buttons/icons/layout) driven by JS props.
14
+
15
+ - **Android**: system photo picker / camera + **uCrop**
16
+ - **iOS**: `UIImagePickerController` / camera + **TOCropViewController**
17
+
18
+ ## Platforms Supported
19
+
20
+ - [x] iOS
21
+ - [x] Android
22
+
23
+ ## Features
24
+
25
+ - Camera + gallery
26
+ - Cropping with configurable aspect ratio (`cropWidth` / `cropHeight`)
27
+ - Circular crop (`circularCrop`)
28
+ - Crop overlays: dimmed layer + grid (`dimmedLayerColor`, `cropGridEnabled`)
29
+ - Native crop controls (rotate/reset + aspect ratio picker) via `showNativeCropControls`
30
+ - Output compression controls (`compressQuality`, `compressFormat`)
31
+ - Optional base64 output (`includeBase64`)
32
+ - Native full-screen crop UI customization from JS (header/footer/buttons/icons/layout)
33
+ - Icons: remote (http/https) + local (`file://` / Android `content://`) + base64 + bundled assets (`require(...)`)
34
+ - Events: `onCropStart`, `onCropEnd`, `onProgress` (Android base64 progress)
35
+
36
+ ## Roadmap (planned)
37
+
38
+ - **Rotation + flip parity**: add flip support, finer control over native toolbars
39
+ - **Multiple aspect ratio presets**: configurable preset list (1:1, 4:3, 16:9, free) beyond the native defaults
40
+ - **Full RN UI mode**: “JS chrome + native crop engine” component so every UI detail is styleable with real RN styles
41
+ - **Richer error codes** and permission UX
42
+ - **Multiple selection** (`multiple`, `maxFiles`)
43
+
44
+ ## Demo
45
+
46
+ **Android**
47
+
48
+ </br></br>
49
+ <p>
50
+ <img src="../../images/1.png" alt="Android demo" width="320" />
51
+ </p>
52
+ </br>
53
+ <p>
54
+ <img src="../../images/2.png" alt="Android demo" width="320" />
55
+ </p>
56
+ </br>
57
+ <p>
58
+ <img src="../../images/3.png" alt="Android demo" width="320" />
59
+ </p>
60
+ </br>
61
+ <p>
62
+ <img src="../../images/4.png" alt="Android demo" width="320" />
63
+ </p>
64
+ </br>
65
+ </br>
66
+
67
+ **iOS**
68
+
69
+ </br>
70
+ </br>
71
+ <p>
72
+ <img src="../../images/5.png" alt="iOS demo" width="320" />
73
+ </p>
74
+ </br>
75
+ <p>
76
+ <img src="../../images/6.png" alt="iOS demo" width="320" />
77
+ </p>
78
+ </br>
79
+ <p>
80
+ <img src="../../images/7.png" alt="iOS demo" width="320" />
81
+ </p>
82
+ </br>
83
+ <p>
84
+ <img src="../../images/8.png" alt="iOS demo" width="320" />
85
+ </p>
86
+ </br>
87
+ <p>
88
+ <img src="../../images/9.png" alt="iOS demo" width="320" />
89
+ </p>
90
+ </br>
91
+ </br>
92
+
93
+
94
+ ## Important notes
95
+
96
+ - **Camera permission**
97
+ - **Android**: you must request `CAMERA` permission at runtime (helper included).
98
+ - **iOS**: you must add `NSCameraUsageDescription` to `Info.plist`.
99
+ - **iOS Simulator**: camera isn’t available on the simulator. Test camera on a real device.
100
+
101
+ ## Getting started
102
+
103
+ ```bash
104
+ npm install react-native-customizable-image-crop-picker --save
105
+ ```
106
+
107
+ or
108
+
109
+ ```bash
110
+ yarn add react-native-customizable-image-crop-picker
111
+ ```
112
+
113
+ ### iOS
114
+
115
+ ```bash
116
+ cd ios
117
+ pod install
118
+ cd ..
119
+ ```
120
+
121
+ #### Permissions (Info.plist)
122
+
123
+ Add:
124
+
125
+ - `NSCameraUsageDescription`
126
+ - `NSPhotoLibraryUsageDescription`
127
+ - `NSPhotoLibraryAddUsageDescription` (only if saving to library)
128
+
129
+ #### If CocoaPods fails: TOCropViewController modular headers
130
+
131
+ ```ruby
132
+ pod 'TOCropViewController', :modular_headers => true
133
+ ```
134
+
135
+ #### If you see an rsync error about missing simulator slice (RN 0.84+ prebuilt pods)
136
+
137
+ ```bash
138
+ cd ios
139
+ RCT_USE_PREBUILT_RNCORE=0 pod install
140
+ ```
141
+
142
+ ### Android
143
+
144
+ Autolinking handles it. For camera flows, ensure this exists (manifest merge usually brings it from the library):
145
+
146
+ ```xml
147
+ <uses-permission android:name="android.permission.CAMERA" />
148
+ ```
149
+
150
+ If you use **remote icons** (`http/https`) for buttons, your app must also have:
151
+
152
+ ```xml
153
+ <uses-permission android:name="android.permission.INTERNET" />
154
+ ```
155
+
156
+ ### SVG icons (Android native UI)
157
+
158
+ On **Android**, button icon props like `uploadButtonIconUri` / `cancelButtonIconUri` can also be **SVG**:
159
+
160
+ - Remote: `https://.../icon.svg`
161
+ - Local: `file://.../icon.svg` or `content://.../icon.svg`
162
+ - Data URI: `data:image/svg+xml;utf8,<svg ...>`
163
+ - Base64: `data:image/svg+xml;base64,PHN2Zy4uLg==`
164
+
165
+ On **iOS native UI**, SVG icons are not supported (use PNG/JPG/WebP), or use the JS UI (`ImageCropPickerModal`) with `react-native-svg`.
166
+
167
+ ## Usage
168
+
169
+ Import:
170
+
171
+ ```js
172
+ import {
173
+ openImageCropPicker,
174
+ } from 'react-native-customizable-image-crop-picker';
175
+ ```
176
+
177
+ ### Select from gallery
178
+
179
+ ```js
180
+ const result = await openImageCropPicker({
181
+ source: 'gallery',
182
+ cropWidth: 1,
183
+ cropHeight: 1,
184
+ });
185
+
186
+ console.log(result.path);
187
+ ```
188
+
189
+ ### Select from camera
190
+
191
+ ```js
192
+ const result = await openImageCropPicker({
193
+ source: 'camera',
194
+ cropWidth: 1,
195
+ cropHeight: 1,
196
+ });
197
+ ```
198
+
199
+ ### Callbacks / progress (base64)
200
+
201
+ ```js
202
+ const result = await openImageCropPicker({
203
+ source: 'gallery',
204
+ includeBase64: true,
205
+ onCropStart: () => console.log('crop started'),
206
+ onProgress: (p) => console.log('progress', p), // Android: real base64 progress
207
+ onCropEnd: (res, err) => console.log('crop end', { res, err }),
208
+ });
209
+ ```
210
+
211
+ ## Optional: JS UI chrome (`ImageCropPickerModal`)
212
+
213
+ This package also exports a **fully customizable React Native modal** (`ImageCropPickerModal`) that you can use as your own UI layer (custom header/footer/buttons). It’s independent from the native crop flow.
214
+
215
+ ### Usage
216
+
217
+ ```js
218
+ import React, { useState } from 'react';
219
+ import { View, Button } from 'react-native';
220
+ import { ImageCropPickerModal } from 'react-native-customizable-image-crop-picker';
221
+
222
+ export default function Screen() {
223
+ const [visible, setVisible] = useState(false);
224
+
225
+ return (
226
+ <View style={{ flex: 1 }}>
227
+ <Button title="Open preview UI" onPress={() => setVisible(true)} />
228
+
229
+ <ImageCropPickerModal
230
+ visible={visible}
231
+ imageUri="file:///path/to/image.jpg"
232
+ headerTitle="Preview Image"
233
+ cancelText="Cancel"
234
+ uploadText="Upload"
235
+ onCancel={() => setVisible(false)}
236
+ onConfirm={() => setVisible(false)}
237
+ />
238
+ </View>
239
+ );
240
+ }
241
+ ```
242
+
243
+ ### Modal props
244
+
245
+ | Prop | Type | Required | Default | Description |
246
+ | --- | --- | --- | --- | --- |
247
+ | visible | boolean | Yes | - | Show/hide the modal |
248
+ | imageUri | string | No | - | Image to preview |
249
+ | onCancel | `() => void` | Yes | - | Cancel callback |
250
+ | onConfirm | `() => void` | Yes | - | Confirm callback |
251
+ | safeAreaEnabled | boolean | No | `true` | Wrap modal in `SafeAreaView` |
252
+ | backgroundColor | string | No | `#000` | Preview background |
253
+ | showHeader | boolean | No | `true` | Show header |
254
+ | showFooter | boolean | No | `true` | Show footer |
255
+ | headerTitle | string | No | `Preview Image` | Header title |
256
+ | headerAlignment | `'left' \| 'center' \| 'right'` | No | `'center'` | Title alignment |
257
+ | leftIcon | `React.ReactNode` | No | - | Left icon element |
258
+ | rightIcon | `React.ReactNode` | No | - | Right icon element |
259
+ | showLeftIcon | boolean | No | `headerAlignment === 'center'` | Show/hide left icon |
260
+ | showRightIcon | boolean | No | `headerAlignment === 'center'` | Show/hide right icon |
261
+ | headerStyle | `{ containerStyle?, titleStyle?, leftIconContainerStyle?, rightIconContainerStyle? }` | No | - | Header styling |
262
+ | cancelText | string | No | `Cancel` | Cancel label |
263
+ | uploadText | string | No | `Upload` | Upload label |
264
+ | cancelIcon | `React.ReactNode` | No | - | Cancel icon element (footer) |
265
+ | uploadIcon | `React.ReactNode` | No | - | Upload icon element (footer) |
266
+ | footerStyle | `{ containerStyle?, buttonRowStyle?, cancelButtonStyle?, uploadButtonStyle?, cancelTextStyle?, uploadTextStyle?, cancelIconContainerStyle?, uploadIconContainerStyle? }` | No | - | Footer styling |
267
+ | overlayStyle | `{ containerStyle?, previewContainerStyle?, imageStyle?, cropOverlayStyle? }` | No | - | Preview + overlay styling |
268
+
269
+ ### Render overrides
270
+
271
+ | Prop | Type | Required | Default | Description |
272
+ | --- | --- | --- | --- | --- |
273
+ | renderHeader | `(ctx) => React.ReactNode` | No | - | Full custom header |
274
+ | renderFooter | `(ctx) => React.ReactNode` | No | - | Full custom footer |
275
+ | renderCancelButton | `(ctx) => React.ReactNode` | No | - | Custom cancel button |
276
+ | renderUploadButton | `(ctx) => React.ReactNode` | No | - | Custom upload button |
277
+
278
+ ## Props / Options (`openImageCropPicker(options)`)
279
+
280
+ Defaults shown below are the current native defaults.
281
+
282
+ ### Picker options
283
+
284
+ | Prop | Type | Required | Default | Description |
285
+ | --- | --- | --- | --- | --- |
286
+ | source | `'camera' \| 'gallery'` | Yes | - | Open camera or gallery |
287
+ | multiple | boolean | No | `false` | Pick multiple images (**planned**, not implemented yet) |
288
+ | maxFiles | number | No | - | Max items when `multiple: true` (**planned**) |
289
+ | mediaType | `'photo'` | No | `'photo'` | Media type (photos only) |
290
+
291
+ ### Crop options
292
+
293
+ | Prop | Type | Required | Default | Description |
294
+ | --- | --- | --- | --- | --- |
295
+ | cropWidth | number | No | `100` | Aspect ratio width (native crop) |
296
+ | cropHeight | number | No | `100` | Aspect ratio height (native crop) |
297
+ | aspectRatio | `{ width: number; height: number }` | No | - | Alternative to `cropWidth/cropHeight` |
298
+ | freeStyleCropEnabled | boolean | No | `false` | If `true`, user can resize the crop box (free-style) |
299
+ | circularCrop | boolean | No | `false` | Circular crop (iOS/Android) |
300
+ | rotationEnabled | boolean | No | `false` | Enables rotation controls when `showNativeCropControls: true` |
301
+ | cropGridEnabled | boolean | No | `false` | Show crop grid (iOS/Android) |
302
+ | cropOverlayColor | string | No | - | Alias for `dimmedLayerColor` |
303
+ | cropFrameColor | string | No | - | Android: crop frame color |
304
+ | cropGridColor | string | No | - | Android: crop grid color. iOS: used for **circular** grid overlay |
305
+ | compressQuality | number | No | `1` | 0..1 (output encoding quality) |
306
+ | compressFormat | `'jpeg' \| 'png' \| 'webp'` | No | `'jpeg'` | Output encoding format (iOS WebP is best-effort; falls back to JPEG if unavailable) |
307
+ | includeBase64 | boolean | No | `false` | If `true`, resolves base64 (slower) |
308
+
309
+ ### Native full-screen crop UI (header/footer/buttons)
310
+
311
+ | Prop | Type | Required | Default | Description |
312
+ | --- | --- | --- | --- | --- |
313
+ | preferNativeUI | boolean | No | `true` | Prefer native full-screen UI (current implementation uses native UI) |
314
+ | headerTitle | string | No | `Preview Image` | Native header title |
315
+ | headerHeight | number | No | `84` | Header height |
316
+ | headerPaddingHorizontal | number | No | `20` | Header padding |
317
+ | headerPaddingTop | number | No | `20` | Header padding |
318
+ | headerPaddingBottom | number | No | `20` | Header padding |
319
+ | controlsPlacement | `'bottom' \| 'top'` | No | `'bottom'` | Render actions in footer or header |
320
+ | topLeftControl | `'cancel' \| 'upload' \| 'none'` | No | `'cancel'` | Left header control when `controlsPlacement: 'top'` |
321
+ | topRightControl | `'cancel' \| 'upload' \| 'none'` | No | `'upload'` | Right header control when `controlsPlacement: 'top'` |
322
+ | cancelText | string | No | `Cancel` | Cancel label |
323
+ | uploadText | string | No | `Upload` | Upload label |
324
+ | footerPaddingHorizontal | number | No | `20` | Footer padding |
325
+ | footerPaddingTop | number | No | `16` | Footer padding |
326
+ | footerPaddingBottom | number | No | `24` | Footer padding |
327
+ | footerButtonGap | number | No | `12` | Gap between footer buttons |
328
+ | footerButtonHeight | number | No | `54` | Button height |
329
+ | footerButtonLayout | `'vertical' \| 'horizontal'` | No | `'vertical'` | Footer layout |
330
+ | footerButtonOrder | `'uploadFirst' \| 'cancelFirst'` | No | `'uploadFirst'` | Footer order |
331
+ | cancelButtonRadius | number | No | `28` | Cancel button radius |
332
+ | uploadButtonRadius | number | No | `28` | Upload button radius |
333
+
334
+ ### Button content + icons
335
+
336
+ | Prop | Type | Required | Default | Description |
337
+ | --- | --- | --- | --- | --- |
338
+ | uploadButtonContent | `'text' \| 'icon' \| 'iconText' \| 'textIcon' \| 'TextIcon' \| 'icon+text' \| 'text+icon'` | No | `'text'` | Upload content mode |
339
+ | cancelButtonContent | same as above | No | `'text'` | Cancel content mode |
340
+ | uploadButtonIconUri | `string \| ImageSourcePropType` | No | `''` | Icon URI (http/https/file/content) or bundled asset `require(...)` |
341
+ | cancelButtonIconUri | `string \| ImageSourcePropType` | No | `''` | Icon URI (http/https/file/content) or bundled asset `require(...)` |
342
+ | uploadButtonIconBase64 | string | No | `''` | Icon base64 (optionally `data:image/...;base64,`) |
343
+ | cancelButtonIconBase64 | string | No | `''` | Icon base64 |
344
+ | uploadButtonIconSize | number | No | `18` | Icon size |
345
+ | cancelButtonIconSize | number | No | `18` | Icon size |
346
+ | buttonIconGap | number | No | `8` | Gap between icon and text |
347
+ | uploadButtonIconTintColor | string | No | `''` | Tint (only applied if provided) |
348
+ | cancelButtonIconTintColor | string | No | `''` | Tint (only applied if provided) |
349
+ | buttonContentPaddingHorizontal | number | No | `12` | Internal button padding (both buttons) |
350
+ | buttonContentPaddingVertical | number | No | `0` | Internal button padding (both buttons) |
351
+ | uploadButtonContentPaddingHorizontal | number | No | - | Upload internal padding override |
352
+ | uploadButtonContentPaddingVertical | number | No | - | Upload internal padding override |
353
+ | cancelButtonContentPaddingHorizontal | number | No | - | Cancel internal padding override |
354
+ | cancelButtonContentPaddingVertical | number | No | - | Cancel internal padding override |
355
+
356
+ #### Using bundled images (`require(...)`)
357
+
358
+ `uploadButtonIconUri` / `cancelButtonIconUri` accept:
359
+
360
+ - a **string URI** (`https://`, `file://`, etc.)
361
+ - or a **bundled asset** via `require(...)` (recommended)
362
+
363
+ ```js
364
+ import { openImageCropPicker } from 'react-native-customizable-image-crop-picker';
365
+
366
+ await openImageCropPicker({
367
+ source: 'gallery',
368
+ uploadButtonContent: 'icon',
369
+ uploadButtonIconUri: require('./upload.jpg'),
370
+ });
371
+ ```
372
+
373
+ ### Theme / status bar / overlay
374
+
375
+ | Prop | Type | Required | Default | Description |
376
+ | --- | --- | --- | --- | --- |
377
+ | isDarkTheme | boolean | No | `false` | Native theme hint |
378
+ | statusBarColor | string | No | `#FFFFFF` (light), `#000000` (dark) | Status bar color |
379
+ | statusBarStyle | `'dark' \| 'light'` | No | - | Android only: status bar icon/text color |
380
+ | dimmedLayerColor | string | No | `#B3000000` (light), `#E0000000` (dark) | Dimmed overlay around crop box |
381
+ | showNativeCropControls | boolean | No | `false` | Show native crop controls (rotation/aspect ratio toolbar) |
382
+
383
+ #### `showNativeCropControls` + `controlsPlacement`
384
+
385
+ When `showNativeCropControls: true`, the native crop toolbar is visible.
386
+
387
+ - To avoid the footer covering the native toolbar, `showNativeCropControls` works **only with** `controlsPlacement: 'top'`.
388
+ - If you pass `controlsPlacement: 'bottom'`, the library will **auto-force it to `'top'`**.
389
+
390
+ ## Platform-specific props / behavior
391
+
392
+ - **Android only**
393
+ - **`drawUnderStatusBar`**: edge-to-edge header under the status bar.
394
+ - **`statusBarStyle`**: controls status bar icons/text (`'dark' | 'light'`).
395
+ - **`cropFrameColor`**: crop frame color.
396
+ - **`cropGridColor`**: crop grid line color (rectangle mode).
397
+ - **SVG button icons**: `uploadButtonIconUri` / `cancelButtonIconUri` support SVG on Android native UI.
398
+
399
+ - **iOS only**
400
+ - **`compressFormat: 'webp'`**: best-effort (falls back to JPEG if the encoder/type is unavailable).
401
+
402
+ - **Both (with small differences)**
403
+ - **`cropGridEnabled`**: rectangle uses native grid on iOS; circular uses a custom grid overlay.
404
+ - **`showNativeCropControls`**: requires header controls (`controlsPlacement: 'top'`), library auto-forces when enabled.
405
+
406
+ ### Style objects (partial support)
407
+
408
+ These are read from React Native styles and mapped into native values (subset only).
409
+
410
+ | Prop | Type | Required | Default | Description |
411
+ | --- | --- | --- | --- | --- |
412
+ | headerStyle | `{ containerStyle?, titleStyle? }` | No | - | Supports `containerStyle.backgroundColor`, `titleStyle.color/fontSize/fontFamily` |
413
+ | footerStyle | `{ containerStyle?, cancelButtonStyle?, uploadButtonStyle?, cancelTextStyle?, uploadTextStyle? }` | No | - | Supports background/border/textColor/fontSize/fontFamily/borderRadius subset |
414
+
415
+ ### JS-only props (ignored by `openImageCropPicker()`)
416
+
417
+ These exist in exported types to support the `ImageCropPickerModal` component. They are currently **not used** by the native `openImageCropPicker()` flow (or its alias `open()`).
418
+
419
+ | Prop | Type | Required | Default | Description |
420
+ | --- | --- | --- | --- | --- |
421
+ | showHeader | boolean | No | - | `ImageCropPickerModal` only |
422
+ | headerAlignment | `'left' \| 'center' \| 'right'` | No | - | `ImageCropPickerModal` only |
423
+ | leftIcon | `React.ReactNode` | No | - | `ImageCropPickerModal` only |
424
+ | rightIcon | `React.ReactNode` | No | - | `ImageCropPickerModal` only |
425
+ | showLeftIcon | boolean | No | - | `ImageCropPickerModal` only |
426
+ | showRightIcon | boolean | No | - | `ImageCropPickerModal` only |
427
+ | showFooter | boolean | No | - | `ImageCropPickerModal` only |
428
+ | cancelIcon | `React.ReactNode` | No | - | `ImageCropPickerModal` only |
429
+ | uploadIcon | `React.ReactNode` | No | - | `ImageCropPickerModal` only |
430
+ | overlayStyle | `CropperOverlayStyle` | No | - | `ImageCropPickerModal` only |
431
+ | backgroundColor | string | No | - | `ImageCropPickerModal` only |
432
+ | safeAreaEnabled | boolean | No | - | `ImageCropPickerModal` only |
433
+
434
+ ## Response Object
435
+
436
+ | Property | Type | Description |
437
+ | --- | --- | --- |
438
+ | path | string | Cropped image URI/path |
439
+ | width | number | Image width (if available) |
440
+ | height | number | Image height (if available) |
441
+ | mime | string | MIME type (if available) |
442
+ | size | number | Size in bytes (if available) |
443
+ | exif | object | EXIF metadata (if available) |
444
+ | base64 | string | Only when `includeBase64: true` |
445
+
446
+ ## Errors
447
+
448
+ The library throws `CropPickerError` with a `code`:
449
+
450
+ - `E_PICKER_CANCELLED`
451
+ - `E_PERMISSION_MISSING`
452
+ - `E_NO_IMAGE_DATA_FOUND`
453
+ - `E_NO_APP_AVAILABLE`
454
+ - `E_PICKER_ERROR`
455
+ - `E_ACTIVITY_DOES_NOT_EXIST`
456
+ - `E_MODULE_DESTROYED`
457
+ - `E_UNAVAILABLE`
458
+ - `E_INVALID_OPTIONS`
459
+
460
+ ## Known limitations
461
+
462
+ - Multiple selection options exist in types but **native multiple picking is not implemented yet**.
463
+ - iOS grid/frame color customization is limited (rectangle grid uses the native overlay; circular grid uses a custom overlay).
464
+
465
+ ## Peer Dependencies
466
+
467
+ | Package | Version |
468
+ | --- | --- |
469
+ | react | `>=18` |
470
+ | react-native | `>=0.72` |
471
+
472
+ ## Contributing
473
+
474
+ Contributions are welcome. Please open an issue with reproduction details or submit a PR with a clear description + test plan.
475
+
476
+ ## License
477
+
478
+ MIT
479
+
@@ -0,0 +1,26 @@
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 = "RNCustomizableImageCropPicker"
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = package["homepage"]
10
+ s.license = package["license"]
11
+ s.authors = { "Your Name" => "you@example.com" }
12
+ s.platforms = { :ios => "12.4" }
13
+ s.source = { :git => package["repository"]["url"], :tag => "v#{s.version}" }
14
+
15
+ s.source_files = "ios/**/*.{h,m,mm,swift}"
16
+ s.requires_arc = true
17
+
18
+ s.dependency "React-Core"
19
+ s.dependency "TOCropViewController"
20
+
21
+ s.pod_target_xcconfig = {
22
+ "DEFINES_MODULE" => "YES",
23
+ "SWIFT_VERSION" => "5.0"
24
+ }
25
+ end
26
+
File without changes
@@ -0,0 +1,2 @@
1
+ #Thu Feb 19 22:07:46 IST 2026
2
+ gradle.version=8.9
File without changes
@@ -0,0 +1 @@
1
+ o/bundleLibRuntimeToDirDebug
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Automatically generated file. DO NOT MODIFY
3
+ */
4
+ package com.rncustomizableimagecroppicker;
5
+
6
+ public final class BuildConfig {
7
+ public static final boolean DEBUG = Boolean.parseBoolean("true");
8
+ public static final String LIBRARY_PACKAGE_NAME = "com.rncustomizableimagecroppicker";
9
+ public static final String BUILD_TYPE = "debug";
10
+ }
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.rncustomizableimagecroppicker" >
4
+
5
+ <uses-sdk android:minSdkVersion="24" />
6
+
7
+ <uses-permission android:name="android.permission.CAMERA" />
8
+
9
+ <application>
10
+ <activity
11
+ android:name="com.rncustomizableimagecroppicker.NativeImageCropperActivity"
12
+ android:exported="false"
13
+ android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
14
+
15
+ <provider
16
+ android:name="com.rncustomizableimagecroppicker.NativeImagePickerFileProvider"
17
+ android:authorities="dollar_openBracket_applicationId_closeBracket.nativeimagepicker.provider"
18
+ android:exported="false"
19
+ android:grantUriPermissions="true" >
20
+ <meta-data
21
+ android:name="android.support.FILE_PROVIDER_PATHS"
22
+ android:resource="@xml/nativeimagepicker_file_paths" />
23
+ </provider>
24
+ </application>
25
+
26
+ </manifest>
@@ -0,0 +1,18 @@
1
+ {
2
+ "version": 3,
3
+ "artifactType": {
4
+ "type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
5
+ "kind": "Directory"
6
+ },
7
+ "applicationId": "com.rncustomizableimagecroppicker",
8
+ "variantName": "debug",
9
+ "elements": [
10
+ {
11
+ "type": "SINGLE",
12
+ "filters": [],
13
+ "attributes": [],
14
+ "outputFile": "AndroidManifest.xml"
15
+ }
16
+ ],
17
+ "elementType": "File"
18
+ }
@@ -0,0 +1,6 @@
1
+ aarFormatVersion=1.0
2
+ aarMetadataVersion=1.0
3
+ minCompileSdk=1
4
+ minCompileSdkExtension=0
5
+ minAndroidGradlePluginVersion=1.0.0
6
+ coreLibraryDesugaringEnabled=false