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,35 @@
1
+ "use strict";
2
+
3
+ import { Platform, requireNativeComponent, View } from 'react-native';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ // The native blur is an Android-only capability (a pure-Kotlin snapshot blur, no
6
+ // third-party library). It is resolved lazily and guarded by platform so iOS/web —
7
+ // or an app where the native view is not registered — fall back to a plain view
8
+ // instead of crashing. Callers overlay their own dim scrim, so the fallback simply
9
+ // renders no blur.
10
+ let NativeBlurComponent = null;
11
+ if (Platform.OS === 'android') {
12
+ try {
13
+ NativeBlurComponent = requireNativeComponent('CustomBlurBackground');
14
+ } catch {
15
+ NativeBlurComponent = null;
16
+ }
17
+ }
18
+ export const NativeBlurView = props => {
19
+ if (NativeBlurComponent) {
20
+ return /*#__PURE__*/_jsx(NativeBlurComponent, {
21
+ ...props
22
+ });
23
+ }
24
+ // Graceful fallback: a plain (non-blurring) view so layout is unaffected.
25
+ const {
26
+ active,
27
+ blurRadius,
28
+ downsampleFactor,
29
+ ...rest
30
+ } = props;
31
+ return /*#__PURE__*/_jsx(View, {
32
+ ...rest
33
+ });
34
+ };
35
+ //# sourceMappingURL=NativeBlurView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","requireNativeComponent","View","jsx","_jsx","NativeBlurComponent","OS","NativeBlurView","props","active","blurRadius","downsampleFactor","rest"],"sourceRoot":"..\\..\\src","sources":["NativeBlurView.tsx"],"mappings":";;AACA,SACEA,QAAQ,EACRC,sBAAsB,EACtBC,IAAI,QAEC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAWtB;AACA;AACA;AACA;AACA;AACA,IAAIC,mBAA8D,GAAG,IAAI;AACzE,IAAIL,QAAQ,CAACM,EAAE,KAAK,SAAS,EAAE;EAC7B,IAAI;IACFD,mBAAmB,GACjBJ,sBAAsB,CAAsB,sBAAsB,CAAC;EACvE,CAAC,CAAC,MAAM;IACNI,mBAAmB,GAAG,IAAI;EAC5B;AACF;AAEA,OAAO,MAAME,cAAuC,GAAIC,KAAK,IAAK;EAChE,IAAIH,mBAAmB,EAAE;IACvB,oBAAOD,IAAA,CAACC,mBAAmB;MAAA,GAAKG;IAAK,CAAG,CAAC;EAC3C;EACA;EACA,MAAM;IAAEC,MAAM;IAAEC,UAAU;IAAEC,gBAAgB;IAAE,GAAGC;EAAK,CAAC,GAAGJ,KAAK;EAC/D,oBAAOJ,IAAA,CAACF,IAAI;IAAA,GAAKU;EAAI,CAAG,CAAC;AAC3B,CAAC","ignoreList":[]}
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+
3
+ import { TurboModuleRegistry } from 'react-native';
4
+ const createStubModule = () => ({
5
+ openCamera: async () => '',
6
+ openCameraPicker: async () => ({
7
+ cancelled: true,
8
+ assets: []
9
+ }),
10
+ openDocumentPicker: async () => ({
11
+ cancelled: true,
12
+ assets: []
13
+ }),
14
+ openAudioPicker: async () => ({
15
+ cancelled: true,
16
+ assets: []
17
+ }),
18
+ openImageVideoPicker: async () => ({
19
+ cancelled: true,
20
+ assets: []
21
+ }),
22
+ openMediaEditor: async () => ({
23
+ cancelled: true,
24
+ assets: []
25
+ }),
26
+ openDocument: async () => false,
27
+ startUpload: async () => undefined,
28
+ getUploadState: async () => '[]',
29
+ getNotificationHistory: async () => '[]',
30
+ clearNotificationHistory: async () => undefined,
31
+ getDeviceCapabilities: async () => ({}),
32
+ cropImage: async () => '',
33
+ rotateImage: async () => '',
34
+ applyFilter: async () => '',
35
+ createAlbum: async () => false,
36
+ moveMediaToAlbum: async () => false,
37
+ deleteMedia: async () => false,
38
+ secureDeleteMedia: async () => ({
39
+ deleted: false,
40
+ securelyOverwritten: false,
41
+ fullySecure: false,
42
+ originalBytes: 0,
43
+ overwrittenBytes: 0,
44
+ derivedFilesErased: 0,
45
+ derivedFilesFailed: 0
46
+ }),
47
+ deleteStoredMedia: async () => false,
48
+ shareMedia: async () => false,
49
+ setCameraFlash: async () => undefined,
50
+ setCameraTimer: async () => undefined,
51
+ enableCameraGrid: async () => undefined,
52
+ setMediaCaption: async () => false,
53
+ getMediaMetadata: async () => ({}),
54
+ getRecordedOriginalSize: async () => 0,
55
+ trimVideo: async () => '',
56
+ compressVideo: async () => '',
57
+ compressImage: async () => '',
58
+ scanQRCode: async () => '',
59
+ enableFaceDetection: async () => undefined,
60
+ setFaceEffect: async () => undefined,
61
+ setCameraTheme: async () => undefined,
62
+ setCameraConfig: async () => undefined,
63
+ // Media Storage Features
64
+ initializeMediaStorage: async () => ({
65
+ success: true
66
+ }),
67
+ publishMedia: async () => ({
68
+ success: false
69
+ }),
70
+ publishBatch: async () => ({
71
+ totalCount: 0,
72
+ successCount: 0,
73
+ failureCount: 0
74
+ }),
75
+ getCachedMedia: async () => [],
76
+ getPublishedMedia: async () => [],
77
+ getStorageStats: async () => ({}),
78
+ cleanupOldCache: async () => ({
79
+ success: false,
80
+ filesRemoved: 0,
81
+ spaceFreedMB: 0
82
+ }),
83
+ getFailedTransfers: async () => [],
84
+ retryFailedTransfers: async () => [],
85
+ playAudio: async () => undefined,
86
+ pauseAudio: async () => undefined,
87
+ resumeAudio: async () => undefined,
88
+ seekAudio: async () => undefined,
89
+ stopAudio: async () => undefined,
90
+ setLocalization: () => undefined,
91
+ // Audio Recording Features
92
+ startAudioRecording: async () => ({
93
+ filePath: '',
94
+ mimeType: ''
95
+ }),
96
+ stopAudioRecording: async () => ({
97
+ filePath: '',
98
+ durationMs: 0,
99
+ fileSizeBytes: 0,
100
+ mimeType: ''
101
+ }),
102
+ cancelAudioRecording: async () => ({
103
+ deleted: false
104
+ }),
105
+ stopAndPublishAudioRecording: async () => ({
106
+ id: '',
107
+ uri: '',
108
+ documentUri: '',
109
+ type: 'audio',
110
+ fileName: '',
111
+ mimeType: '',
112
+ size: 0,
113
+ duration: 0,
114
+ dateTaken: 0
115
+ }),
116
+ pauseAudioRecording: async () => undefined,
117
+ resumeAudioRecording: async () => undefined,
118
+ getAudioRecordingState: async () => ({
119
+ state: 'idle',
120
+ filePath: '',
121
+ durationMs: 0,
122
+ isPauseSupported: false
123
+ }),
124
+ getAudioAmplitude: async () => 0
125
+ });
126
+ const nativeModule = TurboModuleRegistry.get('CustomCamera') ?? createStubModule();
127
+ export default nativeModule;
128
+ //# sourceMappingURL=NativeCustomCamera.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","createStubModule","openCamera","openCameraPicker","cancelled","assets","openDocumentPicker","openAudioPicker","openImageVideoPicker","openMediaEditor","openDocument","startUpload","undefined","getUploadState","getNotificationHistory","clearNotificationHistory","getDeviceCapabilities","cropImage","rotateImage","applyFilter","createAlbum","moveMediaToAlbum","deleteMedia","secureDeleteMedia","deleted","securelyOverwritten","fullySecure","originalBytes","overwrittenBytes","derivedFilesErased","derivedFilesFailed","deleteStoredMedia","shareMedia","setCameraFlash","setCameraTimer","enableCameraGrid","setMediaCaption","getMediaMetadata","getRecordedOriginalSize","trimVideo","compressVideo","compressImage","scanQRCode","enableFaceDetection","setFaceEffect","setCameraTheme","setCameraConfig","initializeMediaStorage","success","publishMedia","publishBatch","totalCount","successCount","failureCount","getCachedMedia","getPublishedMedia","getStorageStats","cleanupOldCache","filesRemoved","spaceFreedMB","getFailedTransfers","retryFailedTransfers","playAudio","pauseAudio","resumeAudio","seekAudio","stopAudio","setLocalization","startAudioRecording","filePath","mimeType","stopAudioRecording","durationMs","fileSizeBytes","cancelAudioRecording","stopAndPublishAudioRecording","id","uri","documentUri","type","fileName","size","duration","dateTaken","pauseAudioRecording","resumeAudioRecording","getAudioRecordingState","state","isPauseSupported","getAudioAmplitude","nativeModule","get"],"sourceRoot":"..\\..\\src","sources":["NativeCustomCamera.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAA0B,cAAc;AAEpE,MAAMC,gBAAgB,GAAGA,CAAA,MAAa;EACpCC,UAAU,EAAE,MAAAA,CAAA,KAAY,EAAE;EAC1BC,gBAAgB,EAAE,MAAAA,CAAA,MAAa;IAAEC,SAAS,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAG,CAAC,CAAC;EAC/DC,kBAAkB,EAAE,MAAAA,CAAA,MAAa;IAAEF,SAAS,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAG,CAAC,CAAC;EACjEE,eAAe,EAAE,MAAAA,CAAA,MAAa;IAAEH,SAAS,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAG,CAAC,CAAC;EAC9DG,oBAAoB,EAAE,MAAAA,CAAA,MAAa;IAAEJ,SAAS,EAAE,IAAI;IAAEC,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]}
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+
3
+ function createUnsupportedPlatformError() {
4
+ return new Error('react-native-ensys-camera-x is not supported on web');
5
+ }
6
+ function rejectUnsupported() {
7
+ return Promise.reject(createUnsupportedPlatformError());
8
+ }
9
+ const CustomCamera = {
10
+ openCamera() {
11
+ return rejectUnsupported();
12
+ },
13
+ openCameraPicker(_options) {
14
+ return rejectUnsupported();
15
+ },
16
+ openDocumentPicker(_options) {
17
+ return rejectUnsupported();
18
+ },
19
+ openAudioPicker(_options) {
20
+ return rejectUnsupported();
21
+ },
22
+ openImageVideoPicker(_options) {
23
+ return rejectUnsupported();
24
+ },
25
+ openMediaEditor(_options) {
26
+ return rejectUnsupported();
27
+ },
28
+ openDocument(_uri, _mimeType) {
29
+ return rejectUnsupported();
30
+ },
31
+ startUpload(_uris, _uploadUrl) {
32
+ return rejectUnsupported();
33
+ },
34
+ getUploadState() {
35
+ return rejectUnsupported();
36
+ },
37
+ getNotificationHistory() {
38
+ return rejectUnsupported();
39
+ },
40
+ clearNotificationHistory() {
41
+ return rejectUnsupported();
42
+ },
43
+ getDeviceCapabilities() {
44
+ return rejectUnsupported();
45
+ },
46
+ cropImage(_uri, _options) {
47
+ return rejectUnsupported();
48
+ },
49
+ rotateImage(_uri, _degrees) {
50
+ return rejectUnsupported();
51
+ },
52
+ applyFilter(_uri, _filterType) {
53
+ return rejectUnsupported();
54
+ },
55
+ createAlbum(_albumName) {
56
+ return rejectUnsupported();
57
+ },
58
+ moveMediaToAlbum(_uris, _albumId) {
59
+ return rejectUnsupported();
60
+ },
61
+ deleteMedia(_uris) {
62
+ return rejectUnsupported();
63
+ },
64
+ secureDeleteMedia(_uri, _options) {
65
+ return rejectUnsupported();
66
+ },
67
+ shareMedia(_uris, _mimeType) {
68
+ return rejectUnsupported();
69
+ },
70
+ setCameraFlash(_mode) {
71
+ return rejectUnsupported();
72
+ },
73
+ setCameraTimer(_delaySeconds) {
74
+ return rejectUnsupported();
75
+ },
76
+ enableCameraGrid(_enabled) {
77
+ return rejectUnsupported();
78
+ },
79
+ setMediaCaption(_uri, _caption) {
80
+ return rejectUnsupported();
81
+ },
82
+ getMediaMetadata(_uri) {
83
+ return rejectUnsupported();
84
+ },
85
+ getRecordedOriginalSize(_mediaId) {
86
+ return rejectUnsupported();
87
+ },
88
+ trimVideo(_uri, _startTime, _endTime) {
89
+ return rejectUnsupported();
90
+ },
91
+ compressVideo(uri, _qualityOrOption) {
92
+ // For web fallback, return the original URI without modification
93
+ return Promise.resolve(uri);
94
+ },
95
+ compressImage(uri, _qualityOrOption) {
96
+ // Same web fallback as compressVideo: hand the original URI back unmodified rather than
97
+ // rejecting, so a caller that only wants a smaller copy still gets a usable one.
98
+ return Promise.resolve(uri);
99
+ },
100
+ scanQRCode() {
101
+ return rejectUnsupported();
102
+ },
103
+ enableFaceDetection(_enabled) {
104
+ return rejectUnsupported();
105
+ },
106
+ setFaceEffect(_effectType) {
107
+ return rejectUnsupported();
108
+ },
109
+ setCameraTheme(_theme) {
110
+ return rejectUnsupported();
111
+ },
112
+ setCameraConfig(_configJson) {
113
+ return rejectUnsupported();
114
+ },
115
+ setLocalization(_translations, _isRtl, _locale) {},
116
+ // Audio Recording Features (unsupported on web)
117
+ startAudioRecording(_options) {
118
+ return rejectUnsupported();
119
+ },
120
+ stopAudioRecording() {
121
+ return rejectUnsupported();
122
+ },
123
+ cancelAudioRecording() {
124
+ return rejectUnsupported();
125
+ },
126
+ stopAndPublishAudioRecording() {
127
+ return rejectUnsupported();
128
+ },
129
+ pauseAudioRecording() {
130
+ return rejectUnsupported();
131
+ },
132
+ resumeAudioRecording() {
133
+ return rejectUnsupported();
134
+ },
135
+ getAudioRecordingState() {
136
+ return rejectUnsupported();
137
+ },
138
+ getAudioAmplitude() {
139
+ return rejectUnsupported();
140
+ }
141
+ };
142
+ export default CustomCamera;
143
+ //# sourceMappingURL=NativeCustomCamera.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createUnsupportedPlatformError","Error","rejectUnsupported","Promise","reject","CustomCamera","openCamera","openCameraPicker","_options","openDocumentPicker","openAudioPicker","openImageVideoPicker","openMediaEditor","openDocument","_uri","_mimeType","startUpload","_uris","_uploadUrl","getUploadState","getNotificationHistory","clearNotificationHistory","getDeviceCapabilities","cropImage","rotateImage","_degrees","applyFilter","_filterType","createAlbum","_albumName","moveMediaToAlbum","_albumId","deleteMedia","secureDeleteMedia","shareMedia","setCameraFlash","_mode","setCameraTimer","_delaySeconds","enableCameraGrid","_enabled","setMediaCaption","_caption","getMediaMetadata","getRecordedOriginalSize","_mediaId","trimVideo","_startTime","_endTime","compressVideo","uri","_qualityOrOption","resolve","compressImage","scanQRCode","enableFaceDetection","setFaceEffect","_effectType","setCameraTheme","_theme","setCameraConfig","_configJson","setLocalization","_translations","_isRtl","_locale","startAudioRecording","stopAudioRecording","cancelAudioRecording","stopAndPublishAudioRecording","pauseAudioRecording","resumeAudioRecording","getAudioRecordingState","getAudioAmplitude"],"sourceRoot":"..\\..\\src","sources":["NativeCustomCamera.web.ts"],"mappings":";;AAAA,SAASA,8BAA8BA,CAAA,EAAU;EAC/C,OAAO,IAAIC,KAAK,CAAC,qDAAqD,CAAC;AACzE;AAEA,SAASC,iBAAiBA,CAAA,EAAkB;EAC1C,OAAOC,OAAO,CAACC,MAAM,CAACJ,8BAA8B,CAAC,CAAC,CAAC;AACzD;AAEA,MAAMK,YAAY,GAAG;EACnBC,UAAUA,CAAA,EAAoB;IAC5B,OAAOJ,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDK,gBAAgBA,CAACC,QAAgB,EAAmB;IAClD,OAAON,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDO,kBAAkBA,CAACD,QAAgB,EAAmB;IACpD,OAAON,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDQ,eAAeA,CAACF,QAAgB,EAAmB;IACjD,OAAON,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDS,oBAAoBA,CAACH,QAAgB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mB,EAAiB;IAChD,OAAOvD,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDwD,cAAcA,CAACC,MAAc,EAAiB;IAC5C,OAAOzD,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAED0D,eAAeA,CAACC,WAAmB,EAAiB;IAClD,OAAO3D,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAED4D,eAAeA,CAACC,aAAqB,EAAEC,MAAe,EAAEC,OAAe,EAAQ,CAAC,CAAC;EAEjF;EACAC,mBAAmBA,CAAC1D,QAAgB,EAAmB;IACrD,OAAON,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDiE,kBAAkBA,CAAA,EAAoB;IACpC,OAAOjE,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDkE,oBAAoBA,CAAA,EAAoB;IACtC,OAAOlE,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDmE,4BAA4BA,CAAA,EAAoB;IAC9C,OAAOnE,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDoE,mBAAmBA,CAAA,EAAkB;IACnC,OAAOpE,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDqE,oBAAoBA,CAAA,EAAkB;IACpC,OAAOrE,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDsE,sBAAsBA,CAAA,EAAoB;IACxC,OAAOtE,iBAAiB,CAAC,CAAC;EAC5B,CAAC;EAEDuE,iBAAiBA,CAAA,EAAoB;IACnC,OAAOvE,iBAAiB,CAAC,CAAC;EAC5B;AACF,CAAC;AAED,eAAeG,YAAY","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ import { requireNativeComponent } from 'react-native';
4
+ export const NativeCustomVideoView = requireNativeComponent('NativeCustomVideoView');
5
+ //# sourceMappingURL=NativeCustomVideoView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["requireNativeComponent","NativeCustomVideoView"],"sourceRoot":"..\\..\\src","sources":["NativeCustomVideoView.ts"],"mappings":";;AAAA,SAAoCA,sBAAsB,QAAwB,cAAc;AA6BhG,OAAO,MAAMC,qBAAqB,GAAGD,sBAAsB,CAA6B,uBAAuB,CAAC","ignoreList":[]}
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+
3
+ import { Platform, requireNativeComponent, View } from 'react-native';
4
+
5
+ /**
6
+ * The renderer families the native in-app document preview supports, all built on standard
7
+ * Android framework APIs (no third-party preview library):
8
+ * - `pdf` → PdfRenderer pages in a scrolling list (lazy, memory-bounded rasterization)
9
+ * - `text` → plain text in a scrollable native TextView
10
+ * - `code` → structured text (JSON/XML/…) — same renderer with a monospace face
11
+ * - `html` → a locked-down WebView (no JavaScript, no network, navigation blocked)
12
+ * - `image` → image-based documents (scans/photos exported as documents), down-sampled decode
13
+ * - `ppt`/`pptx` → dedicated PowerPoint extractors + Canvas slide viewer
14
+ * - `docx`/`xlsx`/`odt`/`ods`/`rtf`/`csv`/`epub` → native format parsers (OOXML/ODF
15
+ * zip+XML structure, RTF control words, CSV records, EPUB spine) that reproduce the
16
+ * ORIGINAL geometry — true page size/margins, authored column widths/row heights/merges,
17
+ * fonts/sizes/colors/spacing, embedded images — rendered by the same locked WebView engine.
18
+ */
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ // Extension → renderer family. Formats without a parser here (binary-era DOC/PPT/XLS, Apple
21
+ // PAGES, archives, …) return null and get the informational card.
22
+ const EXTENSION_KINDS = {
23
+ pdf: 'pdf',
24
+ txt: 'text',
25
+ log: 'text',
26
+ text: 'text',
27
+ md: 'text',
28
+ json: 'code',
29
+ xml: 'code',
30
+ tsv: 'code',
31
+ yaml: 'code',
32
+ yml: 'code',
33
+ html: 'html',
34
+ htm: 'html',
35
+ xhtml: 'html',
36
+ jpg: 'image',
37
+ jpeg: 'image',
38
+ png: 'image',
39
+ gif: 'image',
40
+ webp: 'image',
41
+ bmp: 'image',
42
+ heic: 'image',
43
+ heif: 'image',
44
+ hif: 'image',
45
+ avif: 'image',
46
+ avifs: 'image',
47
+ // Native office-format parsers — original layout geometry preserved.
48
+ docx: 'docx',
49
+ xlsx: 'xlsx',
50
+ ppt: 'ppt',
51
+ pptx: 'pptx',
52
+ pps: 'ppt',
53
+ ppsx: 'pptx',
54
+ pot: 'ppt',
55
+ potx: 'pptx',
56
+ // Macro-enabled variants are ordinary PresentationML zips. Without these the extension lookup
57
+ // misses and SAF providers frequently report application/octet-stream, so the MIME fallback
58
+ // can't rescue them either.
59
+ pptm: 'pptx',
60
+ ppsm: 'pptx',
61
+ potm: 'pptx',
62
+ odt: 'odt',
63
+ ods: 'ods',
64
+ rtf: 'rtf',
65
+ csv: 'csv',
66
+ epub: 'epub'
67
+ };
68
+
69
+ // MIME type → renderer family, used when the file name carries no useful extension.
70
+ const MIME_KINDS = {
71
+ 'application/pdf': 'pdf',
72
+ 'application/json': 'code',
73
+ 'application/xml': 'code',
74
+ 'text/xml': 'code',
75
+ 'text/csv': 'csv',
76
+ 'text/comma-separated-values': 'csv',
77
+ 'text/html': 'html',
78
+ 'application/xhtml+xml': 'html',
79
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'docx',
80
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'xlsx',
81
+ 'application/vnd.ms-powerpoint': 'ppt',
82
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation': 'pptx',
83
+ 'application/vnd.openxmlformats-officedocument.presentationml.slideshow': 'pptx',
84
+ 'application/vnd.openxmlformats-officedocument.presentationml.template': 'pptx',
85
+ 'application/powerpoint': 'ppt',
86
+ 'application/mspowerpoint': 'ppt',
87
+ 'application/x-mspowerpoint': 'ppt',
88
+ 'application/x-powerpoint': 'ppt',
89
+ 'application/vnd.ms-powerpoint.presentation.macroenabled.12': 'pptx',
90
+ 'application/vnd.ms-powerpoint.slideshow.macroenabled.12': 'pptx',
91
+ 'application/vnd.oasis.opendocument.text': 'odt',
92
+ 'application/vnd.oasis.opendocument.spreadsheet': 'ods',
93
+ 'application/rtf': 'rtf',
94
+ 'text/rtf': 'rtf',
95
+ 'application/epub+zip': 'epub'
96
+ };
97
+
98
+ /**
99
+ * Maps a document's file name / MIME type to the native renderer able to preview it in-app,
100
+ * or `null` when no parser exists for the format (binary-era DOC/XLS, Apple PAGES,
101
+ * archives, …) — those should show an informational card instead. The extension wins over the
102
+ * MIME type because SAF providers frequently report generic types (application/octet-stream)
103
+ * for files whose names identify them precisely.
104
+ */
105
+ export function getDocumentPreviewKind(fileName, mimeType) {
106
+ if (fileName) {
107
+ const dot = fileName.lastIndexOf('.');
108
+ if (dot >= 0 && dot < fileName.length - 1) {
109
+ const kind = EXTENSION_KINDS[fileName.slice(dot + 1).toLowerCase()];
110
+ if (kind) return kind;
111
+ }
112
+ }
113
+ if (mimeType) {
114
+ const normalized = mimeType.toLowerCase();
115
+ const direct = MIME_KINDS[normalized];
116
+ if (direct) return direct;
117
+ if (normalized.startsWith('text/')) return 'text';
118
+ if (normalized.startsWith('image/')) return 'image';
119
+ }
120
+ return null;
121
+ }
122
+
123
+ // Native (Android) in-app document preview — PdfRenderer / TextView / locked-down WebView /
124
+ // down-sampled image decode, all standard framework APIs. Resolved lazily and platform-guarded
125
+ // so non-Android targets (or an app without the native view registered) fall back to a plain
126
+ // view, exactly like NativeAudioPlayerView.
127
+ let NativeDocumentComponent = null;
128
+ if (Platform.OS === 'android') {
129
+ try {
130
+ NativeDocumentComponent = requireNativeComponent('CustomDocumentPreview');
131
+ } catch {
132
+ NativeDocumentComponent = null;
133
+ }
134
+ }
135
+
136
+ /** True when the native in-app preview is available on this platform/build. */
137
+ export const isNativeDocumentPreviewAvailable = () => NativeDocumentComponent !== null;
138
+ export const NativeDocumentPreviewView = props => {
139
+ if (NativeDocumentComponent) {
140
+ return /*#__PURE__*/_jsx(NativeDocumentComponent, {
141
+ ...props
142
+ });
143
+ }
144
+ const {
145
+ src,
146
+ kind,
147
+ active,
148
+ onPreviewLoad,
149
+ onPreviewError,
150
+ ...rest
151
+ } = props;
152
+ return /*#__PURE__*/_jsx(View, {
153
+ ...rest
154
+ });
155
+ };
156
+ //# sourceMappingURL=NativeDocumentPreviewView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","requireNativeComponent","View","jsx","_jsx","EXTENSION_KINDS","pdf","txt","log","text","md","json","xml","tsv","yaml","yml","html","htm","xhtml","jpg","jpeg","png","gif","webp","bmp","heic","heif","hif","avif","avifs","docx","xlsx","ppt","pptx","pps","ppsx","pot","potx","pptm","ppsm","potm","odt","ods","rtf","csv","epub","MIME_KINDS","getDocumentPreviewKind","fileName","mimeType","dot","lastIndexOf","length","kind","slice","toLowerCase","normalized","direct","startsWith","NativeDocumentComponent","OS","isNativeDocumentPreviewAvailable","NativeDocumentPreviewView","props","src","active","onPreviewLoad","onPreviewError","rest"],"sourceRoot":"..\\..\\src","sources":["NativeDocumentPreviewView.tsx"],"mappings":";;AACA,SACEA,QAAQ,EACRC,sBAAsB,EACtBC,IAAI,QAGC,cAAc;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAbA,SAAAC,GAAA,IAAAC,IAAA;AA8CA;AACA;AACA,MAAMC,eAAoD,GAAG;EAC3DC,GAAG,EAAE,KAAK;EACVC,GAAG,EAAE,MAAM;EACXC,GAAG,EAAE,MAAM;EACXC,IAAI,EAAE,MAAM;EACZC,EAAE,EAAE,MAAM;EACVC,IAAI,EAAE,MAAM;EACZC,GAAG,EAAE,MAAM;EACXC,GAAG,EAAE,MAAM;EACXC,IAAI,EAAE,MAAM;EACZC,GAAG,EAAE,MAAM;EACXC,IAAI,EAAE,MAAM;EACZC,GAAG,EAAE,MAAM;EACXC,KAAK,EAAE,MAAM;EACbC,GAAG,EAAE,OAAO;EACZC,IAAI,EAAE,OAAO;EACbC,GAAG,EAAE,OAAO;EACZC,GAAG,EAAE,OAAO;EACZC,IAAI,EAAE,OAAO;EACbC,GAAG,EAAE,OAAO;EACZC,IAAI,EAAE,OAAO;EACbC,IAAI,E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AM;IAAEC,aAAa;IAAEC,cAAc;IAAE,GAAGC;EAAK,CAAC,GAAGL,KAAK;EAC3E,oBAAO3D,IAAA,CAACF,IAAI;IAAA,GAAKkE;EAAI,CAAG,CAAC;AAC3B,CAAC","ignoreList":[]}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+
3
+ import { Image, View } from 'react-native';
4
+ import { resolveNativeComponent, toImageSourceUri } from "./nativeComponentSupport.js";
5
+ import { NativeAnimatedImageView } from "./NativeAnimatedImageView.js";
6
+ import { isGifAsset, requiresNativeImageDecoder } from "./utils.js";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ // Native thumbnail view (Android). A JS <Image> cannot produce a thumbnail for a video at all —
9
+ // there is no frame to read without an extractor — and needs platform decoders for HEIF/AVIF, so
10
+ // list rows for those were left blank. The native view runs the library's own ThumbnailLoader
11
+ // (cover frame → extracted video frame → resolver thumbnail → downsampled decode, LRU cached).
12
+ const NativeMediaThumbnailComponent = resolveNativeComponent('CustomMediaThumbnail');
13
+
14
+ /** True when native thumbnail decoding is available on this platform/build. */
15
+ export const isNativeMediaThumbnailAvailable = () => NativeMediaThumbnailComponent !== null;
16
+
17
+ /**
18
+ * The best thumbnail JS alone can draw for this media.
19
+ *
20
+ * Reached whenever the native view is not in the binary — a host app built before it existed,
21
+ * or a non-Android target. A still image is fully renderable here: `<Image>` decodes JPEG, PNG,
22
+ * WebP, GIF and BMP, and {@link NativeAnimatedImageView} covers the containers Fresco cannot
23
+ * (HEIF/AVIF) plus animated GIFs, held on a single frame because a list tile wants a still.
24
+ *
25
+ * A video is the one case JS genuinely cannot serve: without a cover frame there is nothing to
26
+ * decode, so the tile holds its space instead of pointing an `<Image>` at an MP4 and logging a
27
+ * Fresco failure for every row on screen.
28
+ */
29
+ const MediaThumbnailFallback = props => {
30
+ const source = props.coverUri ?? props.src;
31
+ const uri = toImageSourceUri(source);
32
+ const isVideoWithoutCover = props.mediaType === 'video' && !props.coverUri;
33
+ if (!uri || isVideoWithoutCover) {
34
+ // Size/rounding live on the style either component receives.
35
+ return /*#__PURE__*/_jsx(View, {
36
+ style: props.style,
37
+ testID: props.testID
38
+ });
39
+ }
40
+ const descriptor = {
41
+ mimeType: props.mimeType,
42
+ fileName: props.fileName,
43
+ uri: source
44
+ };
45
+ if (isGifAsset(descriptor) || requiresNativeImageDecoder(descriptor)) {
46
+ return /*#__PURE__*/_jsx(NativeAnimatedImageView, {
47
+ src: uri,
48
+ style: props.style,
49
+ testID: props.testID,
50
+ resizeMode: props.resizeMode ?? 'cover'
51
+ // A tile is a still: decode the frame, never animate it behind a scrolling list.
52
+ ,
53
+ active: false
54
+ });
55
+ }
56
+ return /*#__PURE__*/_jsx(Image, {
57
+ style: props.style,
58
+ testID: props.testID,
59
+ source: {
60
+ uri
61
+ },
62
+ resizeMode: props.resizeMode ?? 'cover'
63
+ // Decode to the tile's size rather than the file's full resolution: a 12MP still decoded
64
+ // whole is ~48MB of bitmap for a ~56px row. No-op on iOS.
65
+ ,
66
+ resizeMethod: "resize"
67
+ });
68
+ };
69
+
70
+ /**
71
+ * Renders a media file's own thumbnail — an extracted frame for a video, the decoded image for
72
+ * a still — through the native decoder where the build has it and through
73
+ * {@link MediaThumbnailFallback} where it does not. Either way the underlying file is only ever
74
+ * read.
75
+ */
76
+ export const NativeMediaThumbnailView = props => {
77
+ if (NativeMediaThumbnailComponent) {
78
+ return /*#__PURE__*/_jsx(NativeMediaThumbnailComponent, {
79
+ ...props
80
+ });
81
+ }
82
+ return /*#__PURE__*/_jsx(MediaThumbnailFallback, {
83
+ ...props
84
+ });
85
+ };
86
+ /**
87
+ * Convenience wrapper that feeds a whole {@link CameraAsset} to {@link NativeMediaThumbnailView},
88
+ * so a list row does not have to know which of the asset's fields drive the decode.
89
+ */
90
+ export const MediaThumbnail = ({
91
+ asset,
92
+ style,
93
+ resizeMode = 'cover',
94
+ thumbnailSize,
95
+ testID
96
+ }) => /*#__PURE__*/_jsx(NativeMediaThumbnailView
97
+ // documentUri is the published copy; uri is where the file actually is for a capture.
98
+ , {
99
+ src: asset.uri || asset.documentUri,
100
+ mediaType: asset.type,
101
+ cachePath: asset.cachePath,
102
+ coverUri: asset.coverUri,
103
+ mimeType: asset.mimeType,
104
+ fileName: asset.fileName,
105
+ style: style,
106
+ resizeMode: resizeMode,
107
+ thumbnailSize: thumbnailSize,
108
+ testID: testID
109
+ });
110
+ //# sourceMappingURL=NativeMediaThumbnailView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Image","View","resolveNativeComponent","toImageSourceUri","NativeAnimatedImageView","isGifAsset","requiresNativeImageDecoder","jsx","_jsx","NativeMediaThumbnailComponent","isNativeMediaThumbnailAvailable","MediaThumbnailFallback","props","source","coverUri","src","uri","isVideoWithoutCover","mediaType","style","testID","descriptor","mimeType","fileName","resizeMode","active","resizeMethod","NativeMediaThumbnailView","MediaThumbnail","asset","thumbnailSize","documentUri","type","cachePath"],"sourceRoot":"..\\..\\src","sources":["NativeMediaThumbnailView.tsx"],"mappings":";;AACA,SACEA,KAAK,EACLC,IAAI,QAKC,cAAc;AAErB,SACEC,sBAAsB,EACtBC,gBAAgB,QACX,6BAA0B;AACjC,SAASC,uBAAuB,QAAQ,8BAA2B;AACnE,SAASC,UAAU,EAAEC,0BAA0B,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgCjE;AACA;AACA;AACA;AACA,MAAMC,6BAA6B,GACjCP,sBAAsB,CAAgC,sBAAsB,CAAC;;AAE/E;AACA,OAAO,MAAMQ,+BAA+B,GAAGA,CAAA,KAC7CD,6BAA6B,KAAK,IAAI;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,sBAAyD,GAAIC,KAAK,IAAK;EAC3E,MAAMC,MAAM,GAAGD,KAAK,CAACE,QAAQ,IAAIF,KAAK,CAACG,GAAG;EAC1C,MAAMC,GAAG,GAAGb,gBAAgB,CAACU,MAAM,CAAC;EACpC,MAAMI,mBAAm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AACA;AACA,OAAO,MAAMgB,cAAuC,GAAGA,CAAC;EACtDC,KAAK;EACLV,KAAK;EACLK,UAAU,GAAG,OAAO;EACpBM,aAAa;EACbV;AACF,CAAC,kBACCZ,IAAA,CAACmB;AACC;AAAA;EACAZ,GAAG,EAAEc,KAAK,CAACb,GAAG,IAAIa,KAAK,CAACE,WAAY;EACpCb,SAAS,EAAEW,KAAK,CAACG,IAAK;EACtBC,SAAS,EAAEJ,KAAK,CAACI,SAAU;EAC3BnB,QAAQ,EAAEe,KAAK,CAACf,QAAS;EACzBQ,QAAQ,EAAEO,KAAK,CAACP,QAAS;EACzBC,QAAQ,EAAEM,KAAK,CAACN,QAAS;EACzBJ,KAAK,EAAEA,KAAM;EACbK,UAAU,EAAEA,UAAW;EACvBM,aAAa,EAAEA,aAAc;EAC7BV,MAAM,EAAEA;AAAO,CAChB,CACF","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ import { resolveNativeComponent } from "./nativeComponentSupport.js";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ // Native SVG icon view (Android). ReactNative's own <Image> cannot decode an
6
+ // `<svg>` data URI on Android (Fresco ships no SVG decoder), so inline-`svg`
7
+ // icon customizations are drawn by the library's own bundled SvgDrawable parser
8
+ // through this view — no react-native-svg, no third-party dependency.
9
+ const NativeSvgIconComponent = resolveNativeComponent('CameraSvgIcon');
10
+
11
+ /** True when the bundled native SVG renderer is available on this platform/build. */
12
+ export const isNativeSvgIconAvailable = () => NativeSvgIconComponent !== null;
13
+
14
+ /**
15
+ * Draws inline SVG markup with the bundled native renderer when it is available,
16
+ * and otherwise renders [fallback] — the plugin's built-in default icon. This is
17
+ * how an inline-`svg` customization stays safe on a platform with no native half
18
+ * (iOS/web) or against an older linked binary: it silently shows the default
19
+ * artwork rather than a blank box.
20
+ */
21
+ export const NativeSvgIcon = ({
22
+ fallback,
23
+ ...props
24
+ }) => {
25
+ if (NativeSvgIconComponent) {
26
+ return /*#__PURE__*/_jsx(NativeSvgIconComponent, {
27
+ ...props
28
+ });
29
+ }
30
+ return fallback;
31
+ };
32
+ //# sourceMappingURL=NativeSvgIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["resolveNativeComponent","jsx","_jsx","NativeSvgIconComponent","isNativeSvgIconAvailable","NativeSvgIcon","fallback","props"],"sourceRoot":"..\\..\\src","sources":["NativeSvgIcon.tsx"],"mappings":";;AAOA,SAASA,sBAAsB,QAAQ,6BAA0B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAalE;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAC1BH,sBAAsB,CAAqB,eAAe,CAAC;;AAE7D;AACA,OAAO,MAAMI,wBAAwB,GAAGA,CAAA,KACtCD,sBAAsB,KAAK,IAAI;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,aAEZ,GAAGA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,KAAK;EAC9B,IAAIJ,sBAAsB,EAAE;IAC1B,oBAAOD,IAAA,CAACC,sBAAsB;MAAA,GAAKI;IAAK,CAAG,CAAC;EAC9C;EACA,OAAOD,QAAQ;AACjB,CAAC","ignoreList":[]}