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 @@
|
|
|
1
|
+
{"version":3,"file":"NativeCustomCamera.web.d.ts","sourceRoot":"","sources":["../../../src/NativeCustomCamera.web.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,YAAY;kBACF,OAAO,CAAC,MAAM,CAAC;+BAIF,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;iCAItB,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;8BAI3B,MAAM,GAAG,OAAO,CA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AAC,MAAM,CAAC;kBAMvD,OAAO,CAAC,MAAM,CAAC;kCAIC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;+BAI1B,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;2BAI1B,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;iCAIhB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;mCAIpB,MAAM,UAAU,OAAO,WAAW,MAAM,GAAG,IAAI;kCAGhD,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;0BAIhC,OAAO,CAAC,MAAM,CAAC;4BAIb,OAAO,CAAC,MAAM,CAAC;oCAIP,OAAO,CAAC,MAAM,CAAC;2BAIxB,OAAO,CAAC,IAAI,CAAC;4BAIZ,OAAO,CAAC,IAAI,CAAC;8BAIX,OAAO,CAAC,MAAM,CAAC;yBAIpB,OAAO,CAAC,MAAM,CAAC;CAGrC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type NativeSyntheticEvent, type ViewProps } from 'react-native';
|
|
2
|
+
export interface VideoPlaybackProgressEventData {
|
|
3
|
+
currentTimeMs: number;
|
|
4
|
+
durationMs: number;
|
|
5
|
+
isPlaying: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface VideoPlaybackProgressEvent extends NativeSyntheticEvent<VideoPlaybackProgressEventData> {
|
|
8
|
+
}
|
|
9
|
+
export interface NativeCustomVideoViewProps extends ViewProps {
|
|
10
|
+
src?: string;
|
|
11
|
+
paused?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether this view is the currently-visible page in a paging viewer. When a paging host
|
|
14
|
+
* (e.g. the full-screen preview viewer) sets this per cell, only the active clip keeps a
|
|
15
|
+
* live player: deactivating releases the decoder and resets to 00:00, so returning replays
|
|
16
|
+
* from the start rather than resuming, and at most one video plays at a time.
|
|
17
|
+
*
|
|
18
|
+
* Optional — defaults to true natively, so a single-video consumer that never sets it
|
|
19
|
+
* behaves exactly as before (driven purely by `paused`).
|
|
20
|
+
*/
|
|
21
|
+
active?: boolean;
|
|
22
|
+
/** Called when the native player advances or pauses at a position. */
|
|
23
|
+
onPlaybackProgress?: (event: VideoPlaybackProgressEvent) => void;
|
|
24
|
+
/** Called once the video reaches the end of playback. */
|
|
25
|
+
onPlaybackEnded?: (event: NativeSyntheticEvent<{
|
|
26
|
+
durationMs: number;
|
|
27
|
+
}>) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const NativeCustomVideoView: import("react-native").HostComponent<NativeCustomVideoViewProps>;
|
|
30
|
+
//# sourceMappingURL=NativeCustomVideoView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeCustomVideoView.d.ts","sourceRoot":"","sources":["../../../src/NativeCustomVideoView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEjG,MAAM,WAAW,8BAA8B;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB,CAAC,8BAA8B,CAAC;CAAG;AAE3G,MAAM,WAAW,0BAA2B,SAAQ,SAAS;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACjE,yDAAyD;IACzD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;CACjF;AAED,eAAO,MAAM,qBAAqB,kEAA8E,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { type NativeSyntheticEvent, type ViewProps } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* The renderer families the native in-app document preview supports, all built on standard
|
|
5
|
+
* Android framework APIs (no third-party preview library):
|
|
6
|
+
* - `pdf` → PdfRenderer pages in a scrolling list (lazy, memory-bounded rasterization)
|
|
7
|
+
* - `text` → plain text in a scrollable native TextView
|
|
8
|
+
* - `code` → structured text (JSON/XML/…) — same renderer with a monospace face
|
|
9
|
+
* - `html` → a locked-down WebView (no JavaScript, no network, navigation blocked)
|
|
10
|
+
* - `image` → image-based documents (scans/photos exported as documents), down-sampled decode
|
|
11
|
+
* - `ppt`/`pptx` → dedicated PowerPoint extractors + Canvas slide viewer
|
|
12
|
+
* - `docx`/`xlsx`/`odt`/`ods`/`rtf`/`csv`/`epub` → native format parsers (OOXML/ODF
|
|
13
|
+
* zip+XML structure, RTF control words, CSV records, EPUB spine) that reproduce the
|
|
14
|
+
* ORIGINAL geometry — true page size/margins, authored column widths/row heights/merges,
|
|
15
|
+
* fonts/sizes/colors/spacing, embedded images — rendered by the same locked WebView engine.
|
|
16
|
+
*/
|
|
17
|
+
export type DocumentPreviewKind = 'pdf' | 'text' | 'code' | 'html' | 'image' | 'ppt' | 'docx' | 'xlsx' | 'pptx' | 'odt' | 'ods' | 'rtf' | 'csv' | 'epub';
|
|
18
|
+
export interface NativeDocumentPreviewViewProps extends ViewProps {
|
|
19
|
+
/** Document source uri (content:// or file://). */
|
|
20
|
+
src?: string;
|
|
21
|
+
/** Which native renderer to use — see {@link getDocumentPreviewKind}. */
|
|
22
|
+
kind?: DocumentPreviewKind;
|
|
23
|
+
/**
|
|
24
|
+
* False while the document's page is off-screen in a paging viewer — pauses expensive work
|
|
25
|
+
* (PDF page rasterization) exactly like the audio/video cells' `active` gate.
|
|
26
|
+
*/
|
|
27
|
+
active?: boolean;
|
|
28
|
+
/** Fired when the document is ready. `pageCount` is > 0 for PDFs, 0 otherwise. */
|
|
29
|
+
onPreviewLoad?: (event: NativeSyntheticEvent<{
|
|
30
|
+
pageCount: number;
|
|
31
|
+
}>) => void;
|
|
32
|
+
/** Fired when the file can't be rendered — callers should fall back to an info card. */
|
|
33
|
+
onPreviewError?: (event: NativeSyntheticEvent<{
|
|
34
|
+
message: string;
|
|
35
|
+
}>) => void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Maps a document's file name / MIME type to the native renderer able to preview it in-app,
|
|
39
|
+
* or `null` when no parser exists for the format (binary-era DOC/XLS, Apple PAGES,
|
|
40
|
+
* archives, …) — those should show an informational card instead. The extension wins over the
|
|
41
|
+
* MIME type because SAF providers frequently report generic types (application/octet-stream)
|
|
42
|
+
* for files whose names identify them precisely.
|
|
43
|
+
*/
|
|
44
|
+
export declare function getDocumentPreviewKind(fileName?: string, mimeType?: string): DocumentPreviewKind | null;
|
|
45
|
+
/** True when the native in-app preview is available on this platform/build. */
|
|
46
|
+
export declare const isNativeDocumentPreviewAvailable: () => boolean;
|
|
47
|
+
export declare const NativeDocumentPreviewView: FC<NativeDocumentPreviewViewProps>;
|
|
48
|
+
//# sourceMappingURL=NativeDocumentPreviewView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeDocumentPreviewView.d.ts","sourceRoot":"","sources":["../../../src/NativeDocumentPreviewView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,EAAE,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,GACL,MAAM,GACN,MAAM,GACN,MAAM,GACN,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,MAAM,CAAC;AAEX,MAAM,WAAW,8BAA+B,SAAQ,SAAS;IAC/D,mDAAmD;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kFAAkF;IAClF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;IAC7E,wFAAwF;IACxF,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;CAC7E;AAqFD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,mBAAmB,GAAG,IAAI,CAgB5B;AAmBD,+EAA+E;AAC/E,eAAO,MAAM,gCAAgC,QAAO,OAClB,CAAC;AAEnC,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAQxE,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { type ImageStyle, type StyleProp, type ViewProps } from 'react-native';
|
|
3
|
+
import type { CameraAsset } from './types';
|
|
4
|
+
export interface NativeMediaThumbnailViewProps extends Omit<ViewProps, 'style'> {
|
|
5
|
+
/** The media's own URI (`content://`, `file://` or a plain path). */
|
|
6
|
+
src?: string;
|
|
7
|
+
/**
|
|
8
|
+
* `video` extracts a frame; anything else is decoded as a still. Both the JS (`photo`) and
|
|
9
|
+
* database (`image`) spellings mean the same thing.
|
|
10
|
+
*/
|
|
11
|
+
mediaType?: CameraAsset['type'] | 'image';
|
|
12
|
+
/** Cached copy of the file, read in preference to the URI while it exists on disk. */
|
|
13
|
+
cachePath?: string;
|
|
14
|
+
/** A video's user-selected cover frame; overrides frame extraction when present. */
|
|
15
|
+
coverUri?: string;
|
|
16
|
+
/** Format hints — decide decodability (HEIF/AVIF) and alpha handling. */
|
|
17
|
+
mimeType?: string;
|
|
18
|
+
fileName?: string;
|
|
19
|
+
/** How the frame is scaled into the tile. Defaults to `cover`. */
|
|
20
|
+
resizeMode?: 'contain' | 'cover';
|
|
21
|
+
/**
|
|
22
|
+
* Decode target in pixels. Defaults to the tile's own measured size, which is what a list
|
|
23
|
+
* row wants — set it only to force a sharper (or cheaper) bitmap.
|
|
24
|
+
*/
|
|
25
|
+
thumbnailSize?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Typed as an image style rather than a view style: the native view and the `<Image>`
|
|
28
|
+
* fallback both render image content.
|
|
29
|
+
*/
|
|
30
|
+
style?: StyleProp<ImageStyle>;
|
|
31
|
+
}
|
|
32
|
+
/** True when native thumbnail decoding is available on this platform/build. */
|
|
33
|
+
export declare const isNativeMediaThumbnailAvailable: () => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Renders a media file's own thumbnail — an extracted frame for a video, the decoded image for
|
|
36
|
+
* a still — through the native decoder where the build has it and through
|
|
37
|
+
* {@link MediaThumbnailFallback} where it does not. Either way the underlying file is only ever
|
|
38
|
+
* read.
|
|
39
|
+
*/
|
|
40
|
+
export declare const NativeMediaThumbnailView: FC<NativeMediaThumbnailViewProps>;
|
|
41
|
+
export interface MediaThumbnailProps {
|
|
42
|
+
/** The asset to render a thumbnail for. */
|
|
43
|
+
asset: CameraAsset;
|
|
44
|
+
style?: StyleProp<ImageStyle>;
|
|
45
|
+
resizeMode?: 'contain' | 'cover';
|
|
46
|
+
thumbnailSize?: number;
|
|
47
|
+
testID?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Convenience wrapper that feeds a whole {@link CameraAsset} to {@link NativeMediaThumbnailView},
|
|
51
|
+
* so a list row does not have to know which of the asset's fields drive the decode.
|
|
52
|
+
*/
|
|
53
|
+
export declare const MediaThumbnail: FC<MediaThumbnailProps>;
|
|
54
|
+
//# sourceMappingURL=NativeMediaThumbnailView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeMediaThumbnailView.d.ts","sourceRoot":"","sources":["../../../src/NativeMediaThumbnailView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAQ3C,MAAM,WAAW,6BACf,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IAChC,qEAAqE;IACrE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;IAC1C,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CAC/B;AASD,+EAA+E;AAC/E,eAAO,MAAM,+BAA+B,QAAO,OACX,CAAC;AA8DzC;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAOtE,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,2CAA2C;IAC3C,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAoBlD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FC, ReactElement } from 'react';
|
|
2
|
+
import type { ColorValue, StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
3
|
+
export interface NativeSvgIconProps extends Omit<ViewProps, 'style'> {
|
|
4
|
+
/** Inline SVG markup to draw. */
|
|
5
|
+
svg: string;
|
|
6
|
+
/**
|
|
7
|
+
* Optional tint. Recolours `currentColor` (and any un-parseable colour) in the
|
|
8
|
+
* markup; explicit colours in the SVG are left untouched.
|
|
9
|
+
*/
|
|
10
|
+
tintColor?: ColorValue;
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
}
|
|
13
|
+
/** True when the bundled native SVG renderer is available on this platform/build. */
|
|
14
|
+
export declare const isNativeSvgIconAvailable: () => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Draws inline SVG markup with the bundled native renderer when it is available,
|
|
17
|
+
* and otherwise renders [fallback] — the plugin's built-in default icon. This is
|
|
18
|
+
* how an inline-`svg` customization stays safe on a platform with no native half
|
|
19
|
+
* (iOS/web) or against an older linked binary: it silently shows the default
|
|
20
|
+
* artwork rather than a blank box.
|
|
21
|
+
*/
|
|
22
|
+
export declare const NativeSvgIcon: FC<NativeSvgIconProps & {
|
|
23
|
+
fallback: ReactElement;
|
|
24
|
+
}>;
|
|
25
|
+
//# sourceMappingURL=NativeSvgIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeSvgIcon.d.ts","sourceRoot":"","sources":["../../../src/NativeSvgIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IAClE,iCAAiC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AASD,qFAAqF;AACrF,eAAO,MAAM,wBAAwB,QAAO,OACX,CAAC;AAElC;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAC5B,kBAAkB,GAAG;IAAE,QAAQ,EAAE,YAAY,CAAA;CAAE,CAMhD,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** WhatsApp-like camera preview aspect ratio (720:1165 ≈ 9:14.6 ≈ 0.618) */
|
|
3
|
+
export declare const WHATSAPP_ASPECT_RATIO: number;
|
|
4
|
+
/**
|
|
5
|
+
* Portrait 9:16 aspect ratio used for the media editing / preview canvas.
|
|
6
|
+
*
|
|
7
|
+
* After capture the user is taken to the editing preview, which always presents
|
|
8
|
+
* a portrait (9:16) canvas regardless of the captured media's own orientation.
|
|
9
|
+
* A landscape photo is scaled and centered (letterboxed) inside this canvas with
|
|
10
|
+
* its aspect ratio preserved — no rotation, stretching, distortion, or cropping.
|
|
11
|
+
* This single constant is the source of truth for that canvas so the on-screen
|
|
12
|
+
* preview matches the final exported / sent image exactly.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PORTRAIT_PREVIEW_ASPECT_RATIO: number;
|
|
15
|
+
/**
|
|
16
|
+
* Responsive preview geometry — the single source of truth. Every value is
|
|
17
|
+
* also exposed through `theme.components.responsivePreviewContainer` so host
|
|
18
|
+
* apps can re-tune them without touching this file.
|
|
19
|
+
*/
|
|
20
|
+
export interface PreviewDimensionConfig {
|
|
21
|
+
/** Fraction of screen width used for the preview container. */
|
|
22
|
+
widthRatio: number;
|
|
23
|
+
/** Maximum preview width in logical pixels (matches WhatsApp on tablets). */
|
|
24
|
+
maxWidth: number;
|
|
25
|
+
/** Maximum fraction of screen height the preview may occupy. */
|
|
26
|
+
maxHeightRatio: number;
|
|
27
|
+
}
|
|
28
|
+
/** Default geometry — the stock, WhatsApp-like responsive sizing. */
|
|
29
|
+
export declare const DEFAULT_PREVIEW_DIMENSION_CONFIG: PreviewDimensionConfig;
|
|
30
|
+
/** Compute preview dimensions from raw screen values */
|
|
31
|
+
export declare function calcPreviewDimensions(screenW: number, screenH: number, config?: PreviewDimensionConfig): {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
aspectRatio: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Compute portrait 9:16 canvas dimensions from raw screen values.
|
|
38
|
+
*
|
|
39
|
+
* The canvas is fitted (contain) inside the available screen area so the whole
|
|
40
|
+
* 9:16 frame is always visible: it takes the largest 9:16 box that fits within
|
|
41
|
+
* both the width and height budget. The returned dimensions therefore always
|
|
42
|
+
* satisfy `width / height === PORTRAIT_PREVIEW_ASPECT_RATIO`, guaranteeing that
|
|
43
|
+
* the preview shown on screen is the exact same shape as the exported/sent image.
|
|
44
|
+
*/
|
|
45
|
+
export declare function calcPortraitPreviewDimensions(screenW: number, screenH: number, config?: PreviewDimensionConfig): {
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
aspectRatio: number;
|
|
49
|
+
};
|
|
50
|
+
export declare const PREVIEW_WIDTH: number;
|
|
51
|
+
export declare const PREVIEW_HEIGHT: number;
|
|
52
|
+
/**
|
|
53
|
+
* Returns responsive preview dimensions that update on screen size changes.
|
|
54
|
+
* Use this inside components instead of the static PREVIEW_WIDTH/PREVIEW_HEIGHT
|
|
55
|
+
* exports to ensure correctness after rotation or window resize.
|
|
56
|
+
*/
|
|
57
|
+
export declare function usePreviewDimensions(config?: PreviewDimensionConfig): {
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
aspectRatio: number;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Returns responsive portrait 9:16 canvas dimensions that update on screen size
|
|
64
|
+
* changes. Use this for the editing / preview canvas so a captured landscape
|
|
65
|
+
* image is scaled and centered inside a fixed portrait frame, and the preview
|
|
66
|
+
* matches the final exported / sent image exactly.
|
|
67
|
+
*/
|
|
68
|
+
export declare function usePortraitPreviewDimensions(config?: PreviewDimensionConfig): {
|
|
69
|
+
width: number;
|
|
70
|
+
height: number;
|
|
71
|
+
aspectRatio: number;
|
|
72
|
+
};
|
|
73
|
+
interface ResponsivePreviewContainerProps {
|
|
74
|
+
children: React.ReactNode;
|
|
75
|
+
/** Optional extra styles merged after the container styles */
|
|
76
|
+
style?: any;
|
|
77
|
+
/** Explicit width to use instead of calculated width */
|
|
78
|
+
width?: number;
|
|
79
|
+
/** Explicit height to use instead of calculated height */
|
|
80
|
+
height?: number;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A fixed-aspect-ratio container that matches WhatsApp's camera preview area.
|
|
84
|
+
*
|
|
85
|
+
* Usage:
|
|
86
|
+
* <ResponsivePreviewContainer>
|
|
87
|
+
* <Image source={…} style={{ width: '100%', height: '100%', resizeMode: 'contain' }} />
|
|
88
|
+
* </ResponsivePreviewContainer>
|
|
89
|
+
*/
|
|
90
|
+
export declare const ResponsivePreviewContainer: React.FC<ResponsivePreviewContainerProps>;
|
|
91
|
+
export {};
|
|
92
|
+
//# sourceMappingURL=ResponsivePreviewContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsivePreviewContainer.d.ts","sourceRoot":"","sources":["../../../src/ResponsivePreviewContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAc5D,4EAA4E;AAC5E,eAAO,MAAM,qBA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if screen reader is enabled
|
|
6
|
+
*/
|
|
7
|
+
export declare function useScreenReaderEnabled(): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if reduced motion is enabled
|
|
10
|
+
*/
|
|
11
|
+
export declare function useReducedMotion(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Check if bold text is enabled
|
|
14
|
+
*/
|
|
15
|
+
export declare function useBoldText(): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Announce text for screen readers
|
|
18
|
+
*/
|
|
19
|
+
export declare function announceForAccessibility(announcement: string): void;
|
|
20
|
+
//# sourceMappingURL=accessibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../../src/accessibility.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAehD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAmB1C;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAerC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAKnE"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { clearCameraLanguageProvider, getCameraIsRtl, getCameraLocale, setCameraLanguage, setCameraLanguageProvider, syncCameraLanguage } from './localization';
|
|
2
|
+
import { type CameraIconsConfig } from './iconConfig';
|
|
3
|
+
import type { CameraAnimationConfig, CameraDimensionConfig, CameraIconConfig, CameraPluginConfig, GifPickerConfig, UploadNotificationConfig } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Default animation durations (ms) — extracted verbatim from the native views
|
|
6
|
+
* (CustomCameraActivity, MediaPreviewEditor, MediaAdapters). Changing these
|
|
7
|
+
* values changes the native UI; leaving them produces the exact stock motion.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_ANIMATION_CONFIG: Required<Omit<CameraAnimationConfig, 'disableAnimations'>> & {
|
|
10
|
+
disableAnimations: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Icon defaults: no global tint override and no per-icon overrides — native
|
|
14
|
+
* renders each vector drawable exactly as shipped (white strokes at their
|
|
15
|
+
* responsive sizes).
|
|
16
|
+
*/
|
|
17
|
+
export declare const DEFAULT_ICON_CONFIG: CameraIconConfig;
|
|
18
|
+
/**
|
|
19
|
+
* Centralized icon defaults: nothing customized, so every icon resolves to the
|
|
20
|
+
* default the plugin ships. Adding an id to this map is what replaces an icon.
|
|
21
|
+
*/
|
|
22
|
+
export declare const DEFAULT_CUSTOM_ICONS: CameraIconsConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Dimension defaults are intentionally EMPTY: the native UI sizes its chrome
|
|
25
|
+
* responsively (e.g. shutter = 18% of the short screen edge clamped to
|
|
26
|
+
* 64–78dp, control icons = 11.5% clamped to 42–52dp). A value set here becomes
|
|
27
|
+
* a fixed dp override; absence keeps the stock responsive behavior.
|
|
28
|
+
*/
|
|
29
|
+
export declare const DEFAULT_DIMENSION_CONFIG: CameraDimensionConfig;
|
|
30
|
+
/**
|
|
31
|
+
* Upload notification defaults — the current channel ids/names and texts from
|
|
32
|
+
* UploadService.kt. Text defaults live in the localization layer (the same
|
|
33
|
+
* `upload*` keys), so they are omitted here and only override when set.
|
|
34
|
+
*/
|
|
35
|
+
export declare const DEFAULT_NOTIFICATION_CONFIG: UploadNotificationConfig;
|
|
36
|
+
/**
|
|
37
|
+
* GIF picker default: GIPHY provider, no API key. With no key the native "Add
|
|
38
|
+
* GIF" button still appears but the picker shows a "not configured" state
|
|
39
|
+
* instead of calling out. Host apps set `gif.apiKey` (and optionally switch
|
|
40
|
+
* `gif.provider` to `tenor`) via {@link configureCameraPlugin}.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DEFAULT_GIF_CONFIG: GifPickerConfig;
|
|
43
|
+
/** The fully-merged config the plugin currently applies. */
|
|
44
|
+
export type ResolvedCameraPluginConfig = {
|
|
45
|
+
/**
|
|
46
|
+
* The centralized icon configuration: icon id → replacement. This is the
|
|
47
|
+
* section host apps customize; see {@link setCameraIcons}.
|
|
48
|
+
*/
|
|
49
|
+
customIcons: CameraIconsConfig;
|
|
50
|
+
icons: CameraIconConfig;
|
|
51
|
+
animations: typeof DEFAULT_ANIMATION_CONFIG;
|
|
52
|
+
dimensions: CameraDimensionConfig;
|
|
53
|
+
notifications: UploadNotificationConfig;
|
|
54
|
+
gif: GifPickerConfig;
|
|
55
|
+
};
|
|
56
|
+
/** Returns the currently active (fully merged) white-label config. */
|
|
57
|
+
export declare function getCameraPluginConfig(): ResolvedCameraPluginConfig;
|
|
58
|
+
/** Subscribe to config changes; returns an unsubscribe function. */
|
|
59
|
+
export declare function subscribeToCameraPluginConfig(listener: (config: ResolvedCameraPluginConfig) => void): () => void;
|
|
60
|
+
/**
|
|
61
|
+
* Configure every customizable aspect of the plugin in one call. Sections are
|
|
62
|
+
* deep-merged over the previous configuration (which starts at the stock
|
|
63
|
+
* defaults), so repeated calls compose. Resolves when the config has been
|
|
64
|
+
* handed to the native layer.
|
|
65
|
+
*
|
|
66
|
+
* ```ts
|
|
67
|
+
* await configureCameraPlugin({
|
|
68
|
+
* theme: { colors: { primary: '#E91E63' } },
|
|
69
|
+
* customIcons: { close: MyCloseIcon, send: { tintColor: '#FFD54F' } },
|
|
70
|
+
* language: 'de',
|
|
71
|
+
* translations: { de: { photoMode: 'Foto', videoMode: 'Video' } },
|
|
72
|
+
* animations: { disableAnimations: true },
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* `language` also accepts a live provider, which is the one-time setup for
|
|
77
|
+
* automatic language synchronization — after this the whole plugin, React Native
|
|
78
|
+
* screens and native camera alike, follows the host app's language on its own:
|
|
79
|
+
*
|
|
80
|
+
* ```ts
|
|
81
|
+
* await configureCameraPlugin({
|
|
82
|
+
* translations: myBundles,
|
|
83
|
+
* language: {
|
|
84
|
+
* get: () => i18n.language,
|
|
85
|
+
* subscribe: (onChange) => {
|
|
86
|
+
* i18n.on('languageChanged', onChange);
|
|
87
|
+
* return () => i18n.off('languageChanged', onChange);
|
|
88
|
+
* },
|
|
89
|
+
* },
|
|
90
|
+
* });
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare function configureCameraPlugin(config?: CameraPluginConfig): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Replace any of the plugin's icons, on every surface, in one call.
|
|
96
|
+
*
|
|
97
|
+
* Keys are the unique ids from `CAMERA_ICON_CATALOG`; a key you leave out keeps
|
|
98
|
+
* the icon the plugin ships. Repeated calls compose (each icon merges
|
|
99
|
+
* field-wise), so a later `setCameraIcons({ send: { tintColor: 'green' } })`
|
|
100
|
+
* does not undo an earlier `setCameraIcons({ send: MySendIcon })`.
|
|
101
|
+
*
|
|
102
|
+
* ```ts
|
|
103
|
+
* setCameraIcons({
|
|
104
|
+
* close: MyCloseIcon, // React component
|
|
105
|
+
* gallery: require('./gallery.png'), // image
|
|
106
|
+
* send: { tintColor: '#25D366' }, // recolour the built-in icon
|
|
107
|
+
* crop: { resourceName: 'my_crop' }, // Android drawable in your app
|
|
108
|
+
* });
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* Resolves once the native camera screen has the configuration.
|
|
112
|
+
*/
|
|
113
|
+
export declare function setCameraIcons(icons: CameraIconsConfig): Promise<void>;
|
|
114
|
+
/** The centralized icon customizations currently in effect. */
|
|
115
|
+
export declare function getCameraIcons(): CameraIconsConfig;
|
|
116
|
+
/** Drop every icon customization and go back to the plugin's default icons. */
|
|
117
|
+
export declare function resetCameraIcons(): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Namespace-style facade so integrations can write
|
|
120
|
+
* `CameraPlugin.configure({...})` / `CameraPlugin.getConfig()`.
|
|
121
|
+
*/
|
|
122
|
+
export declare const CameraPlugin: {
|
|
123
|
+
configure: typeof configureCameraPlugin;
|
|
124
|
+
getConfig: typeof getCameraPluginConfig;
|
|
125
|
+
subscribe: typeof subscribeToCameraPluginConfig;
|
|
126
|
+
setIcons: typeof setCameraIcons;
|
|
127
|
+
getIcons: typeof getCameraIcons;
|
|
128
|
+
resetIcons: typeof resetCameraIcons;
|
|
129
|
+
/** Switch to the host app's newly selected language. */
|
|
130
|
+
setLanguage: typeof setCameraLanguage;
|
|
131
|
+
/**
|
|
132
|
+
* Bind the host app's language once and let every plugin surface follow it
|
|
133
|
+
* automatically from then on. The one-time alternative to `setLanguage`.
|
|
134
|
+
*/
|
|
135
|
+
setLanguageProvider: typeof setCameraLanguageProvider;
|
|
136
|
+
/** Turn automatic language synchronization back off. */
|
|
137
|
+
clearLanguageProvider: typeof clearCameraLanguageProvider;
|
|
138
|
+
/** Re-read the bound language provider, for hosts that cannot notify. */
|
|
139
|
+
syncLanguage: typeof syncCameraLanguage;
|
|
140
|
+
/** The active language tag, or `''` when the host has not set one. */
|
|
141
|
+
getLanguage: typeof getCameraLocale;
|
|
142
|
+
/** Whether plugin UI is currently laid out right-to-left. */
|
|
143
|
+
isRtl: typeof getCameraIsRtl;
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AAqBA,OAAO,EACL,2BAA2B,EAC3B,cAAc,EACd,eAAe,EAGf,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAGhB,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAC7C,IAAI,CAAC,qBAAqB,EAAE,m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;AACH,eAAO,MAAM,YAAY;;;;;;;IAOvB,wDAAwD;;IAExD;;;OAGG;;IAEH,wDAAwD;;IAExD,yEAAyE;;IAEzE,sEAAsE;;IAEtE,6DAA6D;;CAE9D,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debounce function optimized for low-end devices
|
|
3
|
+
* Longer default delay to reduce CPU load
|
|
4
|
+
*/
|
|
5
|
+
export declare function debounceForLowEnd<T extends (...args: unknown[]) => unknown>(func: T, wait?: number): (...args: Parameters<T>) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Throttle function optimized for low-end devices
|
|
8
|
+
* Longer limit to reduce CPU load
|
|
9
|
+
*/
|
|
10
|
+
export declare function throttleForLowEnd<T extends (...args: unknown[]) => unknown>(func: T, limit?: number): (...args: Parameters<T>) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Run operation in background with priority control
|
|
13
|
+
* Uses requestIdleCallback when available
|
|
14
|
+
*/
|
|
15
|
+
export declare function runInBackgroundWithPriority(operation: () => Promise<void>, priority?: 'low' | 'normal' | 'high'): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Create lazy initializer that defers execution
|
|
18
|
+
* Uses requestIdleCallback when available
|
|
19
|
+
*/
|
|
20
|
+
export declare function createLazyInitializer<T>(initializer: () => T): () => T | Promise<T>;
|
|
21
|
+
/**
|
|
22
|
+
* Process operations in chunks to avoid blocking UI
|
|
23
|
+
*/
|
|
24
|
+
export declare function processInChunks<T>(operations: (() => Promise<T>)[]): Promise<T[]>;
|
|
25
|
+
/**
|
|
26
|
+
* CPU-efficient delay that yields to main thread
|
|
27
|
+
*/
|
|
28
|
+
export declare function efficientDelay(ms: number): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Check if current thread is busy
|
|
31
|
+
*/
|
|
32
|
+
export declare function isMainThreadBusy(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Wait for main thread to be available
|
|
35
|
+
*/
|
|
36
|
+
export declare function waitForMainThreadAvailable(maxWait?: number, checkInterval?: number): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* CPU-efficient animation frame handler
|
|
39
|
+
*/
|
|
40
|
+
export declare function requestEfficientAnimationFrame(callback: FrameRequestCallback): number;
|
|
41
|
+
/**
|
|
42
|
+
* Cancel efficient animation frame
|
|
43
|
+
*/
|
|
44
|
+
export declare function cancelEfficientAnimationFrame(handle: number): void;
|
|
45
|
+
/**
|
|
46
|
+
* Get CPU optimization level based on device specs
|
|
47
|
+
*/
|
|
48
|
+
export declare function getCpuOptimizationLevel(ram: 'low' | 'medium' | 'high', processor: 'weak' | 'medium' | 'strong'): 'aggressive' | 'moderate' | 'none';
|
|
49
|
+
/**
|
|
50
|
+
* Check if device supports requestIdleCallback
|
|
51
|
+
*/
|
|
52
|
+
export declare function supportsIdleCallback(): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Polyfill for requestIdleCallback
|
|
55
|
+
*/
|
|
56
|
+
export declare function requestIdleCallbackPolyfill(callback: (deadline: IdleDeadline) => void, options?: {
|
|
57
|
+
timeout: number;
|
|
58
|
+
}): number;
|
|
59
|
+
/**
|
|
60
|
+
* Cancel polyfilled idle callback
|
|
61
|
+
*/
|
|
62
|
+
export declare function cancelIdleCallbackPolyfill(handle: number): void;
|
|
63
|
+
//# sourceMappingURL=cpuOptimization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cpuOptimization.d.ts","sourceRoot":"","sources":["../../../src/cpuOptimization.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EACzE,IAAI,EAAE,CAAC,EACP,IAAI,GAAE,MAAY,GACjB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CA0BlC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,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UpC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,EAC1C,OAAO,CAAC,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAC5B,MAAM,CA2BR;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAgB/D"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { SQLiteDatabase, ResultSet } from 'react-native-sqlcipher';
|
|
2
|
+
/** A single parameterized statement for {@link DatabaseManager.batch}. */
|
|
3
|
+
export interface BatchStatement {
|
|
4
|
+
sql: string;
|
|
5
|
+
params?: any[];
|
|
6
|
+
}
|
|
7
|
+
export declare class DatabaseManager {
|
|
8
|
+
private db;
|
|
9
|
+
private initPromise;
|
|
10
|
+
/** True once the encrypted database is open and migrated. */
|
|
11
|
+
get isReady(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Opens (once) the encrypted database and applies migrations. Concurrent
|
|
14
|
+
* callers share a single in-flight open, so `init` is safe to call from
|
|
15
|
+
* multiple screens/hooks simultaneously.
|
|
16
|
+
*/
|
|
17
|
+
init(): Promise<SQLiteDatabase>;
|
|
18
|
+
private open;
|
|
19
|
+
/** Ensures the DB is open and returns the live connection. */
|
|
20
|
+
private requireDb;
|
|
21
|
+
/**
|
|
22
|
+
* Executes a write/DDL statement. Returns the raw result set for callers that
|
|
23
|
+
* need `insertId` / `rowsAffected`.
|
|
24
|
+
*/
|
|
25
|
+
exec(sql: string, params?: any[]): Promise<ResultSet>;
|
|
26
|
+
/** Executes a SELECT and returns the rows as an array of `T`. */
|
|
27
|
+
query<T = any>(sql: string, params?: any[]): Promise<T[]>;
|
|
28
|
+
/** Convenience: SELECT returning the first scalar column of the first row. */
|
|
29
|
+
queryScalar<T = number>(sql: string, params?: any[]): Promise<T | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Runs a set of statements atomically in a single transaction.
|
|
32
|
+
*
|
|
33
|
+
* The `react-native-sqlcipher` driver requires every `executeSql` to be queued
|
|
34
|
+
* *synchronously* inside the transaction scope, so this takes a pre-built list
|
|
35
|
+
* of statements rather than an async callback — guaranteeing all-or-nothing
|
|
36
|
+
* semantics (used by `insertMany` and the migration runner).
|
|
37
|
+
*/
|
|
38
|
+
batch(statements: BatchStatement[]): Promise<void>;
|
|
39
|
+
/** Adapts this manager to the migration executor contract. */
|
|
40
|
+
private createMigrationExecutor;
|
|
41
|
+
/** Closes the connection (e.g. on teardown). Safe to call when not open. */
|
|
42
|
+
close(): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
/** Returns the shared `DatabaseManager` singleton. */
|
|
45
|
+
export declare function getDatabaseManager(): DatabaseManager;
|
|
46
|
+
/** Opens + migrates the encrypted database. Call once at app startup. */
|
|
47
|
+
export declare function initializeMediaDatabase(): Promise<void>;
|
|
48
|
+
//# sourceMappingURL=DatabaseManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseManager.d.ts","sourceRoot":"","sources":["../../../../src/db/DatabaseManager.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,cAAc,EAEd,SAAS,EACV,MAAM,wBAAwB,CAAC;AAOhC,0EAA0E;AAC1E,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;CAChB;AAaD,qBAAa,eAAe;IAC1B,OAAO,CAAC,EAAE,CAA+B;IACzC,OAAO,CAAC,WAAW,CAAwC;IAE3D,6DAA6D;IAC7D,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC;YAkBvB,IAAI;IAgClB,8DAA8D;YAChD,SAAS;IAIvB;;;OAGG;IACG,IAAI,CAAC,GAAG,EA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