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,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ImagePreview — in-app image preview for an image asset in the full-screen viewer.
|
|
5
|
+
*
|
|
6
|
+
* Displays a metadata header (file name, size, date, time, dimensions) using the
|
|
7
|
+
* standardized metadata header component, with the full image below using contain mode.
|
|
8
|
+
* Handles all image types including HEIF/AVIF and animated GIFs through native decoders.
|
|
9
|
+
*/
|
|
10
|
+
import { View, Image, StyleSheet } from 'react-native';
|
|
11
|
+
import { NativeAnimatedImageView } from "../../NativeAnimatedImageView.js";
|
|
12
|
+
import { isGifAsset, requiresNativeImageDecoder } from "../../utils.js";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
export const ImagePreview = ({
|
|
15
|
+
asset
|
|
16
|
+
}) => {
|
|
17
|
+
const previewUri = asset.documentUri || asset.uri;
|
|
18
|
+
// Determine which renderer to use based on image format
|
|
19
|
+
const isGif = isGifAsset(asset);
|
|
20
|
+
const needsNativeDecoder = requiresNativeImageDecoder(asset);
|
|
21
|
+
const useNativeDecoder = isGif || needsNativeDecoder;
|
|
22
|
+
return /*#__PURE__*/_jsx(View, {
|
|
23
|
+
style: styles.wrap,
|
|
24
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
25
|
+
style: styles.imageWrapper,
|
|
26
|
+
children: useNativeDecoder ? /*#__PURE__*/_jsx(NativeAnimatedImageView, {
|
|
27
|
+
src: previewUri,
|
|
28
|
+
style: styles.image,
|
|
29
|
+
resizeMode: "contain",
|
|
30
|
+
active: true
|
|
31
|
+
}) : /*#__PURE__*/_jsx(Image, {
|
|
32
|
+
source: {
|
|
33
|
+
uri: previewUri
|
|
34
|
+
},
|
|
35
|
+
style: styles.image,
|
|
36
|
+
resizeMode: "contain"
|
|
37
|
+
// Decode to the slide's size instead of the file's full resolution: a 12MP still
|
|
38
|
+
// decoded whole is ~48MB of bitmap, and the viewer keeps neighbouring slides
|
|
39
|
+
// mounted. No-op on iOS.
|
|
40
|
+
,
|
|
41
|
+
resizeMethod: "resize"
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// No backgroundColor anywhere in this tree: the slide sits directly on the viewer's single
|
|
48
|
+
// screen background (s.viewerContainer). The header used to sit on `surface` and the media on
|
|
49
|
+
// `surfaceRaised`, which read as two stacked colour blocks — and because the image is fitted
|
|
50
|
+
// with `contain`, the raised block showed as empty strips above and below it. Painting nothing
|
|
51
|
+
// lets the one screen colour run edge to edge behind both.
|
|
52
|
+
const styles = StyleSheet.create({
|
|
53
|
+
wrap: {
|
|
54
|
+
flex: 1,
|
|
55
|
+
width: '100%',
|
|
56
|
+
overflow: 'hidden'
|
|
57
|
+
},
|
|
58
|
+
imageWrapper: {
|
|
59
|
+
flex: 1,
|
|
60
|
+
justifyContent: 'center',
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
overflow: 'hidden'
|
|
63
|
+
},
|
|
64
|
+
image: {
|
|
65
|
+
flex: 1,
|
|
66
|
+
width: '100%',
|
|
67
|
+
height: '100%'
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=ImagePreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Image","StyleSheet","NativeAnimatedImageView","isGifAsset","requiresNativeImageDecoder","jsx","_jsx","ImagePreview","asset","previewUri","documentUri","uri","isGif","needsNativeDecoder","useNativeDecoder","style","styles","wrap","children","imageWrapper","src","image","resizeMode","active","source","resizeMethod","create","flex","width","overflow","justifyContent","alignItems","height"],"sourceRoot":"..\\..\\..\\..\\src","sources":["library/components/ImagePreview.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,KAAK,EAAEC,UAAU,QAAQ,cAAc;AAEtD,SAASC,uBAAuB,QAAQ,kCAA+B;AACvE,SAASC,UAAU,EAAEC,0BAA0B,QAAQ,gBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAErE,OAAO,MAAMC,YAAY,GAAGA,CAAC;EAC3BC;AAGF,CAAC,KAAK;EACJ,MAAMC,UAAU,GAAGD,KAAK,CAACE,WAAW,IAAIF,KAAK,CAACG,GAAG;EACjD;EACA,MAAMC,KAAK,GAAGT,UAAU,CAACK,KAAK,CAAC;EAC/B,MAAMK,kBAAkB,GAAGT,0BAA0B,CAACI,KAAK,CAAC;EAC5D,MAAMM,gBAAgB,GAAGF,KAAK,IAAIC,kBAAkB;EAEpD,oBACEP,IAAA,CAACP,IAAI;IAACgB,KAAK,EAAEC,MAAM,CAACC,IAAK;IAAAC,QAAA,eACvBZ,IAAA,CAACP,IAAI;MAACgB,KAAK,EAAEC,MAAM,CAACG,YAAa;MAAAD,QAAA,EAC9BJ,gBAAgB,gBACfR,IAAA,CAACJ,uBAAuB;QACtBkB,GAAG,EAAEX,UAAW;QAChBM,KAAK,EAAEC,MAAM,CAACK,KAAM;QACpBC,UAAU,EAAC,SAAS;QACpBC,MAAM,EAAE;MAAK,CACd,CAAC,gBAEFjB,IAAA,CAACN,KAAK;QACJwB,MAAM,EAAE;UAAEb,GAAG,EAAEF;QAAW,CAAE;QAC5BM,KAAK,EAAEC,MAAM,CAACK,KAAM;QACpBC,UAAU,EAAC;QACX;QACA;QACA;QAAA;QACAG,YAAY,EAAC;MAAQ,CACtB;IACF,CACG;EAAC,CACH,CAAC;AAEX,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMT,MAAM,GAAGf,UAAU,CAACyB,MAAM,CAAC;EAC/BT,IAAI,EAAE;IACJU,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,MAAM;IACbC,QAAQ,EAAE;EACZ,CAAC;EACDV,YAAY,EAAE;IACZQ,IAAI,EAAE,CAAC;IACPG,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBF,QAAQ,EAAE;EACZ,CAAC;EACDR,KAAK,EAAE;IACLM,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,MAAM;IACbI,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MediaMetadataHeader — THE metadata strip for every media kind in the full-screen viewer.
|
|
5
|
+
*
|
|
6
|
+
* This is the document preview's header, lifted out verbatim: same row, same extension badge,
|
|
7
|
+
* same two-line text group, same paddings/type scale. Images, videos, audio AND documents all
|
|
8
|
+
* render through this one component, so the header can never drift between media types — there
|
|
9
|
+
* is only one set of styles to drift.
|
|
10
|
+
*
|
|
11
|
+
* What differs per kind is only WHICH fields are in the meta line, never how it looks:
|
|
12
|
+
* images → size · date · time · resolution
|
|
13
|
+
* videos → size · date · time · duration
|
|
14
|
+
* audio → size · date · time · duration
|
|
15
|
+
* documents → page count · size (unchanged from the original document strip)
|
|
16
|
+
*
|
|
17
|
+
* Every field is optional. A missing/unreadable value drops its chunk out of the line entirely
|
|
18
|
+
* rather than rendering an "Unknown …" placeholder, and the row keeps its exact height either
|
|
19
|
+
* way — the meta line is a single line whatever survives.
|
|
20
|
+
*/
|
|
21
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
22
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
23
|
+
import { useCameraLocalization } from "../../localization.js";
|
|
24
|
+
import { ms, fs } from "../responsive.js";
|
|
25
|
+
import { useLibraryPalette } from "../palette.js";
|
|
26
|
+
import { refreshAssetMetadata } from "../fileMetadata.js";
|
|
27
|
+
import { formatFileSize, formatMediaDate, formatMediaTime, formatMediaDuration, formatDimensions } from "../localizedFormat.js";
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
/**
|
|
30
|
+
* Last path segment of a name or URI — never the full path.
|
|
31
|
+
*
|
|
32
|
+
* `fileName` is usually already a bare display name, but it can arrive as an absolute path
|
|
33
|
+
* (documents dir publish) or a SAF/`file://` URI depending on where the asset came from, and
|
|
34
|
+
* the header must show `IMG_20260803_114530.jpg`, not `/storage/emulated/0/…/IMG_…jpg`.
|
|
35
|
+
*/
|
|
36
|
+
function baseNameOf(value) {
|
|
37
|
+
if (!value) return null;
|
|
38
|
+
// Drop any query/fragment a content:// or file:// URI may carry.
|
|
39
|
+
const withoutQuery = value.split(/[?#]/)[0] ?? '';
|
|
40
|
+
const segments = withoutQuery.split(/[\\/]/);
|
|
41
|
+
let candidate = segments[segments.length - 1] ?? '';
|
|
42
|
+
try {
|
|
43
|
+
candidate = decodeURIComponent(candidate);
|
|
44
|
+
} catch {
|
|
45
|
+
// Malformed percent-escapes — keep the raw segment.
|
|
46
|
+
}
|
|
47
|
+
candidate = candidate.trim();
|
|
48
|
+
return candidate.length > 0 ? candidate : null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* A URI's last segment, but only when it actually looks like a file name. A `content://` URI
|
|
53
|
+
* ends in a bare MediaStore row id ("1234"), which is not a name worth showing.
|
|
54
|
+
*/
|
|
55
|
+
function fileNameFromUri(uri) {
|
|
56
|
+
const base = baseNameOf(uri);
|
|
57
|
+
if (!base) return null;
|
|
58
|
+
const dot = base.lastIndexOf('.');
|
|
59
|
+
return dot > 0 && dot < base.length - 1 ? base : null;
|
|
60
|
+
}
|
|
61
|
+
function extensionOf(fileName, mimeType, fallback) {
|
|
62
|
+
if (fileName) {
|
|
63
|
+
const dot = fileName.lastIndexOf('.');
|
|
64
|
+
if (dot >= 0 && dot < fileName.length - 1) {
|
|
65
|
+
return fileName.slice(dot + 1).toUpperCase();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (mimeType) {
|
|
69
|
+
const slash = mimeType.lastIndexOf('/');
|
|
70
|
+
if (slash >= 0) return mimeType.slice(slash + 1).toUpperCase();
|
|
71
|
+
}
|
|
72
|
+
return fallback;
|
|
73
|
+
}
|
|
74
|
+
export const MediaMetadataHeader = ({
|
|
75
|
+
asset,
|
|
76
|
+
showDimensions = false,
|
|
77
|
+
showDuration = false,
|
|
78
|
+
leadingMeta = null,
|
|
79
|
+
showDateTime = true,
|
|
80
|
+
fallbackName
|
|
81
|
+
}) => {
|
|
82
|
+
const {
|
|
83
|
+
t,
|
|
84
|
+
locale
|
|
85
|
+
} = useCameraLocalization();
|
|
86
|
+
const palette = useLibraryPalette();
|
|
87
|
+
const styles = useMemo(() => makeStyles(palette), [palette]);
|
|
88
|
+
const [resolvedAsset, setResolvedAsset] = useState(asset);
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
let cancelled = false;
|
|
91
|
+
const loadResolvedAsset = async () => {
|
|
92
|
+
try {
|
|
93
|
+
const refreshed = await refreshAssetMetadata(asset);
|
|
94
|
+
if (!cancelled) setResolvedAsset(refreshed);
|
|
95
|
+
} catch {
|
|
96
|
+
if (!cancelled) setResolvedAsset(asset);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
loadResolvedAsset();
|
|
100
|
+
return () => {
|
|
101
|
+
cancelled = true;
|
|
102
|
+
};
|
|
103
|
+
}, [asset]);
|
|
104
|
+
|
|
105
|
+
// Name only — never a path. Falls back to the URI's last segment when it looks like a real
|
|
106
|
+
// file name, so a picked file with no display name still shows something meaningful.
|
|
107
|
+
const previewUri = resolvedAsset.documentUri || resolvedAsset.uri;
|
|
108
|
+
const pathName = fileNameFromUri(previewUri) ?? fileNameFromUri(resolvedAsset.uri);
|
|
109
|
+
const name = pathName ?? baseNameOf(resolvedAsset.fileName) ?? fallbackName ?? t('media');
|
|
110
|
+
const ext = extensionOf(name, resolvedAsset.mimeType, t('fileTypeGeneric'));
|
|
111
|
+
|
|
112
|
+
// Missing values contribute nothing — no placeholder text, no layout shift.
|
|
113
|
+
const metaParts = [leadingMeta, formatFileSize(resolvedAsset.size, locale, t), showDateTime ? formatMediaDate(resolvedAsset.dateTaken, locale) : null, showDateTime ? formatMediaTime(resolvedAsset.dateTaken, locale) : null, showDuration ? formatMediaDuration(resolvedAsset.duration, locale) : null, showDimensions ? formatDimensions(resolvedAsset.width, resolvedAsset.height, locale) : null].filter(part => Boolean(part));
|
|
114
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
115
|
+
style: styles.header,
|
|
116
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
117
|
+
style: styles.badge,
|
|
118
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
119
|
+
style: styles.badgeText,
|
|
120
|
+
numberOfLines: 1,
|
|
121
|
+
children: ext
|
|
122
|
+
})
|
|
123
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
124
|
+
style: styles.textGroup,
|
|
125
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
126
|
+
style: styles.name,
|
|
127
|
+
numberOfLines: 1,
|
|
128
|
+
ellipsizeMode: "middle",
|
|
129
|
+
children: name
|
|
130
|
+
}), metaParts.length > 0 ? /*#__PURE__*/_jsx(Text, {
|
|
131
|
+
style: styles.meta,
|
|
132
|
+
numberOfLines: 1,
|
|
133
|
+
ellipsizeMode: "tail",
|
|
134
|
+
children: metaParts.join(' · ')
|
|
135
|
+
}) : null]
|
|
136
|
+
})]
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
const makeStyles = palette => StyleSheet.create({
|
|
140
|
+
header: {
|
|
141
|
+
flexDirection: 'row',
|
|
142
|
+
alignItems: 'center',
|
|
143
|
+
paddingHorizontal: ms(4),
|
|
144
|
+
paddingBottom: ms(10)
|
|
145
|
+
},
|
|
146
|
+
badge: {
|
|
147
|
+
paddingHorizontal: ms(8),
|
|
148
|
+
paddingVertical: ms(4),
|
|
149
|
+
borderRadius: ms(6),
|
|
150
|
+
backgroundColor: palette.primary,
|
|
151
|
+
maxWidth: ms(72),
|
|
152
|
+
marginRight: ms(10)
|
|
153
|
+
},
|
|
154
|
+
badgeText: {
|
|
155
|
+
color: palette.white,
|
|
156
|
+
fontSize: fs(10),
|
|
157
|
+
fontWeight: '800',
|
|
158
|
+
letterSpacing: 0.5
|
|
159
|
+
},
|
|
160
|
+
textGroup: {
|
|
161
|
+
flex: 1
|
|
162
|
+
},
|
|
163
|
+
name: {
|
|
164
|
+
color: palette.textBright,
|
|
165
|
+
fontSize: fs(13.5),
|
|
166
|
+
fontWeight: '700'
|
|
167
|
+
},
|
|
168
|
+
meta: {
|
|
169
|
+
color: palette.textFaded,
|
|
170
|
+
fontSize: fs(11),
|
|
171
|
+
fontWeight: '500',
|
|
172
|
+
marginTop: ms(1)
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
//# sourceMappingURL=MediaMetadataHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useMemo","useState","View","Text","StyleSheet","useCameraLocalization","ms","fs","useLibraryPalette","refreshAssetMetadata","formatFileSize","formatMediaDate","formatMediaTime","formatMediaDuration","formatDimensions","jsx","_jsx","jsxs","_jsxs","baseNameOf","value","withoutQuery","split","segments","candidate","length","decodeURIComponent","trim","fileNameFromUri","uri","base","dot","lastIndexOf","extensionOf","fileName","mimeType","fallback","slice","toUpperCase","slash","MediaMetadataHeader","asset","showDimensions","showDuration","leadingMeta","showDateTime","fallbackName","t","locale","palette","styles","makeStyles","resolvedAsset","setResolvedAsset","cancelled","loadResolvedAsset","refreshed","previewUri","documentUri","pathName","name","ext","metaParts","size","dateTaken","duration","width","height","filter","part","Boolean","style","header","children","badge","badgeText","numberOfLines","textGroup","ellipsizeMode","meta","join","create","flexDirection","alignItems","paddingHorizontal","paddingBottom","paddingVertical","borderRadius","backgroundColor","primary","maxWidth","marginRight","color","white","fontSize","fontWeight","letterSpacing","flex","textBright","textFaded","marginTop"],"sourceRoot":"..\\..\\..\\..\\src","sources":["library/components/MediaMetadataHeader.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACpD,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAErD,SAASC,qBAAqB,QAAQ,uBAAoB;AAE1D,SAASC,EAAE,EAAEC,EAAE,QAAQ,kBAAe;AACtC,SAASC,iBAAiB,QAA6B,eAAY;AACnE,SAASC,oBAAoB,QAAQ,oBAAiB;AACtD,SACEC,cAAc,EACdC,eAAe,EACfC,eAAe,EACfC,mBAAmB,EACnBC,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