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,928 @@
1
+ /**
2
+ * Hand-authored vector icons built ONLY from React Native primitives (View + borders +
3
+ * transforms). No third-party icon library, no react-native-svg, and no external SVG/PNG
4
+ * assets — every shape is composed from scratch so the set stays dependency-free and matches
5
+ * the app's clean, modern outline style.
6
+ *
7
+ * Every icon shares one contract — { size, color, strokeWidth } — so stroke width, sizing,
8
+ * padding and alignment stay identical across the whole set. Sizes are unitless (dp), so the
9
+ * caller scales them for different screen densities.
10
+ */
11
+ import type { FC } from 'react';
12
+ import { View, Text, Animated, StyleSheet, type ColorValue } from 'react-native';
13
+ import { libraryPalette as palette } from './palette';
14
+
15
+ export interface IconProps {
16
+ /** Overall square canvas size in dp. */
17
+ size?: number;
18
+ /** Stroke / fill color. */
19
+ color?: ColorValue;
20
+ /** Stroke thickness in dp — kept consistent across every icon. */
21
+ strokeWidth?: number;
22
+ style?: any;
23
+ progress?: any;
24
+ direction?: 'back' | 'forward';
25
+ label?: string;
26
+ [key: string]: any;
27
+ }
28
+
29
+ const DEFAULT_SIZE = 22;
30
+ const DEFAULT_COLOR = palette.white;
31
+ const DEFAULT_STROKE = 2;
32
+
33
+ /**
34
+ * A single Plus icon that morphs into a Cross (✕) as [progress] animates 0 → 1.
35
+ * When progress is omitted or 0, renders a clean Plus (+).
36
+ *
37
+ * The glyph is two crossed strokes — a "+" — that keep their full length the whole time. As
38
+ * progress runs, the whole glyph spins 225° (a half-turn flourish, preserving the original
39
+ * animated feel) so both strokes settle at 45°, forming a crisp, perfectly symmetric "✕" at
40
+ * progress 1 and a clean "+" at progress 0. The cross is drawn entirely from RN primitives
41
+ * (two rounded bars) — no icon library, no react-native-svg, no external SVG asset. Driven
42
+ * solely by the parent's Animated.Value, so there is exactly one source of truth for the
43
+ * transition in BOTH directions (open ⇄ close) with no internal state to desync.
44
+ */
45
+ export const PlusCloseIcon: FC<IconProps> = ({
46
+ size = 24,
47
+ color = DEFAULT_COLOR,
48
+ strokeWidth = 2.4,
49
+ progress,
50
+ style,
51
+ }) => {
52
+ const barLength = Math.round(size * 0.58);
53
+ // 0° → 225° = 180° flourish + the 45° needed to turn a "+" into an "✕".
54
+ let spin: any = '0deg';
55
+ if (progress && typeof (progress as any).interpolate === 'function') {
56
+ spin = (progress as Animated.Value).interpolate({
57
+ inputRange: [0, 1],
58
+ outputRange: ['0deg', '225deg'],
59
+ });
60
+ } else if (typeof progress === 'number') {
61
+ spin = `${progress * 225}deg`;
62
+ }
63
+
64
+ const horizontal = {
65
+ position: 'absolute' as const,
66
+ width: barLength,
67
+ height: strokeWidth,
68
+ borderRadius: strokeWidth,
69
+ backgroundColor: color,
70
+ };
71
+ const vertical = {
72
+ position: 'absolute' as const,
73
+ width: strokeWidth,
74
+ height: barLength,
75
+ borderRadius: strokeWidth,
76
+ backgroundColor: color,
77
+ };
78
+
79
+ return (
80
+ <Animated.View
81
+ style={[
82
+ styles.center,
83
+ { width: size, height: size, transform: [{ rotate: spin }] },
84
+ style,
85
+ ]}
86
+ >
87
+ {/* Both strokes stay crossed throughout — the container's rotation alone
88
+ carries the "+" to a clean "✕". */}
89
+ <View style={horizontal} />
90
+ <View style={vertical} />
91
+ </Animated.View>
92
+ );
93
+ };
94
+
95
+ /** Outline camera: rounded body + viewfinder bump + centered lens ring. */
96
+ export const CameraIcon: FC<IconProps> = ({
97
+ size = DEFAULT_SIZE,
98
+ color = DEFAULT_COLOR,
99
+ strokeWidth = DEFAULT_STROKE,
100
+ }) => {
101
+ const bodyW = size;
102
+ const bodyH = Math.round(size * 0.66);
103
+ const lens = Math.round(size * 0.34);
104
+ const bumpW = Math.round(size * 0.3);
105
+ const bumpH = Math.round(size * 0.16);
106
+
107
+ return (
108
+ <View style={[styles.center, { width: size, height: size }]}>
109
+ {/* Viewfinder bump — sits on the body's top edge, slightly right of centre. */}
110
+ <View
111
+ style={{
112
+ position: 'absolute',
113
+ top: Math.round((size - bodyH) / 2) - bumpH + strokeWidth,
114
+ left: Math.round(size / 2 - bumpW / 2 + size * 0.12),
115
+ width: bumpW,
116
+ height: bumpH + strokeWidth,
117
+ borderTopLeftRadius: Math.round(size * 0.06),
118
+ borderTopRightRadius: Math.round(size * 0.06),
119
+ borderWidth: strokeWidth,
120
+ borderBottomWidth: 0,
121
+ borderColor: color,
122
+ }}
123
+ />
124
+ {/* Camera body */}
125
+ <View
126
+ style={{
127
+ width: bodyW,
128
+ height: bodyH,
129
+ borderWidth: strokeWidth,
130
+ borderColor: color,
131
+ borderRadius: Math.round(size * 0.18),
132
+ alignItems: 'center',
133
+ justifyContent: 'center',
134
+ }}
135
+ >
136
+ {/* Lens */}
137
+ <View
138
+ style={{
139
+ width: lens,
140
+ height: lens,
141
+ borderRadius: Math.round(lens / 2),
142
+ borderWidth: strokeWidth,
143
+ borderColor: color,
144
+ }}
145
+ />
146
+ </View>
147
+ </View>
148
+ );
149
+ };
150
+
151
+ /** Outline document: rounded page, folded top-right corner, two text lines. */
152
+ export const DocumentIcon: FC<IconProps> = ({
153
+ size = DEFAULT_SIZE,
154
+ color = DEFAULT_COLOR,
155
+ strokeWidth = DEFAULT_STROKE,
156
+ }) => {
157
+ const w = Math.round(size * 0.72);
158
+ const h = Math.round(size * 0.9);
159
+ const fold = Math.round(size * 0.28);
160
+ const lineW = Math.round(w * 0.54);
161
+
162
+ return (
163
+ <View style={[styles.center, { width: size, height: size }]}>
164
+ <View style={{ width: w, height: h }}>
165
+ {/* Page */}
166
+ <View
167
+ style={{
168
+ position: 'absolute',
169
+ top: 0,
170
+ left: 0,
171
+ width: w,
172
+ height: h,
173
+ borderWidth: strokeWidth,
174
+ borderColor: color,
175
+ borderRadius: Math.round(size * 0.09),
176
+ }}
177
+ />
178
+ {/* Folded corner — one diagonal stroke across the top-right corner. */}
179
+ <View
180
+ style={{
181
+ position: 'absolute',
182
+ top: -strokeWidth / 2,
183
+ left: w - fold,
184
+ width: fold,
185
+ height: fold,
186
+ }}
187
+ >
188
+ <View
189
+ style={{
190
+ position: 'absolute',
191
+ top: Math.round(fold / 2 - strokeWidth / 2),
192
+ left: Math.round(fold / 2 - (fold * 1.414) / 2),
193
+ width: Math.round(fold * 1.414),
194
+ height: strokeWidth,
195
+ borderRadius: strokeWidth,
196
+ backgroundColor: color,
197
+ transform: [{ rotate: '-45deg' }],
198
+ }}
199
+ />
200
+ </View>
201
+ {/* Text lines */}
202
+ <View
203
+ style={{
204
+ position: 'absolute',
205
+ left: Math.round(w * 0.23),
206
+ top: Math.round(h * 0.52),
207
+ width: lineW,
208
+ height: strokeWidth,
209
+ borderRadius: strokeWidth,
210
+ backgroundColor: color,
211
+ }}
212
+ />
213
+ <View
214
+ style={{
215
+ position: 'absolute',
216
+ left: Math.round(w * 0.23),
217
+ top: Math.round(h * 0.7),
218
+ width: lineW,
219
+ height: strokeWidth,
220
+ borderRadius: strokeWidth,
221
+ backgroundColor: color,
222
+ }}
223
+ />
224
+ </View>
225
+ </View>
226
+ );
227
+ };
228
+
229
+ /** Browse Audio icon — a folder outline with a music note inside, representing browsing/selecting
230
+ * audio files. Minimal outline style with rounded edges, matching the Android material design
231
+ * aesthetic used throughout this icon set. */
232
+ export const BrowseAudioIcon: FC<IconProps> = ({
233
+ size = DEFAULT_SIZE,
234
+ color = DEFAULT_COLOR,
235
+ strokeWidth = DEFAULT_STROKE,
236
+ }) => {
237
+ // ── Folder dimensions ────────────────────────────────────────
238
+ const folderW = Math.round(size * 0.84);
239
+ const folderH = Math.round(size * 0.74);
240
+ const folderX = Math.round((size - folderW) / 2);
241
+ const folderY = Math.round(size * 0.16);
242
+ // Folder tab — the little flap on top-left, flush with folder top
243
+ const tabW = Math.round(size * 0.28);
244
+ const tabH = Math.round(size * 0.12);
245
+ const tabX = folderX;
246
+ const tabY = folderY;
247
+
248
+ // ── Music note dimensions (inside the folder) ─────────────────
249
+ const noteHeadSize = Math.round(size * 0.26);
250
+ const noteStemH = Math.round(size * 0.34);
251
+ const noteStemX = Math.round(size * 0.56);
252
+ const noteHeadY = Math.round(size * 0.4);
253
+
254
+ return (
255
+ <View style={[styles.center, { width: size, height: size }]}>
256
+ {/* Folder tab — sits flush on the folder body top edge */}
257
+ <View
258
+ style={{
259
+ position: 'absolute',
260
+ left: tabX,
261
+ top: tabY,
262
+ width: tabW,
263
+ height: tabH + strokeWidth,
264
+ borderWidth: strokeWidth,
265
+ borderColor: color,
266
+ borderBottomWidth: 0,
267
+ borderTopLeftRadius: Math.round(size * 0.06),
268
+ borderTopRightRadius: Math.round(size * 0.06),
269
+ backgroundColor: 'transparent',
270
+ }}
271
+ />
272
+ {/* Folder body — rounded rectangle */}
273
+ <View
274
+ style={{
275
+ position: 'absolute',
276
+ left: folderX,
277
+ top: folderY,
278
+ width: folderW,
279
+ height: folderH,
280
+ borderWidth: strokeWidth,
281
+ borderColor: color,
282
+ borderRadius: Math.round(size * 0.1),
283
+ backgroundColor: 'transparent',
284
+ }}
285
+ >
286
+ {/* Music note head — small tilted ellipse */}
287
+ <View
288
+ style={{
289
+ position: 'absolute',
290
+ left: noteStemX - Math.round(noteHeadSize * 0.55),
291
+ top: noteHeadY,
292
+ width: noteHeadSize,
293
+ height: Math.round(noteHeadSize * 0.72),
294
+ borderRadius: Math.round(noteHeadSize / 2),
295
+ borderWidth: strokeWidth,
296
+ borderColor: color,
297
+ transform: [{ rotate: '-20deg' }],
298
+ }}
299
+ />
300
+ {/* Music note stem */}
301
+ <View
302
+ style={{
303
+ position: 'absolute',
304
+ left: noteStemX,
305
+ top: noteHeadY - Math.round(noteStemH * 0.15),
306
+ width: strokeWidth,
307
+ height: noteStemH,
308
+ borderRadius: strokeWidth,
309
+ backgroundColor: color,
310
+ }}
311
+ />
312
+ {/* Music note flag — curved stroke from the stem top */}
313
+ <View
314
+ style={{
315
+ position: 'absolute',
316
+ left: noteStemX,
317
+ top: noteHeadY - Math.round(noteStemH * 0.15) + Math.round(strokeWidth * 0.3),
318
+ width: Math.round(size * 0.16),
319
+ height: Math.round(size * 0.18),
320
+ borderWidth: strokeWidth,
321
+ borderColor: color,
322
+ borderLeftWidth: 0,
323
+ borderBottomWidth: 0,
324
+ borderRadius: Math.round(size * 0.04),
325
+ borderTopRightRadius: Math.round(size * 0.06),
326
+ backgroundColor: 'transparent',
327
+ }}
328
+ />
329
+ </View>
330
+ </View>
331
+ );
332
+ };
333
+
334
+ /** Outline microphone: capsule head, U-shaped cradle, stem + base. */
335
+ export const AudioIcon: FC<IconProps> = ({
336
+ size = DEFAULT_SIZE,
337
+ color = DEFAULT_COLOR,
338
+ strokeWidth = DEFAULT_STROKE,
339
+ }) => {
340
+ const headW = Math.round(size * 0.36);
341
+ const headH = Math.round(size * 0.5);
342
+ const cradleW = Math.round(size * 0.58);
343
+ const cradleH = Math.round(size * 0.3);
344
+ const stemH = Math.round(size * 0.12);
345
+ const baseW = Math.round(size * 0.34);
346
+
347
+ return (
348
+ <View
349
+ style={[
350
+ styles.center,
351
+ { width: size, height: size, paddingTop: Math.round(size * 0.06) },
352
+ ]}
353
+ >
354
+ {/* Mic head */}
355
+ <View
356
+ style={{
357
+ width: headW,
358
+ height: headH,
359
+ borderRadius: Math.round(headW / 2),
360
+ borderWidth: strokeWidth,
361
+ borderColor: color,
362
+ }}
363
+ />
364
+ {/* Cradle (open-top U) */}
365
+ <View
366
+ style={{
367
+ width: cradleW,
368
+ height: cradleH,
369
+ marginTop: -Math.round(headH * 0.3),
370
+ borderWidth: strokeWidth,
371
+ borderTopWidth: 0,
372
+ borderColor: color,
373
+ borderBottomLeftRadius: Math.round(cradleW / 2),
374
+ borderBottomRightRadius: Math.round(cradleW / 2),
375
+ backgroundColor: 'transparent',
376
+ }}
377
+ />
378
+ {/* Stem */}
379
+ <View style={{ width: strokeWidth, height: stemH, backgroundColor: color }} />
380
+ {/* Base */}
381
+ <View
382
+ style={{
383
+ width: baseW,
384
+ height: strokeWidth,
385
+ borderRadius: strokeWidth,
386
+ backgroundColor: color,
387
+ }}
388
+ />
389
+ </View>
390
+ );
391
+ };
392
+
393
+ /** Outline photo: rounded frame, sun dot top-right, mountain range from two angled strokes. */
394
+ export const PhotoIcon: FC<IconProps> = ({
395
+ size = DEFAULT_SIZE,
396
+ color = DEFAULT_COLOR,
397
+ strokeWidth = DEFAULT_STROKE,
398
+ }) => {
399
+ const w = size;
400
+ const h = Math.round(size * 0.82);
401
+ const sun = Math.round(size * 0.16);
402
+ const slopeLong = Math.round(size * 0.52);
403
+ const slopeShort = Math.round(size * 0.34);
404
+
405
+ return (
406
+ <View style={[styles.center, { width: size, height: size }]}>
407
+ <View
408
+ style={{
409
+ width: w,
410
+ height: h,
411
+ borderWidth: strokeWidth,
412
+ borderColor: color,
413
+ borderRadius: Math.round(size * 0.16),
414
+ overflow: 'hidden',
415
+ }}
416
+ >
417
+ {/* Sun */}
418
+ <View
419
+ style={{
420
+ position: 'absolute',
421
+ top: Math.round(h * 0.18),
422
+ right: Math.round(w * 0.2),
423
+ width: sun,
424
+ height: sun,
425
+ borderRadius: Math.round(sun / 2),
426
+ borderWidth: strokeWidth,
427
+ borderColor: color,
428
+ }}
429
+ />
430
+ {/* Large mountain — rising stroke from the bottom-left. */}
431
+ <View
432
+ style={{
433
+ position: 'absolute',
434
+ bottom: Math.round(h * 0.14),
435
+ left: -Math.round(slopeLong * 0.12),
436
+ width: slopeLong,
437
+ height: strokeWidth,
438
+ borderRadius: strokeWidth,
439
+ backgroundColor: color,
440
+ transform: [{ rotate: '-38deg' }],
441
+ }}
442
+ />
443
+ {/* Small mountain — descending stroke to the bottom-right. */}
444
+ <View
445
+ style={{
446
+ position: 'absolute',
447
+ bottom: Math.round(h * 0.1),
448
+ right: -Math.round(slopeShort * 0.1),
449
+ width: slopeShort,
450
+ height: strokeWidth,
451
+ borderRadius: strokeWidth,
452
+ backgroundColor: color,
453
+ transform: [{ rotate: '38deg' }],
454
+ }}
455
+ />
456
+ </View>
457
+ </View>
458
+ );
459
+ };
460
+
461
+ /** Outline video camera: rounded body + right-pointing lens wedge (camcorder silhouette). */
462
+ export const VideoIcon: FC<IconProps> = ({
463
+ size = DEFAULT_SIZE,
464
+ color = DEFAULT_COLOR,
465
+ strokeWidth = DEFAULT_STROKE,
466
+ }) => {
467
+ const bodyW = Math.round(size * 0.62);
468
+ const bodyH = Math.round(size * 0.56);
469
+ // The lens wedge is an outlined square rotated 45°; clipping its left half behind the
470
+ // body leaves a clean ">" prism, matching the classic camcorder glyph in pure outline.
471
+ const wedge = Math.round(bodyH * 0.62);
472
+
473
+ return (
474
+ <View style={[styles.center, { width: size, height: size }]}>
475
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
476
+ {/* Body */}
477
+ <View
478
+ style={{
479
+ width: bodyW,
480
+ height: bodyH,
481
+ borderWidth: strokeWidth,
482
+ borderColor: color,
483
+ borderRadius: Math.round(size * 0.12),
484
+ }}
485
+ />
486
+ {/* Lens wedge — rotated outlined square, overlapping the body edge. */}
487
+ <View
488
+ style={{
489
+ width: wedge,
490
+ height: wedge,
491
+ marginLeft: -Math.round(wedge * 0.28),
492
+ borderTopWidth: strokeWidth,
493
+ borderRightWidth: strokeWidth,
494
+ borderColor: color,
495
+ borderTopRightRadius: Math.round(size * 0.08),
496
+ transform: [{ rotate: '45deg' }],
497
+ }}
498
+ />
499
+ </View>
500
+ </View>
501
+ );
502
+ };
503
+
504
+ /** Outline gallery/image-video icon: photo frame with small play triangle overlay. */
505
+ export const ImageVideoIcon: FC<IconProps> = ({
506
+ size = DEFAULT_SIZE,
507
+ color = DEFAULT_COLOR,
508
+ strokeWidth = DEFAULT_STROKE,
509
+ }) => {
510
+ const w = Math.round(size * 0.76);
511
+ const h = Math.round(size * 0.68);
512
+ const playSize = Math.round(size * 0.26);
513
+
514
+ return (
515
+ <View style={[styles.center, { width: size, height: size }]}>
516
+ {/* Photo frame */}
517
+ <View
518
+ style={{
519
+ width: w,
520
+ height: h,
521
+ borderWidth: strokeWidth,
522
+ borderColor: color,
523
+ borderRadius: Math.round(size * 0.1),
524
+ overflow: 'hidden',
525
+ }}
526
+ >
527
+ {/* Mountain landscape inside */}
528
+ <View
529
+ style={{
530
+ position: 'absolute',
531
+ bottom: Math.round(size * 0.1),
532
+ left: Math.round(size * 0.08),
533
+ width: Math.round(size * 0.3),
534
+ height: strokeWidth,
535
+ borderRadius: strokeWidth,
536
+ backgroundColor: color,
537
+ transform: [{ rotate: '-35deg' }],
538
+ }}
539
+ />
540
+ <View
541
+ style={{
542
+ position: 'absolute',
543
+ bottom: Math.round(size * 0.1),
544
+ right: Math.round(size * 0.06),
545
+ width: Math.round(size * 0.24),
546
+ height: strokeWidth,
547
+ borderRadius: strokeWidth,
548
+ backgroundColor: color,
549
+ transform: [{ rotate: '40deg' }],
550
+ }}
551
+ />
552
+ </View>
553
+ {/* Small play triangle at bottom-right corner */}
554
+ <View
555
+ style={{
556
+ position: 'absolute',
557
+ bottom: Math.round(size * 0.06),
558
+ right: Math.round(size * 0.06),
559
+ width: 0,
560
+ height: 0,
561
+ borderLeftWidth: playSize * 0.55,
562
+ borderTopWidth: playSize * 0.32,
563
+ borderBottomWidth: playSize * 0.32,
564
+ borderLeftColor: color,
565
+ borderTopColor: 'transparent',
566
+ borderBottomColor: 'transparent',
567
+ }}
568
+ />
569
+ </View>
570
+ );
571
+ };
572
+
573
+ /** Outline trash/delete can: rounded lid + handle, open-top body, two ribs. */
574
+ export const TrashIcon: FC<IconProps> = ({
575
+ size = DEFAULT_SIZE,
576
+ color = DEFAULT_COLOR,
577
+ strokeWidth = DEFAULT_STROKE,
578
+ }) => {
579
+ const handleW = Math.round(size * 0.3);
580
+ const handleH = Math.round(size * 0.1);
581
+ const lidW = Math.round(size * 0.66);
582
+ const bodyW = Math.round(size * 0.5);
583
+ const bodyH = Math.round(size * 0.5);
584
+ const lidTop = Math.round(size * 0.28);
585
+ const bodyTop = lidTop + strokeWidth;
586
+ const ribTop = bodyTop + Math.round(size * 0.1);
587
+ const ribH = Math.round(size * 0.26);
588
+ const ribGap = Math.round(size * 0.11);
589
+ const cx = size / 2;
590
+
591
+ return (
592
+ <View style={[styles.center, { width: size, height: size }]}>
593
+ {/* Lid handle — small arch resting on the lid. */}
594
+ <View
595
+ style={{
596
+ position: 'absolute',
597
+ top: lidTop - handleH,
598
+ left: Math.round(cx - handleW / 2),
599
+ width: handleW,
600
+ height: handleH + strokeWidth,
601
+ borderWidth: strokeWidth,
602
+ borderBottomWidth: 0,
603
+ borderColor: color,
604
+ borderTopLeftRadius: Math.round(size * 0.06),
605
+ borderTopRightRadius: Math.round(size * 0.06),
606
+ }}
607
+ />
608
+ {/* Lid bar — spans slightly wider than the body. */}
609
+ <View
610
+ style={{
611
+ position: 'absolute',
612
+ top: lidTop,
613
+ left: Math.round(cx - lidW / 2),
614
+ width: lidW,
615
+ height: strokeWidth,
616
+ borderRadius: strokeWidth,
617
+ backgroundColor: color,
618
+ }}
619
+ />
620
+ {/* Can body — open top (capped by the lid), rounded bottom. */}
621
+ <View
622
+ style={{
623
+ position: 'absolute',
624
+ top: bodyTop,
625
+ left: Math.round(cx - bodyW / 2),
626
+ width: bodyW,
627
+ height: bodyH,
628
+ borderWidth: strokeWidth,
629
+ borderTopWidth: 0,
630
+ borderColor: color,
631
+ borderBottomLeftRadius: Math.round(size * 0.12),
632
+ borderBottomRightRadius: Math.round(size * 0.12),
633
+ }}
634
+ />
635
+ {/* Two ribs inside the can. */}
636
+ {[-ribGap, ribGap].map((dx, i) => (
637
+ <View
638
+ key={i}
639
+ style={{
640
+ position: 'absolute',
641
+ top: ribTop,
642
+ left: Math.round(cx + dx - strokeWidth / 2),
643
+ width: strokeWidth,
644
+ height: ribH,
645
+ borderRadius: strokeWidth,
646
+ backgroundColor: color,
647
+ }}
648
+ />
649
+ ))}
650
+ </View>
651
+ );
652
+ };
653
+
654
+ /** Android-style share: three filled nodes joined by two arms (left → each right). */
655
+ export const ShareIcon: FC<IconProps> = ({
656
+ size = DEFAULT_SIZE,
657
+ color = DEFAULT_COLOR,
658
+ strokeWidth = DEFAULT_STROKE,
659
+ }) => {
660
+ const dot = Math.round(size * 0.26);
661
+ const r = dot / 2;
662
+ // Node centres: left-middle, top-right, bottom-right.
663
+ const left = { x: size * 0.24, y: size * 0.5 };
664
+ const top = { x: size * 0.74, y: size * 0.26 };
665
+ const bottom = { x: size * 0.74, y: size * 0.74 };
666
+
667
+ return (
668
+ <View style={[styles.center, { width: size, height: size }]}>
669
+ {/* Arms first, so the filled nodes cover the joins. Each bar spans the gap
670
+ between two node centres, is centred on their midpoint, then rotated
671
+ about its own centre so both ends land exactly on the dots. */}
672
+ {[top, bottom].map((n, i) => {
673
+ const dx = n.x - left.x;
674
+ const dy = n.y - left.y;
675
+ const len = Math.round(Math.hypot(dx, dy));
676
+ const deg = `${(Math.atan2(dy, dx) * 180) / Math.PI}deg`;
677
+ return (
678
+ <View
679
+ key={`arm${i}`}
680
+ style={{
681
+ position: 'absolute',
682
+ left: Math.round((left.x + n.x) / 2 - len / 2),
683
+ top: Math.round((left.y + n.y) / 2 - strokeWidth / 2),
684
+ width: len,
685
+ height: strokeWidth,
686
+ borderRadius: strokeWidth,
687
+ backgroundColor: color,
688
+ transform: [{ rotate: deg }],
689
+ }}
690
+ />
691
+ );
692
+ })}
693
+ {[left, top, bottom].map((n, i) => (
694
+ <View
695
+ key={`dot${i}`}
696
+ style={{
697
+ position: 'absolute',
698
+ left: Math.round(n.x - r),
699
+ top: Math.round(n.y - r),
700
+ width: dot,
701
+ height: dot,
702
+ borderRadius: r,
703
+ backgroundColor: color,
704
+ }}
705
+ />
706
+ ))}
707
+ </View>
708
+ );
709
+ };
710
+
711
+ /**
712
+ * Circular seek skip ring icon (◀ -10s / ▶ +10s).
713
+ * Renders an open-topped circular arrow ring with directional arrowhead
714
+ * and a centered seconds label.
715
+ */
716
+ export const CircularSeekIcon: FC<IconProps> = ({
717
+ direction = 'forward',
718
+ label = '10',
719
+ size = DEFAULT_SIZE,
720
+ color = DEFAULT_COLOR,
721
+ strokeWidth = DEFAULT_STROKE,
722
+ style,
723
+ }) => {
724
+ const head = Math.max(3, strokeWidth * 2);
725
+ return (
726
+ <View
727
+ style={[
728
+ styles.center,
729
+ {
730
+ width: size,
731
+ height: size,
732
+ position: 'relative',
733
+ },
734
+ style,
735
+ ]}
736
+ >
737
+ {/* Open-topped ring — curved arrow body */}
738
+ <View
739
+ style={{
740
+ position: 'absolute',
741
+ width: size,
742
+ height: size,
743
+ borderRadius: size / 2,
744
+ borderWidth: strokeWidth,
745
+ borderColor: color,
746
+ borderTopColor: 'transparent',
747
+ }}
748
+ />
749
+ {/* Arrowhead in the top gap, pointing in the seek direction (◀ back / ▶ forward) */}
750
+ <View
751
+ style={{
752
+ position: 'absolute',
753
+ top: -strokeWidth * 0.4,
754
+ left: direction === 'back' ? size * 0.24 : undefined,
755
+ right: direction === 'forward' ? size * 0.24 : undefined,
756
+ width: 0,
757
+ height: 0,
758
+ borderTopWidth: head,
759
+ borderBottomWidth: head,
760
+ borderTopColor: 'transparent',
761
+ borderBottomColor: 'transparent',
762
+ borderLeftWidth: direction === 'forward' ? head : 0,
763
+ borderRightWidth: direction === 'back' ? head : 0,
764
+ borderLeftColor: direction === 'forward' ? color : 'transparent',
765
+ borderRightColor: direction === 'back' ? color : 'transparent',
766
+ }}
767
+ />
768
+ <Text
769
+ style={{
770
+ color: color as string,
771
+ fontSize: size * 0.4,
772
+ fontWeight: '600',
773
+ includeFontPadding: false,
774
+ textAlign: 'center',
775
+ }}
776
+ >
777
+ {label}
778
+ </Text>
779
+ </View>
780
+ );
781
+ };
782
+
783
+ /**
784
+ * View Details / Info (ⓘ) icon.
785
+ * Renders an outlined circular badge with a centered 'i' glyph (dot + stem).
786
+ */
787
+ export const ViewDetailsIcon: FC<IconProps> = ({
788
+ size = DEFAULT_SIZE,
789
+ color = DEFAULT_COLOR,
790
+ strokeWidth = DEFAULT_STROKE,
791
+ style,
792
+ }) => {
793
+ const circleSize = Math.round(size * 0.85);
794
+ const dotSize = Math.max(2, Math.round(strokeWidth * 1.2));
795
+ const stemWidth = Math.max(1.5, strokeWidth);
796
+ const stemHeight = Math.round(size * 0.28);
797
+
798
+ return (
799
+ <View
800
+ style={[
801
+ styles.center,
802
+ {
803
+ width: size,
804
+ height: size,
805
+ position: 'relative',
806
+ },
807
+ style,
808
+ ]}
809
+ >
810
+ {/* Outer circle */}
811
+ <View
812
+ style={{
813
+ width: circleSize,
814
+ height: circleSize,
815
+ borderRadius: Math.round(circleSize / 2),
816
+ borderWidth: strokeWidth,
817
+ borderColor: color,
818
+ alignItems: 'center',
819
+ justifyContent: 'center',
820
+ }}
821
+ >
822
+ {/* Dot of the 'i' */}
823
+ <View
824
+ style={{
825
+ position: 'absolute',
826
+ top: Math.round(circleSize * 0.22),
827
+ width: dotSize,
828
+ height: dotSize,
829
+ borderRadius: Math.round(dotSize / 2),
830
+ backgroundColor: color,
831
+ }}
832
+ />
833
+ {/* Stem of the 'i' */}
834
+ <View
835
+ style={{
836
+ position: 'absolute',
837
+ bottom: Math.round(circleSize * 0.22),
838
+ width: stemWidth,
839
+ height: stemHeight,
840
+ borderRadius: stemWidth / 2,
841
+ backgroundColor: color,
842
+ }}
843
+ />
844
+ </View>
845
+ </View>
846
+ );
847
+ };
848
+
849
+ /** Alias for ViewDetailsIcon */
850
+ export const InfoIcon = ViewDetailsIcon;
851
+
852
+ /**
853
+ * Compress icon — two arrows squeezing toward a centre line.
854
+ *
855
+ * The outline-set counterpart of the plugin's default `compress` glyph, drawn in the same
856
+ * "clean stroke" language as the rest of this file: one horizontal bar across the middle with a
857
+ * down-pointing arrow above it and an up-pointing arrow below, each a stem plus a two-armed
858
+ * chevron. It reads as "make this smaller" at 24 dp without any diagonal-resize ambiguity.
859
+ *
860
+ * Every stroke is a bar laid between two points, centred on their midpoint and rotated about its
861
+ * own centre, so the arms land exactly on the stems at any [size] / [strokeWidth] pair — the same
862
+ * construction {@link ShareIcon} uses for its arms.
863
+ */
864
+ export const CompressIcon: FC<IconProps> = ({
865
+ size = DEFAULT_SIZE,
866
+ color = DEFAULT_COLOR,
867
+ strokeWidth = DEFAULT_STROKE,
868
+ style,
869
+ }) => {
870
+ const centre = size / 2;
871
+ // Chevron half-span and rise, equal so both arrowheads sit at a clean 45°.
872
+ const arm = size * 0.145;
873
+ // Arrow apexes stop short of the centre bar, leaving a visible gap on both sides.
874
+ const apexTop = size * 0.4;
875
+ const apexBottom = size * 0.6;
876
+
877
+ const strokes: Array<[number, number, number, number]> = [
878
+ // The line the two arrows are compressing toward.
879
+ [size * 0.19, centre, size * 0.81, centre],
880
+ // Arrow above, pointing down: stem, then its two chevron arms.
881
+ [centre, size * 0.15, centre, apexTop],
882
+ [centre, apexTop, centre - arm, apexTop - arm],
883
+ [centre, apexTop, centre + arm, apexTop - arm],
884
+ // Arrow below, pointing up — the same shape mirrored through the centre bar.
885
+ [centre, size * 0.85, centre, apexBottom],
886
+ [centre, apexBottom, centre - arm, apexBottom + arm],
887
+ [centre, apexBottom, centre + arm, apexBottom + arm],
888
+ ];
889
+ return (
890
+ <View
891
+ style={[
892
+ styles.center,
893
+ { width: size, height: size, position: 'relative' },
894
+ style,
895
+ ]}
896
+ >
897
+ {strokes.map(([x1, y1, x2, y2], i) => {
898
+ const dx = x2 - x1;
899
+ const dy = y2 - y1;
900
+ const len = Math.max(strokeWidth, Math.hypot(dx, dy));
901
+ return (
902
+ <View
903
+ key={`stroke${i}`}
904
+ style={{
905
+ position: 'absolute',
906
+ left: (x1 + x2) / 2 - len / 2,
907
+ top: (y1 + y2) / 2 - strokeWidth / 2,
908
+ width: len,
909
+ height: strokeWidth,
910
+ borderRadius: strokeWidth,
911
+ backgroundColor: color,
912
+ transform: [
913
+ { rotate: `${(Math.atan2(dy, dx) * 180) / Math.PI}deg` },
914
+ ],
915
+ }}
916
+ />
917
+ );
918
+ })}
919
+ </View>
920
+ );
921
+ };
922
+
923
+ const styles = StyleSheet.create({
924
+ center: {
925
+ alignItems: 'center',
926
+ justifyContent: 'center',
927
+ },
928
+ });