react-native-ensys-camera-x 1.0.7

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 (506) hide show
  1. package/CustomCamera.podspec +20 -0
  2. package/LICENSE +20 -0
  3. package/README.md +833 -0
  4. package/android/build.gradle +135 -0
  5. package/android/consumer-rules.pro +47 -0
  6. package/android/src/main/AndroidManifest.xml +72 -0
  7. package/android/src/main/java/android/print/PdfPrint.java +51 -0
  8. package/android/src/main/java/com/customcamera/AnimatedImageViewManager.kt +199 -0
  9. package/android/src/main/java/com/customcamera/AudioPlayerView.kt +322 -0
  10. package/android/src/main/java/com/customcamera/AudioRecorder.kt +506 -0
  11. package/android/src/main/java/com/customcamera/BarcodeScannerActivity.kt +361 -0
  12. package/android/src/main/java/com/customcamera/BlurBackgroundView.kt +199 -0
  13. package/android/src/main/java/com/customcamera/CacheCleanupManager.kt +386 -0
  14. package/android/src/main/java/com/customcamera/CameraAspectRatioMode.kt +77 -0
  15. package/android/src/main/java/com/customcamera/CameraAsset.kt +211 -0
  16. package/android/src/main/java/com/customcamera/CameraTheme.kt +479 -0
  17. package/android/src/main/java/com/customcamera/CompressionCacheStore.kt +504 -0
  18. package/android/src/main/java/com/customcamera/CompressionFileNameUtils.kt +7 -0
  19. package/android/src/main/java/com/customcamera/CompressionProfile.kt +195 -0
  20. package/android/src/main/java/com/customcamera/CustomCameraActivity.kt +7291 -0
  21. package/android/src/main/java/com/customcamera/CustomCameraFileProvider.kt +9 -0
  22. package/android/src/main/java/com/customcamera/CustomCameraModule.kt +2479 -0
  23. package/android/src/main/java/com/customcamera/CustomCameraPackage.kt +53 -0
  24. package/android/src/main/java/com/customcamera/DisplayUtils.kt +9 -0
  25. package/android/src/main/java/com/customcamera/DocumentPreviewView.kt +846 -0
  26. package/android/src/main/java/com/customcamera/DrawingView.kt +214 -0
  27. package/android/src/main/java/com/customcamera/EmojiPickerData.kt +228 -0
  28. package/android/src/main/java/com/customcamera/FilterStripAdapter.kt +158 -0
  29. package/android/src/main/java/com/customcamera/GifSupport.kt +215 -0
  30. package/android/src/main/java/com/customcamera/GlobalAudioPlayer.kt +320 -0
  31. package/android/src/main/java/com/customcamera/ImageExporter.kt +1394 -0
  32. package/android/src/main/java/com/customcamera/ImageFormatSupport.kt +163 -0
  33. package/android/src/main/java/com/customcamera/Localization.kt +206 -0
  34. package/android/src/main/java/com/customcamera/MediaAdapters.kt +758 -0
  35. package/android/src/main/java/com/customcamera/MediaCacheManager.kt +782 -0
  36. package/android/src/main/java/com/customcamera/MediaExportFormats.kt +201 -0
  37. package/android/src/main/java/com/customcamera/MediaFileIo.kt +310 -0
  38. package/android/src/main/java/com/customcamera/MediaMetadataStore.kt +494 -0
  39. package/android/src/main/java/com/customcamera/MediaPreviewEditor.kt +14865 -0
  40. package/android/src/main/java/com/customcamera/MediaPublisher.kt +423 -0
  41. package/android/src/main/java/com/customcamera/MediaStorageWorkflow.kt +722 -0
  42. package/android/src/main/java/com/customcamera/MediaStoreRepository.kt +378 -0
  43. package/android/src/main/java/com/customcamera/MediaThumbnailView.kt +286 -0
  44. package/android/src/main/java/com/customcamera/MediaUtils.kt +37 -0
  45. package/android/src/main/java/com/customcamera/NativeVideoViewManager.kt +845 -0
  46. package/android/src/main/java/com/customcamera/OfficeDocumentConverter.kt +2791 -0
  47. package/android/src/main/java/com/customcamera/PendingCaptureCrops.kt +88 -0
  48. package/android/src/main/java/com/customcamera/PowerPointPreview.kt +4077 -0
  49. package/android/src/main/java/com/customcamera/RecentPickerStore.kt +74 -0
  50. package/android/src/main/java/com/customcamera/SecureFileEraser.kt +411 -0
  51. package/android/src/main/java/com/customcamera/SecureKeyModule.kt +88 -0
  52. package/android/src/main/java/com/customcamera/SecureMediaDeleter.kt +493 -0
  53. package/android/src/main/java/com/customcamera/StickerPickerData.kt +107 -0
  54. package/android/src/main/java/com/customcamera/SvgDrawable.kt +175 -0
  55. package/android/src/main/java/com/customcamera/SvgIconViewManager.kt +77 -0
  56. package/android/src/main/java/com/customcamera/TextEntryController.kt +553 -0
  57. package/android/src/main/java/com/customcamera/ThumbnailLoader.kt +455 -0
  58. package/android/src/main/java/com/customcamera/UploadService.kt +909 -0
  59. package/android/src/main/java/com/customcamera/VideoEditUtils.kt +210 -0
  60. package/android/src/main/java/com/customcamera/VideoRotationTranscoder.kt +1992 -0
  61. package/android/src/main/java/com/customcamera/gif/AnimatedGifEncoder.kt +473 -0
  62. package/android/src/main/java/com/customcamera/gif/GifDecoder.kt +690 -0
  63. package/android/src/main/java/com/customcamera/gif/GifFramesDrawable.kt +160 -0
  64. package/android/src/main/java/com/customcamera/gif/GifHttp.kt +112 -0
  65. package/android/src/main/java/com/customcamera/gif/GifImageLoader.kt +186 -0
  66. package/android/src/main/java/com/customcamera/gif/GifModels.kt +74 -0
  67. package/android/src/main/java/com/customcamera/gif/GifProvider.kt +49 -0
  68. package/android/src/main/java/com/customcamera/gif/GifProviders.kt +27 -0
  69. package/android/src/main/java/com/customcamera/gif/GifRepository.kt +124 -0
  70. package/android/src/main/java/com/customcamera/gif/GifSafety.kt +33 -0
  71. package/android/src/main/java/com/customcamera/gif/GiphyGifProvider.kt +146 -0
  72. package/android/src/main/java/com/customcamera/gif/LZWEncoder.kt +258 -0
  73. package/android/src/main/java/com/customcamera/gif/NeuQuant.kt +435 -0
  74. package/android/src/main/java/com/customcamera/gif/TenorGifProvider.kt +147 -0
  75. package/android/src/main/res/drawable/bg_brush_selected.xml +5 -0
  76. package/android/src/main/res/drawable/bg_color_swatch.xml +5 -0
  77. package/android/src/main/res/drawable/bg_editor_toolbar.xml +6 -0
  78. package/android/src/main/res/drawable/bg_icon_circle.xml +5 -0
  79. package/android/src/main/res/drawable/bg_icon_circle_light.xml +5 -0
  80. package/android/src/main/res/drawable/bg_mode_tab_active.xml +6 -0
  81. package/android/src/main/res/drawable/bg_pill.xml +6 -0
  82. package/android/src/main/res/drawable/bg_recording_dot.xml +6 -0
  83. package/android/src/main/res/drawable/bg_selection_badge.xml +8 -0
  84. package/android/src/main/res/drawable/bg_send_button.xml +5 -0
  85. package/android/src/main/res/drawable/bg_shutter_inner.xml +5 -0
  86. package/android/src/main/res/drawable/bg_shutter_recording.xml +6 -0
  87. package/android/src/main/res/drawable/bg_shutter_ring.xml +8 -0
  88. package/android/src/main/res/drawable/bg_shutter_video_idle.xml +5 -0
  89. package/android/src/main/res/drawable/bg_thumbnail.xml +9 -0
  90. package/android/src/main/res/drawable/ic_aspect_ratio.xml +17 -0
  91. package/android/src/main/res/drawable/ic_audio.xml +10 -0
  92. package/android/src/main/res/drawable/ic_back.xml +10 -0
  93. package/android/src/main/res/drawable/ic_brush_medium.xml +12 -0
  94. package/android/src/main/res/drawable/ic_brush_thick.xml +12 -0
  95. package/android/src/main/res/drawable/ic_brush_thin.xml +12 -0
  96. package/android/src/main/res/drawable/ic_check.xml +17 -0
  97. package/android/src/main/res/drawable/ic_chevron_down.xml +10 -0
  98. package/android/src/main/res/drawable/ic_chevron_up.xml +13 -0
  99. package/android/src/main/res/drawable/ic_clear_drawing.xml +10 -0
  100. package/android/src/main/res/drawable/ic_close.xml +10 -0
  101. package/android/src/main/res/drawable/ic_cover.xml +9 -0
  102. package/android/src/main/res/drawable/ic_crop.xml +10 -0
  103. package/android/src/main/res/drawable/ic_delete.xml +9 -0
  104. package/android/src/main/res/drawable/ic_document.xml +10 -0
  105. package/android/src/main/res/drawable/ic_done.xml +10 -0
  106. package/android/src/main/res/drawable/ic_download.xml +10 -0
  107. package/android/src/main/res/drawable/ic_emoji.xml +10 -0
  108. package/android/src/main/res/drawable/ic_filter.xml +10 -0
  109. package/android/src/main/res/drawable/ic_flash_auto.xml +7 -0
  110. package/android/src/main/res/drawable/ic_flash_off.xml +23 -0
  111. package/android/src/main/res/drawable/ic_flash_on.xml +16 -0
  112. package/android/src/main/res/drawable/ic_flip.xml +15 -0
  113. package/android/src/main/res/drawable/ic_gallery.xml +10 -0
  114. package/android/src/main/res/drawable/ic_gif.xml +24 -0
  115. package/android/src/main/res/drawable/ic_lock.xml +19 -0
  116. package/android/src/main/res/drawable/ic_lock_open.xml +22 -0
  117. package/android/src/main/res/drawable/ic_marker.xml +10 -0
  118. package/android/src/main/res/drawable/ic_more_vert.xml +18 -0
  119. package/android/src/main/res/drawable/ic_overlay_close.xml +19 -0
  120. package/android/src/main/res/drawable/ic_overlay_resize.xml +18 -0
  121. package/android/src/main/res/drawable/ic_pause.xml +10 -0
  122. package/android/src/main/res/drawable/ic_photo_mode.xml +10 -0
  123. package/android/src/main/res/drawable/ic_play.xml +10 -0
  124. package/android/src/main/res/drawable/ic_redo.xml +10 -0
  125. package/android/src/main/res/drawable/ic_rotate.xml +9 -0
  126. package/android/src/main/res/drawable/ic_send.xml +10 -0
  127. package/android/src/main/res/drawable/ic_share.xml +10 -0
  128. package/android/src/main/res/drawable/ic_stat_upload.xml +10 -0
  129. package/android/src/main/res/drawable/ic_sticker.xml +24 -0
  130. package/android/src/main/res/drawable/ic_text.xml +10 -0
  131. package/android/src/main/res/drawable/ic_text_align_center.xml +11 -0
  132. package/android/src/main/res/drawable/ic_text_align_left.xml +11 -0
  133. package/android/src/main/res/drawable/ic_text_align_right.xml +11 -0
  134. package/android/src/main/res/drawable/ic_text_bg.xml +11 -0
  135. package/android/src/main/res/drawable/ic_trim.xml +23 -0
  136. package/android/src/main/res/drawable/ic_undo.xml +10 -0
  137. package/android/src/main/res/drawable/ic_video_mode.xml +10 -0
  138. package/android/src/main/res/drawable/ic_video_note.xml +13 -0
  139. package/android/src/main/res/drawable/ic_volume_off.xml +9 -0
  140. package/android/src/main/res/drawable/ic_volume_on.xml +9 -0
  141. package/android/src/main/res/drawable/sticker_heart.xml +9 -0
  142. package/android/src/main/res/drawable/sticker_smile.xml +9 -0
  143. package/android/src/main/res/drawable/sticker_star.xml +9 -0
  144. package/android/src/main/res/drawable/sticker_thumbsup.xml +9 -0
  145. package/android/src/main/res/values/colors.xml +34 -0
  146. package/android/src/main/res/values/ids.xml +15 -0
  147. package/android/src/main/res/values/strings.xml +15 -0
  148. package/android/src/main/res/values/styles.xml +20 -0
  149. package/android/src/main/res/xml/file_paths.xml +34 -0
  150. package/ios/CustomCamera.h +5 -0
  151. package/ios/CustomCamera.mm +214 -0
  152. package/lib/module/AudioPlayerContext.js +233 -0
  153. package/lib/module/AudioPlayerContext.js.map +1 -0
  154. package/lib/module/CameraPreview.js +304 -0
  155. package/lib/module/CameraPreview.js.map +1 -0
  156. package/lib/module/NativeAnimatedImageView.js +41 -0
  157. package/lib/module/NativeAnimatedImageView.js.map +1 -0
  158. package/lib/module/NativeAudioPlayerView.js +33 -0
  159. package/lib/module/NativeAudioPlayerView.js.map +1 -0
  160. package/lib/module/NativeBlurView.js +35 -0
  161. package/lib/module/NativeBlurView.js.map +1 -0
  162. package/lib/module/NativeCustomCamera.js +128 -0
  163. package/lib/module/NativeCustomCamera.js.map +1 -0
  164. package/lib/module/NativeCustomCamera.web.js +143 -0
  165. package/lib/module/NativeCustomCamera.web.js.map +1 -0
  166. package/lib/module/NativeCustomVideoView.js +5 -0
  167. package/lib/module/NativeCustomVideoView.js.map +1 -0
  168. package/lib/module/NativeDocumentPreviewView.js +156 -0
  169. package/lib/module/NativeDocumentPreviewView.js.map +1 -0
  170. package/lib/module/NativeMediaThumbnailView.js +110 -0
  171. package/lib/module/NativeMediaThumbnailView.js.map +1 -0
  172. package/lib/module/NativeSvgIcon.js +32 -0
  173. package/lib/module/NativeSvgIcon.js.map +1 -0
  174. package/lib/module/ResponsivePreviewContainer.js +171 -0
  175. package/lib/module/ResponsivePreviewContainer.js.map +1 -0
  176. package/lib/module/accessibility.js +61 -0
  177. package/lib/module/accessibility.js.map +1 -0
  178. package/lib/module/config.js +352 -0
  179. package/lib/module/config.js.map +1 -0
  180. package/lib/module/cpuOptimization.js +296 -0
  181. package/lib/module/cpuOptimization.js.map +1 -0
  182. package/lib/module/db/DatabaseManager.js +191 -0
  183. package/lib/module/db/DatabaseManager.js.map +1 -0
  184. package/lib/module/db/MediaMapper.js +284 -0
  185. package/lib/module/db/MediaMapper.js.map +1 -0
  186. package/lib/module/db/MediaRepository.js +242 -0
  187. package/lib/module/db/MediaRepository.js.map +1 -0
  188. package/lib/module/db/index.js +41 -0
  189. package/lib/module/db/index.js.map +1 -0
  190. package/lib/module/db/migrations.js +180 -0
  191. package/lib/module/db/migrations.js.map +1 -0
  192. package/lib/module/db/react-native-sqlcipher.d.js +2 -0
  193. package/lib/module/db/react-native-sqlcipher.d.js.map +1 -0
  194. package/lib/module/db/secureKey.js +87 -0
  195. package/lib/module/db/secureKey.js.map +1 -0
  196. package/lib/module/db/types.js +57 -0
  197. package/lib/module/db/types.js.map +1 -0
  198. package/lib/module/db/useMediaDatabase.js +123 -0
  199. package/lib/module/db/useMediaDatabase.js.map +1 -0
  200. package/lib/module/defaultIcons.js +2259 -0
  201. package/lib/module/defaultIcons.js.map +1 -0
  202. package/lib/module/deviceCapabilities.js +408 -0
  203. package/lib/module/deviceCapabilities.js.map +1 -0
  204. package/lib/module/errors.js +267 -0
  205. package/lib/module/errors.js.map +1 -0
  206. package/lib/module/iconConfig.js +796 -0
  207. package/lib/module/iconConfig.js.map +1 -0
  208. package/lib/module/icons.js +514 -0
  209. package/lib/module/icons.js.map +1 -0
  210. package/lib/module/index.js +251 -0
  211. package/lib/module/index.js.map +1 -0
  212. package/lib/module/jest-globals.d.js +2 -0
  213. package/lib/module/jest-globals.d.js.map +1 -0
  214. package/lib/module/library/MediaLibrary.js +107 -0
  215. package/lib/module/library/MediaLibrary.js.map +1 -0
  216. package/lib/module/library/MediaLibraryScreen.js +2597 -0
  217. package/lib/module/library/MediaLibraryScreen.js.map +1 -0
  218. package/lib/module/library/components/AudioPreview.js +74 -0
  219. package/lib/module/library/components/AudioPreview.js.map +1 -0
  220. package/lib/module/library/components/DocumentPreview.js +331 -0
  221. package/lib/module/library/components/DocumentPreview.js.map +1 -0
  222. package/lib/module/library/components/ExpandableFab.js +343 -0
  223. package/lib/module/library/components/ExpandableFab.js.map +1 -0
  224. package/lib/module/library/components/FileTiles.js +251 -0
  225. package/lib/module/library/components/FileTiles.js.map +1 -0
  226. package/lib/module/library/components/ImagePreview.js +70 -0
  227. package/lib/module/library/components/ImagePreview.js.map +1 -0
  228. package/lib/module/library/components/MediaMetadataHeader.js +175 -0
  229. package/lib/module/library/components/MediaMetadataHeader.js.map +1 -0
  230. package/lib/module/library/components/RecordAudioScreen.js +816 -0
  231. package/lib/module/library/components/RecordAudioScreen.js.map +1 -0
  232. package/lib/module/library/components/VideoPreview.js +453 -0
  233. package/lib/module/library/components/VideoPreview.js.map +1 -0
  234. package/lib/module/library/components/ViewerCounter.js +55 -0
  235. package/lib/module/library/components/ViewerCounter.js.map +1 -0
  236. package/lib/module/library/compressionEstimate.js +507 -0
  237. package/lib/module/library/compressionEstimate.js.map +1 -0
  238. package/lib/module/library/fileMetadata.js +196 -0
  239. package/lib/module/library/fileMetadata.js.map +1 -0
  240. package/lib/module/library/index.js +42 -0
  241. package/lib/module/library/index.js.map +1 -0
  242. package/lib/module/library/libraryIconRegistry.js +69 -0
  243. package/lib/module/library/libraryIconRegistry.js.map +1 -0
  244. package/lib/module/library/libraryIcons.js +858 -0
  245. package/lib/module/library/libraryIcons.js.map +1 -0
  246. package/lib/module/library/localizedFormat.js +181 -0
  247. package/lib/module/library/localizedFormat.js.map +1 -0
  248. package/lib/module/library/palette.js +225 -0
  249. package/lib/module/library/palette.js.map +1 -0
  250. package/lib/module/library/responsive.js +53 -0
  251. package/lib/module/library/responsive.js.map +1 -0
  252. package/lib/module/locales.js +416 -0
  253. package/lib/module/locales.js.map +1 -0
  254. package/lib/module/localization.js +1064 -0
  255. package/lib/module/localization.js.map +1 -0
  256. package/lib/module/logger.js +20 -0
  257. package/lib/module/logger.js.map +1 -0
  258. package/lib/module/lowMemoryCache.js +206 -0
  259. package/lib/module/lowMemoryCache.js.map +1 -0
  260. package/lib/module/mediaHistory.js +33 -0
  261. package/lib/module/mediaHistory.js.map +1 -0
  262. package/lib/module/mediaStorageService.js +402 -0
  263. package/lib/module/mediaStorageService.js.map +1 -0
  264. package/lib/module/memory.js +79 -0
  265. package/lib/module/memory.js.map +1 -0
  266. package/lib/module/nativeActions.js +307 -0
  267. package/lib/module/nativeActions.js.map +1 -0
  268. package/lib/module/nativeComponentSupport.js +61 -0
  269. package/lib/module/nativeComponentSupport.js.map +1 -0
  270. package/lib/module/networkPerformance.js +24 -0
  271. package/lib/module/networkPerformance.js.map +1 -0
  272. package/lib/module/package.json +1 -0
  273. package/lib/module/performance.js +104 -0
  274. package/lib/module/performance.js.map +1 -0
  275. package/lib/module/performanceMonitor.js +155 -0
  276. package/lib/module/performanceMonitor.js.map +1 -0
  277. package/lib/module/permissions.js +370 -0
  278. package/lib/module/permissions.js.map +1 -0
  279. package/lib/module/rendering.js +40 -0
  280. package/lib/module/rendering.js.map +1 -0
  281. package/lib/module/security.js +18 -0
  282. package/lib/module/security.js.map +1 -0
  283. package/lib/module/state.js +266 -0
  284. package/lib/module/state.js.map +1 -0
  285. package/lib/module/storage.js +400 -0
  286. package/lib/module/storage.js.map +1 -0
  287. package/lib/module/theme.js +390 -0
  288. package/lib/module/theme.js.map +1 -0
  289. package/lib/module/types.js +4 -0
  290. package/lib/module/types.js.map +1 -0
  291. package/lib/module/utils.js +115 -0
  292. package/lib/module/utils.js.map +1 -0
  293. package/lib/module/validation.js +288 -0
  294. package/lib/module/validation.js.map +1 -0
  295. package/lib/typescript/package.json +1 -0
  296. package/lib/typescript/src/AudioPlayerContext.d.ts +27 -0
  297. package/lib/typescript/src/AudioPlayerContext.d.ts.map +1 -0
  298. package/lib/typescript/src/CameraPreview.d.ts +13 -0
  299. package/lib/typescript/src/CameraPreview.d.ts.map +1 -0
  300. package/lib/typescript/src/NativeAnimatedImageView.d.ts +33 -0
  301. package/lib/typescript/src/NativeAnimatedImageView.d.ts.map +1 -0
  302. package/lib/typescript/src/NativeAudioPlayerView.d.ts +12 -0
  303. package/lib/typescript/src/NativeAudioPlayerView.d.ts.map +1 -0
  304. package/lib/typescript/src/NativeBlurView.d.ts +12 -0
  305. package/lib/typescript/src/NativeBlurView.d.ts.map +1 -0
  306. package/lib/typescript/src/NativeCustomCamera.d.ts +167 -0
  307. package/lib/typescript/src/NativeCustomCamera.d.ts.map +1 -0
  308. package/lib/typescript/src/NativeCustomCamera.web.d.ts +47 -0
  309. package/lib/typescript/src/NativeCustomCamera.web.d.ts.map +1 -0
  310. package/lib/typescript/src/NativeCustomVideoView.d.ts +30 -0
  311. package/lib/typescript/src/NativeCustomVideoView.d.ts.map +1 -0
  312. package/lib/typescript/src/NativeDocumentPreviewView.d.ts +48 -0
  313. package/lib/typescript/src/NativeDocumentPreviewView.d.ts.map +1 -0
  314. package/lib/typescript/src/NativeMediaThumbnailView.d.ts +54 -0
  315. package/lib/typescript/src/NativeMediaThumbnailView.d.ts.map +1 -0
  316. package/lib/typescript/src/NativeSvgIcon.d.ts +25 -0
  317. package/lib/typescript/src/NativeSvgIcon.d.ts.map +1 -0
  318. package/lib/typescript/src/ResponsivePreviewContainer.d.ts +92 -0
  319. package/lib/typescript/src/ResponsivePreviewContainer.d.ts.map +1 -0
  320. package/lib/typescript/src/accessibility.d.ts +20 -0
  321. package/lib/typescript/src/accessibility.d.ts.map +1 -0
  322. package/lib/typescript/src/config.d.ts +145 -0
  323. package/lib/typescript/src/config.d.ts.map +1 -0
  324. package/lib/typescript/src/cpuOptimization.d.ts +63 -0
  325. package/lib/typescript/src/cpuOptimization.d.ts.map +1 -0
  326. package/lib/typescript/src/db/DatabaseManager.d.ts +48 -0
  327. package/lib/typescript/src/db/DatabaseManager.d.ts.map +1 -0
  328. package/lib/typescript/src/db/MediaMapper.d.ts +77 -0
  329. package/lib/typescript/src/db/MediaMapper.d.ts.map +1 -0
  330. package/lib/typescript/src/db/MediaRepository.d.ts +66 -0
  331. package/lib/typescript/src/db/MediaRepository.d.ts.map +1 -0
  332. package/lib/typescript/src/db/index.d.ts +23 -0
  333. package/lib/typescript/src/db/index.d.ts.map +1 -0
  334. package/lib/typescript/src/db/migrations.d.ts +31 -0
  335. package/lib/typescript/src/db/migrations.d.ts.map +1 -0
  336. package/lib/typescript/src/db/secureKey.d.ts +10 -0
  337. package/lib/typescript/src/db/secureKey.d.ts.map +1 -0
  338. package/lib/typescript/src/db/types.d.ts +115 -0
  339. package/lib/typescript/src/db/types.d.ts.map +1 -0
  340. package/lib/typescript/src/db/useMediaDatabase.d.ts +41 -0
  341. package/lib/typescript/src/db/useMediaDatabase.d.ts.map +1 -0
  342. package/lib/typescript/src/defaultIcons.d.ts +139 -0
  343. package/lib/typescript/src/defaultIcons.d.ts.map +1 -0
  344. package/lib/typescript/src/deviceCapabilities.d.ts +92 -0
  345. package/lib/typescript/src/deviceCapabilities.d.ts.map +1 -0
  346. package/lib/typescript/src/errors.d.ts +95 -0
  347. package/lib/typescript/src/errors.d.ts.map +1 -0
  348. package/lib/typescript/src/iconConfig.d.ts +176 -0
  349. package/lib/typescript/src/iconConfig.d.ts.map +1 -0
  350. package/lib/typescript/src/icons.d.ts +217 -0
  351. package/lib/typescript/src/icons.d.ts.map +1 -0
  352. package/lib/typescript/src/index.d.ts +104 -0
  353. package/lib/typescript/src/index.d.ts.map +1 -0
  354. package/lib/typescript/src/library/MediaLibrary.d.ts +57 -0
  355. package/lib/typescript/src/library/MediaLibrary.d.ts.map +1 -0
  356. package/lib/typescript/src/library/MediaLibraryScreen.d.ts +51 -0
  357. package/lib/typescript/src/library/MediaLibraryScreen.d.ts.map +1 -0
  358. package/lib/typescript/src/library/components/AudioPreview.d.ts +6 -0
  359. package/lib/typescript/src/library/components/AudioPreview.d.ts.map +1 -0
  360. package/lib/typescript/src/library/components/DocumentPreview.d.ts +10 -0
  361. package/lib/typescript/src/library/components/DocumentPreview.d.ts.map +1 -0
  362. package/lib/typescript/src/library/components/ExpandableFab.d.ts +39 -0
  363. package/lib/typescript/src/library/components/ExpandableFab.d.ts.map +1 -0
  364. package/lib/typescript/src/library/components/FileTiles.d.ts +8 -0
  365. package/lib/typescript/src/library/components/FileTiles.d.ts.map +1 -0
  366. package/lib/typescript/src/library/components/ImagePreview.d.ts +5 -0
  367. package/lib/typescript/src/library/components/ImagePreview.d.ts.map +1 -0
  368. package/lib/typescript/src/library/components/MediaMetadataHeader.d.ts +16 -0
  369. package/lib/typescript/src/library/components/MediaMetadataHeader.d.ts.map +1 -0
  370. package/lib/typescript/src/library/components/RecordAudioScreen.d.ts +8 -0
  371. package/lib/typescript/src/library/components/RecordAudioScreen.d.ts.map +1 -0
  372. package/lib/typescript/src/library/components/VideoPreview.d.ts +20 -0
  373. package/lib/typescript/src/library/components/VideoPreview.d.ts.map +1 -0
  374. package/lib/typescript/src/library/components/ViewerCounter.d.ts +13 -0
  375. package/lib/typescript/src/library/components/ViewerCounter.d.ts.map +1 -0
  376. package/lib/typescript/src/library/compressionEstimate.d.ts +313 -0
  377. package/lib/typescript/src/library/compressionEstimate.d.ts.map +1 -0
  378. package/lib/typescript/src/library/fileMetadata.d.ts +33 -0
  379. package/lib/typescript/src/library/fileMetadata.d.ts.map +1 -0
  380. package/lib/typescript/src/library/index.d.ts +40 -0
  381. package/lib/typescript/src/library/index.d.ts.map +1 -0
  382. package/lib/typescript/src/library/libraryIconRegistry.d.ts +35 -0
  383. package/lib/typescript/src/library/libraryIconRegistry.d.ts.map +1 -0
  384. package/lib/typescript/src/library/libraryIcons.d.ts +85 -0
  385. package/lib/typescript/src/library/libraryIcons.d.ts.map +1 -0
  386. package/lib/typescript/src/library/localizedFormat.d.ts +49 -0
  387. package/lib/typescript/src/library/localizedFormat.d.ts.map +1 -0
  388. package/lib/typescript/src/library/palette.d.ts +104 -0
  389. package/lib/typescript/src/library/palette.d.ts.map +1 -0
  390. package/lib/typescript/src/library/responsive.d.ts +15 -0
  391. package/lib/typescript/src/library/responsive.d.ts.map +1 -0
  392. package/lib/typescript/src/locales.d.ts +103 -0
  393. package/lib/typescript/src/locales.d.ts.map +1 -0
  394. package/lib/typescript/src/localization.d.ts +1051 -0
  395. package/lib/typescript/src/localization.d.ts.map +1 -0
  396. package/lib/typescript/src/logger.d.ts +4 -0
  397. package/lib/typescript/src/logger.d.ts.map +1 -0
  398. package/lib/typescript/src/lowMemoryCache.d.ts +64 -0
  399. package/lib/typescript/src/lowMemoryCache.d.ts.map +1 -0
  400. package/lib/typescript/src/mediaHistory.d.ts +3 -0
  401. package/lib/typescript/src/mediaHistory.d.ts.map +1 -0
  402. package/lib/typescript/src/mediaStorageService.d.ts +155 -0
  403. package/lib/typescript/src/mediaStorageService.d.ts.map +1 -0
  404. package/lib/typescript/src/memory.d.ts +21 -0
  405. package/lib/typescript/src/memory.d.ts.map +1 -0
  406. package/lib/typescript/src/nativeActions.d.ts +174 -0
  407. package/lib/typescript/src/nativeActions.d.ts.map +1 -0
  408. package/lib/typescript/src/nativeComponentSupport.d.ts +30 -0
  409. package/lib/typescript/src/nativeComponentSupport.d.ts.map +1 -0
  410. package/lib/typescript/src/networkPerformance.d.ts +12 -0
  411. package/lib/typescript/src/networkPerformance.d.ts.map +1 -0
  412. package/lib/typescript/src/performance.d.ts +32 -0
  413. package/lib/typescript/src/performance.d.ts.map +1 -0
  414. package/lib/typescript/src/performanceMonitor.d.ts +45 -0
  415. package/lib/typescript/src/performanceMonitor.d.ts.map +1 -0
  416. package/lib/typescript/src/permissions.d.ts +132 -0
  417. package/lib/typescript/src/permissions.d.ts.map +1 -0
  418. package/lib/typescript/src/rendering.d.ts +9 -0
  419. package/lib/typescript/src/rendering.d.ts.map +1 -0
  420. package/lib/typescript/src/security.d.ts +6 -0
  421. package/lib/typescript/src/security.d.ts.map +1 -0
  422. package/lib/typescript/src/state.d.ts +102 -0
  423. package/lib/typescript/src/state.d.ts.map +1 -0
  424. package/lib/typescript/src/storage.d.ts +117 -0
  425. package/lib/typescript/src/storage.d.ts.map +1 -0
  426. package/lib/typescript/src/theme.d.ts +15 -0
  427. package/lib/typescript/src/theme.d.ts.map +1 -0
  428. package/lib/typescript/src/types.d.ts +802 -0
  429. package/lib/typescript/src/types.d.ts.map +1 -0
  430. package/lib/typescript/src/utils.d.ts +50 -0
  431. package/lib/typescript/src/utils.d.ts.map +1 -0
  432. package/lib/typescript/src/validation.d.ts +52 -0
  433. package/lib/typescript/src/validation.d.ts.map +1 -0
  434. package/package.json +204 -0
  435. package/react-native.config.js +17 -0
  436. package/src/AudioPlayerContext.tsx +220 -0
  437. package/src/CameraPreview.tsx +352 -0
  438. package/src/NativeAnimatedImageView.tsx +71 -0
  439. package/src/NativeAudioPlayerView.tsx +39 -0
  440. package/src/NativeBlurView.tsx +40 -0
  441. package/src/NativeCustomCamera.ts +305 -0
  442. package/src/NativeCustomCamera.web.ts +192 -0
  443. package/src/NativeCustomVideoView.ts +30 -0
  444. package/src/NativeDocumentPreviewView.tsx +196 -0
  445. package/src/NativeMediaThumbnailView.tsx +167 -0
  446. package/src/NativeSvgIcon.tsx +46 -0
  447. package/src/ResponsivePreviewContainer.tsx +227 -0
  448. package/src/accessibility.ts +80 -0
  449. package/src/config.ts +406 -0
  450. package/src/cpuOptimization.ts +365 -0
  451. package/src/db/DatabaseManager.ts +212 -0
  452. package/src/db/MediaMapper.ts +377 -0
  453. package/src/db/MediaRepository.ts +313 -0
  454. package/src/db/index.ts +73 -0
  455. package/src/db/migrations.ts +222 -0
  456. package/src/db/react-native-sqlcipher.d.ts +76 -0
  457. package/src/db/secureKey.ts +100 -0
  458. package/src/db/types.ts +123 -0
  459. package/src/db/useMediaDatabase.ts +191 -0
  460. package/src/defaultIcons.tsx +2390 -0
  461. package/src/deviceCapabilities.ts +438 -0
  462. package/src/errors.ts +350 -0
  463. package/src/iconConfig.tsx +962 -0
  464. package/src/icons.tsx +788 -0
  465. package/src/index.tsx +763 -0
  466. package/src/jest-globals.d.ts +9 -0
  467. package/src/library/MediaLibrary.tsx +141 -0
  468. package/src/library/MediaLibraryScreen.tsx +3003 -0
  469. package/src/library/components/AudioPreview.tsx +73 -0
  470. package/src/library/components/DocumentPreview.tsx +361 -0
  471. package/src/library/components/ExpandableFab.tsx +342 -0
  472. package/src/library/components/FileTiles.tsx +252 -0
  473. package/src/library/components/ImagePreview.tsx +72 -0
  474. package/src/library/components/MediaMetadataHeader.tsx +208 -0
  475. package/src/library/components/RecordAudioScreen.tsx +845 -0
  476. package/src/library/components/VideoPreview.tsx +478 -0
  477. package/src/library/components/ViewerCounter.tsx +71 -0
  478. package/src/library/compressionEstimate.ts +662 -0
  479. package/src/library/fileMetadata.ts +212 -0
  480. package/src/library/index.ts +66 -0
  481. package/src/library/libraryIconRegistry.tsx +86 -0
  482. package/src/library/libraryIcons.tsx +928 -0
  483. package/src/library/localizedFormat.ts +207 -0
  484. package/src/library/palette.ts +281 -0
  485. package/src/library/responsive.ts +49 -0
  486. package/src/locales.ts +381 -0
  487. package/src/localization.ts +1947 -0
  488. package/src/logger.ts +20 -0
  489. package/src/lowMemoryCache.ts +218 -0
  490. package/src/mediaHistory.ts +42 -0
  491. package/src/mediaStorageService.ts +546 -0
  492. package/src/memory.ts +102 -0
  493. package/src/nativeActions.ts +422 -0
  494. package/src/nativeComponentSupport.ts +60 -0
  495. package/src/networkPerformance.ts +30 -0
  496. package/src/performance.ts +137 -0
  497. package/src/performanceMonitor.ts +219 -0
  498. package/src/permissions.ts +403 -0
  499. package/src/rendering.ts +47 -0
  500. package/src/security.ts +19 -0
  501. package/src/state.ts +333 -0
  502. package/src/storage.ts +453 -0
  503. package/src/theme.tsx +467 -0
  504. package/src/types.ts +946 -0
  505. package/src/utils.ts +177 -0
  506. package/src/validation.ts +372 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE,KAAK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AI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,KAAK,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { CameraTheme, FaceEffect, FilterType, FlashMode, ImageCropOptions } from './types';
2
+ export declare const DEFAULT_FILTERS: FilterType[];
3
+ export declare const DEFAULT_FACE_EFFECTS: FaceEffect[];
4
+ export declare const DEFAULT_THEMES: CameraTheme[];
5
+ export declare const DEFAULT_FLASH_MODES: FlashMode[];
6
+ /**
7
+ * Helper function to validate image crop options
8
+ */
9
+ export declare function validateCropOptions(options: ImageCropOptions): boolean;
10
+ export declare function generateAlbumName(baseName: string): string;
11
+ /**
12
+ * Helper function to format video duration
13
+ */
14
+ export declare function formatVideoDuration(seconds: number): string;
15
+ /**
16
+ * Helper function to check if a URI is a video
17
+ */
18
+ export declare function isVideoUri(uri: string): boolean;
19
+ /**
20
+ * Helper function to check if a URI is an image
21
+ */
22
+ export declare function isImageUri(uri: string): boolean;
23
+ /**
24
+ * Whether an asset is a GIF, judged by its declared MIME type first and its file name / uri
25
+ * extension second — so a file from a provider that reports no MIME type is still recognised.
26
+ *
27
+ * A declared, recognised `image/*` type is authoritative: an asset that says it is `image/jpeg`
28
+ * is not reclassified just because something in its path ends in `.gif`. Mirrors the native
29
+ * `GifSupport.isGif` precedence so the two sides never disagree about the same file.
30
+ */
31
+ export declare function isGifAsset(asset: {
32
+ mimeType?: string | null;
33
+ fileName?: string | null;
34
+ uri?: string | null;
35
+ }): boolean;
36
+ /**
37
+ * Whether this image must be rendered through the library's native image view instead of
38
+ * ReactNative's `<Image>`.
39
+ *
40
+ * HEIF and AVIF are decoded by the Android platform (API 28+ / API 31+ respectively) but NOT by
41
+ * Fresco, which is what backs `<Image>` on Android — so those assets silently render as empty
42
+ * space. `NativeAnimatedImageView` decodes through ImageDecoder/BitmapFactory and therefore shows
43
+ * them wherever the platform can. Same MIME-then-extension precedence as {@link isGifAsset}.
44
+ */
45
+ export declare function requiresNativeImageDecoder(asset: {
46
+ mimeType?: string | null;
47
+ fileName?: string | null;
48
+ uri?: string | null;
49
+ }): boolean;
50
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,eAAe,EAAE,UAAU,EAMvC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,UAAU,EAM5C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,WAAW,EAKvC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,SAAS,EAAmC,CAAC;AAE/E;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAUtE;AAOD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI1D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAI3D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAM/C;AAqBD;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAK/C;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,GAAG,OAAO,CAWV;AAqBD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,GAAG,OAAO,CAWV"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Comprehensive validation utilities for camera operations
3
+ */
4
+ import type { CameraPickerOptions } from './types';
5
+ /**
6
+ * Validate camera picker options
7
+ */
8
+ export declare function validateCameraPickerOptions(options: CameraPickerOptions): void;
9
+ /**
10
+ * Validate URIs array
11
+ */
12
+ export declare function validateUrisArray(uris: string[]): void;
13
+ /**
14
+ * Validate album name
15
+ */
16
+ export declare function validateAlbumName(albumName: string): void;
17
+ /**
18
+ * Validate caption
19
+ */
20
+ export declare function validateCaption(caption: string): void;
21
+ /**
22
+ * Validate timer delay
23
+ */
24
+ export declare function validateTimerDelay(delaySeconds: number): void;
25
+ /**
26
+ * Validate video trim parameters
27
+ */
28
+ export declare function validateVideoTrimParameters(startTime: number, endTime: number): void;
29
+ /**
30
+ * Validate upload URL
31
+ */
32
+ export declare function validateUploadUrl(uploadUrl: string): void;
33
+ /**
34
+ * Check file size limits
35
+ */
36
+ export declare function checkFileSize(uri: string, size: number, isVideo: boolean): void;
37
+ /**
38
+ * Validate album ID
39
+ */
40
+ export declare function validateAlbumId(albumId: string): void;
41
+ /**
42
+ * Validate rotation degrees
43
+ */
44
+ export declare function validateRotationDegrees(degrees: number): void;
45
+ export declare const VALIDATION_CONSTANTS: {
46
+ readonly MAX_IMAGE_SIZE: number;
47
+ readonly MAX_VIDEO_SIZE: number;
48
+ readonly MAX_ALBUM_NAME_LENGTH: 100;
49
+ readonly MAX_CAPTION_LENGTH: 2000;
50
+ readonly MAX_BATCH_SIZE: 50;
51
+ };
52
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AASnD;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,mBAAmB,GAC3B,IAAI,CAkEN;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAkCtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAiCzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAkBrD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAwB7D;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,IAAI,CAiCN;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAsBzD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,GACf,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAgBrD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAwB7D;AAGD,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,204 @@
1
+ {
2
+ "name": "react-native-ensys-camera-x",
3
+ "version": "1.0.7",
4
+ "description": "Full-screen native Android camera and media picker for React Native — photo/video capture, gallery multi-select, and an editor (crop, rotate, filters, stickers, emoji, text, drawing, trim) in one call. Fully white-labelled: every icon, colour and string is configurable.",
5
+ "source": "./src/index.tsx",
6
+ "main": "./lib/module/index.js",
7
+ "module": "./lib/module/index.js",
8
+ "types": "./lib/typescript/src/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "source": "./src/index.tsx",
12
+ "types": "./lib/typescript/src/index.d.ts",
13
+ "default": "./lib/module/index.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "src",
19
+ "lib",
20
+ "android",
21
+ "ios",
22
+ "cpp",
23
+ "*.podspec",
24
+ "react-native.config.js",
25
+ "!ios/build",
26
+ "!android/build",
27
+ "!android/gradle",
28
+ "!android/gradlew",
29
+ "!android/gradlew.bat",
30
+ "!android/local.properties",
31
+ "!android/src/test",
32
+ "!**/__tests__",
33
+ "!**/__fixtures__",
34
+ "!**/__mocks__",
35
+ "!**/*.log",
36
+ "!**/.*"
37
+ ],
38
+ "scripts": {
39
+ "example": "yarn workspace react-native-custom-camera-example",
40
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
41
+ "prepare": "bob build",
42
+ "typecheck": "tsc",
43
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
44
+ "test": "jest",
45
+ "release": "release-it --only-version",
46
+ "web": "vite",
47
+ "build:web": "vite build"
48
+ },
49
+ "keywords": [
50
+ "react-native",
51
+ "android",
52
+ "camera",
53
+ "camerax",
54
+ "image-picker",
55
+ "media-picker",
56
+ "gallery",
57
+ "video",
58
+ "photo",
59
+ "image-editor",
60
+ "crop",
61
+ "filters",
62
+ "stickers",
63
+ "white-label",
64
+ "turbo-module"
65
+ ],
66
+ "repository": {
67
+ "type": "git",
68
+ "url": "git+https://github.com/ensys-asif/ensys-camera-x.git"
69
+ },
70
+ "author": "Asif Ali <221866@students.au.edu.pk> (https://github.com/asifali741)",
71
+ "license": "MIT",
72
+ "bugs": {
73
+ "url": "https://github.com/ensys-asif/ensys-camera-x/issues"
74
+ },
75
+ "homepage": "https://github.com/ensys-asif/ensys-camera-x#readme",
76
+ "engines": {
77
+ "node": ">=20"
78
+ },
79
+ "publishConfig": {
80
+ "registry": "https://registry.npmjs.org/"
81
+ },
82
+ "devDependencies": {
83
+ "@commitlint/config-conventional": "^21.0.2",
84
+ "@eslint/compat": "^2.1.0",
85
+ "@eslint/eslintrc": "^3.3.5",
86
+ "@eslint/js": "^10.0.1",
87
+ "@jest/globals": "^29.7.0",
88
+ "@react-native/babel-preset": "0.85.0",
89
+ "@react-native/eslint-config": "0.85.0",
90
+ "@react-native/jest-preset": "0.85.0",
91
+ "@release-it/conventional-changelog": "^11.0.1",
92
+ "@types/react": "^19.2.0",
93
+ "commitlint": "^21.0.2",
94
+ "del-cli": "^7.0.0",
95
+ "eslint": "^9.39.4",
96
+ "eslint-config-prettier": "^10.1.8",
97
+ "eslint-plugin-ft-flow": "^3.0.11",
98
+ "eslint-plugin-prettier": "^5.5.6",
99
+ "jest": "^29.7.0",
100
+ "lefthook": "^2.1.9",
101
+ "prettier": "^3.8.3",
102
+ "react": "19.2.3",
103
+ "react-native": "0.85.0",
104
+ "react-native-builder-bob": "^0.41.0",
105
+ "react-native-web": "~0.21.2",
106
+ "release-it": "^20.2.0",
107
+ "turbo": "^2.9.16",
108
+ "typescript": "~5.8.3"
109
+ },
110
+ "peerDependencies": {
111
+ "react": "*",
112
+ "react-native": "*",
113
+ "react-native-sqlcipher": "*"
114
+ },
115
+ "peerDependenciesMeta": {
116
+ "react-native-sqlcipher": {
117
+ "optional": true
118
+ }
119
+ },
120
+ "resolutions": {
121
+ "undici": "^7.28.0",
122
+ "@istanbuljs/load-nyc-config/js-yaml": "3.15.0"
123
+ },
124
+ "workspaces": [
125
+ "example"
126
+ ],
127
+ "packageManager": "yarn@4.11.0",
128
+ "react-native-builder-bob": {
129
+ "source": "src",
130
+ "output": "lib",
131
+ "targets": [
132
+ [
133
+ "module",
134
+ {
135
+ "esm": true
136
+ }
137
+ ],
138
+ [
139
+ "typescript",
140
+ {
141
+ "project": "tsconfig.build.json"
142
+ }
143
+ ]
144
+ ]
145
+ },
146
+ "codegenConfig": {
147
+ "name": "CustomCameraSpec",
148
+ "type": "modules",
149
+ "jsSrcsDir": "src",
150
+ "android": {
151
+ "javaPackageName": "com.customcamera"
152
+ }
153
+ },
154
+ "prettier": {
155
+ "quoteProps": "consistent",
156
+ "singleQuote": true,
157
+ "tabWidth": 2,
158
+ "trailingComma": "es5",
159
+ "useTabs": false
160
+ },
161
+ "jest": {
162
+ "preset": "@react-native/jest-preset",
163
+ "modulePathIgnorePatterns": [
164
+ "<rootDir>/example/node_modules",
165
+ "<rootDir>/lib/"
166
+ ]
167
+ },
168
+ "commitlint": {
169
+ "extends": [
170
+ "@commitlint/config-conventional"
171
+ ]
172
+ },
173
+ "release-it": {
174
+ "git": {
175
+ "commitMessage": "chore: release ${version}",
176
+ "tagName": "v${version}"
177
+ },
178
+ "npm": {
179
+ "publish": true
180
+ },
181
+ "github": {
182
+ "release": true
183
+ },
184
+ "plugins": {
185
+ "@release-it/conventional-changelog": {
186
+ "preset": {
187
+ "name": "angular"
188
+ }
189
+ }
190
+ }
191
+ },
192
+ "create-react-native-library": {
193
+ "type": "turbo-module",
194
+ "languages": "kotlin-objc",
195
+ "tools": [
196
+ "eslint",
197
+ "jest",
198
+ "lefthook",
199
+ "release-it",
200
+ "vite"
201
+ ],
202
+ "version": "0.62.1"
203
+ }
204
+ }
@@ -0,0 +1,17 @@
1
+ module.exports = {
2
+ dependency: {
3
+ platforms: {
4
+ android: {
5
+ sourceDir: './android',
6
+ packageImportPath: 'import com.customcamera.CustomCameraPackage;',
7
+ packageInstance: 'new CustomCameraPackage()',
8
+ },
9
+ ios: {
10
+ // podspecPath is no longer supported in dependency.platforms.ios
11
+ // The podspec will be automatically detected from the project root
12
+ },
13
+ },
14
+ },
15
+ // iOS podspec configuration is now handled automatically
16
+ // Ensure CustomCamera.podspec is in the project root directory
17
+ };
@@ -0,0 +1,220 @@
1
+ import { createContext, useContext, useEffect, useMemo, useState, type FC, type ReactNode } from 'react';
2
+ import { View, Text, TouchableOpacity, StyleSheet, DeviceEventEmitter } from 'react-native';
3
+ import NativeCustomCamera from './NativeCustomCamera';
4
+ import { useCameraTheme } from './theme';
5
+ import type { CameraThemeConfig } from './types';
6
+ import { useCameraLocalization } from './localization';
7
+ import { RenderIcon } from './icons';
8
+
9
+ interface AudioState {
10
+ isPlaying: boolean;
11
+ uri: string | null;
12
+ title: string;
13
+ position: number;
14
+ duration: number;
15
+ didComplete: boolean;
16
+ }
17
+
18
+ interface AudioPlayerContextType {
19
+ state: AudioState;
20
+ play: (uri: string, title: string) => Promise<void>;
21
+ pause: () => Promise<void>;
22
+ resume: () => Promise<void>;
23
+ seek: (ms: number) => Promise<void>;
24
+ stop: () => Promise<void>;
25
+ }
26
+
27
+ const defaultState: AudioState = {
28
+ isPlaying: false,
29
+ uri: null,
30
+ title: '',
31
+ position: 0,
32
+ duration: 0,
33
+ didComplete: false,
34
+ };
35
+
36
+ const AudioPlayerContext = createContext<AudioPlayerContextType>({
37
+ state: defaultState,
38
+ play: async () => {},
39
+ pause: async () => {},
40
+ resume: async () => {},
41
+ seek: async () => {},
42
+ stop: async () => {},
43
+ });
44
+
45
+ export const useGlobalAudioPlayer = () => useContext(AudioPlayerContext);
46
+
47
+ export interface GlobalAudioPlayerProviderProps {
48
+ children: ReactNode;
49
+ }
50
+
51
+ export const GlobalAudioPlayerProvider: FC<GlobalAudioPlayerProviderProps> = ({ children }) => {
52
+ const [state, setState] = useState<AudioState>(defaultState);
53
+
54
+ useEffect(() => {
55
+ const progressSub = DeviceEventEmitter.addListener('onAudioProgress', (ev) => {
56
+ setState((prev) => ({
57
+ ...prev,
58
+ position: ev.position,
59
+ duration: ev.duration,
60
+ }));
61
+ });
62
+
63
+ const stateSub = DeviceEventEmitter.addListener('onAudioStateChange', (ev) => {
64
+ setState((prev) => {
65
+ if (ev.didComplete) {
66
+ // Auto-hide when playback finishes
67
+ NativeCustomCamera.stopAudio();
68
+ return defaultState;
69
+ }
70
+ return {
71
+ ...prev,
72
+ isPlaying: ev.isPlaying ?? prev.isPlaying,
73
+ uri: ev.uri ?? prev.uri,
74
+ title: ev.title ?? prev.title,
75
+ duration: ev.duration ?? prev.duration,
76
+ };
77
+ });
78
+ });
79
+
80
+ const closeSub = DeviceEventEmitter.addListener('onAudioClose', () => {
81
+ setState(defaultState);
82
+ });
83
+
84
+ return () => {
85
+ progressSub.remove();
86
+ stateSub.remove();
87
+ closeSub.remove();
88
+ };
89
+ }, []);
90
+
91
+ const play = async (uri: string, title: string) => {
92
+ await NativeCustomCamera.playAudio(uri, title);
93
+ };
94
+ const pause = async () => {
95
+ await NativeCustomCamera.pauseAudio();
96
+ };
97
+ const resume = async () => {
98
+ await NativeCustomCamera.resumeAudio();
99
+ };
100
+ const seek = async (ms: number) => {
101
+ await NativeCustomCamera.seekAudio(ms);
102
+ };
103
+ const stop = async () => {
104
+ await NativeCustomCamera.stopAudio();
105
+ };
106
+
107
+ return (
108
+ <AudioPlayerContext.Provider value={{ state, play, pause, resume, seek, stop }}>
109
+ {children}
110
+ </AudioPlayerContext.Provider>
111
+ );
112
+ };
113
+
114
+ export const GlobalMiniAudioPlayer: FC<{ onExpandPlayer?: (uri: string) => void }> = ({ onExpandPlayer }) => {
115
+ const { state, pause, resume, stop } = useGlobalAudioPlayer();
116
+ const theme = useCameraTheme();
117
+ const { t, isRtl, textAlign } = useCameraLocalization();
118
+ const audioTheme = theme.components.audioPlayer;
119
+ const styles = useMemo(() => createMiniPlayerStyles(theme), [theme]);
120
+ const showMiniPlayer = state.uri !== null && !state.didComplete;
121
+
122
+ const handleToggle = () => {
123
+ if (state.isPlaying) {
124
+ pause();
125
+ } else {
126
+ resume();
127
+ }
128
+ };
129
+
130
+ if (!showMiniPlayer) return null;
131
+
132
+ return (
133
+ <View style={[styles.miniPlayerWrap, { paddingBottom: theme.spacing.lg }]}>
134
+ <TouchableOpacity
135
+ style={[
136
+ styles.miniPlayerContainer,
137
+ {
138
+ backgroundColor: audioTheme.containerBackground,
139
+ borderRadius: audioTheme.borderRadius,
140
+ borderColor: audioTheme.borderColor,
141
+ shadowColor: audioTheme.shadow.color,
142
+ shadowOpacity: audioTheme.shadow.opacity,
143
+ shadowRadius: audioTheme.shadow.radius,
144
+ shadowOffset: audioTheme.shadow.offset,
145
+ },
146
+ ]}
147
+ activeOpacity={audioTheme.activeOpacity}
148
+ onPress={() => state.uri && onExpandPlayer?.(state.uri)}>
149
+ {/* The fill grows from the reading-direction start edge, so an Arabic or
150
+ Persian UI fills right-to-left. */}
151
+ <View style={[styles.progressTrack, { backgroundColor: audioTheme.progressTrackBackground, justifyContent: isRtl ? 'flex-end' : 'flex-start' }]}>
152
+ <View style={[styles.progressFill, { width: `${state.duration > 0 ? (state.position / state.duration) * 100 : 0}%`, backgroundColor: audioTheme.progressFillBackground }]} />
153
+ </View>
154
+ <View style={[styles.contentRow, { flexDirection: isRtl ? 'row-reverse' : 'row' }]}>
155
+ <TouchableOpacity onPress={handleToggle} style={[styles.iconBtn, { backgroundColor: audioTheme.iconButtonBackground }]}>
156
+ <RenderIcon name={state.isPlaying ? 'pause' : 'play'} size={audioTheme.playIconSize} color={audioTheme.iconColor} />
157
+ </TouchableOpacity>
158
+ <Text style={[styles.title, { color: audioTheme.titleColor, textAlign }]} numberOfLines={1}>{state.title || t('audio')}</Text>
159
+ <TouchableOpacity onPress={stop} style={[styles.iconBtn, { backgroundColor: audioTheme.iconButtonBackground }]}>
160
+ <RenderIcon name="close" size={audioTheme.closeIconSize} color={audioTheme.iconColor} />
161
+ </TouchableOpacity>
162
+ </View>
163
+ </TouchableOpacity>
164
+ </View>
165
+ );
166
+ };
167
+
168
+ /**
169
+ * Builds every mini-audio-player style from the active theme. Components never
170
+ * hardcode sizing/typography/spacing — they all flow from
171
+ * `theme.components.audioPlayer` (see src/types.ts / src/theme.tsx).
172
+ */
173
+ const createMiniPlayerStyles = (theme: CameraThemeConfig) => {
174
+ const ap = theme.components.audioPlayer;
175
+
176
+ return StyleSheet.create({
177
+ miniPlayerWrap: {
178
+ width: '100%',
179
+ },
180
+ miniPlayerContainer: {
181
+ overflow: 'hidden',
182
+ elevation: ap.containerElevation,
183
+ borderWidth: ap.containerBorderWidth,
184
+ },
185
+ progressTrack: {
186
+ height: ap.progressTrackHeight,
187
+ width: '100%',
188
+ // A row so the caller can pin the fill to the reading-direction start edge
189
+ // with justifyContent; RN's own RTL flip needs I18nManager (app restart),
190
+ // which the plugin deliberately does not depend on.
191
+ flexDirection: 'row',
192
+ },
193
+ progressFill: {
194
+ height: '100%',
195
+ },
196
+ contentRow: {
197
+ flexDirection: 'row',
198
+ alignItems: 'center',
199
+ paddingHorizontal: ap.contentPaddingHorizontal,
200
+ paddingVertical: ap.contentPaddingVertical,
201
+ },
202
+ iconBtn: {
203
+ width: ap.iconButtonSize,
204
+ height: ap.iconButtonSize,
205
+ borderRadius: ap.iconButtonRadius,
206
+ justifyContent: 'center',
207
+ alignItems: 'center',
208
+ },
209
+ iconText: {
210
+ fontSize: ap.iconTextSize,
211
+ fontWeight: ap.iconTextWeight,
212
+ },
213
+ title: {
214
+ flex: 1,
215
+ fontSize: ap.titleFontSize,
216
+ fontWeight: ap.titleFontWeight,
217
+ marginHorizontal: ap.titleMarginHorizontal,
218
+ },
219
+ });
220
+ };