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,251 @@
1
+ "use strict";
2
+
3
+ import { measurePerformance } from "./performance.js";
4
+ import { debounceForLowEnd } from "./cpuOptimization.js";
5
+ import { setGlobalCameraTheme, getCurrentCameraTheme } from "./theme.js";
6
+ // The native bridge accessor and the wrappers the plugin's own screens call live
7
+ // in ./nativeActions, so `src/library/**` can reach them without importing this
8
+ // barrel (which would be a require cycle). They are re-exported below, so the
9
+ // public API is unchanged.
10
+ import { getCustomCameraModule } from "./nativeActions.js";
11
+
12
+ // Types used for exports
13
+
14
+ // Export utility functions and constants
15
+ export { DEFAULT_FILTERS, DEFAULT_FACE_EFFECTS, DEFAULT_THEMES, DEFAULT_FLASH_MODES, validateCropOptions, generateAlbumName, formatVideoDuration, isVideoUri, isImageUri, isGifAsset, requiresNativeImageDecoder } from "./utils.js";
16
+
17
+ // Export localization
18
+ export { setCameraLocalization, updateCameraLocalization, setCameraLanguage,
19
+ // One-time automatic host-language synchronization.
20
+ setCameraLanguageProvider, clearCameraLanguageProvider, getCameraLanguageProvider, syncCameraLanguage, isCameraLanguageProvider, registerCameraTranslations, getCameraLocale, getCameraIsRtl, defaultTranslations, CameraLocalizationProvider, LocalizationManager, cameraLocalizationKeys, useCameraLocalization, useCameraLocalizationContext, rtlAwareStyles, getRtlAwareStyles } from "./localization.js";
21
+
22
+ // Export the locale engine — useful for hosts that want to reuse the plugin's
23
+ // tag parsing or RTL detection instead of shipping their own.
24
+ export { DEFAULT_LOCALE, RTL_LANGUAGES, RTL_SCRIPTS, isRtlLocale, localeFallbackChain, matchLocaleKey, normalizeLocale, parseLocale, resolveLocaleTranslations } from "./locales.js";
25
+
26
+ // Export error handling
27
+ export { CameraError, ERROR_CODES, isCameraError, handleCameraError, getUserFriendlyErrorMessage, validateUri, validateImageUri, validateVideoUri, validateFilterType, validateFlashMode, validateFaceEffect, validateCameraTheme } from "./errors.js";
28
+
29
+ // Export validation utilities
30
+ export { validateCameraPickerOptions, validateUrisArray, validateAlbumName, validateCaption, validateTimerDelay, validateVideoTrimParameters, validateUploadUrl, checkFileSize, validateAlbumId, validateRotationDegrees, VALIDATION_CONSTANTS } from "./validation.js";
31
+
32
+ // Export state management
33
+ export { createInitialOperationState, createLoadingState, createSuccessState, createErrorState, createCancelledState, isOperationInProgress, isOperationSuccessful, isOperationFailed, isOperationCancelled, getStatusMessage, OperationQueue, processInBatches, retryWithBackoff, withTimeout } from "./state.js";
34
+ // Export theme system
35
+ export { DEFAULT_CAMERA_THEME_CONFIG, createCameraTheme, resolveCameraTheme, setGlobalCameraTheme, getCurrentCameraTheme, subscribeToCameraTheme, CameraThemeProvider, useCameraTheme } from "./theme.js";
36
+
37
+ // Export the centralized white-label configuration system
38
+ export { CameraPlugin, configureCameraPlugin, getCameraPluginConfig, subscribeToCameraPluginConfig, setCameraIcons, getCameraIcons, resetCameraIcons, DEFAULT_CUSTOM_ICONS, DEFAULT_ICON_CONFIG, DEFAULT_ANIMATION_CONFIG, DEFAULT_DIMENSION_CONFIG, DEFAULT_NOTIFICATION_CONFIG } from "./config.js";
39
+ // Export THE centralized icon configuration: one catalog of unique icon ids in
40
+ // front of both the RN component registry and the native drawable layer.
41
+ export { CAMERA_ICON_CATALOG, CAMERA_ICON_IDS, isCameraIconId, normalizeCameraIconValue, createSvgIconComponent, createImageIconComponent, isRenderableSvg, resolveCameraIconRegistryConfig, resolveNativeIconConfig, mergeCameraIconsConfig } from "./iconConfig.js";
42
+ export { CameraIconProvider, useIcon, useIconRegistry, useIconConfig, useRenderIcon, RenderIcon, createDefaultIconRegistry, resolveIconConfig, mergeIconConfigs, getIconComponent, setGlobalIconRegistryConfig, getGlobalIconRegistryConfig, subscribeToGlobalIconRegistryConfig, DefaultFallbackIcon, DEFAULT_ICON_REGISTRY_CONFIG, DEFAULT_ICON_SIZE, DEFAULT_ICON_COLOR, DEFAULT_ICON_STROKE_WIDTH, DEFAULT_FALLBACK_ICON_COLOR, DEFAULT_FALLBACK_ICON_WEIGHT } from "./icons.js";
43
+ // Export performance utilities
44
+ export { measurePerformance, debounce, throttle, MediaCache, BackgroundOperationManager, LazyLoader, processMediaInChunks } from "./performance.js";
45
+
46
+ // Export memory management
47
+ export { MemoryManager, WeakCache, processMediaInChunksMemory } from "./memory.js";
48
+
49
+ // Export network utilities
50
+ export { checkNetworkConnectivity, validateUploadUrl as validateUploadUrlNetwork, adaptiveUpload, estimateBandwidth, NetworkMonitor } from "./networkPerformance.js";
51
+
52
+ // Export rendering utilities
53
+ export { runAfterInteractions, createOptimizedListData, createMemoizer, createThrottledRenderer, optimizeListRenderItem, createOptimizedImageSource } from "./rendering.js";
54
+
55
+ // Export security utilities
56
+ export { validateSecureUri, sanitizeFileName, validateFileContentType, validateSecureFileSize, validateBatchOperation } from "./security.js";
57
+
58
+ // Export permission utilities
59
+ export { checkCameraPermission, checkCameraPermissionStatus, requestCameraPermission, checkStoragePermission, checkStoragePermissionStatus, requestStoragePermission, checkMicrophonePermission, checkMicrophonePermissionStatus, requestMicrophonePermission, checkAllPermissions, requestAllPermissions, openSettings, shouldShowRationale, getDefaultPermissionRationale, DEFAULT_RATIONALE } from "./permissions.js";
60
+
61
+ // Export performance-optimized operations
62
+ export const cropImageWithPerformance = async (uri, options = {}) => {
63
+ return measurePerformance('crop_image', () => cropImage(uri, options));
64
+ };
65
+ export const applyFilterWithPerformance = async (uri, filterType = 'none') => {
66
+ return measurePerformance('apply_filter', () => applyFilter(uri, filterType));
67
+ };
68
+ export const debouncedRotateImage = debounceForLowEnd((uri, degrees) => {
69
+ if (typeof uri === 'string' && typeof degrees === 'number') {
70
+ return rotateImage(uri, degrees);
71
+ }
72
+ return Promise.reject(new Error('Invalid arguments for debouncedRotateImage'));
73
+ }, 300);
74
+ export const throttledSetCameraFlash = debounceForLowEnd(mode => {
75
+ if (mode === undefined || ['auto', 'on', 'off', 'torch'].includes(mode)) {
76
+ return setCameraFlash(mode);
77
+ }
78
+ return Promise.reject(new Error('Invalid arguments for throttledSetCameraFlash'));
79
+ }, 500);
80
+
81
+ // Export low-end optimization utilities
82
+ export { LowMemoryCache, processMediaForLowEnd, processInSmallBatches, getOptimizedImageDimensions, shouldUseLowMemoryOptimizations } from "./lowMemoryCache.js";
83
+ export { debounceForLowEnd, throttleForLowEnd, runInBackgroundWithPriority, createLazyInitializer, processInChunks, efficientDelay, isMainThreadBusy, waitForMainThreadAvailable, requestEfficientAnimationFrame, cancelEfficientAnimationFrame, getCpuOptimizationLevel, supportsIdleCallback, requestIdleCallbackPolyfill, cancelIdleCallbackPolyfill } from "./cpuOptimization.js";
84
+ export { detectDeviceCapabilities, isLowEndDevice, getOptimizationLevel, getMemorySettings, getCpuSettings, getRenderingSettings, getNetworkSettings, getImageQualitySettings, shouldUseOptimization, createOptimizedConfig, createTestDeviceSpecs } from "./deviceCapabilities.js";
85
+ // Export performance monitoring
86
+ export { PerformanceMonitor } from "./performanceMonitor.js";
87
+
88
+ // Export accessibility utilities
89
+ export { useScreenReaderEnabled, useReducedMotion, useBoldText } from "./accessibility.js";
90
+
91
+ // Export all types for TypeScript
92
+
93
+ export { prependMediaHistory } from "./mediaHistory.js";
94
+ export function openCamera() {
95
+ return getCustomCameraModule().openCamera();
96
+ }
97
+
98
+ // ── Native bridge actions ───────────────────────────────────────────
99
+ // Defined in ./nativeActions (see the import at the top of this file for why)
100
+ // and re-exported here unchanged — these are part of the public API.
101
+ export { openCameraPicker, openDocumentPicker, openAudioPicker, openImageVideoPicker, openMediaEditor, openGalleryEditor, openDocument, startUpload, secureDeleteMedia, shareMedia, getMediaMetadata, getRecordedOriginalSize, startAudioRecording, stopAudioRecording, cancelAudioRecording, stopAndPublishAudioRecording, pauseAudioRecording, resumeAudioRecording, getAudioRecordingState, getAudioAmplitude, compressVideo, compressImage, addCompressionProgressListener } from "./nativeActions.js";
102
+ export function getUploadState() {
103
+ return getCustomCameraModule().getUploadState();
104
+ }
105
+ export function getNotificationHistory() {
106
+ return getCustomCameraModule().getNotificationHistory();
107
+ }
108
+ export function clearNotificationHistory() {
109
+ return getCustomCameraModule().clearNotificationHistory();
110
+ }
111
+
112
+ /**
113
+ * Real device-memory facts from the OS (Android: ActivityManager). Returns
114
+ * `{ isLowRamDevice, memoryClassMb, totalRamMb, availableRamMb,
115
+ * isCurrentlyLowMemory, cpuCores }`. detectDeviceCapabilities() consumes this
116
+ * to classify the device instead of guessing from screen size.
117
+ */
118
+ export function getDeviceCapabilities() {
119
+ return getCustomCameraModule().getDeviceCapabilities();
120
+ }
121
+ export function cropImage(uri, options = {}) {
122
+ return getCustomCameraModule().cropImage(uri, options);
123
+ }
124
+ export function rotateImage(uri, degrees) {
125
+ return getCustomCameraModule().rotateImage(uri, degrees);
126
+ }
127
+ export function applyFilter(uri, filterType = 'none') {
128
+ return getCustomCameraModule().applyFilter(uri, filterType);
129
+ }
130
+
131
+ // Media Management Features
132
+ export function createAlbum(albumName) {
133
+ return getCustomCameraModule().createAlbum(albumName);
134
+ }
135
+ export function moveMediaToAlbum(uris, albumId) {
136
+ return getCustomCameraModule().moveMediaToAlbum(uris, albumId);
137
+ }
138
+
139
+ /**
140
+ * Delete media files, securely overwriting their bytes first (Android).
141
+ *
142
+ * Resolves `true` when at least one file was removed. This boolean cannot say
143
+ * whether the secure overwrite actually succeeded — call
144
+ * {@link secureDeleteMedia} instead whenever that distinction matters, e.g.
145
+ * before telling the user their media was securely erased.
146
+ */
147
+ export function deleteMedia(uris) {
148
+ return getCustomCameraModule().deleteMedia(uris);
149
+ }
150
+ export function setCameraFlash(mode = 'auto') {
151
+ return getCustomCameraModule().setCameraFlash(mode);
152
+ }
153
+ export function setCameraTimer(delaySeconds) {
154
+ return getCustomCameraModule().setCameraTimer(delaySeconds);
155
+ }
156
+ export function enableCameraGrid(enabled) {
157
+ return getCustomCameraModule().enableCameraGrid(enabled);
158
+ }
159
+
160
+ // Metadata Features
161
+ export function setMediaCaption(uri, caption) {
162
+ return getCustomCameraModule().setMediaCaption(uri, caption);
163
+ }
164
+
165
+ // Video Features
166
+ export function trimVideo(uri, startTime, endTime) {
167
+ return getCustomCameraModule().trimVideo(uri, startTime, endTime);
168
+ }
169
+
170
+ // Compression (video + image) lives in ./nativeActions with the other bridge
171
+ // calls, so the shipped library shell under src/library/ can reach it without
172
+ // importing this barrel. Re-exported below, unchanged.
173
+
174
+ // QR Code Features
175
+ export function scanQRCode() {
176
+ return getCustomCameraModule().scanQRCode();
177
+ }
178
+ export function enableFaceDetection(enabled) {
179
+ return getCustomCameraModule().enableFaceDetection(enabled);
180
+ }
181
+ export function setFaceEffect(effectType = 'none') {
182
+ return getCustomCameraModule().setFaceEffect(effectType);
183
+ }
184
+ export function setCameraTheme(theme = 'default') {
185
+ setGlobalCameraTheme(theme);
186
+ const resolvedTheme = getCurrentCameraTheme();
187
+ return getCustomCameraModule().setCameraTheme(JSON.stringify(resolvedTheme));
188
+ }
189
+
190
+ // ===== Media Storage Features =====
191
+
192
+ export { getMediaStorageManager, initializeMediaStorage, publishCachedMedia, getCacheInfo, cleanupExpiredCache, MediaStorageManager } from "./storage.js";
193
+
194
+ // Export new media storage service
195
+ export { getMediaStorageService, initializeMediaStorageService, handleCapturedMedia, publishAllCachedMedia, getStorageSummary, MediaStorageService } from "./mediaStorageService.js";
196
+
197
+ // Re-export storage types
198
+
199
+ // ── Encrypted media database (SQLCipher) ──────────────────────────
200
+ // Modular, production-ready persistence layer: centralized manager, schema
201
+ // migrations, repository/service, typed models, and a UI hook.
202
+ export {
203
+ // Manager + lifecycle
204
+ DatabaseManager, getDatabaseManager, initializeMediaDatabase,
205
+ // Repository / service
206
+ MediaRepository, getMediaRepository,
207
+ // Migrations
208
+ MIGRATIONS, LATEST_SCHEMA_VERSION, runMigrations,
209
+ // Mapping helpers
210
+ assetToRecordInput, recordToAsset, rowToRecord, assetTypeToMediaType, mediaTypeToAssetType, normalizeSource, extensionForMimeType, resolveDocumentsPath, isPublishedToDocuments, detectSource,
211
+ // Encryption key
212
+ getDatabaseKey, isHardwareBackedKeyAvailable,
213
+ // UI hook
214
+ useMediaDatabase,
215
+ // Table/column constants
216
+ MEDIA_TABLE, MediaColumns } from "./db/index.js";
217
+ export { NativeCustomVideoView } from "./NativeCustomVideoView.js";
218
+ export { NativeAnimatedImageView, isNativeAnimatedImageAvailable } from "./NativeAnimatedImageView.js";
219
+ export { NativeMediaThumbnailView, MediaThumbnail, isNativeMediaThumbnailAvailable } from "./NativeMediaThumbnailView.js";
220
+ export { NativeBlurView } from "./NativeBlurView.js";
221
+ export { NativeAudioPlayerView } from "./NativeAudioPlayerView.js";
222
+ export { GlobalAudioPlayerProvider, GlobalMiniAudioPlayer, useGlobalAudioPlayer } from "./AudioPlayerContext.js";
223
+ export { NativeDocumentPreviewView, getDocumentPreviewKind, isNativeDocumentPreviewAvailable } from "./NativeDocumentPreviewView.js";
224
+ export { CameraPreview } from "./CameraPreview.js";
225
+ export { ResponsivePreviewContainer, PREVIEW_WIDTH, PREVIEW_HEIGHT, WHATSAPP_ASPECT_RATIO, PORTRAIT_PREVIEW_ASPECT_RATIO, DEFAULT_PREVIEW_DIMENSION_CONFIG, calcPreviewDimensions, calcPortraitPreviewDimensions, usePreviewDimensions, usePortraitPreviewDimensions } from "./ResponsivePreviewContainer.js";
226
+ // ── Audio Recording ─────────────────────────────────────────────────
227
+ // startAudioRecording / stopAudioRecording / cancelAudioRecording /
228
+ // stopAndPublishAudioRecording / pauseAudioRecording / resumeAudioRecording /
229
+ // getAudioRecordingState / getAudioAmplitude are defined in ./nativeActions and
230
+ // re-exported near the top of this file.
231
+
232
+ // ── Media library shell (the RN screens on top of the native camera) ─
233
+ // `<CameraMediaLibrary />` is the one-element drop-in: the library grid with its
234
+ // five category pills, the swipeable category pager, the Plus/Cross FAB, the
235
+ // full-screen viewer with scrubber + counter, the document/audio preview cards,
236
+ // the record-audio screen, the SQLCipher-backed store and upload progress.
237
+ //
238
+ // Everything it is built from is exported too, so a host can assemble its own
239
+ // screen from the same pieces. See ./library for the folder's own docs.
240
+ export {
241
+ // Screens
242
+ CameraMediaLibrary, MediaLibraryScreen, RecordAudioScreen,
243
+ // Viewer slides
244
+ ImagePreview, VideoPreview, DocumentPreview, AudioPreview, MediaMetadataHeader,
245
+ // Chrome
246
+ ExpandableFab, ViewerCounter, DocumentTile, AudioTile,
247
+ // Theming / icons / scaling
248
+ createLibraryIconRegistry, libraryIconRegistry, PlusCloseIcon, CircularSeekIcon, ViewDetailsIcon, libraryPalette, useLibraryPalette, createPalette, wp, hp, ms, fs, SCREEN_W, SCREEN_H, BASE_W, BASE_H,
249
+ // Metadata helpers
250
+ getFileSize, refreshAssetMetadata, refreshAssetMetadataBatch } from "./library/index.js";
251
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["measurePerformance","debounceForLowEnd","setGlobalCameraTheme","getCurrentCameraTheme","getCustomCameraModule","DEFAULT_FILTERS","DEFAULT_FACE_EFFECTS","DEFAULT_THEMES","DEFAULT_FLASH_MODES","validateCropOptions","generateAlbumName","formatVideoDuration","isVideoUri","isImageUri","isGifAsset","requiresNativeImageDecoder","setCameraLocalization","updateCameraLocalization","setCameraLanguage","setCameraLanguageProvider","clearCameraLanguageProvider","getCameraLanguageProvider","syncCameraLanguage","isCameraLanguageProvider","registerCameraTranslations","getCameraLocale","getCameraIsRtl","defaultTranslations","CameraLocalizationProvider","LocalizationManager","cameraLocalizationKeys","useCameraLocalization","useCameraLocalizationContext","rtlAwareStyles","getRtlAwareStyles","DEFAULT_LOCALE","RTL_LANGUAGES","RTL_SCRIPTS","isRtlLocale","localeFallbackChain","matchLocaleKey","normalizeLocale","parseLocale","resolveLocaleTranslations","CameraError","ERROR_CODES","isCameraError","handleCameraError","getUserFriendlyErrorMessage","validateUri","validateImageUri","validateVideoUri","validateFilterType","validateFlashMode","validateFaceEffect","validateCameraTheme","validateCameraPickerOptions","validateUrisArray","validateAlbumName","validateCaption","validateTimerDelay","validateVideoTrimParameters","validateUploadUrl","checkFileSize","validateAlbumId","validateRotationDegrees","VALIDATION_CONSTANTS","createInitialOperationState","createLoadingState","createSuccessState","createErrorState","createCancelledState","isOperationInProgress","isOperationSuccessful","isOperationFailed","isOperationCancelled","getStatusMessage","OperationQueue","processInBatches","retryWithBackoff","withTimeout","DEFAULT_CAMERA_THEME_CONFIG","createCameraTheme","resolveCameraTheme","subscribeToCameraTheme","CameraThemeProvider","useCameraTheme","CameraPlugin","configureCameraPlugin","getCameraPluginConfig","subscribeToCameraPluginConfig","setCameraIcons","getCameraIcons","resetCameraIcons","DEFAULT_CUSTOM_ICONS","DEFAULT_ICON_CONFIG","DEFAULT_ANIMATION_CONFIG","DEFAULT_DIMENSION_CONFIG","DEFAULT_NOTIFICATION_CONFIG","CAMERA_ICON_CATALOG","CAMERA_ICON_IDS","isCameraIconId","normalizeCameraIconValue","createSvgIconComponent","createImageIconComponent","isRenderableSvg","resolveCameraIconRegistryConfig","resolveNativeIconConfig","mergeCameraIconsConfig","CameraIconProvider","useIcon","useIconRegistry","useIconConfig","useRenderIcon","RenderIcon","createDefaultIconRegistry","resolveIconConfig","mergeIconConfigs","getIconComponent","setGlobalIconRegistryConfig","getGlobalIconRegistryConfig","subscribeToGlobalIconRegistryConfig","DefaultFallbackIcon","DEFAULT_ICON_REGISTRY_CONFIG","DEFAULT_ICON_SIZE","DEFAULT_ICON_COLOR","DEFAULT_ICON_STROKE_WIDTH","DEFAULT_FALLBACK_ICON_COLOR","DEFAULT_FALLBACK_ICON_WEIGHT","debounce","throttle","MediaCache","BackgroundOperationManager","LazyLoader","processMediaInChunks","MemoryManager","WeakCache","processMediaInChunksMemory","checkNetworkConnectivity","validateUploadUrlNetwork","adaptiveUpload","estimateBandwidth","NetworkMonitor","runAfterInteractions","createOptimizedListData","createMemoizer","createThrottledRenderer","optimizeListRenderItem","createOptimizedImageSource","validateSecureUri","sanitizeFileName","validateFileContentType","validateSecureFileSize","validateBatchOperation","checkCameraPermission","checkCameraPermissionStatus","requestCameraPermission","checkStoragePermission","checkStoragePermissionStatus","requestStoragePermission","checkMicrophonePermission","checkMicrophonePermissionStatus","requestMicrophonePermission","checkAllPermissions","requestAllPermissions","openSettings","shouldShowRationale","getDefaultPermissionRationale","DEFAULT_RATIONALE","cropImageWithPerformance","uri","options","cropImage","applyFilterWithPerformance","filterType","applyFilter","debouncedRotateImage","degrees","rotateImage","Promise","reject","Error","throttledSetCameraFlash","mode","undefined","includes","setCameraFlash","LowMemoryCache","processMediaForLowEnd","processInSmallBatches","getOptimizedImageDimensions","shouldUseLowMemoryOptimizations","throttleForLowEnd","runInBackgroundWithPriority","createLazyInitializer","processInChunks","efficientDelay","isMainThreadBusy","waitForMainThreadAvailable","requestEfficientAnimationFrame","cancelEfficientAnimationFrame","getCpuOptimizationLevel","supportsIdleCallback","requestIdleCallbackPolyfill","cancelIdleCallbackPolyfill","detectDeviceCapabilities","isLowEndDevice","getOptimizationLevel","getMemorySettings","getCpuSettings","getRenderingSettings","getNetworkSettings","getImageQualitySettings","shouldUseOptimization","createOptimizedConfig","createTestDeviceSpecs","PerformanceMonitor","useScreenReaderEnabled","useReducedMotion","useBoldText","prependMediaHistory","openCamera","openCameraPicker","openDocumentPicker","openAudioPicker","openImageVideoPicker","openMediaEditor","openGalleryEditor","openDocument","startUpload","secureDeleteMedia","shareMedia","getMediaMetadata","getRecordedOriginalSize","startAudioRecording","stopAudioRecording","cancelAudioRecording","stopAndPublishAudioRecording","pauseAudioRecording","resumeAudioRecording","getAudioRecordingState","getAudioAmplitude","compressVideo","compressImage","addCompressionProgressListener","getUploadState","getNotificationHistory","clearNotificationHistory","getDeviceCapabilities","createAlbum","albumName","moveMediaToAlbum","uris","albumId","deleteMedia","setCameraTimer","delaySeconds","enableCameraGrid","enabled","setMediaCaption","caption","trimVideo","startTime","endTime","scanQRCode","enableFaceDetection","setFaceEffect","effectType","setCameraTheme","theme","resolvedTheme","JSON","stringify","getMediaStorageManager","initializeMediaStorage","publishCachedMedia","getCacheInfo","cleanupExpiredCache","MediaStorageManager","getMediaStorageService","initializeMediaStorageService","handleCapturedMedia","publishAllCachedMedia","getStorageSummary","MediaStorageService","DatabaseManager","getDatabaseManager","initializeMediaDatabase","MediaRepository","getMediaRepository","MIGRATIONS","LATEST_SCHEMA_VERSION","runMigrations","assetToRecordInput","recordToAsset","rowToRecord","assetTypeToMediaType","mediaTypeToAssetType","normalizeSource","extensionForMimeType","resolveDocumentsPath","isPublishedToDocuments","detectSource","getDatabaseKey","isHardwareBackedKeyAvailable","useMediaDatabase","MEDIA_TABLE","MediaColumns","NativeCustomVideoView","NativeAnimatedImageView","isNativeAnimatedImageAvailable","NativeMediaThumbnailView","MediaThumbnail","isNativeMediaThumbnailAvailable","NativeBlurView","NativeAudioPlayerView","GlobalAudioPlayerProvider","GlobalMiniAudioPlayer","useGlobalAudioPlayer","NativeDocumentPreviewView","getDocumentPreviewKind","isNativeDocumentPreviewAvailable","CameraPreview","ResponsivePreviewContainer","PREVIEW_WIDTH","PREVIEW_HEIGHT","WHATSAPP_ASPECT_RATIO","PORTRAIT_PREVIEW_ASPECT_RATIO","DEFAULT_PREVIEW_DIMENSION_CONFIG","calcPreviewDimensions","calcPortraitPreviewDimensions","usePreviewDimensions","usePortraitPreviewDimensions","CameraMediaLibrary","MediaLibraryScreen","RecordAudioScreen","ImagePreview","VideoPreview","DocumentPreview","AudioPreview","MediaMetadataHeader","ExpandableFab","ViewerCounter","DocumentTile","AudioTile","createLibraryIconRegistry","libraryIconRegistry","PlusCloseIcon","CircularSeekIcon","ViewDetailsIcon","libraryPalette","useLibraryPalette","createPalette","wp","hp","ms","fs","SCREEN_W","SCREEN_H","BASE_W","BASE_H","getFileSize","refreshAssetMetadata","refreshAssetMetadataBatch"],"sourceRoot":"..\\..\\src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,kBAAe;AAClD,SAASC,iBAAiB,QAAQ,sBAAmB;AACrD,SAASC,oBAAoB,EAAEC,qBAAqB,QAAQ,YAAS;AACrE;AACA;AACA;AACA;AACA,SAASC,qBAAqB,QAAQ,oBAAiB;;AAEvD;;AAWA;AACA,SACEC,eAAe,EACfC,oBAAoB,EACpBC,cAAc,EACdC,mBAAmB,EACnBC,mBAAmB,EACnBC,iBAAiB,EACjBC,mBAAmB,EACnBC,UAAU,EACVC,UAAU,EACVC,UAAU,EACVC,0BAA0B,QACrB,YAAS;;AAEhB;AACA,SACEC,qBAAqB,EACrBC,wBAAwB,EACxBC,iBAAiB;AACjB;AACAC,yBAAyB,EACzBC,2BAA2B,EAC3BC,yBAAyB,EACzBC,kBAAkB,EAClBC,wBAA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ACrBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,qBAAqB,EACrBC,6BAA6B,EAC7BC,oBAAoB,EACpBC,4BAA4B,QACvB,iCAA8B;AAGrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE;AACAC,kBAAkB,EAClBC,kBAAkB,EAClBC,iBAAiB;AACjB;AACAC,YAAY,EACZC,YAAY,EACZC,eAAe,EACfC,YAAY,EACZC,mBAAmB;AACnB;AACAC,aAAa,EACbC,aAAa,EACbC,YAAY,EACZC,SAAS;AACT;AACAC,yBAAyB,EACzBC,mBAAmB,EACnBC,aAAa,EACbC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,EACdC,iBAAiB,EACjBC,aAAa,EACbC,EAAE,EACFC,EAAE,EACFC,EAAE,EACFC,EAAE,EACFC,QAAQ,EACRC,QAAQ,EACRC,MAAM,EACNC,MAAM;AACN;AACAC,WAAW,EACXC,oBAAoB,EACpBC,yBAAyB,QACpB,oBAAW","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=jest-globals.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\src","sources":["jest-globals.d.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * CameraMediaLibrary — the batteries-included media library screen.
5
+ *
6
+ * This is the drop-in entry point: ONE element renders the whole shell the
7
+ * example app renders — the category pills, the swipeable category pager, the
8
+ * Plus/Cross FAB, the full-screen viewer with its scrubber and counter, the
9
+ * document/audio preview cards, the record-audio screen, the SQLCipher-backed
10
+ * library and upload progress:
11
+ *
12
+ * ```tsx
13
+ * export default function App() {
14
+ * return (
15
+ * <CameraMediaLibrary
16
+ * locale={myApp.language} // any BCP-47 tag the host already uses
17
+ * bundles={MY_TRANSLATIONS} // the host's existing translation data
18
+ * uploadUrl="https://api.example.com/upload"
19
+ * />
20
+ * );
21
+ * }
22
+ * ```
23
+ *
24
+ * It wraps {@link MediaLibraryScreen} in the plugin's three providers —
25
+ * `CameraThemeProvider`, `CameraIconProvider`, `CameraLocalizationProvider` —
26
+ * so a host needs no provider boilerplate of its own. Hosts that already mount
27
+ * those providers (because they use other plugin surfaces too) should render
28
+ * `<MediaLibraryScreen />` directly instead and skip the duplication.
29
+ *
30
+ * Defaults are the shipped design: omitting `theme` keeps the plugin's palette,
31
+ * omitting `icons` uses {@link libraryIconRegistry} (the shell's hand-authored
32
+ * outline set), and omitting `locale`/`bundles` renders English.
33
+ *
34
+ * The props are an alternative to `configureCameraPlugin`, not an addition to
35
+ * it. Configure language and icons through either one — a bare
36
+ * `<CameraMediaLibrary />` inherits whatever `configureCameraPlugin` set, and
37
+ * localization props passed here take over from it (they replace the plugin's
38
+ * localization config rather than merging into it).
39
+ */
40
+ import { useMemo } from 'react';
41
+ import { CameraLocalizationProvider } from "../localization.js";
42
+ import { CameraThemeProvider } from "../theme.js";
43
+ import { CameraIconProvider } from "../icons.js";
44
+ import { libraryIconRegistry } from "./libraryIconRegistry.js";
45
+ import { MediaLibraryScreen } from "./MediaLibraryScreen.js";
46
+ import { jsx as _jsx } from "react/jsx-runtime";
47
+ export const CameraMediaLibrary = ({
48
+ theme,
49
+ icons,
50
+ // ── Localization (forwarded to CameraLocalizationProvider) ──
51
+ locale,
52
+ version,
53
+ translate,
54
+ translations,
55
+ bundles,
56
+ fallbackLocale,
57
+ isRtl,
58
+ languageProvider,
59
+ // ── Everything else belongs to the screen itself ──
60
+ ...screenProps
61
+ }) => {
62
+ // The shell's icons are the DEFAULT registry, not a replacement of the host's:
63
+ // a caller passing only `overrides` still gets the outline set underneath.
64
+ // Per-icon `customIcons` registered through `configureCameraPlugin` also
65
+ // survive — they resolve as global overrides, which outrank any registry.
66
+ const iconConfig = useMemo(() => ({
67
+ registry: libraryIconRegistry,
68
+ ...icons
69
+ }), [icons]);
70
+
71
+ // Mount the localization provider ONLY when the host actually passes
72
+ // localization props. `CameraLocalizationProvider` applies its props with the
73
+ // REPLACE semantics of `setCameraLocalization`, so mounting it with every
74
+ // field undefined would clear a language and bundles the host had already
75
+ // registered through `configureCameraPlugin({ language, translations })` —
76
+ // the setup path the README teaches. Left unmounted, the shell still reads
77
+ // that same global store, because `useCameraLocalization` subscribes to it
78
+ // directly rather than to this context. Both integration styles therefore
79
+ // work; what must not happen is one silently erasing the other.
80
+ //
81
+ // A `languageProvider` bound globally is safe either way: the provider is the
82
+ // one field the REPLACE deliberately leaves alone, so automatic language
83
+ // synchronization keeps working even when this shell owns localization.
84
+ const ownsLocalization = locale !== undefined || version !== undefined || translate !== undefined || translations !== undefined || bundles !== undefined || fallbackLocale !== undefined || isRtl !== undefined || languageProvider !== undefined;
85
+ const screen = /*#__PURE__*/_jsx(MediaLibraryScreen, {
86
+ ...screenProps
87
+ });
88
+ return /*#__PURE__*/_jsx(CameraThemeProvider, {
89
+ theme: theme,
90
+ children: /*#__PURE__*/_jsx(CameraIconProvider, {
91
+ config: iconConfig,
92
+ children: ownsLocalization ? /*#__PURE__*/_jsx(CameraLocalizationProvider, {
93
+ locale: locale,
94
+ version: version,
95
+ translate: translate,
96
+ translations: translations,
97
+ bundles: bundles,
98
+ fallbackLocale: fallbackLocale,
99
+ isRtl: isRtl,
100
+ languageProvider: languageProvider,
101
+ children: screen
102
+ }) : screen
103
+ })
104
+ });
105
+ };
106
+ CameraMediaLibrary.displayName = 'CameraMediaLibrary';
107
+ //# sourceMappingURL=MediaLibrary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useMemo","CameraLocalizationProvider","CameraThemeProvider","CameraIconProvider","libraryIconRegistry","MediaLibraryScreen","jsx","_jsx","CameraMediaLibrary","theme","icons","locale","version","translate","translations","bundles","fallbackLocale","isRtl","languageProvider","screenProps","iconConfig","registry","ownsLocalization","undefined","screen","children","config","displayName"],"sourceRoot":"..\\..\\..\\src","sources":["library/MediaLibrary.tsx"],"mappings":";;AAAA;AACA;AACA;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