react-native-inapp-inspector 2.3.16 → 2.3.18
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/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +438 -7
- package/bin/cli.js +0 -0
- package/dist/commonjs/capture.d.ts +26 -0
- package/dist/commonjs/capture.js +32 -0
- package/dist/commonjs/components/AnalyticsEventCard.js +11 -11
- package/dist/commonjs/components/AnimatedEntrance.js +6 -70
- package/dist/commonjs/components/DomainHeader.js +3 -48
- package/dist/commonjs/components/EmptyState.js +2 -2
- package/dist/commonjs/components/HeadersSection.js +14 -34
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +1 -2
- package/dist/commonjs/components/Inspector/ConsoleTab.js +1 -1
- package/dist/commonjs/components/Inspector/CrashTab.js +4 -2
- package/dist/commonjs/components/Inspector/DebuggingTab.js +2 -2
- package/dist/commonjs/components/Inspector/InspectorHeader.js +651 -313
- package/dist/commonjs/components/Inspector/MainScreen.js +25 -70
- package/dist/commonjs/components/Inspector/MediaGalleryTab.d.ts +2 -0
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +307 -0
- package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +11 -0
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +393 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +183 -182
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +4 -9
- package/dist/commonjs/components/Inspector/ReduxTab.js +4 -2
- package/dist/commonjs/components/Inspector/SettingsPanel.js +245 -0
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +2 -2
- package/dist/commonjs/components/Inspector/StorageTab.js +3 -3
- package/dist/commonjs/components/Inspector/TabBar.js +5 -10
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +5 -10
- package/dist/commonjs/components/JsonViewer.js +43 -20
- package/dist/commonjs/components/LogCard.js +5 -5
- package/dist/commonjs/components/MetaAccordion.js +78 -80
- package/dist/commonjs/components/NetworkIcons.d.ts +8 -0
- package/dist/commonjs/components/NetworkIcons.js +51 -1
- package/dist/commonjs/components/SectionHeader.js +3 -48
- package/dist/commonjs/components/SkeletonPlaceholder.js +2 -2
- package/dist/commonjs/components/SourcePageCard.js +43 -45
- package/dist/commonjs/components/Toast.js +4 -4
- package/dist/commonjs/components/TouchableScale.js +9 -65
- package/dist/commonjs/components/TreeNode.js +2 -14
- package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
- package/dist/commonjs/constants/telemetryConfig.js +3 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/useAccordion.d.ts +3 -8
- package/dist/commonjs/customHooks/useAccordion.js +6 -36
- package/dist/commonjs/helpers/index.d.ts +2 -1
- package/dist/commonjs/helpers/index.js +10 -1
- package/dist/commonjs/i18n/locales/en.json +66 -2
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +39 -22
- package/dist/commonjs/native/NativeInspector.d.ts +60 -0
- package/dist/commonjs/native/NativeInspector.js +109 -2
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +8 -0
- package/dist/commonjs/styles/AppColors.d.ts +36 -0
- package/dist/commonjs/styles/AppColors.js +36 -0
- package/dist/commonjs/styles/index.d.ts +3 -1
- package/dist/commonjs/styles/index.js +3 -1
- package/dist/commonjs/types/enums.d.ts +1 -0
- package/dist/commonjs/types/enums.js +1 -0
- package/dist/commonjs/types/index.d.ts +2 -2
- package/dist/esm/capture.d.ts +26 -0
- package/dist/esm/capture.js +29 -0
- package/dist/esm/components/AnalyticsEventCard.js +11 -11
- package/dist/esm/components/AnimatedEntrance.js +4 -38
- package/dist/esm/components/DomainHeader.js +4 -16
- package/dist/esm/components/EmptyState.js +2 -2
- package/dist/esm/components/HeadersSection.js +16 -36
- package/dist/esm/components/Inspector/AnalyticsTab.js +2 -3
- package/dist/esm/components/Inspector/ConsoleTab.js +2 -2
- package/dist/esm/components/Inspector/CrashTab.js +5 -3
- package/dist/esm/components/Inspector/DebuggingTab.js +3 -3
- package/dist/esm/components/Inspector/InspectorHeader.js +654 -316
- package/dist/esm/components/Inspector/MainScreen.js +25 -70
- package/dist/esm/components/Inspector/MediaGalleryTab.d.ts +2 -0
- package/dist/esm/components/Inspector/MediaGalleryTab.js +267 -0
- package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +11 -0
- package/dist/esm/components/Inspector/MediaPreviewModal.js +353 -0
- package/dist/esm/components/Inspector/NetworkTab.js +185 -184
- package/dist/esm/components/Inspector/NpmUpdateToast.js +5 -10
- package/dist/esm/components/Inspector/ReduxTab.js +5 -3
- package/dist/esm/components/Inspector/SettingsPanel.js +246 -1
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +2 -2
- package/dist/esm/components/Inspector/StorageTab.js +3 -3
- package/dist/esm/components/Inspector/TabBar.js +6 -11
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +6 -11
- package/dist/esm/components/JsonViewer.js +43 -20
- package/dist/esm/components/LogCard.js +5 -5
- package/dist/esm/components/MetaAccordion.js +79 -81
- package/dist/esm/components/NetworkIcons.d.ts +8 -0
- package/dist/esm/components/NetworkIcons.js +42 -0
- package/dist/esm/components/SectionHeader.js +4 -16
- package/dist/esm/components/SkeletonPlaceholder.js +2 -2
- package/dist/esm/components/SourcePageCard.js +44 -46
- package/dist/esm/components/Toast.js +4 -4
- package/dist/esm/components/TouchableScale.js +7 -33
- package/dist/esm/components/TreeNode.js +4 -16
- package/dist/esm/constants/telemetryConfig.d.ts +3 -3
- package/dist/esm/constants/telemetryConfig.js +3 -3
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/useAccordion.d.ts +3 -8
- package/dist/esm/customHooks/useAccordion.js +7 -37
- package/dist/esm/helpers/index.d.ts +2 -1
- package/dist/esm/helpers/index.js +8 -0
- package/dist/esm/i18n/locales/en.json +66 -2
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +36 -21
- package/dist/esm/native/NativeInspector.d.ts +60 -0
- package/dist/esm/native/NativeInspector.js +100 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +8 -0
- package/dist/esm/styles/AppColors.d.ts +36 -0
- package/dist/esm/styles/AppColors.js +36 -0
- package/dist/esm/styles/index.d.ts +3 -1
- package/dist/esm/styles/index.js +3 -1
- package/dist/esm/types/enums.d.ts +1 -0
- package/dist/esm/types/enums.js +1 -0
- package/dist/esm/types/index.d.ts +2 -2
- package/ios/NetworkInspectorModule.h +1 -0
- package/ios/NetworkInspectorModule.mm +736 -7
- package/package.json +10 -2
- package/react-native-inapp-inspector.podspec +1 -0
- package/src/capture.ts +101 -0
- package/src/components/AnalyticsEventCard.tsx +15 -13
- package/src/components/AnimatedEntrance.tsx +3 -47
- package/src/components/DomainHeader.tsx +4 -17
- package/src/components/EmptyState.tsx +2 -2
- package/src/components/HeadersSection.tsx +31 -56
- package/src/components/Inspector/AnalyticsTab.tsx +2 -2
- package/src/components/Inspector/ConsoleTab.tsx +2 -1
- package/src/components/Inspector/CrashTab.tsx +4 -2
- package/src/components/Inspector/DebuggingTab.tsx +2 -2
- package/src/components/Inspector/InspectorHeader.tsx +1215 -789
- package/src/components/Inspector/MainScreen.tsx +44 -85
- package/src/components/Inspector/MediaGalleryTab.tsx +355 -0
- package/src/components/Inspector/MediaPreviewModal.tsx +435 -0
- package/src/components/Inspector/NetworkTab.tsx +14 -15
- package/src/components/Inspector/NpmUpdateToast.tsx +4 -9
- package/src/components/Inspector/ReduxTab.tsx +5 -2
- package/src/components/Inspector/SettingsPanel.tsx +303 -0
- package/src/components/Inspector/SkeletonPlaceholder.tsx +2 -2
- package/src/components/Inspector/StorageTab.tsx +3 -3
- package/src/components/Inspector/TabBar.tsx +6 -12
- package/src/components/Inspector/UpdateAvailableModal.tsx +6 -10
- package/src/components/JsonViewer.tsx +101 -60
- package/src/components/LogCard.tsx +10 -8
- package/src/components/MetaAccordion.tsx +6 -6
- package/src/components/NetworkIcons.tsx +150 -0
- package/src/components/SectionHeader.tsx +4 -16
- package/src/components/SkeletonPlaceholder.tsx +2 -2
- package/src/components/SourcePageCard.tsx +57 -55
- package/src/components/Toast.tsx +4 -4
- package/src/components/TouchableScale.tsx +8 -38
- package/src/components/TreeNode.tsx +5 -20
- package/src/constants/telemetryConfig.ts +3 -5
- package/src/constants/version.ts +1 -1
- package/src/customHooks/useAccordion.tsx +10 -43
- package/src/helpers/index.ts +10 -1
- package/src/i18n/locales/en.json +69 -2
- package/src/index.tsx +51 -23
- package/src/native/NativeInspector.ts +186 -1
- package/src/native/NativeNetworkInspector.ts +9 -0
- package/src/styles/AppColors.ts +38 -0
- package/src/styles/index.ts +3 -1
- package/src/types/enums.ts +3 -0
- package/src/types/index.ts +2 -2
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build/.transforms/6683d6eeaa3e1dfa689c3385111a0386/results.bin +0 -1
- package/android/build/.transforms/6683d6eeaa3e1dfa689c3385111a0386/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/results.bin +0 -1
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/BuildConfig.dex +0 -0
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView$iconView$1.dex +0 -0
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView.dex +0 -0
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NativeNetworkInspectorSpec.dex +0 -0
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$Companion.dex +0 -0
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$frameCallback$1.dex +0 -0
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$shakeListener$1.dex +0 -0
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule.dex +0 -0
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorPackage.dex +0 -0
- package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/generated/source/buildConfig/debug/com/inappinspector/BuildConfig.java +0 -10
- package/android/build/generated/source/codegen/java/com/inappinspector/NativeNetworkInspectorSpec.java +0 -104
- package/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
- package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec-generated.cpp +0 -128
- package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec.h +0 -31
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.cpp +0 -22
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.h +0 -24
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.cpp +0 -16
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.h +0 -17
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.cpp +0 -19
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.h +0 -18
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/RNInAppInspectorSpecJSI.h +0 -177
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.cpp +0 -17
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.h +0 -23
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.cpp +0 -16
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.h +0 -20
- package/android/build/generated/source/codegen/schema.json +0 -1
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
- package/android/build/intermediates/aar_main_jar/debug/syncDebugLibJars/classes.jar +0 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
- package/android/build/intermediates/annotations_typedef_file/debug/extractDebugAnnotations/typedefs.txt +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/android/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
- package/android/build/intermediates/merged_java_res/debug/mergeDebugJavaResource/feature-react-native-inapp-inspector.jar +0 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/aar/react-native-inapp-inspector-debug.aar +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -17
- package/android/build/reports/problems/problems-report.html +0 -659
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorPackage.class +0 -0
|
@@ -31,7 +31,9 @@ import CrashDetail from './CrashDetail';
|
|
|
31
31
|
import DeviceInfoTab from './DeviceInfoTab';
|
|
32
32
|
import StorageTab from './StorageTab';
|
|
33
33
|
import DebuggingTab from './DebuggingTab';
|
|
34
|
+
import {MediaGalleryTab} from './MediaGalleryTab';
|
|
34
35
|
import SettingsPanel from './SettingsPanel';
|
|
36
|
+
|
|
35
37
|
import NpmUpdateToast from './NpmUpdateToast';
|
|
36
38
|
import NpmStarPrompt from './NpmStarPrompt';
|
|
37
39
|
import FeedbackModal from './FeedbackModal';
|
|
@@ -74,18 +76,6 @@ const MainScreen = () => {
|
|
|
74
76
|
(activeTab === 'crash' && selectedCrash != null);
|
|
75
77
|
|
|
76
78
|
// ─── 60 FPS Transition Animations ──────────────────────────────────────────
|
|
77
|
-
const detailAnim = useRef(new Animated.Value(0)).current;
|
|
78
|
-
useEffect(() => {
|
|
79
|
-
if (isDetailActive) {
|
|
80
|
-
detailAnim.setValue(0);
|
|
81
|
-
Animated.spring(detailAnim, {
|
|
82
|
-
toValue: 1,
|
|
83
|
-
friction: 8,
|
|
84
|
-
tension: 65,
|
|
85
|
-
useNativeDriver: true,
|
|
86
|
-
}).start();
|
|
87
|
-
}
|
|
88
|
-
}, [isDetailActive]);
|
|
89
79
|
|
|
90
80
|
const settingsAnim = useRef(new Animated.Value(0)).current;
|
|
91
81
|
useEffect(() => {
|
|
@@ -95,7 +85,7 @@ const MainScreen = () => {
|
|
|
95
85
|
toValue: 1,
|
|
96
86
|
friction: 8,
|
|
97
87
|
tension: 65,
|
|
98
|
-
useNativeDriver:
|
|
88
|
+
useNativeDriver: false,
|
|
99
89
|
}).start();
|
|
100
90
|
}
|
|
101
91
|
}, [settingsPage !== null]);
|
|
@@ -108,21 +98,11 @@ const MainScreen = () => {
|
|
|
108
98
|
toValue: 1,
|
|
109
99
|
friction: 8,
|
|
110
100
|
tension: 65,
|
|
111
|
-
useNativeDriver:
|
|
101
|
+
useNativeDriver: false,
|
|
112
102
|
}).start();
|
|
113
103
|
}
|
|
114
104
|
}, [isFeedbackOpen]);
|
|
115
105
|
|
|
116
|
-
const tabAnim = useRef(new Animated.Value(1)).current;
|
|
117
|
-
useEffect(() => {
|
|
118
|
-
tabAnim.setValue(0);
|
|
119
|
-
Animated.timing(tabAnim, {
|
|
120
|
-
toValue: 1,
|
|
121
|
-
duration: 150,
|
|
122
|
-
useNativeDriver: true,
|
|
123
|
-
}).start();
|
|
124
|
-
}, [activeTab]);
|
|
125
|
-
|
|
126
106
|
return (
|
|
127
107
|
<>
|
|
128
108
|
{(Platform.OS === 'ios' || Platform.OS === 'android') &&
|
|
@@ -159,30 +139,17 @@ const MainScreen = () => {
|
|
|
159
139
|
<InspectorHeader />
|
|
160
140
|
|
|
161
141
|
<View style={{flex: 1}}>
|
|
162
|
-
{/* ───
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
transform: [
|
|
174
|
-
{
|
|
175
|
-
translateY: tabAnim.interpolate({
|
|
176
|
-
inputRange: [0, 1],
|
|
177
|
-
outputRange: [6, 0],
|
|
178
|
-
}),
|
|
179
|
-
},
|
|
180
|
-
],
|
|
181
|
-
},
|
|
182
|
-
(isDetailActive || settingsPage !== null || isFeedbackOpen) && {
|
|
183
|
-
pointerEvents: 'none',
|
|
184
|
-
},
|
|
185
|
-
]}>
|
|
142
|
+
{/* ─── Persistent Content Layer (TabBar + List, never unmounted or hidden with display:none) ─── */}
|
|
143
|
+
<View
|
|
144
|
+
style={{flex: 1}}
|
|
145
|
+
pointerEvents={
|
|
146
|
+
isDetailActive || settingsPage !== null || isFeedbackOpen
|
|
147
|
+
? 'none'
|
|
148
|
+
: 'auto'
|
|
149
|
+
}>
|
|
150
|
+
<TabBar />
|
|
151
|
+
{isReady ? (
|
|
152
|
+
<View style={{flex: 1}}>
|
|
186
153
|
{activeTab === 'apis' && <NetworkTab />}
|
|
187
154
|
{activeTab === 'logs' && <ConsoleTab />}
|
|
188
155
|
{activeTab === 'analytics' && <AnalyticsTab />}
|
|
@@ -195,44 +162,36 @@ const MainScreen = () => {
|
|
|
195
162
|
{Platform.OS === 'android' &&
|
|
196
163
|
isLocalDebugEnvironment() &&
|
|
197
164
|
activeTab === 'debugging' && <DebuggingTab />}
|
|
198
|
-
</
|
|
165
|
+
</View>
|
|
166
|
+
) : (
|
|
167
|
+
<MainScreenSkeleton />
|
|
168
|
+
)}
|
|
169
|
+
</View>
|
|
199
170
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
<AnalyticsDetail event={selectedEvent} />
|
|
223
|
-
)}
|
|
224
|
-
{activeTab === 'logs' && selectedLog != null && (
|
|
225
|
-
<LogDetail />
|
|
226
|
-
)}
|
|
227
|
-
{activeTab === 'redux' && <ReduxDetail />}
|
|
228
|
-
{activeTab === 'crash' && selectedCrash != null && (
|
|
229
|
-
<CrashDetail />
|
|
230
|
-
)}
|
|
231
|
-
</Animated.View>
|
|
171
|
+
{/* ─── Detail View Layer (Solid overlay covering TabBar + Content with zero layout flicker) ─── */}
|
|
172
|
+
{isDetailActive && (
|
|
173
|
+
<View
|
|
174
|
+
style={[
|
|
175
|
+
StyleSheet.absoluteFill,
|
|
176
|
+
{
|
|
177
|
+
backgroundColor: AppColors.contentBg,
|
|
178
|
+
zIndex: 10,
|
|
179
|
+
},
|
|
180
|
+
]}>
|
|
181
|
+
{activeTab === 'apis' && selected != null && (
|
|
182
|
+
<NetworkDetail />
|
|
183
|
+
)}
|
|
184
|
+
{activeTab === 'analytics' && selectedEvent != null && (
|
|
185
|
+
<AnalyticsDetail event={selectedEvent} />
|
|
186
|
+
)}
|
|
187
|
+
{activeTab === 'logs' && selectedLog != null && (
|
|
188
|
+
<LogDetail />
|
|
189
|
+
)}
|
|
190
|
+
{activeTab === 'redux' && <ReduxDetail />}
|
|
191
|
+
{activeTab === 'crash' && selectedCrash != null && (
|
|
192
|
+
<CrashDetail />
|
|
232
193
|
)}
|
|
233
194
|
</View>
|
|
234
|
-
) : (
|
|
235
|
-
<MainScreenSkeleton />
|
|
236
195
|
)}
|
|
237
196
|
|
|
238
197
|
{/* Settings Panel Layer - Rendered on top with smooth slide & spring transition */}
|
|
@@ -319,12 +278,12 @@ const MainScreenSkeleton = React.memo(function MainScreenSkeleton() {
|
|
|
319
278
|
Animated.timing(shimmerAnim, {
|
|
320
279
|
toValue: 0.85,
|
|
321
280
|
duration: 750,
|
|
322
|
-
useNativeDriver:
|
|
281
|
+
useNativeDriver: false,
|
|
323
282
|
}),
|
|
324
283
|
Animated.timing(shimmerAnim, {
|
|
325
284
|
toValue: 0.35,
|
|
326
285
|
duration: 750,
|
|
327
|
-
useNativeDriver:
|
|
286
|
+
useNativeDriver: false,
|
|
328
287
|
}),
|
|
329
288
|
]),
|
|
330
289
|
);
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import React, {useState, useEffect, useMemo, useCallback} from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Alert,
|
|
4
|
+
Dimensions,
|
|
5
|
+
FlatList,
|
|
6
|
+
Image,
|
|
7
|
+
RefreshControl,
|
|
8
|
+
StyleSheet,
|
|
9
|
+
Text,
|
|
10
|
+
TouchableOpacity,
|
|
11
|
+
View,
|
|
12
|
+
} from 'react-native';
|
|
13
|
+
import {AppColors} from '../../styles/AppColors';
|
|
14
|
+
import {AppFonts} from '../../styles/AppFonts';
|
|
15
|
+
import TouchableScale from '../TouchableScale';
|
|
16
|
+
import EmptyState from '../EmptyState';
|
|
17
|
+
import {
|
|
18
|
+
CameraIcon,
|
|
19
|
+
FilmIcon,
|
|
20
|
+
GifIcon,
|
|
21
|
+
ImageIcon,
|
|
22
|
+
SendIcon,
|
|
23
|
+
TrashIcon,
|
|
24
|
+
VideoCameraIcon,
|
|
25
|
+
} from '../NetworkIcons';
|
|
26
|
+
import {MediaPreviewModal} from './MediaPreviewModal';
|
|
27
|
+
import {
|
|
28
|
+
ScreenCapture,
|
|
29
|
+
CapturedMediaItem,
|
|
30
|
+
} from '../../capture';
|
|
31
|
+
import {formatBytes} from '../../helpers';
|
|
32
|
+
import {showToast} from '../../helpers/toast';
|
|
33
|
+
import {useTranslation} from '../../i18n';
|
|
34
|
+
|
|
35
|
+
export const MediaGalleryTab: React.FC = () => {
|
|
36
|
+
const {t} = useTranslation();
|
|
37
|
+
const [mediaList, setMediaList] = useState<CapturedMediaItem[]>([]);
|
|
38
|
+
const [refreshing, setRefreshing] = useState(false);
|
|
39
|
+
const [selectedFilter, setSelectedFilter] = useState<'all' | 'image' | 'video' | 'gif'>('all');
|
|
40
|
+
const [selectedItem, setSelectedItem] = useState<CapturedMediaItem | null>(null);
|
|
41
|
+
|
|
42
|
+
const loadMedia = useCallback(async () => {
|
|
43
|
+
try {
|
|
44
|
+
const items = await ScreenCapture.getMediaList();
|
|
45
|
+
setMediaList(items);
|
|
46
|
+
} catch {
|
|
47
|
+
setMediaList([]);
|
|
48
|
+
}
|
|
49
|
+
}, []);
|
|
50
|
+
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
loadMedia();
|
|
53
|
+
}, [loadMedia]);
|
|
54
|
+
|
|
55
|
+
const onRefresh = async () => {
|
|
56
|
+
setRefreshing(true);
|
|
57
|
+
await loadMedia();
|
|
58
|
+
setRefreshing(false);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const filteredMedia = useMemo(() => {
|
|
62
|
+
if (selectedFilter === 'all') return mediaList;
|
|
63
|
+
return mediaList.filter(item => item.type === selectedFilter);
|
|
64
|
+
}, [mediaList, selectedFilter]);
|
|
65
|
+
|
|
66
|
+
const totalStorageBytes = useMemo(() => {
|
|
67
|
+
return mediaList.reduce((sum, item) => sum + (item.sizeBytes || 0), 0);
|
|
68
|
+
}, [mediaList]);
|
|
69
|
+
|
|
70
|
+
const handleDeleteItem = async (item: CapturedMediaItem) => {
|
|
71
|
+
await ScreenCapture.deleteMedia(item.uri);
|
|
72
|
+
await loadMedia();
|
|
73
|
+
showToast(t('mediaGallery.deleted'));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const handleClearAll = () => {
|
|
77
|
+
Alert.alert(
|
|
78
|
+
t('mediaGallery.purgeTitle'),
|
|
79
|
+
t('mediaGallery.purgeMessage', {count: mediaList.length, size: formatBytes(totalStorageBytes)}),
|
|
80
|
+
[
|
|
81
|
+
{text: t('common.cancel'), style: 'cancel'},
|
|
82
|
+
{
|
|
83
|
+
text: t('common.clearAll'),
|
|
84
|
+
style: 'destructive',
|
|
85
|
+
onPress: async () => {
|
|
86
|
+
await ScreenCapture.clearAllMedia();
|
|
87
|
+
await loadMedia();
|
|
88
|
+
showToast(t('mediaGallery.allPurged'));
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const handleConvertToGif = async (item: CapturedMediaItem) => {
|
|
96
|
+
const gifResult = await ScreenCapture.convertToGif(item.uri, {fps: 12, width: 480});
|
|
97
|
+
if (gifResult) {
|
|
98
|
+
await loadMedia();
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const renderItem = ({item}: {item: CapturedMediaItem}) => {
|
|
103
|
+
const isVideo = item.type === 'video';
|
|
104
|
+
const isGif = item.type === 'gif';
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<TouchableScale
|
|
108
|
+
onPress={() => setSelectedItem(item)}
|
|
109
|
+
style={galleryStyles.card}>
|
|
110
|
+
<View style={galleryStyles.thumbnailContainer}>
|
|
111
|
+
<Image
|
|
112
|
+
source={{uri: item.uri}}
|
|
113
|
+
style={galleryStyles.thumbnail}
|
|
114
|
+
resizeMode="cover"
|
|
115
|
+
/>
|
|
116
|
+
<View style={galleryStyles.typeBadge}>
|
|
117
|
+
{isVideo ? (
|
|
118
|
+
<FilmIcon size={11} color={AppColors.sky400} />
|
|
119
|
+
) : isGif ? (
|
|
120
|
+
<GifIcon size={11} color={AppColors.warningAmber} />
|
|
121
|
+
) : (
|
|
122
|
+
<ImageIcon size={11} color={AppColors.emerald500} />
|
|
123
|
+
)}
|
|
124
|
+
<Text style={galleryStyles.typeBadgeText}>
|
|
125
|
+
{item.format.toUpperCase()}
|
|
126
|
+
</Text>
|
|
127
|
+
</View>
|
|
128
|
+
</View>
|
|
129
|
+
|
|
130
|
+
<View style={galleryStyles.cardInfo}>
|
|
131
|
+
<Text style={galleryStyles.cardTitle} numberOfLines={1}>
|
|
132
|
+
{item.filename}
|
|
133
|
+
</Text>
|
|
134
|
+
<View style={galleryStyles.cardMetaRow}>
|
|
135
|
+
<Text style={galleryStyles.cardMeta}>
|
|
136
|
+
{formatBytes(item.sizeBytes)}
|
|
137
|
+
</Text>
|
|
138
|
+
<Text style={galleryStyles.cardMetaDot}>•</Text>
|
|
139
|
+
<Text style={galleryStyles.cardMeta}>
|
|
140
|
+
{new Date(item.timestamp).toLocaleTimeString([], {hour: '2-digit', minute: '2-digit'})}
|
|
141
|
+
</Text>
|
|
142
|
+
</View>
|
|
143
|
+
</View>
|
|
144
|
+
</TouchableScale>
|
|
145
|
+
);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<View style={galleryStyles.container}>
|
|
150
|
+
{/* Top Bar with Filter Chips and Clear All */}
|
|
151
|
+
<View style={galleryStyles.filterBar}>
|
|
152
|
+
<View style={galleryStyles.chipGroup}>
|
|
153
|
+
{(['all', 'image', 'video', 'gif'] as const).map(filterKey => {
|
|
154
|
+
const isActive = selectedFilter === filterKey;
|
|
155
|
+
const label =
|
|
156
|
+
filterKey === 'all'
|
|
157
|
+
? t('mediaGallery.all', {count: mediaList.length})
|
|
158
|
+
: filterKey === 'image'
|
|
159
|
+
? t('mediaGallery.photos')
|
|
160
|
+
: filterKey === 'video'
|
|
161
|
+
? t('mediaGallery.videos')
|
|
162
|
+
: t('mediaGallery.gifs');
|
|
163
|
+
|
|
164
|
+
return (
|
|
165
|
+
<TouchableOpacity
|
|
166
|
+
key={filterKey}
|
|
167
|
+
onPress={() => setSelectedFilter(filterKey)}
|
|
168
|
+
style={[
|
|
169
|
+
galleryStyles.chip,
|
|
170
|
+
isActive && galleryStyles.chipActive,
|
|
171
|
+
]}>
|
|
172
|
+
<Text
|
|
173
|
+
style={[
|
|
174
|
+
galleryStyles.chipText,
|
|
175
|
+
isActive && galleryStyles.chipTextActive,
|
|
176
|
+
]}>
|
|
177
|
+
{label}
|
|
178
|
+
</Text>
|
|
179
|
+
</TouchableOpacity>
|
|
180
|
+
);
|
|
181
|
+
})}
|
|
182
|
+
</View>
|
|
183
|
+
|
|
184
|
+
{mediaList.length > 0 && (
|
|
185
|
+
<TouchableOpacity
|
|
186
|
+
onPress={handleClearAll}
|
|
187
|
+
style={galleryStyles.clearBtn}
|
|
188
|
+
hitSlop={{top: 8, bottom: 8, left: 8, right: 8}}>
|
|
189
|
+
<TrashIcon size={13} color={AppColors.red500} />
|
|
190
|
+
<Text style={galleryStyles.clearBtnText}>{t('mediaGallery.purge', {size: formatBytes(totalStorageBytes)})}</Text>
|
|
191
|
+
</TouchableOpacity>
|
|
192
|
+
)}
|
|
193
|
+
</View>
|
|
194
|
+
|
|
195
|
+
{/* Grid of Media Items */}
|
|
196
|
+
<FlatList
|
|
197
|
+
data={filteredMedia}
|
|
198
|
+
keyExtractor={item => item.id}
|
|
199
|
+
renderItem={renderItem}
|
|
200
|
+
numColumns={2}
|
|
201
|
+
columnWrapperStyle={galleryStyles.columnWrapper}
|
|
202
|
+
contentContainerStyle={galleryStyles.listContent}
|
|
203
|
+
refreshControl={
|
|
204
|
+
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} tintColor={AppColors.sky400} />
|
|
205
|
+
}
|
|
206
|
+
ListEmptyComponent={
|
|
207
|
+
<EmptyState
|
|
208
|
+
customTitle={t('mediaGallery.noMediaTitle')}
|
|
209
|
+
customSub={t('mediaGallery.noMediaDesc')}
|
|
210
|
+
/>
|
|
211
|
+
}
|
|
212
|
+
/>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
{/* Fullscreen Preview Modal */}
|
|
216
|
+
<MediaPreviewModal
|
|
217
|
+
item={selectedItem}
|
|
218
|
+
visible={!!selectedItem}
|
|
219
|
+
onClose={() => setSelectedItem(null)}
|
|
220
|
+
onDelete={handleDeleteItem}
|
|
221
|
+
onConvertToGif={handleConvertToGif}
|
|
222
|
+
/>
|
|
223
|
+
</View>
|
|
224
|
+
);
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const {width: WINDOW_WIDTH} = Dimensions.get('window');
|
|
228
|
+
const CARD_WIDTH = (WINDOW_WIDTH - 36) / 2;
|
|
229
|
+
|
|
230
|
+
const galleryStyles = StyleSheet.create({
|
|
231
|
+
container: {
|
|
232
|
+
flex: 1,
|
|
233
|
+
backgroundColor: AppColors.slate850,
|
|
234
|
+
},
|
|
235
|
+
filterBar: {
|
|
236
|
+
flexDirection: 'row',
|
|
237
|
+
alignItems: 'center',
|
|
238
|
+
justifyContent: 'space-between',
|
|
239
|
+
paddingHorizontal: 12,
|
|
240
|
+
paddingVertical: 10,
|
|
241
|
+
borderBottomWidth: 1,
|
|
242
|
+
borderBottomColor: AppColors.borderGlassLight,
|
|
243
|
+
flexWrap: 'wrap',
|
|
244
|
+
gap: 8,
|
|
245
|
+
},
|
|
246
|
+
chipGroup: {
|
|
247
|
+
flexDirection: 'row',
|
|
248
|
+
alignItems: 'center',
|
|
249
|
+
gap: 6,
|
|
250
|
+
},
|
|
251
|
+
chip: {
|
|
252
|
+
paddingHorizontal: 9,
|
|
253
|
+
paddingVertical: 4.5,
|
|
254
|
+
borderRadius: 6,
|
|
255
|
+
backgroundColor: AppColors.whiteAlpha06,
|
|
256
|
+
borderWidth: 1,
|
|
257
|
+
borderColor: AppColors.whiteAlpha10,
|
|
258
|
+
},
|
|
259
|
+
chipActive: {
|
|
260
|
+
backgroundColor: `${AppColors.sky400}2E`,
|
|
261
|
+
borderColor: AppColors.sky400,
|
|
262
|
+
},
|
|
263
|
+
chipText: {
|
|
264
|
+
fontFamily: AppFonts.interMedium,
|
|
265
|
+
fontSize: 11,
|
|
266
|
+
color: AppColors.slate400,
|
|
267
|
+
},
|
|
268
|
+
chipTextActive: {
|
|
269
|
+
fontFamily: AppFonts.interBold,
|
|
270
|
+
color: AppColors.sky400,
|
|
271
|
+
},
|
|
272
|
+
clearBtn: {
|
|
273
|
+
flexDirection: 'row',
|
|
274
|
+
alignItems: 'center',
|
|
275
|
+
gap: 4,
|
|
276
|
+
paddingHorizontal: 8,
|
|
277
|
+
paddingVertical: 4,
|
|
278
|
+
borderRadius: 6,
|
|
279
|
+
backgroundColor: `${AppColors.red500}1F`,
|
|
280
|
+
borderWidth: 1,
|
|
281
|
+
borderColor: `${AppColors.red500}4D`,
|
|
282
|
+
},
|
|
283
|
+
clearBtnText: {
|
|
284
|
+
fontFamily: AppFonts.interMedium,
|
|
285
|
+
fontSize: 10.5,
|
|
286
|
+
color: AppColors.red500,
|
|
287
|
+
},
|
|
288
|
+
listContent: {
|
|
289
|
+
padding: 12,
|
|
290
|
+
gap: 12,
|
|
291
|
+
},
|
|
292
|
+
columnWrapper: {
|
|
293
|
+
gap: 12,
|
|
294
|
+
},
|
|
295
|
+
card: {
|
|
296
|
+
width: CARD_WIDTH,
|
|
297
|
+
backgroundColor: AppColors.slate800,
|
|
298
|
+
borderRadius: 8,
|
|
299
|
+
borderWidth: 1,
|
|
300
|
+
borderColor: AppColors.borderGlassLight,
|
|
301
|
+
overflow: 'hidden',
|
|
302
|
+
},
|
|
303
|
+
thumbnailContainer: {
|
|
304
|
+
width: '100%',
|
|
305
|
+
height: 110,
|
|
306
|
+
backgroundColor: AppColors.slate850,
|
|
307
|
+
position: 'relative',
|
|
308
|
+
},
|
|
309
|
+
thumbnail: {
|
|
310
|
+
width: '100%',
|
|
311
|
+
height: '100%',
|
|
312
|
+
},
|
|
313
|
+
typeBadge: {
|
|
314
|
+
position: 'absolute',
|
|
315
|
+
top: 6,
|
|
316
|
+
right: 6,
|
|
317
|
+
flexDirection: 'row',
|
|
318
|
+
alignItems: 'center',
|
|
319
|
+
gap: 3,
|
|
320
|
+
backgroundColor: AppColors.badgeGlassDark,
|
|
321
|
+
paddingHorizontal: 5,
|
|
322
|
+
paddingVertical: 2,
|
|
323
|
+
borderRadius: 4,
|
|
324
|
+
borderWidth: 1,
|
|
325
|
+
borderColor: AppColors.borderGlassMedium,
|
|
326
|
+
},
|
|
327
|
+
typeBadgeText: {
|
|
328
|
+
fontFamily: AppFonts.interBold,
|
|
329
|
+
fontSize: 9,
|
|
330
|
+
color: AppColors.slate200,
|
|
331
|
+
},
|
|
332
|
+
cardInfo: {
|
|
333
|
+
padding: 8,
|
|
334
|
+
gap: 3,
|
|
335
|
+
},
|
|
336
|
+
cardTitle: {
|
|
337
|
+
fontFamily: AppFonts.interMedium,
|
|
338
|
+
fontSize: 11.5,
|
|
339
|
+
color: AppColors.white,
|
|
340
|
+
},
|
|
341
|
+
cardMetaRow: {
|
|
342
|
+
flexDirection: 'row',
|
|
343
|
+
alignItems: 'center',
|
|
344
|
+
gap: 4,
|
|
345
|
+
},
|
|
346
|
+
cardMeta: {
|
|
347
|
+
fontFamily: AppFonts.interRegular,
|
|
348
|
+
fontSize: 10,
|
|
349
|
+
color: AppColors.slate400,
|
|
350
|
+
},
|
|
351
|
+
cardMetaDot: {
|
|
352
|
+
fontSize: 10,
|
|
353
|
+
color: AppColors.whiteAlpha30,
|
|
354
|
+
},
|
|
355
|
+
});
|