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.
- package/CustomCamera.podspec +20 -0
- package/LICENSE +20 -0
- package/README.md +833 -0
- package/android/build.gradle +135 -0
- package/android/consumer-rules.pro +47 -0
- package/android/src/main/AndroidManifest.xml +72 -0
- package/android/src/main/java/android/print/PdfPrint.java +51 -0
- package/android/src/main/java/com/customcamera/AnimatedImageViewManager.kt +199 -0
- package/android/src/main/java/com/customcamera/AudioPlayerView.kt +322 -0
- package/android/src/main/java/com/customcamera/AudioRecorder.kt +506 -0
- package/android/src/main/java/com/customcamera/BarcodeScannerActivity.kt +361 -0
- package/android/src/main/java/com/customcamera/BlurBackgroundView.kt +199 -0
- package/android/src/main/java/com/customcamera/CacheCleanupManager.kt +386 -0
- package/android/src/main/java/com/customcamera/CameraAspectRatioMode.kt +77 -0
- package/android/src/main/java/com/customcamera/CameraAsset.kt +211 -0
- package/android/src/main/java/com/customcamera/CameraTheme.kt +479 -0
- package/android/src/main/java/com/customcamera/CompressionCacheStore.kt +504 -0
- package/android/src/main/java/com/customcamera/CompressionFileNameUtils.kt +7 -0
- package/android/src/main/java/com/customcamera/CompressionProfile.kt +195 -0
- package/android/src/main/java/com/customcamera/CustomCameraActivity.kt +7291 -0
- package/android/src/main/java/com/customcamera/CustomCameraFileProvider.kt +9 -0
- package/android/src/main/java/com/customcamera/CustomCameraModule.kt +2479 -0
- package/android/src/main/java/com/customcamera/CustomCameraPackage.kt +53 -0
- package/android/src/main/java/com/customcamera/DisplayUtils.kt +9 -0
- package/android/src/main/java/com/customcamera/DocumentPreviewView.kt +846 -0
- package/android/src/main/java/com/customcamera/DrawingView.kt +214 -0
- package/android/src/main/java/com/customcamera/EmojiPickerData.kt +228 -0
- package/android/src/main/java/com/customcamera/FilterStripAdapter.kt +158 -0
- package/android/src/main/java/com/customcamera/GifSupport.kt +215 -0
- package/android/src/main/java/com/customcamera/GlobalAudioPlayer.kt +320 -0
- package/android/src/main/java/com/customcamera/ImageExporter.kt +1394 -0
- package/android/src/main/java/com/customcamera/ImageFormatSupport.kt +163 -0
- package/android/src/main/java/com/customcamera/Localization.kt +206 -0
- package/android/src/main/java/com/customcamera/MediaAdapters.kt +758 -0
- package/android/src/main/java/com/customcamera/MediaCacheManager.kt +782 -0
- package/android/src/main/java/com/customcamera/MediaExportFormats.kt +201 -0
- package/android/src/main/java/com/customcamera/MediaFileIo.kt +310 -0
- package/android/src/main/java/com/customcamera/MediaMetadataStore.kt +494 -0
- package/android/src/main/java/com/customcamera/MediaPreviewEditor.kt +14865 -0
- package/android/src/main/java/com/customcamera/MediaPublisher.kt +423 -0
- package/android/src/main/java/com/customcamera/MediaStorageWorkflow.kt +722 -0
- package/android/src/main/java/com/customcamera/MediaStoreRepository.kt +378 -0
- package/android/src/main/java/com/customcamera/MediaThumbnailView.kt +286 -0
- package/android/src/main/java/com/customcamera/MediaUtils.kt +37 -0
- package/android/src/main/java/com/customcamera/NativeVideoViewManager.kt +845 -0
- package/android/src/main/java/com/customcamera/OfficeDocumentConverter.kt +2791 -0
- package/android/src/main/java/com/customcamera/PendingCaptureCrops.kt +88 -0
- package/android/src/main/java/com/customcamera/PowerPointPreview.kt +4077 -0
- package/android/src/main/java/com/customcamera/RecentPickerStore.kt +74 -0
- package/android/src/main/java/com/customcamera/SecureFileEraser.kt +411 -0
- package/android/src/main/java/com/customcamera/SecureKeyModule.kt +88 -0
- package/android/src/main/java/com/customcamera/SecureMediaDeleter.kt +493 -0
- package/android/src/main/java/com/customcamera/StickerPickerData.kt +107 -0
- package/android/src/main/java/com/customcamera/SvgDrawable.kt +175 -0
- package/android/src/main/java/com/customcamera/SvgIconViewManager.kt +77 -0
- package/android/src/main/java/com/customcamera/TextEntryController.kt +553 -0
- package/android/src/main/java/com/customcamera/ThumbnailLoader.kt +455 -0
- package/android/src/main/java/com/customcamera/UploadService.kt +909 -0
- package/android/src/main/java/com/customcamera/VideoEditUtils.kt +210 -0
- package/android/src/main/java/com/customcamera/VideoRotationTranscoder.kt +1992 -0
- package/android/src/main/java/com/customcamera/gif/AnimatedGifEncoder.kt +473 -0
- package/android/src/main/java/com/customcamera/gif/GifDecoder.kt +690 -0
- package/android/src/main/java/com/customcamera/gif/GifFramesDrawable.kt +160 -0
- package/android/src/main/java/com/customcamera/gif/GifHttp.kt +112 -0
- package/android/src/main/java/com/customcamera/gif/GifImageLoader.kt +186 -0
- package/android/src/main/java/com/customcamera/gif/GifModels.kt +74 -0
- package/android/src/main/java/com/customcamera/gif/GifProvider.kt +49 -0
- package/android/src/main/java/com/customcamera/gif/GifProviders.kt +27 -0
- package/android/src/main/java/com/customcamera/gif/GifRepository.kt +124 -0
- package/android/src/main/java/com/customcamera/gif/GifSafety.kt +33 -0
- package/android/src/main/java/com/customcamera/gif/GiphyGifProvider.kt +146 -0
- package/android/src/main/java/com/customcamera/gif/LZWEncoder.kt +258 -0
- package/android/src/main/java/com/customcamera/gif/NeuQuant.kt +435 -0
- package/android/src/main/java/com/customcamera/gif/TenorGifProvider.kt +147 -0
- package/android/src/main/res/drawable/bg_brush_selected.xml +5 -0
- package/android/src/main/res/drawable/bg_color_swatch.xml +5 -0
- package/android/src/main/res/drawable/bg_editor_toolbar.xml +6 -0
- package/android/src/main/res/drawable/bg_icon_circle.xml +5 -0
- package/android/src/main/res/drawable/bg_icon_circle_light.xml +5 -0
- package/android/src/main/res/drawable/bg_mode_tab_active.xml +6 -0
- package/android/src/main/res/drawable/bg_pill.xml +6 -0
- package/android/src/main/res/drawable/bg_recording_dot.xml +6 -0
- package/android/src/main/res/drawable/bg_selection_badge.xml +8 -0
- package/android/src/main/res/drawable/bg_send_button.xml +5 -0
- package/android/src/main/res/drawable/bg_shutter_inner.xml +5 -0
- package/android/src/main/res/drawable/bg_shutter_recording.xml +6 -0
- package/android/src/main/res/drawable/bg_shutter_ring.xml +8 -0
- package/android/src/main/res/drawable/bg_shutter_video_idle.xml +5 -0
- package/android/src/main/res/drawable/bg_thumbnail.xml +9 -0
- package/android/src/main/res/drawable/ic_aspect_ratio.xml +17 -0
- package/android/src/main/res/drawable/ic_audio.xml +10 -0
- package/android/src/main/res/drawable/ic_back.xml +10 -0
- package/android/src/main/res/drawable/ic_brush_medium.xml +12 -0
- package/android/src/main/res/drawable/ic_brush_thick.xml +12 -0
- package/android/src/main/res/drawable/ic_brush_thin.xml +12 -0
- package/android/src/main/res/drawable/ic_check.xml +17 -0
- package/android/src/main/res/drawable/ic_chevron_down.xml +10 -0
- package/android/src/main/res/drawable/ic_chevron_up.xml +13 -0
- package/android/src/main/res/drawable/ic_clear_drawing.xml +10 -0
- package/android/src/main/res/drawable/ic_close.xml +10 -0
- package/android/src/main/res/drawable/ic_cover.xml +9 -0
- package/android/src/main/res/drawable/ic_crop.xml +10 -0
- package/android/src/main/res/drawable/ic_delete.xml +9 -0
- package/android/src/main/res/drawable/ic_document.xml +10 -0
- package/android/src/main/res/drawable/ic_done.xml +10 -0
- package/android/src/main/res/drawable/ic_download.xml +10 -0
- package/android/src/main/res/drawable/ic_emoji.xml +10 -0
- package/android/src/main/res/drawable/ic_filter.xml +10 -0
- package/android/src/main/res/drawable/ic_flash_auto.xml +7 -0
- package/android/src/main/res/drawable/ic_flash_off.xml +23 -0
- package/android/src/main/res/drawable/ic_flash_on.xml +16 -0
- package/android/src/main/res/drawable/ic_flip.xml +15 -0
- package/android/src/main/res/drawable/ic_gallery.xml +10 -0
- package/android/src/main/res/drawable/ic_gif.xml +24 -0
- package/android/src/main/res/drawable/ic_lock.xml +19 -0
- package/android/src/main/res/drawable/ic_lock_open.xml +22 -0
- package/android/src/main/res/drawable/ic_marker.xml +10 -0
- package/android/src/main/res/drawable/ic_more_vert.xml +18 -0
- package/android/src/main/res/drawable/ic_overlay_close.xml +19 -0
- package/android/src/main/res/drawable/ic_overlay_resize.xml +18 -0
- package/android/src/main/res/drawable/ic_pause.xml +10 -0
- package/android/src/main/res/drawable/ic_photo_mode.xml +10 -0
- package/android/src/main/res/drawable/ic_play.xml +10 -0
- package/android/src/main/res/drawable/ic_redo.xml +10 -0
- package/android/src/main/res/drawable/ic_rotate.xml +9 -0
- package/android/src/main/res/drawable/ic_send.xml +10 -0
- package/android/src/main/res/drawable/ic_share.xml +10 -0
- package/android/src/main/res/drawable/ic_stat_upload.xml +10 -0
- package/android/src/main/res/drawable/ic_sticker.xml +24 -0
- package/android/src/main/res/drawable/ic_text.xml +10 -0
- package/android/src/main/res/drawable/ic_text_align_center.xml +11 -0
- package/android/src/main/res/drawable/ic_text_align_left.xml +11 -0
- package/android/src/main/res/drawable/ic_text_align_right.xml +11 -0
- package/android/src/main/res/drawable/ic_text_bg.xml +11 -0
- package/android/src/main/res/drawable/ic_trim.xml +23 -0
- package/android/src/main/res/drawable/ic_undo.xml +10 -0
- package/android/src/main/res/drawable/ic_video_mode.xml +10 -0
- package/android/src/main/res/drawable/ic_video_note.xml +13 -0
- package/android/src/main/res/drawable/ic_volume_off.xml +9 -0
- package/android/src/main/res/drawable/ic_volume_on.xml +9 -0
- package/android/src/main/res/drawable/sticker_heart.xml +9 -0
- package/android/src/main/res/drawable/sticker_smile.xml +9 -0
- package/android/src/main/res/drawable/sticker_star.xml +9 -0
- package/android/src/main/res/drawable/sticker_thumbsup.xml +9 -0
- package/android/src/main/res/values/colors.xml +34 -0
- package/android/src/main/res/values/ids.xml +15 -0
- package/android/src/main/res/values/strings.xml +15 -0
- package/android/src/main/res/values/styles.xml +20 -0
- package/android/src/main/res/xml/file_paths.xml +34 -0
- package/ios/CustomCamera.h +5 -0
- package/ios/CustomCamera.mm +214 -0
- package/lib/module/AudioPlayerContext.js +233 -0
- package/lib/module/AudioPlayerContext.js.map +1 -0
- package/lib/module/CameraPreview.js +304 -0
- package/lib/module/CameraPreview.js.map +1 -0
- package/lib/module/NativeAnimatedImageView.js +41 -0
- package/lib/module/NativeAnimatedImageView.js.map +1 -0
- package/lib/module/NativeAudioPlayerView.js +33 -0
- package/lib/module/NativeAudioPlayerView.js.map +1 -0
- package/lib/module/NativeBlurView.js +35 -0
- package/lib/module/NativeBlurView.js.map +1 -0
- package/lib/module/NativeCustomCamera.js +128 -0
- package/lib/module/NativeCustomCamera.js.map +1 -0
- package/lib/module/NativeCustomCamera.web.js +143 -0
- package/lib/module/NativeCustomCamera.web.js.map +1 -0
- package/lib/module/NativeCustomVideoView.js +5 -0
- package/lib/module/NativeCustomVideoView.js.map +1 -0
- package/lib/module/NativeDocumentPreviewView.js +156 -0
- package/lib/module/NativeDocumentPreviewView.js.map +1 -0
- package/lib/module/NativeMediaThumbnailView.js +110 -0
- package/lib/module/NativeMediaThumbnailView.js.map +1 -0
- package/lib/module/NativeSvgIcon.js +32 -0
- package/lib/module/NativeSvgIcon.js.map +1 -0
- package/lib/module/ResponsivePreviewContainer.js +171 -0
- package/lib/module/ResponsivePreviewContainer.js.map +1 -0
- package/lib/module/accessibility.js +61 -0
- package/lib/module/accessibility.js.map +1 -0
- package/lib/module/config.js +352 -0
- package/lib/module/config.js.map +1 -0
- package/lib/module/cpuOptimization.js +296 -0
- package/lib/module/cpuOptimization.js.map +1 -0
- package/lib/module/db/DatabaseManager.js +191 -0
- package/lib/module/db/DatabaseManager.js.map +1 -0
- package/lib/module/db/MediaMapper.js +284 -0
- package/lib/module/db/MediaMapper.js.map +1 -0
- package/lib/module/db/MediaRepository.js +242 -0
- package/lib/module/db/MediaRepository.js.map +1 -0
- package/lib/module/db/index.js +41 -0
- package/lib/module/db/index.js.map +1 -0
- package/lib/module/db/migrations.js +180 -0
- package/lib/module/db/migrations.js.map +1 -0
- package/lib/module/db/react-native-sqlcipher.d.js +2 -0
- package/lib/module/db/react-native-sqlcipher.d.js.map +1 -0
- package/lib/module/db/secureKey.js +87 -0
- package/lib/module/db/secureKey.js.map +1 -0
- package/lib/module/db/types.js +57 -0
- package/lib/module/db/types.js.map +1 -0
- package/lib/module/db/useMediaDatabase.js +123 -0
- package/lib/module/db/useMediaDatabase.js.map +1 -0
- package/lib/module/defaultIcons.js +2259 -0
- package/lib/module/defaultIcons.js.map +1 -0
- package/lib/module/deviceCapabilities.js +408 -0
- package/lib/module/deviceCapabilities.js.map +1 -0
- package/lib/module/errors.js +267 -0
- package/lib/module/errors.js.map +1 -0
- package/lib/module/iconConfig.js +796 -0
- package/lib/module/iconConfig.js.map +1 -0
- package/lib/module/icons.js +514 -0
- package/lib/module/icons.js.map +1 -0
- package/lib/module/index.js +251 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/jest-globals.d.js +2 -0
- package/lib/module/jest-globals.d.js.map +1 -0
- package/lib/module/library/MediaLibrary.js +107 -0
- package/lib/module/library/MediaLibrary.js.map +1 -0
- package/lib/module/library/MediaLibraryScreen.js +2597 -0
- package/lib/module/library/MediaLibraryScreen.js.map +1 -0
- package/lib/module/library/components/AudioPreview.js +74 -0
- package/lib/module/library/components/AudioPreview.js.map +1 -0
- package/lib/module/library/components/DocumentPreview.js +331 -0
- package/lib/module/library/components/DocumentPreview.js.map +1 -0
- package/lib/module/library/components/ExpandableFab.js +343 -0
- package/lib/module/library/components/ExpandableFab.js.map +1 -0
- package/lib/module/library/components/FileTiles.js +251 -0
- package/lib/module/library/components/FileTiles.js.map +1 -0
- package/lib/module/library/components/ImagePreview.js +70 -0
- package/lib/module/library/components/ImagePreview.js.map +1 -0
- package/lib/module/library/components/MediaMetadataHeader.js +175 -0
- package/lib/module/library/components/MediaMetadataHeader.js.map +1 -0
- package/lib/module/library/components/RecordAudioScreen.js +816 -0
- package/lib/module/library/components/RecordAudioScreen.js.map +1 -0
- package/lib/module/library/components/VideoPreview.js +453 -0
- package/lib/module/library/components/VideoPreview.js.map +1 -0
- package/lib/module/library/components/ViewerCounter.js +55 -0
- package/lib/module/library/components/ViewerCounter.js.map +1 -0
- package/lib/module/library/compressionEstimate.js +507 -0
- package/lib/module/library/compressionEstimate.js.map +1 -0
- package/lib/module/library/fileMetadata.js +196 -0
- package/lib/module/library/fileMetadata.js.map +1 -0
- package/lib/module/library/index.js +42 -0
- package/lib/module/library/index.js.map +1 -0
- package/lib/module/library/libraryIconRegistry.js +69 -0
- package/lib/module/library/libraryIconRegistry.js.map +1 -0
- package/lib/module/library/libraryIcons.js +858 -0
- package/lib/module/library/libraryIcons.js.map +1 -0
- package/lib/module/library/localizedFormat.js +181 -0
- package/lib/module/library/localizedFormat.js.map +1 -0
- package/lib/module/library/palette.js +225 -0
- package/lib/module/library/palette.js.map +1 -0
- package/lib/module/library/responsive.js +53 -0
- package/lib/module/library/responsive.js.map +1 -0
- package/lib/module/locales.js +416 -0
- package/lib/module/locales.js.map +1 -0
- package/lib/module/localization.js +1064 -0
- package/lib/module/localization.js.map +1 -0
- package/lib/module/logger.js +20 -0
- package/lib/module/logger.js.map +1 -0
- package/lib/module/lowMemoryCache.js +206 -0
- package/lib/module/lowMemoryCache.js.map +1 -0
- package/lib/module/mediaHistory.js +33 -0
- package/lib/module/mediaHistory.js.map +1 -0
- package/lib/module/mediaStorageService.js +402 -0
- package/lib/module/mediaStorageService.js.map +1 -0
- package/lib/module/memory.js +79 -0
- package/lib/module/memory.js.map +1 -0
- package/lib/module/nativeActions.js +307 -0
- package/lib/module/nativeActions.js.map +1 -0
- package/lib/module/nativeComponentSupport.js +61 -0
- package/lib/module/nativeComponentSupport.js.map +1 -0
- package/lib/module/networkPerformance.js +24 -0
- package/lib/module/networkPerformance.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/performance.js +104 -0
- package/lib/module/performance.js.map +1 -0
- package/lib/module/performanceMonitor.js +155 -0
- package/lib/module/performanceMonitor.js.map +1 -0
- package/lib/module/permissions.js +370 -0
- package/lib/module/permissions.js.map +1 -0
- package/lib/module/rendering.js +40 -0
- package/lib/module/rendering.js.map +1 -0
- package/lib/module/security.js +18 -0
- package/lib/module/security.js.map +1 -0
- package/lib/module/state.js +266 -0
- package/lib/module/state.js.map +1 -0
- package/lib/module/storage.js +400 -0
- package/lib/module/storage.js.map +1 -0
- package/lib/module/theme.js +390 -0
- package/lib/module/theme.js.map +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils.js +115 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/module/validation.js +288 -0
- package/lib/module/validation.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/AudioPlayerContext.d.ts +27 -0
- package/lib/typescript/src/AudioPlayerContext.d.ts.map +1 -0
- package/lib/typescript/src/CameraPreview.d.ts +13 -0
- package/lib/typescript/src/CameraPreview.d.ts.map +1 -0
- package/lib/typescript/src/NativeAnimatedImageView.d.ts +33 -0
- package/lib/typescript/src/NativeAnimatedImageView.d.ts.map +1 -0
- package/lib/typescript/src/NativeAudioPlayerView.d.ts +12 -0
- package/lib/typescript/src/NativeAudioPlayerView.d.ts.map +1 -0
- package/lib/typescript/src/NativeBlurView.d.ts +12 -0
- package/lib/typescript/src/NativeBlurView.d.ts.map +1 -0
- package/lib/typescript/src/NativeCustomCamera.d.ts +167 -0
- package/lib/typescript/src/NativeCustomCamera.d.ts.map +1 -0
- package/lib/typescript/src/NativeCustomCamera.web.d.ts +47 -0
- package/lib/typescript/src/NativeCustomCamera.web.d.ts.map +1 -0
- package/lib/typescript/src/NativeCustomVideoView.d.ts +30 -0
- package/lib/typescript/src/NativeCustomVideoView.d.ts.map +1 -0
- package/lib/typescript/src/NativeDocumentPreviewView.d.ts +48 -0
- package/lib/typescript/src/NativeDocumentPreviewView.d.ts.map +1 -0
- package/lib/typescript/src/NativeMediaThumbnailView.d.ts +54 -0
- package/lib/typescript/src/NativeMediaThumbnailView.d.ts.map +1 -0
- package/lib/typescript/src/NativeSvgIcon.d.ts +25 -0
- package/lib/typescript/src/NativeSvgIcon.d.ts.map +1 -0
- package/lib/typescript/src/ResponsivePreviewContainer.d.ts +92 -0
- package/lib/typescript/src/ResponsivePreviewContainer.d.ts.map +1 -0
- package/lib/typescript/src/accessibility.d.ts +20 -0
- package/lib/typescript/src/accessibility.d.ts.map +1 -0
- package/lib/typescript/src/config.d.ts +145 -0
- package/lib/typescript/src/config.d.ts.map +1 -0
- package/lib/typescript/src/cpuOptimization.d.ts +63 -0
- package/lib/typescript/src/cpuOptimization.d.ts.map +1 -0
- package/lib/typescript/src/db/DatabaseManager.d.ts +48 -0
- package/lib/typescript/src/db/DatabaseManager.d.ts.map +1 -0
- package/lib/typescript/src/db/MediaMapper.d.ts +77 -0
- package/lib/typescript/src/db/MediaMapper.d.ts.map +1 -0
- package/lib/typescript/src/db/MediaRepository.d.ts +66 -0
- package/lib/typescript/src/db/MediaRepository.d.ts.map +1 -0
- package/lib/typescript/src/db/index.d.ts +23 -0
- package/lib/typescript/src/db/index.d.ts.map +1 -0
- package/lib/typescript/src/db/migrations.d.ts +31 -0
- package/lib/typescript/src/db/migrations.d.ts.map +1 -0
- package/lib/typescript/src/db/secureKey.d.ts +10 -0
- package/lib/typescript/src/db/secureKey.d.ts.map +1 -0
- package/lib/typescript/src/db/types.d.ts +115 -0
- package/lib/typescript/src/db/types.d.ts.map +1 -0
- package/lib/typescript/src/db/useMediaDatabase.d.ts +41 -0
- package/lib/typescript/src/db/useMediaDatabase.d.ts.map +1 -0
- package/lib/typescript/src/defaultIcons.d.ts +139 -0
- package/lib/typescript/src/defaultIcons.d.ts.map +1 -0
- package/lib/typescript/src/deviceCapabilities.d.ts +92 -0
- package/lib/typescript/src/deviceCapabilities.d.ts.map +1 -0
- package/lib/typescript/src/errors.d.ts +95 -0
- package/lib/typescript/src/errors.d.ts.map +1 -0
- package/lib/typescript/src/iconConfig.d.ts +176 -0
- package/lib/typescript/src/iconConfig.d.ts.map +1 -0
- package/lib/typescript/src/icons.d.ts +217 -0
- package/lib/typescript/src/icons.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +104 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/library/MediaLibrary.d.ts +57 -0
- package/lib/typescript/src/library/MediaLibrary.d.ts.map +1 -0
- package/lib/typescript/src/library/MediaLibraryScreen.d.ts +51 -0
- package/lib/typescript/src/library/MediaLibraryScreen.d.ts.map +1 -0
- package/lib/typescript/src/library/components/AudioPreview.d.ts +6 -0
- package/lib/typescript/src/library/components/AudioPreview.d.ts.map +1 -0
- package/lib/typescript/src/library/components/DocumentPreview.d.ts +10 -0
- package/lib/typescript/src/library/components/DocumentPreview.d.ts.map +1 -0
- package/lib/typescript/src/library/components/ExpandableFab.d.ts +39 -0
- package/lib/typescript/src/library/components/ExpandableFab.d.ts.map +1 -0
- package/lib/typescript/src/library/components/FileTiles.d.ts +8 -0
- package/lib/typescript/src/library/components/FileTiles.d.ts.map +1 -0
- package/lib/typescript/src/library/components/ImagePreview.d.ts +5 -0
- package/lib/typescript/src/library/components/ImagePreview.d.ts.map +1 -0
- package/lib/typescript/src/library/components/MediaMetadataHeader.d.ts +16 -0
- package/lib/typescript/src/library/components/MediaMetadataHeader.d.ts.map +1 -0
- package/lib/typescript/src/library/components/RecordAudioScreen.d.ts +8 -0
- package/lib/typescript/src/library/components/RecordAudioScreen.d.ts.map +1 -0
- package/lib/typescript/src/library/components/VideoPreview.d.ts +20 -0
- package/lib/typescript/src/library/components/VideoPreview.d.ts.map +1 -0
- package/lib/typescript/src/library/components/ViewerCounter.d.ts +13 -0
- package/lib/typescript/src/library/components/ViewerCounter.d.ts.map +1 -0
- package/lib/typescript/src/library/compressionEstimate.d.ts +313 -0
- package/lib/typescript/src/library/compressionEstimate.d.ts.map +1 -0
- package/lib/typescript/src/library/fileMetadata.d.ts +33 -0
- package/lib/typescript/src/library/fileMetadata.d.ts.map +1 -0
- package/lib/typescript/src/library/index.d.ts +40 -0
- package/lib/typescript/src/library/index.d.ts.map +1 -0
- package/lib/typescript/src/library/libraryIconRegistry.d.ts +35 -0
- package/lib/typescript/src/library/libraryIconRegistry.d.ts.map +1 -0
- package/lib/typescript/src/library/libraryIcons.d.ts +85 -0
- package/lib/typescript/src/library/libraryIcons.d.ts.map +1 -0
- package/lib/typescript/src/library/localizedFormat.d.ts +49 -0
- package/lib/typescript/src/library/localizedFormat.d.ts.map +1 -0
- package/lib/typescript/src/library/palette.d.ts +104 -0
- package/lib/typescript/src/library/palette.d.ts.map +1 -0
- package/lib/typescript/src/library/responsive.d.ts +15 -0
- package/lib/typescript/src/library/responsive.d.ts.map +1 -0
- package/lib/typescript/src/locales.d.ts +103 -0
- package/lib/typescript/src/locales.d.ts.map +1 -0
- package/lib/typescript/src/localization.d.ts +1051 -0
- package/lib/typescript/src/localization.d.ts.map +1 -0
- package/lib/typescript/src/logger.d.ts +4 -0
- package/lib/typescript/src/logger.d.ts.map +1 -0
- package/lib/typescript/src/lowMemoryCache.d.ts +64 -0
- package/lib/typescript/src/lowMemoryCache.d.ts.map +1 -0
- package/lib/typescript/src/mediaHistory.d.ts +3 -0
- package/lib/typescript/src/mediaHistory.d.ts.map +1 -0
- package/lib/typescript/src/mediaStorageService.d.ts +155 -0
- package/lib/typescript/src/mediaStorageService.d.ts.map +1 -0
- package/lib/typescript/src/memory.d.ts +21 -0
- package/lib/typescript/src/memory.d.ts.map +1 -0
- package/lib/typescript/src/nativeActions.d.ts +174 -0
- package/lib/typescript/src/nativeActions.d.ts.map +1 -0
- package/lib/typescript/src/nativeComponentSupport.d.ts +30 -0
- package/lib/typescript/src/nativeComponentSupport.d.ts.map +1 -0
- package/lib/typescript/src/networkPerformance.d.ts +12 -0
- package/lib/typescript/src/networkPerformance.d.ts.map +1 -0
- package/lib/typescript/src/performance.d.ts +32 -0
- package/lib/typescript/src/performance.d.ts.map +1 -0
- package/lib/typescript/src/performanceMonitor.d.ts +45 -0
- package/lib/typescript/src/performanceMonitor.d.ts.map +1 -0
- package/lib/typescript/src/permissions.d.ts +132 -0
- package/lib/typescript/src/permissions.d.ts.map +1 -0
- package/lib/typescript/src/rendering.d.ts +9 -0
- package/lib/typescript/src/rendering.d.ts.map +1 -0
- package/lib/typescript/src/security.d.ts +6 -0
- package/lib/typescript/src/security.d.ts.map +1 -0
- package/lib/typescript/src/state.d.ts +102 -0
- package/lib/typescript/src/state.d.ts.map +1 -0
- package/lib/typescript/src/storage.d.ts +117 -0
- package/lib/typescript/src/storage.d.ts.map +1 -0
- package/lib/typescript/src/theme.d.ts +15 -0
- package/lib/typescript/src/theme.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +802 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/utils.d.ts +50 -0
- package/lib/typescript/src/utils.d.ts.map +1 -0
- package/lib/typescript/src/validation.d.ts +52 -0
- package/lib/typescript/src/validation.d.ts.map +1 -0
- package/package.json +204 -0
- package/react-native.config.js +17 -0
- package/src/AudioPlayerContext.tsx +220 -0
- package/src/CameraPreview.tsx +352 -0
- package/src/NativeAnimatedImageView.tsx +71 -0
- package/src/NativeAudioPlayerView.tsx +39 -0
- package/src/NativeBlurView.tsx +40 -0
- package/src/NativeCustomCamera.ts +305 -0
- package/src/NativeCustomCamera.web.ts +192 -0
- package/src/NativeCustomVideoView.ts +30 -0
- package/src/NativeDocumentPreviewView.tsx +196 -0
- package/src/NativeMediaThumbnailView.tsx +167 -0
- package/src/NativeSvgIcon.tsx +46 -0
- package/src/ResponsivePreviewContainer.tsx +227 -0
- package/src/accessibility.ts +80 -0
- package/src/config.ts +406 -0
- package/src/cpuOptimization.ts +365 -0
- package/src/db/DatabaseManager.ts +212 -0
- package/src/db/MediaMapper.ts +377 -0
- package/src/db/MediaRepository.ts +313 -0
- package/src/db/index.ts +73 -0
- package/src/db/migrations.ts +222 -0
- package/src/db/react-native-sqlcipher.d.ts +76 -0
- package/src/db/secureKey.ts +100 -0
- package/src/db/types.ts +123 -0
- package/src/db/useMediaDatabase.ts +191 -0
- package/src/defaultIcons.tsx +2390 -0
- package/src/deviceCapabilities.ts +438 -0
- package/src/errors.ts +350 -0
- package/src/iconConfig.tsx +962 -0
- package/src/icons.tsx +788 -0
- package/src/index.tsx +763 -0
- package/src/jest-globals.d.ts +9 -0
- package/src/library/MediaLibrary.tsx +141 -0
- package/src/library/MediaLibraryScreen.tsx +3003 -0
- package/src/library/components/AudioPreview.tsx +73 -0
- package/src/library/components/DocumentPreview.tsx +361 -0
- package/src/library/components/ExpandableFab.tsx +342 -0
- package/src/library/components/FileTiles.tsx +252 -0
- package/src/library/components/ImagePreview.tsx +72 -0
- package/src/library/components/MediaMetadataHeader.tsx +208 -0
- package/src/library/components/RecordAudioScreen.tsx +845 -0
- package/src/library/components/VideoPreview.tsx +478 -0
- package/src/library/components/ViewerCounter.tsx +71 -0
- package/src/library/compressionEstimate.ts +662 -0
- package/src/library/fileMetadata.ts +212 -0
- package/src/library/index.ts +66 -0
- package/src/library/libraryIconRegistry.tsx +86 -0
- package/src/library/libraryIcons.tsx +928 -0
- package/src/library/localizedFormat.ts +207 -0
- package/src/library/palette.ts +281 -0
- package/src/library/responsive.ts +49 -0
- package/src/locales.ts +381 -0
- package/src/localization.ts +1947 -0
- package/src/logger.ts +20 -0
- package/src/lowMemoryCache.ts +218 -0
- package/src/mediaHistory.ts +42 -0
- package/src/mediaStorageService.ts +546 -0
- package/src/memory.ts +102 -0
- package/src/nativeActions.ts +422 -0
- package/src/nativeComponentSupport.ts +60 -0
- package/src/networkPerformance.ts +30 -0
- package/src/performance.ts +137 -0
- package/src/performanceMonitor.ts +219 -0
- package/src/permissions.ts +403 -0
- package/src/rendering.ts +47 -0
- package/src/security.ts +19 -0
- package/src/state.ts +333 -0
- package/src/storage.ts +453 -0
- package/src/theme.tsx +467 -0
- package/src/types.ts +946 -0
- package/src/utils.ts +177 -0
- package/src/validation.ts +372 -0
package/src/index.tsx
ADDED
|
@@ -0,0 +1,763 @@
|
|
|
1
|
+
import { measurePerformance } from './performance';
|
|
2
|
+
import { debounceForLowEnd } from './cpuOptimization';
|
|
3
|
+
import { setGlobalCameraTheme, getCurrentCameraTheme } from './theme';
|
|
4
|
+
// The native bridge accessor and the wrappers the plugin's own screens call live
|
|
5
|
+
// in ./nativeActions, so `src/library/**` can reach them without importing this
|
|
6
|
+
// barrel (which would be a require cycle). They are re-exported below, so the
|
|
7
|
+
// public API is unchanged.
|
|
8
|
+
import { getCustomCameraModule } from './nativeActions';
|
|
9
|
+
|
|
10
|
+
// Types used for exports
|
|
11
|
+
import type {
|
|
12
|
+
CameraTheme,
|
|
13
|
+
CameraThemeConfig,
|
|
14
|
+
FaceEffect,
|
|
15
|
+
FilterType,
|
|
16
|
+
FlashMode,
|
|
17
|
+
ImageCropOptions,
|
|
18
|
+
PerformanceMetrics,
|
|
19
|
+
} from './types';
|
|
20
|
+
|
|
21
|
+
// Export utility functions and constants
|
|
22
|
+
export {
|
|
23
|
+
DEFAULT_FILTERS,
|
|
24
|
+
DEFAULT_FACE_EFFECTS,
|
|
25
|
+
DEFAULT_THEMES,
|
|
26
|
+
DEFAULT_FLASH_MODES,
|
|
27
|
+
validateCropOptions,
|
|
28
|
+
generateAlbumName,
|
|
29
|
+
formatVideoDuration,
|
|
30
|
+
isVideoUri,
|
|
31
|
+
isImageUri,
|
|
32
|
+
isGifAsset,
|
|
33
|
+
requiresNativeImageDecoder,
|
|
34
|
+
} from './utils';
|
|
35
|
+
|
|
36
|
+
// Export localization
|
|
37
|
+
export {
|
|
38
|
+
setCameraLocalization,
|
|
39
|
+
updateCameraLocalization,
|
|
40
|
+
setCameraLanguage,
|
|
41
|
+
// One-time automatic host-language synchronization.
|
|
42
|
+
setCameraLanguageProvider,
|
|
43
|
+
clearCameraLanguageProvider,
|
|
44
|
+
getCameraLanguageProvider,
|
|
45
|
+
syncCameraLanguage,
|
|
46
|
+
isCameraLanguageProvider,
|
|
47
|
+
registerCameraTranslations,
|
|
48
|
+
getCameraLocale,
|
|
49
|
+
getCameraIsRtl,
|
|
50
|
+
defaultTranslations,
|
|
51
|
+
CameraLocalizationProvider,
|
|
52
|
+
LocalizationManager,
|
|
53
|
+
cameraLocalizationKeys,
|
|
54
|
+
useCameraLocalization,
|
|
55
|
+
useCameraLocalizationContext,
|
|
56
|
+
rtlAwareStyles,
|
|
57
|
+
getRtlAwareStyles,
|
|
58
|
+
type CameraTranslations,
|
|
59
|
+
type CameraLanguageProvider,
|
|
60
|
+
type CameraLanguageSubscription,
|
|
61
|
+
type CameraLocalizationConfig,
|
|
62
|
+
type CameraLocalizationProviderProps,
|
|
63
|
+
type CameraTranslationBundles,
|
|
64
|
+
type CameraTranslationFunction,
|
|
65
|
+
type CameraTranslationKey,
|
|
66
|
+
type CameraTranslationMap,
|
|
67
|
+
} from './localization';
|
|
68
|
+
|
|
69
|
+
// Export the locale engine — useful for hosts that want to reuse the plugin's
|
|
70
|
+
// tag parsing or RTL detection instead of shipping their own.
|
|
71
|
+
export {
|
|
72
|
+
DEFAULT_LOCALE,
|
|
73
|
+
RTL_LANGUAGES,
|
|
74
|
+
RTL_SCRIPTS,
|
|
75
|
+
isRtlLocale,
|
|
76
|
+
localeFallbackChain,
|
|
77
|
+
matchLocaleKey,
|
|
78
|
+
normalizeLocale,
|
|
79
|
+
parseLocale,
|
|
80
|
+
resolveLocaleTranslations,
|
|
81
|
+
type ParsedLocale,
|
|
82
|
+
} from './locales';
|
|
83
|
+
|
|
84
|
+
// Export error handling
|
|
85
|
+
export {
|
|
86
|
+
CameraError,
|
|
87
|
+
ERROR_CODES,
|
|
88
|
+
isCameraError,
|
|
89
|
+
handleCameraError,
|
|
90
|
+
getUserFriendlyErrorMessage,
|
|
91
|
+
validateUri,
|
|
92
|
+
validateImageUri,
|
|
93
|
+
validateVideoUri,
|
|
94
|
+
validateFilterType,
|
|
95
|
+
validateFlashMode,
|
|
96
|
+
validateFaceEffect,
|
|
97
|
+
validateCameraTheme,
|
|
98
|
+
} from './errors';
|
|
99
|
+
|
|
100
|
+
// Export validation utilities
|
|
101
|
+
export {
|
|
102
|
+
validateCameraPickerOptions,
|
|
103
|
+
validateUrisArray,
|
|
104
|
+
validateAlbumName,
|
|
105
|
+
validateCaption,
|
|
106
|
+
validateTimerDelay,
|
|
107
|
+
validateVideoTrimParameters,
|
|
108
|
+
validateUploadUrl,
|
|
109
|
+
checkFileSize,
|
|
110
|
+
validateAlbumId,
|
|
111
|
+
validateRotationDegrees,
|
|
112
|
+
VALIDATION_CONSTANTS,
|
|
113
|
+
} from './validation';
|
|
114
|
+
|
|
115
|
+
// Export state management
|
|
116
|
+
export {
|
|
117
|
+
createInitialOperationState,
|
|
118
|
+
createLoadingState,
|
|
119
|
+
createSuccessState,
|
|
120
|
+
createErrorState,
|
|
121
|
+
createCancelledState,
|
|
122
|
+
isOperationInProgress,
|
|
123
|
+
isOperationSuccessful,
|
|
124
|
+
isOperationFailed,
|
|
125
|
+
isOperationCancelled,
|
|
126
|
+
getStatusMessage,
|
|
127
|
+
OperationQueue,
|
|
128
|
+
processInBatches,
|
|
129
|
+
retryWithBackoff,
|
|
130
|
+
withTimeout,
|
|
131
|
+
} from './state';
|
|
132
|
+
export type { OperationResult, OperationStatus } from './state';
|
|
133
|
+
|
|
134
|
+
// Export theme system
|
|
135
|
+
export {
|
|
136
|
+
DEFAULT_CAMERA_THEME_CONFIG,
|
|
137
|
+
createCameraTheme,
|
|
138
|
+
resolveCameraTheme,
|
|
139
|
+
setGlobalCameraTheme,
|
|
140
|
+
getCurrentCameraTheme,
|
|
141
|
+
subscribeToCameraTheme,
|
|
142
|
+
CameraThemeProvider,
|
|
143
|
+
useCameraTheme,
|
|
144
|
+
} from './theme';
|
|
145
|
+
|
|
146
|
+
// Export the centralized white-label configuration system
|
|
147
|
+
export {
|
|
148
|
+
CameraPlugin,
|
|
149
|
+
configureCameraPlugin,
|
|
150
|
+
getCameraPluginConfig,
|
|
151
|
+
subscribeToCameraPluginConfig,
|
|
152
|
+
setCameraIcons,
|
|
153
|
+
getCameraIcons,
|
|
154
|
+
resetCameraIcons,
|
|
155
|
+
DEFAULT_CUSTOM_ICONS,
|
|
156
|
+
DEFAULT_ICON_CONFIG,
|
|
157
|
+
DEFAULT_ANIMATION_CONFIG,
|
|
158
|
+
DEFAULT_DIMENSION_CONFIG,
|
|
159
|
+
DEFAULT_NOTIFICATION_CONFIG,
|
|
160
|
+
} from './config';
|
|
161
|
+
export type { ResolvedCameraPluginConfig } from './config';
|
|
162
|
+
|
|
163
|
+
// Export THE centralized icon configuration: one catalog of unique icon ids in
|
|
164
|
+
// front of both the RN component registry and the native drawable layer.
|
|
165
|
+
export {
|
|
166
|
+
CAMERA_ICON_CATALOG,
|
|
167
|
+
CAMERA_ICON_IDS,
|
|
168
|
+
isCameraIconId,
|
|
169
|
+
normalizeCameraIconValue,
|
|
170
|
+
createSvgIconComponent,
|
|
171
|
+
createImageIconComponent,
|
|
172
|
+
isRenderableSvg,
|
|
173
|
+
resolveCameraIconRegistryConfig,
|
|
174
|
+
resolveNativeIconConfig,
|
|
175
|
+
mergeCameraIconsConfig,
|
|
176
|
+
} from './iconConfig';
|
|
177
|
+
export type {
|
|
178
|
+
CameraIconId,
|
|
179
|
+
CameraIconsConfig,
|
|
180
|
+
CameraIconCustomization,
|
|
181
|
+
CameraIconValue,
|
|
182
|
+
CameraIconSurface,
|
|
183
|
+
CameraIconCatalogEntry,
|
|
184
|
+
} from './iconConfig';
|
|
185
|
+
|
|
186
|
+
export type {
|
|
187
|
+
CameraPluginConfig,
|
|
188
|
+
CameraIconConfig,
|
|
189
|
+
CameraIconName,
|
|
190
|
+
CameraIconStyle,
|
|
191
|
+
CameraAnimationConfig,
|
|
192
|
+
CameraDimensionConfig,
|
|
193
|
+
UploadNotificationConfig,
|
|
194
|
+
} from './types';
|
|
195
|
+
export {
|
|
196
|
+
CameraIconProvider,
|
|
197
|
+
useIcon,
|
|
198
|
+
useIconRegistry,
|
|
199
|
+
useIconConfig,
|
|
200
|
+
useRenderIcon,
|
|
201
|
+
RenderIcon,
|
|
202
|
+
createDefaultIconRegistry,
|
|
203
|
+
resolveIconConfig,
|
|
204
|
+
mergeIconConfigs,
|
|
205
|
+
getIconComponent,
|
|
206
|
+
setGlobalIconRegistryConfig,
|
|
207
|
+
getGlobalIconRegistryConfig,
|
|
208
|
+
subscribeToGlobalIconRegistryConfig,
|
|
209
|
+
DefaultFallbackIcon,
|
|
210
|
+
DEFAULT_ICON_REGISTRY_CONFIG,
|
|
211
|
+
DEFAULT_ICON_SIZE,
|
|
212
|
+
DEFAULT_ICON_COLOR,
|
|
213
|
+
DEFAULT_ICON_STROKE_WIDTH,
|
|
214
|
+
DEFAULT_FALLBACK_ICON_COLOR,
|
|
215
|
+
DEFAULT_FALLBACK_ICON_WEIGHT,
|
|
216
|
+
} from './icons';
|
|
217
|
+
export type {
|
|
218
|
+
// RN React-component icon registry (distinct from the native
|
|
219
|
+
// CameraIconConfig/CameraIconName/CameraIconStyle exported above, which
|
|
220
|
+
// configure the native Activity's Android vector drawables). Host apps
|
|
221
|
+
// normally use the centralized CameraIconId layer instead of either.
|
|
222
|
+
CameraIconKey,
|
|
223
|
+
IconComponent,
|
|
224
|
+
IconProps,
|
|
225
|
+
IconOverride,
|
|
226
|
+
IconRegistry,
|
|
227
|
+
ResolvedIconConfig,
|
|
228
|
+
CameraIconProviderProps,
|
|
229
|
+
CameraIconRegistryConfig,
|
|
230
|
+
} from './icons';
|
|
231
|
+
export type {
|
|
232
|
+
CameraThemeConfig,
|
|
233
|
+
CameraThemeInput,
|
|
234
|
+
CameraThemePreset,
|
|
235
|
+
CameraThemePalette,
|
|
236
|
+
CameraThemeTypography,
|
|
237
|
+
CameraFontWeight,
|
|
238
|
+
CameraThemeSpacing,
|
|
239
|
+
CameraThemeBorderRadius,
|
|
240
|
+
CameraThemeShadow,
|
|
241
|
+
CameraThemeComponentStyles,
|
|
242
|
+
CameraThemeComponentStyle,
|
|
243
|
+
} from './types';
|
|
244
|
+
|
|
245
|
+
// Export performance utilities
|
|
246
|
+
export {
|
|
247
|
+
measurePerformance,
|
|
248
|
+
debounce,
|
|
249
|
+
throttle,
|
|
250
|
+
MediaCache,
|
|
251
|
+
BackgroundOperationManager,
|
|
252
|
+
LazyLoader,
|
|
253
|
+
processMediaInChunks,
|
|
254
|
+
} from './performance';
|
|
255
|
+
|
|
256
|
+
// Export memory management
|
|
257
|
+
export { MemoryManager, WeakCache, processMediaInChunksMemory } from './memory';
|
|
258
|
+
|
|
259
|
+
// Export network utilities
|
|
260
|
+
export {
|
|
261
|
+
checkNetworkConnectivity,
|
|
262
|
+
validateUploadUrl as validateUploadUrlNetwork,
|
|
263
|
+
adaptiveUpload,
|
|
264
|
+
estimateBandwidth,
|
|
265
|
+
NetworkMonitor,
|
|
266
|
+
} from './networkPerformance';
|
|
267
|
+
|
|
268
|
+
// Export rendering utilities
|
|
269
|
+
export {
|
|
270
|
+
runAfterInteractions,
|
|
271
|
+
createOptimizedListData,
|
|
272
|
+
createMemoizer,
|
|
273
|
+
createThrottledRenderer,
|
|
274
|
+
optimizeListRenderItem,
|
|
275
|
+
createOptimizedImageSource,
|
|
276
|
+
} from './rendering';
|
|
277
|
+
|
|
278
|
+
// Export security utilities
|
|
279
|
+
export {
|
|
280
|
+
validateSecureUri,
|
|
281
|
+
sanitizeFileName,
|
|
282
|
+
validateFileContentType,
|
|
283
|
+
validateSecureFileSize,
|
|
284
|
+
validateBatchOperation,
|
|
285
|
+
} from './security';
|
|
286
|
+
|
|
287
|
+
// Export permission utilities
|
|
288
|
+
export {
|
|
289
|
+
checkCameraPermission,
|
|
290
|
+
checkCameraPermissionStatus,
|
|
291
|
+
requestCameraPermission,
|
|
292
|
+
checkStoragePermission,
|
|
293
|
+
checkStoragePermissionStatus,
|
|
294
|
+
requestStoragePermission,
|
|
295
|
+
checkMicrophonePermission,
|
|
296
|
+
checkMicrophonePermissionStatus,
|
|
297
|
+
requestMicrophonePermission,
|
|
298
|
+
checkAllPermissions,
|
|
299
|
+
requestAllPermissions,
|
|
300
|
+
openSettings,
|
|
301
|
+
shouldShowRationale,
|
|
302
|
+
getDefaultPermissionRationale,
|
|
303
|
+
DEFAULT_RATIONALE,
|
|
304
|
+
type PermissionStatus,
|
|
305
|
+
type PermissionFeature,
|
|
306
|
+
} from './permissions';
|
|
307
|
+
|
|
308
|
+
// Export performance-optimized operations
|
|
309
|
+
export const cropImageWithPerformance = async (
|
|
310
|
+
uri: string,
|
|
311
|
+
options: ImageCropOptions = {}
|
|
312
|
+
): Promise<{ result: string; metrics: PerformanceMetrics }> => {
|
|
313
|
+
return measurePerformance('crop_image', () => cropImage(uri, options));
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
export const applyFilterWithPerformance = async (
|
|
317
|
+
uri: string,
|
|
318
|
+
filterType: FilterType = 'none'
|
|
319
|
+
): Promise<{ result: string; metrics: PerformanceMetrics }> => {
|
|
320
|
+
return measurePerformance('apply_filter', () => applyFilter(uri, filterType));
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
export const debouncedRotateImage = debounceForLowEnd(
|
|
324
|
+
(uri: unknown, degrees: unknown) => {
|
|
325
|
+
if (typeof uri === 'string' && typeof degrees === 'number') {
|
|
326
|
+
return rotateImage(uri, degrees);
|
|
327
|
+
}
|
|
328
|
+
return Promise.reject(
|
|
329
|
+
new Error('Invalid arguments for debouncedRotateImage')
|
|
330
|
+
);
|
|
331
|
+
},
|
|
332
|
+
300
|
|
333
|
+
);
|
|
334
|
+
export const throttledSetCameraFlash = debounceForLowEnd((mode: unknown) => {
|
|
335
|
+
if (
|
|
336
|
+
mode === undefined ||
|
|
337
|
+
['auto', 'on', 'off', 'torch'].includes(mode as string)
|
|
338
|
+
) {
|
|
339
|
+
return setCameraFlash(mode as FlashMode);
|
|
340
|
+
}
|
|
341
|
+
return Promise.reject(
|
|
342
|
+
new Error('Invalid arguments for throttledSetCameraFlash')
|
|
343
|
+
);
|
|
344
|
+
}, 500);
|
|
345
|
+
|
|
346
|
+
// Export low-end optimization utilities
|
|
347
|
+
export {
|
|
348
|
+
LowMemoryCache,
|
|
349
|
+
processMediaForLowEnd,
|
|
350
|
+
processInSmallBatches,
|
|
351
|
+
getOptimizedImageDimensions,
|
|
352
|
+
shouldUseLowMemoryOptimizations,
|
|
353
|
+
} from './lowMemoryCache';
|
|
354
|
+
|
|
355
|
+
export {
|
|
356
|
+
debounceForLowEnd,
|
|
357
|
+
throttleForLowEnd,
|
|
358
|
+
runInBackgroundWithPriority,
|
|
359
|
+
createLazyInitializer,
|
|
360
|
+
processInChunks,
|
|
361
|
+
efficientDelay,
|
|
362
|
+
isMainThreadBusy,
|
|
363
|
+
waitForMainThreadAvailable,
|
|
364
|
+
requestEfficientAnimationFrame,
|
|
365
|
+
cancelEfficientAnimationFrame,
|
|
366
|
+
getCpuOptimizationLevel,
|
|
367
|
+
supportsIdleCallback,
|
|
368
|
+
requestIdleCallbackPolyfill,
|
|
369
|
+
cancelIdleCallbackPolyfill,
|
|
370
|
+
} from './cpuOptimization';
|
|
371
|
+
|
|
372
|
+
export {
|
|
373
|
+
detectDeviceCapabilities,
|
|
374
|
+
isLowEndDevice,
|
|
375
|
+
getOptimizationLevel,
|
|
376
|
+
getMemorySettings,
|
|
377
|
+
getCpuSettings,
|
|
378
|
+
getRenderingSettings,
|
|
379
|
+
getNetworkSettings,
|
|
380
|
+
getImageQualitySettings,
|
|
381
|
+
shouldUseOptimization,
|
|
382
|
+
createOptimizedConfig,
|
|
383
|
+
createTestDeviceSpecs,
|
|
384
|
+
} from './deviceCapabilities';
|
|
385
|
+
export type { DeviceSpecs } from './deviceCapabilities';
|
|
386
|
+
|
|
387
|
+
// Export performance monitoring
|
|
388
|
+
export { PerformanceMonitor } from './performanceMonitor';
|
|
389
|
+
|
|
390
|
+
// Export accessibility utilities
|
|
391
|
+
export {
|
|
392
|
+
useScreenReaderEnabled,
|
|
393
|
+
useReducedMotion,
|
|
394
|
+
useBoldText,
|
|
395
|
+
} from './accessibility';
|
|
396
|
+
|
|
397
|
+
// Export all types for TypeScript
|
|
398
|
+
export type {
|
|
399
|
+
CameraPickerOptions,
|
|
400
|
+
FilePickerOptions,
|
|
401
|
+
GalleryEditorOptions,
|
|
402
|
+
MediaEditorItem,
|
|
403
|
+
MediaEditorOptions,
|
|
404
|
+
CameraAsset,
|
|
405
|
+
CameraPickerResult,
|
|
406
|
+
} from './types';
|
|
407
|
+
export { prependMediaHistory } from './mediaHistory';
|
|
408
|
+
export type {
|
|
409
|
+
CameraTheme,
|
|
410
|
+
FaceEffect,
|
|
411
|
+
FilterType,
|
|
412
|
+
FlashMode,
|
|
413
|
+
ImageCropOptions,
|
|
414
|
+
MediaMetadata,
|
|
415
|
+
PerformanceMetrics,
|
|
416
|
+
} from './types';
|
|
417
|
+
export type { ErrorCode } from './errors';
|
|
418
|
+
|
|
419
|
+
export function openCamera(): Promise<string> {
|
|
420
|
+
return getCustomCameraModule().openCamera();
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// ── Native bridge actions ───────────────────────────────────────────
|
|
424
|
+
// Defined in ./nativeActions (see the import at the top of this file for why)
|
|
425
|
+
// and re-exported here unchanged — these are part of the public API.
|
|
426
|
+
export {
|
|
427
|
+
openCameraPicker,
|
|
428
|
+
openDocumentPicker,
|
|
429
|
+
openAudioPicker,
|
|
430
|
+
openImageVideoPicker,
|
|
431
|
+
openMediaEditor,
|
|
432
|
+
openGalleryEditor,
|
|
433
|
+
openDocument,
|
|
434
|
+
startUpload,
|
|
435
|
+
secureDeleteMedia,
|
|
436
|
+
shareMedia,
|
|
437
|
+
getMediaMetadata,
|
|
438
|
+
getRecordedOriginalSize,
|
|
439
|
+
startAudioRecording,
|
|
440
|
+
stopAudioRecording,
|
|
441
|
+
cancelAudioRecording,
|
|
442
|
+
stopAndPublishAudioRecording,
|
|
443
|
+
pauseAudioRecording,
|
|
444
|
+
resumeAudioRecording,
|
|
445
|
+
getAudioRecordingState,
|
|
446
|
+
getAudioAmplitude,
|
|
447
|
+
compressVideo,
|
|
448
|
+
compressImage,
|
|
449
|
+
addCompressionProgressListener,
|
|
450
|
+
} from './nativeActions';
|
|
451
|
+
export type { CompressionProgressEvent } from './nativeActions';
|
|
452
|
+
|
|
453
|
+
export function getUploadState(): Promise<string> {
|
|
454
|
+
return getCustomCameraModule().getUploadState();
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export function getNotificationHistory(): Promise<string> {
|
|
458
|
+
return getCustomCameraModule().getNotificationHistory();
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export function clearNotificationHistory(): Promise<void> {
|
|
462
|
+
return getCustomCameraModule().clearNotificationHistory();
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Real device-memory facts from the OS (Android: ActivityManager). Returns
|
|
467
|
+
* `{ isLowRamDevice, memoryClassMb, totalRamMb, availableRamMb,
|
|
468
|
+
* isCurrentlyLowMemory, cpuCores }`. detectDeviceCapabilities() consumes this
|
|
469
|
+
* to classify the device instead of guessing from screen size.
|
|
470
|
+
*/
|
|
471
|
+
export function getDeviceCapabilities(): Promise<Object> {
|
|
472
|
+
return getCustomCameraModule().getDeviceCapabilities();
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export function cropImage(
|
|
476
|
+
uri: string,
|
|
477
|
+
options: ImageCropOptions = {}
|
|
478
|
+
): Promise<string> {
|
|
479
|
+
return getCustomCameraModule().cropImage(uri, options);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export function rotateImage(uri: string, degrees: number): Promise<string> {
|
|
483
|
+
return getCustomCameraModule().rotateImage(uri, degrees);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export function applyFilter(
|
|
487
|
+
uri: string,
|
|
488
|
+
filterType: FilterType = 'none'
|
|
489
|
+
): Promise<string> {
|
|
490
|
+
return getCustomCameraModule().applyFilter(uri, filterType);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// Media Management Features
|
|
494
|
+
export function createAlbum(albumName: string): Promise<boolean> {
|
|
495
|
+
return getCustomCameraModule().createAlbum(albumName);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export function moveMediaToAlbum(
|
|
499
|
+
uris: string[],
|
|
500
|
+
albumId: string
|
|
501
|
+
): Promise<boolean> {
|
|
502
|
+
return getCustomCameraModule().moveMediaToAlbum(uris, albumId);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Delete media files, securely overwriting their bytes first (Android).
|
|
507
|
+
*
|
|
508
|
+
* Resolves `true` when at least one file was removed. This boolean cannot say
|
|
509
|
+
* whether the secure overwrite actually succeeded — call
|
|
510
|
+
* {@link secureDeleteMedia} instead whenever that distinction matters, e.g.
|
|
511
|
+
* before telling the user their media was securely erased.
|
|
512
|
+
*/
|
|
513
|
+
export function deleteMedia(uris: string[]): Promise<boolean> {
|
|
514
|
+
return getCustomCameraModule().deleteMedia(uris);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export function setCameraFlash(mode: FlashMode = 'auto'): Promise<void> {
|
|
518
|
+
return getCustomCameraModule().setCameraFlash(mode);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export function setCameraTimer(delaySeconds: number): Promise<void> {
|
|
522
|
+
return getCustomCameraModule().setCameraTimer(delaySeconds);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export function enableCameraGrid(enabled: boolean): Promise<void> {
|
|
526
|
+
return getCustomCameraModule().enableCameraGrid(enabled);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// Metadata Features
|
|
530
|
+
export function setMediaCaption(
|
|
531
|
+
uri: string,
|
|
532
|
+
caption: string
|
|
533
|
+
): Promise<boolean> {
|
|
534
|
+
return getCustomCameraModule().setMediaCaption(uri, caption);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
// Video Features
|
|
538
|
+
export function trimVideo(
|
|
539
|
+
uri: string,
|
|
540
|
+
startTime: number,
|
|
541
|
+
endTime: number
|
|
542
|
+
): Promise<string> {
|
|
543
|
+
return getCustomCameraModule().trimVideo(uri, startTime, endTime);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// Compression (video + image) lives in ./nativeActions with the other bridge
|
|
547
|
+
// calls, so the shipped library shell under src/library/ can reach it without
|
|
548
|
+
// importing this barrel. Re-exported below, unchanged.
|
|
549
|
+
|
|
550
|
+
// QR Code Features
|
|
551
|
+
export function scanQRCode(): Promise<string> {
|
|
552
|
+
return getCustomCameraModule().scanQRCode();
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export function enableFaceDetection(enabled: boolean): Promise<void> {
|
|
556
|
+
return getCustomCameraModule().enableFaceDetection(enabled);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
export function setFaceEffect(effectType: FaceEffect = 'none'): Promise<void> {
|
|
560
|
+
return getCustomCameraModule().setFaceEffect(effectType);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export function setCameraTheme(theme: CameraTheme | CameraThemeConfig = 'default'): Promise<void> {
|
|
564
|
+
setGlobalCameraTheme(theme as CameraTheme);
|
|
565
|
+
const resolvedTheme = getCurrentCameraTheme();
|
|
566
|
+
return getCustomCameraModule().setCameraTheme(JSON.stringify(resolvedTheme));
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
// ===== Media Storage Features =====
|
|
570
|
+
|
|
571
|
+
export {
|
|
572
|
+
getMediaStorageManager,
|
|
573
|
+
initializeMediaStorage,
|
|
574
|
+
publishCachedMedia,
|
|
575
|
+
getCacheInfo,
|
|
576
|
+
cleanupExpiredCache,
|
|
577
|
+
MediaStorageManager,
|
|
578
|
+
} from './storage';
|
|
579
|
+
|
|
580
|
+
// Export new media storage service
|
|
581
|
+
export {
|
|
582
|
+
getMediaStorageService,
|
|
583
|
+
initializeMediaStorageService,
|
|
584
|
+
handleCapturedMedia,
|
|
585
|
+
publishAllCachedMedia,
|
|
586
|
+
getStorageSummary,
|
|
587
|
+
MediaStorageService,
|
|
588
|
+
} from './mediaStorageService';
|
|
589
|
+
|
|
590
|
+
// Re-export storage types
|
|
591
|
+
export type {
|
|
592
|
+
StoredMediaMetadata,
|
|
593
|
+
MediaPublishResult,
|
|
594
|
+
CleanupResult,
|
|
595
|
+
StorageStats,
|
|
596
|
+
MediaStorageLocation,
|
|
597
|
+
MediaStorageStatus,
|
|
598
|
+
MediaStorageConfig,
|
|
599
|
+
SecureDeleteOptions,
|
|
600
|
+
SecureDeleteResult,
|
|
601
|
+
} from './types';
|
|
602
|
+
|
|
603
|
+
// ── Encrypted media database (SQLCipher) ──────────────────────────
|
|
604
|
+
// Modular, production-ready persistence layer: centralized manager, schema
|
|
605
|
+
// migrations, repository/service, typed models, and a UI hook.
|
|
606
|
+
export {
|
|
607
|
+
// Manager + lifecycle
|
|
608
|
+
DatabaseManager,
|
|
609
|
+
getDatabaseManager,
|
|
610
|
+
initializeMediaDatabase,
|
|
611
|
+
// Repository / service
|
|
612
|
+
MediaRepository,
|
|
613
|
+
getMediaRepository,
|
|
614
|
+
// Migrations
|
|
615
|
+
MIGRATIONS,
|
|
616
|
+
LATEST_SCHEMA_VERSION,
|
|
617
|
+
runMigrations,
|
|
618
|
+
// Mapping helpers
|
|
619
|
+
assetToRecordInput,
|
|
620
|
+
recordToAsset,
|
|
621
|
+
rowToRecord,
|
|
622
|
+
assetTypeToMediaType,
|
|
623
|
+
mediaTypeToAssetType,
|
|
624
|
+
normalizeSource,
|
|
625
|
+
extensionForMimeType,
|
|
626
|
+
resolveDocumentsPath,
|
|
627
|
+
isPublishedToDocuments,
|
|
628
|
+
detectSource,
|
|
629
|
+
// Encryption key
|
|
630
|
+
getDatabaseKey,
|
|
631
|
+
isHardwareBackedKeyAvailable,
|
|
632
|
+
// UI hook
|
|
633
|
+
useMediaDatabase,
|
|
634
|
+
// Table/column constants
|
|
635
|
+
MEDIA_TABLE,
|
|
636
|
+
MediaColumns,
|
|
637
|
+
} from './db';
|
|
638
|
+
|
|
639
|
+
export type {
|
|
640
|
+
MediaRecord,
|
|
641
|
+
MediaRecordInput,
|
|
642
|
+
MediaType,
|
|
643
|
+
MediaSource,
|
|
644
|
+
MediaFilter,
|
|
645
|
+
MediaCounts,
|
|
646
|
+
MediaQueryOptions,
|
|
647
|
+
BatchStatement,
|
|
648
|
+
Migration,
|
|
649
|
+
MigrationExecutor,
|
|
650
|
+
UseMediaDatabaseResult,
|
|
651
|
+
} from './db';
|
|
652
|
+
|
|
653
|
+
export { NativeCustomVideoView } from './NativeCustomVideoView';
|
|
654
|
+
export type { NativeCustomVideoViewProps } from './NativeCustomVideoView';
|
|
655
|
+
export {
|
|
656
|
+
NativeAnimatedImageView,
|
|
657
|
+
isNativeAnimatedImageAvailable,
|
|
658
|
+
} from './NativeAnimatedImageView';
|
|
659
|
+
export type { NativeAnimatedImageViewProps } from './NativeAnimatedImageView';
|
|
660
|
+
export {
|
|
661
|
+
NativeMediaThumbnailView,
|
|
662
|
+
MediaThumbnail,
|
|
663
|
+
isNativeMediaThumbnailAvailable,
|
|
664
|
+
} from './NativeMediaThumbnailView';
|
|
665
|
+
export type {
|
|
666
|
+
NativeMediaThumbnailViewProps,
|
|
667
|
+
MediaThumbnailProps,
|
|
668
|
+
} from './NativeMediaThumbnailView';
|
|
669
|
+
export { NativeBlurView } from './NativeBlurView';
|
|
670
|
+
export type { NativeBlurViewProps } from './NativeBlurView';
|
|
671
|
+
export { NativeAudioPlayerView } from './NativeAudioPlayerView';
|
|
672
|
+
export type { NativeAudioPlayerViewProps } from './NativeAudioPlayerView';
|
|
673
|
+
export { GlobalAudioPlayerProvider, GlobalMiniAudioPlayer, useGlobalAudioPlayer } from './AudioPlayerContext';
|
|
674
|
+
export type { GlobalAudioPlayerProviderProps } from './AudioPlayerContext';
|
|
675
|
+
export {
|
|
676
|
+
NativeDocumentPreviewView,
|
|
677
|
+
getDocumentPreviewKind,
|
|
678
|
+
isNativeDocumentPreviewAvailable,
|
|
679
|
+
} from './NativeDocumentPreviewView';
|
|
680
|
+
export type {
|
|
681
|
+
NativeDocumentPreviewViewProps,
|
|
682
|
+
DocumentPreviewKind,
|
|
683
|
+
} from './NativeDocumentPreviewView';
|
|
684
|
+
export { CameraPreview } from './CameraPreview';
|
|
685
|
+
export {
|
|
686
|
+
ResponsivePreviewContainer,
|
|
687
|
+
PREVIEW_WIDTH,
|
|
688
|
+
PREVIEW_HEIGHT,
|
|
689
|
+
WHATSAPP_ASPECT_RATIO,
|
|
690
|
+
PORTRAIT_PREVIEW_ASPECT_RATIO,
|
|
691
|
+
DEFAULT_PREVIEW_DIMENSION_CONFIG,
|
|
692
|
+
calcPreviewDimensions,
|
|
693
|
+
calcPortraitPreviewDimensions,
|
|
694
|
+
usePreviewDimensions,
|
|
695
|
+
usePortraitPreviewDimensions,
|
|
696
|
+
} from './ResponsivePreviewContainer';
|
|
697
|
+
export type { PreviewDimensionConfig } from './ResponsivePreviewContainer';
|
|
698
|
+
|
|
699
|
+
// ── Audio Recording ─────────────────────────────────────────────────
|
|
700
|
+
// startAudioRecording / stopAudioRecording / cancelAudioRecording /
|
|
701
|
+
// stopAndPublishAudioRecording / pauseAudioRecording / resumeAudioRecording /
|
|
702
|
+
// getAudioRecordingState / getAudioAmplitude are defined in ./nativeActions and
|
|
703
|
+
// re-exported near the top of this file.
|
|
704
|
+
|
|
705
|
+
// ── Media library shell (the RN screens on top of the native camera) ─
|
|
706
|
+
// `<CameraMediaLibrary />` is the one-element drop-in: the library grid with its
|
|
707
|
+
// five category pills, the swipeable category pager, the Plus/Cross FAB, the
|
|
708
|
+
// full-screen viewer with scrubber + counter, the document/audio preview cards,
|
|
709
|
+
// the record-audio screen, the SQLCipher-backed store and upload progress.
|
|
710
|
+
//
|
|
711
|
+
// Everything it is built from is exported too, so a host can assemble its own
|
|
712
|
+
// screen from the same pieces. See ./library for the folder's own docs.
|
|
713
|
+
export {
|
|
714
|
+
// Screens
|
|
715
|
+
CameraMediaLibrary,
|
|
716
|
+
MediaLibraryScreen,
|
|
717
|
+
RecordAudioScreen,
|
|
718
|
+
// Viewer slides
|
|
719
|
+
ImagePreview,
|
|
720
|
+
VideoPreview,
|
|
721
|
+
DocumentPreview,
|
|
722
|
+
AudioPreview,
|
|
723
|
+
MediaMetadataHeader,
|
|
724
|
+
// Chrome
|
|
725
|
+
ExpandableFab,
|
|
726
|
+
ViewerCounter,
|
|
727
|
+
DocumentTile,
|
|
728
|
+
AudioTile,
|
|
729
|
+
// Theming / icons / scaling
|
|
730
|
+
createLibraryIconRegistry,
|
|
731
|
+
libraryIconRegistry,
|
|
732
|
+
PlusCloseIcon,
|
|
733
|
+
CircularSeekIcon,
|
|
734
|
+
ViewDetailsIcon,
|
|
735
|
+
libraryPalette,
|
|
736
|
+
useLibraryPalette,
|
|
737
|
+
createPalette,
|
|
738
|
+
wp,
|
|
739
|
+
hp,
|
|
740
|
+
ms,
|
|
741
|
+
fs,
|
|
742
|
+
SCREEN_W,
|
|
743
|
+
SCREEN_H,
|
|
744
|
+
BASE_W,
|
|
745
|
+
BASE_H,
|
|
746
|
+
// Metadata helpers
|
|
747
|
+
getFileSize,
|
|
748
|
+
refreshAssetMetadata,
|
|
749
|
+
refreshAssetMetadataBatch,
|
|
750
|
+
} from './library';
|
|
751
|
+
|
|
752
|
+
export type {
|
|
753
|
+
CameraMediaLibraryProps,
|
|
754
|
+
MediaLibraryScreenProps,
|
|
755
|
+
MediaLibraryFilterKey,
|
|
756
|
+
RecordAudioScreenProps,
|
|
757
|
+
VideoPreviewProps,
|
|
758
|
+
MediaMetadataHeaderProps,
|
|
759
|
+
ExpandableFabProps,
|
|
760
|
+
ViewerCounterProps,
|
|
761
|
+
ViewerCounterHandle,
|
|
762
|
+
LibraryPalette,
|
|
763
|
+
} from './library';
|