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