react-native-inapp-inspector 2.3.16 → 2.3.17
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
|
@@ -37,18 +37,6 @@ const MainScreen = () => {
|
|
|
37
37
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
38
38
|
(activeTab === 'redux' && (selectedReduxSlice != null || selectedReduxAction != null)) ||
|
|
39
39
|
(activeTab === 'crash' && selectedCrash != null);
|
|
40
|
-
const detailAnim = useRef(new Animated.Value(0)).current;
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
if (isDetailActive) {
|
|
43
|
-
detailAnim.setValue(0);
|
|
44
|
-
Animated.spring(detailAnim, {
|
|
45
|
-
toValue: 1,
|
|
46
|
-
friction: 8,
|
|
47
|
-
tension: 65,
|
|
48
|
-
useNativeDriver: true,
|
|
49
|
-
}).start();
|
|
50
|
-
}
|
|
51
|
-
}, [isDetailActive]);
|
|
52
40
|
const settingsAnim = useRef(new Animated.Value(0)).current;
|
|
53
41
|
useEffect(() => {
|
|
54
42
|
if (settingsPage !== null) {
|
|
@@ -57,7 +45,7 @@ const MainScreen = () => {
|
|
|
57
45
|
toValue: 1,
|
|
58
46
|
friction: 8,
|
|
59
47
|
tension: 65,
|
|
60
|
-
useNativeDriver:
|
|
48
|
+
useNativeDriver: false,
|
|
61
49
|
}).start();
|
|
62
50
|
}
|
|
63
51
|
}, [settingsPage !== null]);
|
|
@@ -69,19 +57,10 @@ const MainScreen = () => {
|
|
|
69
57
|
toValue: 1,
|
|
70
58
|
friction: 8,
|
|
71
59
|
tension: 65,
|
|
72
|
-
useNativeDriver:
|
|
60
|
+
useNativeDriver: false,
|
|
73
61
|
}).start();
|
|
74
62
|
}
|
|
75
63
|
}, [isFeedbackOpen]);
|
|
76
|
-
const tabAnim = useRef(new Animated.Value(1)).current;
|
|
77
|
-
useEffect(() => {
|
|
78
|
-
tabAnim.setValue(0);
|
|
79
|
-
Animated.timing(tabAnim, {
|
|
80
|
-
toValue: 1,
|
|
81
|
-
duration: 150,
|
|
82
|
-
useNativeDriver: true,
|
|
83
|
-
}).start();
|
|
84
|
-
}, [activeTab]);
|
|
85
64
|
return (<>
|
|
86
65
|
{(Platform.OS === 'ios' || Platform.OS === 'android') &&
|
|
87
66
|
enabled &&
|
|
@@ -105,27 +84,11 @@ const MainScreen = () => {
|
|
|
105
84
|
|
|
106
85
|
<View style={{ flex: 1 }}>
|
|
107
86
|
|
|
108
|
-
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
flex: 1,
|
|
115
|
-
opacity: tabAnim,
|
|
116
|
-
transform: [
|
|
117
|
-
{
|
|
118
|
-
translateY: tabAnim.interpolate({
|
|
119
|
-
inputRange: [0, 1],
|
|
120
|
-
outputRange: [6, 0],
|
|
121
|
-
}),
|
|
122
|
-
},
|
|
123
|
-
],
|
|
124
|
-
},
|
|
125
|
-
(isDetailActive || settingsPage !== null || isFeedbackOpen) && {
|
|
126
|
-
pointerEvents: 'none',
|
|
127
|
-
},
|
|
128
|
-
]}>
|
|
87
|
+
<View style={{ flex: 1 }} pointerEvents={isDetailActive || settingsPage !== null || isFeedbackOpen
|
|
88
|
+
? 'none'
|
|
89
|
+
: 'auto'}>
|
|
90
|
+
<TabBar />
|
|
91
|
+
{isReady ? (<View style={{ flex: 1 }}>
|
|
129
92
|
{activeTab === 'apis' && <NetworkTab />}
|
|
130
93
|
{activeTab === 'logs' && <ConsoleTab />}
|
|
131
94
|
{activeTab === 'analytics' && <AnalyticsTab />}
|
|
@@ -138,31 +101,23 @@ const MainScreen = () => {
|
|
|
138
101
|
{Platform.OS === 'android' &&
|
|
139
102
|
isLocalDebugEnvironment() &&
|
|
140
103
|
activeTab === 'debugging' && <DebuggingTab />}
|
|
141
|
-
</
|
|
104
|
+
</View>) : (<MainScreenSkeleton />)}
|
|
105
|
+
</View>
|
|
142
106
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
},
|
|
158
|
-
]}>
|
|
159
|
-
{activeTab === 'apis' && selected != null && (<NetworkDetail />)}
|
|
160
|
-
{activeTab === 'analytics' && selectedEvent != null && (<AnalyticsDetail event={selectedEvent}/>)}
|
|
161
|
-
{activeTab === 'logs' && selectedLog != null && (<LogDetail />)}
|
|
162
|
-
{activeTab === 'redux' && <ReduxDetail />}
|
|
163
|
-
{activeTab === 'crash' && selectedCrash != null && (<CrashDetail />)}
|
|
164
|
-
</Animated.View>)}
|
|
165
|
-
</View>) : (<MainScreenSkeleton />)}
|
|
107
|
+
|
|
108
|
+
{isDetailActive && (<View style={[
|
|
109
|
+
StyleSheet.absoluteFill,
|
|
110
|
+
{
|
|
111
|
+
backgroundColor: AppColors.contentBg,
|
|
112
|
+
zIndex: 10,
|
|
113
|
+
},
|
|
114
|
+
]}>
|
|
115
|
+
{activeTab === 'apis' && selected != null && (<NetworkDetail />)}
|
|
116
|
+
{activeTab === 'analytics' && selectedEvent != null && (<AnalyticsDetail event={selectedEvent}/>)}
|
|
117
|
+
{activeTab === 'logs' && selectedLog != null && (<LogDetail />)}
|
|
118
|
+
{activeTab === 'redux' && <ReduxDetail />}
|
|
119
|
+
{activeTab === 'crash' && selectedCrash != null && (<CrashDetail />)}
|
|
120
|
+
</View>)}
|
|
166
121
|
|
|
167
122
|
|
|
168
123
|
{settingsPage !== null && (<Animated.View style={[
|
|
@@ -230,12 +185,12 @@ const MainScreenSkeleton = React.memo(function MainScreenSkeleton() {
|
|
|
230
185
|
Animated.timing(shimmerAnim, {
|
|
231
186
|
toValue: 0.85,
|
|
232
187
|
duration: 750,
|
|
233
|
-
useNativeDriver:
|
|
188
|
+
useNativeDriver: false,
|
|
234
189
|
}),
|
|
235
190
|
Animated.timing(shimmerAnim, {
|
|
236
191
|
toValue: 0.35,
|
|
237
192
|
duration: 750,
|
|
238
|
-
useNativeDriver:
|
|
193
|
+
useNativeDriver: false,
|
|
239
194
|
}),
|
|
240
195
|
]));
|
|
241
196
|
animation.start();
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import React, { useState, useEffect, useMemo, useCallback } from 'react';
|
|
2
|
+
import { Alert, Dimensions, FlatList, Image, RefreshControl, StyleSheet, Text, TouchableOpacity, View, } from 'react-native';
|
|
3
|
+
import { AppColors } from '../../styles/AppColors';
|
|
4
|
+
import { AppFonts } from '../../styles/AppFonts';
|
|
5
|
+
import TouchableScale from '../TouchableScale';
|
|
6
|
+
import EmptyState from '../EmptyState';
|
|
7
|
+
import { FilmIcon, GifIcon, ImageIcon, TrashIcon, } from '../NetworkIcons';
|
|
8
|
+
import { MediaPreviewModal } from './MediaPreviewModal';
|
|
9
|
+
import { ScreenCapture, } from '../../capture';
|
|
10
|
+
import { formatBytes } from '../../helpers';
|
|
11
|
+
import { showToast } from '../../helpers/toast';
|
|
12
|
+
import { useTranslation } from '../../i18n';
|
|
13
|
+
export const MediaGalleryTab = () => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const [mediaList, setMediaList] = useState([]);
|
|
16
|
+
const [refreshing, setRefreshing] = useState(false);
|
|
17
|
+
const [selectedFilter, setSelectedFilter] = useState('all');
|
|
18
|
+
const [selectedItem, setSelectedItem] = useState(null);
|
|
19
|
+
const loadMedia = useCallback(async () => {
|
|
20
|
+
try {
|
|
21
|
+
const items = await ScreenCapture.getMediaList();
|
|
22
|
+
setMediaList(items);
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
setMediaList([]);
|
|
26
|
+
}
|
|
27
|
+
}, []);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
loadMedia();
|
|
30
|
+
}, [loadMedia]);
|
|
31
|
+
const onRefresh = async () => {
|
|
32
|
+
setRefreshing(true);
|
|
33
|
+
await loadMedia();
|
|
34
|
+
setRefreshing(false);
|
|
35
|
+
};
|
|
36
|
+
const filteredMedia = useMemo(() => {
|
|
37
|
+
if (selectedFilter === 'all')
|
|
38
|
+
return mediaList;
|
|
39
|
+
return mediaList.filter(item => item.type === selectedFilter);
|
|
40
|
+
}, [mediaList, selectedFilter]);
|
|
41
|
+
const totalStorageBytes = useMemo(() => {
|
|
42
|
+
return mediaList.reduce((sum, item) => sum + (item.sizeBytes || 0), 0);
|
|
43
|
+
}, [mediaList]);
|
|
44
|
+
const handleDeleteItem = async (item) => {
|
|
45
|
+
await ScreenCapture.deleteMedia(item.uri);
|
|
46
|
+
await loadMedia();
|
|
47
|
+
showToast(t('mediaGallery.deleted'));
|
|
48
|
+
};
|
|
49
|
+
const handleClearAll = () => {
|
|
50
|
+
Alert.alert(t('mediaGallery.purgeTitle'), t('mediaGallery.purgeMessage', { count: mediaList.length, size: formatBytes(totalStorageBytes) }), [
|
|
51
|
+
{ text: t('common.cancel'), style: 'cancel' },
|
|
52
|
+
{
|
|
53
|
+
text: t('common.clearAll'),
|
|
54
|
+
style: 'destructive',
|
|
55
|
+
onPress: async () => {
|
|
56
|
+
await ScreenCapture.clearAllMedia();
|
|
57
|
+
await loadMedia();
|
|
58
|
+
showToast(t('mediaGallery.allPurged'));
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
]);
|
|
62
|
+
};
|
|
63
|
+
const handleConvertToGif = async (item) => {
|
|
64
|
+
const gifResult = await ScreenCapture.convertToGif(item.uri, { fps: 12, width: 480 });
|
|
65
|
+
if (gifResult) {
|
|
66
|
+
await loadMedia();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const renderItem = ({ item }) => {
|
|
70
|
+
const isVideo = item.type === 'video';
|
|
71
|
+
const isGif = item.type === 'gif';
|
|
72
|
+
return (<TouchableScale onPress={() => setSelectedItem(item)} style={galleryStyles.card}>
|
|
73
|
+
<View style={galleryStyles.thumbnailContainer}>
|
|
74
|
+
<Image source={{ uri: item.uri }} style={galleryStyles.thumbnail} resizeMode="cover"/>
|
|
75
|
+
<View style={galleryStyles.typeBadge}>
|
|
76
|
+
{isVideo ? (<FilmIcon size={11} color={AppColors.sky400}/>) : isGif ? (<GifIcon size={11} color={AppColors.warningAmber}/>) : (<ImageIcon size={11} color={AppColors.emerald500}/>)}
|
|
77
|
+
<Text style={galleryStyles.typeBadgeText}>
|
|
78
|
+
{item.format.toUpperCase()}
|
|
79
|
+
</Text>
|
|
80
|
+
</View>
|
|
81
|
+
</View>
|
|
82
|
+
|
|
83
|
+
<View style={galleryStyles.cardInfo}>
|
|
84
|
+
<Text style={galleryStyles.cardTitle} numberOfLines={1}>
|
|
85
|
+
{item.filename}
|
|
86
|
+
</Text>
|
|
87
|
+
<View style={galleryStyles.cardMetaRow}>
|
|
88
|
+
<Text style={galleryStyles.cardMeta}>
|
|
89
|
+
{formatBytes(item.sizeBytes)}
|
|
90
|
+
</Text>
|
|
91
|
+
<Text style={galleryStyles.cardMetaDot}>•</Text>
|
|
92
|
+
<Text style={galleryStyles.cardMeta}>
|
|
93
|
+
{new Date(item.timestamp).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}
|
|
94
|
+
</Text>
|
|
95
|
+
</View>
|
|
96
|
+
</View>
|
|
97
|
+
</TouchableScale>);
|
|
98
|
+
};
|
|
99
|
+
return (<View style={galleryStyles.container}>
|
|
100
|
+
|
|
101
|
+
<View style={galleryStyles.filterBar}>
|
|
102
|
+
<View style={galleryStyles.chipGroup}>
|
|
103
|
+
{['all', 'image', 'video', 'gif'].map(filterKey => {
|
|
104
|
+
const isActive = selectedFilter === filterKey;
|
|
105
|
+
const label = filterKey === 'all'
|
|
106
|
+
? t('mediaGallery.all', { count: mediaList.length })
|
|
107
|
+
: filterKey === 'image'
|
|
108
|
+
? t('mediaGallery.photos')
|
|
109
|
+
: filterKey === 'video'
|
|
110
|
+
? t('mediaGallery.videos')
|
|
111
|
+
: t('mediaGallery.gifs');
|
|
112
|
+
return (<TouchableOpacity key={filterKey} onPress={() => setSelectedFilter(filterKey)} style={[
|
|
113
|
+
galleryStyles.chip,
|
|
114
|
+
isActive && galleryStyles.chipActive,
|
|
115
|
+
]}>
|
|
116
|
+
<Text style={[
|
|
117
|
+
galleryStyles.chipText,
|
|
118
|
+
isActive && galleryStyles.chipTextActive,
|
|
119
|
+
]}>
|
|
120
|
+
{label}
|
|
121
|
+
</Text>
|
|
122
|
+
</TouchableOpacity>);
|
|
123
|
+
})}
|
|
124
|
+
</View>
|
|
125
|
+
|
|
126
|
+
{mediaList.length > 0 && (<TouchableOpacity onPress={handleClearAll} style={galleryStyles.clearBtn} hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}>
|
|
127
|
+
<TrashIcon size={13} color={AppColors.red500}/>
|
|
128
|
+
<Text style={galleryStyles.clearBtnText}>{t('mediaGallery.purge', { size: formatBytes(totalStorageBytes) })}</Text>
|
|
129
|
+
</TouchableOpacity>)}
|
|
130
|
+
</View>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
<FlatList data={filteredMedia} keyExtractor={item => item.id} renderItem={renderItem} numColumns={2} columnWrapperStyle={galleryStyles.columnWrapper} contentContainerStyle={galleryStyles.listContent} refreshControl={<RefreshControl refreshing={refreshing} onRefresh={onRefresh} tintColor={AppColors.sky400}/>} ListEmptyComponent={<EmptyState customTitle={t('mediaGallery.noMediaTitle')} customSub={t('mediaGallery.noMediaDesc')}/>}/>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
<MediaPreviewModal item={selectedItem} visible={!!selectedItem} onClose={() => setSelectedItem(null)} onDelete={handleDeleteItem} onConvertToGif={handleConvertToGif}/>
|
|
138
|
+
</View>);
|
|
139
|
+
};
|
|
140
|
+
const { width: WINDOW_WIDTH } = Dimensions.get('window');
|
|
141
|
+
const CARD_WIDTH = (WINDOW_WIDTH - 36) / 2;
|
|
142
|
+
const galleryStyles = StyleSheet.create({
|
|
143
|
+
container: {
|
|
144
|
+
flex: 1,
|
|
145
|
+
backgroundColor: AppColors.slate850,
|
|
146
|
+
},
|
|
147
|
+
filterBar: {
|
|
148
|
+
flexDirection: 'row',
|
|
149
|
+
alignItems: 'center',
|
|
150
|
+
justifyContent: 'space-between',
|
|
151
|
+
paddingHorizontal: 12,
|
|
152
|
+
paddingVertical: 10,
|
|
153
|
+
borderBottomWidth: 1,
|
|
154
|
+
borderBottomColor: AppColors.borderGlassLight,
|
|
155
|
+
flexWrap: 'wrap',
|
|
156
|
+
gap: 8,
|
|
157
|
+
},
|
|
158
|
+
chipGroup: {
|
|
159
|
+
flexDirection: 'row',
|
|
160
|
+
alignItems: 'center',
|
|
161
|
+
gap: 6,
|
|
162
|
+
},
|
|
163
|
+
chip: {
|
|
164
|
+
paddingHorizontal: 9,
|
|
165
|
+
paddingVertical: 4.5,
|
|
166
|
+
borderRadius: 6,
|
|
167
|
+
backgroundColor: AppColors.whiteAlpha06,
|
|
168
|
+
borderWidth: 1,
|
|
169
|
+
borderColor: AppColors.whiteAlpha10,
|
|
170
|
+
},
|
|
171
|
+
chipActive: {
|
|
172
|
+
backgroundColor: `${AppColors.sky400}2E`,
|
|
173
|
+
borderColor: AppColors.sky400,
|
|
174
|
+
},
|
|
175
|
+
chipText: {
|
|
176
|
+
fontFamily: AppFonts.interMedium,
|
|
177
|
+
fontSize: 11,
|
|
178
|
+
color: AppColors.slate400,
|
|
179
|
+
},
|
|
180
|
+
chipTextActive: {
|
|
181
|
+
fontFamily: AppFonts.interBold,
|
|
182
|
+
color: AppColors.sky400,
|
|
183
|
+
},
|
|
184
|
+
clearBtn: {
|
|
185
|
+
flexDirection: 'row',
|
|
186
|
+
alignItems: 'center',
|
|
187
|
+
gap: 4,
|
|
188
|
+
paddingHorizontal: 8,
|
|
189
|
+
paddingVertical: 4,
|
|
190
|
+
borderRadius: 6,
|
|
191
|
+
backgroundColor: `${AppColors.red500}1F`,
|
|
192
|
+
borderWidth: 1,
|
|
193
|
+
borderColor: `${AppColors.red500}4D`,
|
|
194
|
+
},
|
|
195
|
+
clearBtnText: {
|
|
196
|
+
fontFamily: AppFonts.interMedium,
|
|
197
|
+
fontSize: 10.5,
|
|
198
|
+
color: AppColors.red500,
|
|
199
|
+
},
|
|
200
|
+
listContent: {
|
|
201
|
+
padding: 12,
|
|
202
|
+
gap: 12,
|
|
203
|
+
},
|
|
204
|
+
columnWrapper: {
|
|
205
|
+
gap: 12,
|
|
206
|
+
},
|
|
207
|
+
card: {
|
|
208
|
+
width: CARD_WIDTH,
|
|
209
|
+
backgroundColor: AppColors.slate800,
|
|
210
|
+
borderRadius: 8,
|
|
211
|
+
borderWidth: 1,
|
|
212
|
+
borderColor: AppColors.borderGlassLight,
|
|
213
|
+
overflow: 'hidden',
|
|
214
|
+
},
|
|
215
|
+
thumbnailContainer: {
|
|
216
|
+
width: '100%',
|
|
217
|
+
height: 110,
|
|
218
|
+
backgroundColor: AppColors.slate850,
|
|
219
|
+
position: 'relative',
|
|
220
|
+
},
|
|
221
|
+
thumbnail: {
|
|
222
|
+
width: '100%',
|
|
223
|
+
height: '100%',
|
|
224
|
+
},
|
|
225
|
+
typeBadge: {
|
|
226
|
+
position: 'absolute',
|
|
227
|
+
top: 6,
|
|
228
|
+
right: 6,
|
|
229
|
+
flexDirection: 'row',
|
|
230
|
+
alignItems: 'center',
|
|
231
|
+
gap: 3,
|
|
232
|
+
backgroundColor: AppColors.badgeGlassDark,
|
|
233
|
+
paddingHorizontal: 5,
|
|
234
|
+
paddingVertical: 2,
|
|
235
|
+
borderRadius: 4,
|
|
236
|
+
borderWidth: 1,
|
|
237
|
+
borderColor: AppColors.borderGlassMedium,
|
|
238
|
+
},
|
|
239
|
+
typeBadgeText: {
|
|
240
|
+
fontFamily: AppFonts.interBold,
|
|
241
|
+
fontSize: 9,
|
|
242
|
+
color: AppColors.slate200,
|
|
243
|
+
},
|
|
244
|
+
cardInfo: {
|
|
245
|
+
padding: 8,
|
|
246
|
+
gap: 3,
|
|
247
|
+
},
|
|
248
|
+
cardTitle: {
|
|
249
|
+
fontFamily: AppFonts.interMedium,
|
|
250
|
+
fontSize: 11.5,
|
|
251
|
+
color: AppColors.white,
|
|
252
|
+
},
|
|
253
|
+
cardMetaRow: {
|
|
254
|
+
flexDirection: 'row',
|
|
255
|
+
alignItems: 'center',
|
|
256
|
+
gap: 4,
|
|
257
|
+
},
|
|
258
|
+
cardMeta: {
|
|
259
|
+
fontFamily: AppFonts.interRegular,
|
|
260
|
+
fontSize: 10,
|
|
261
|
+
color: AppColors.slate400,
|
|
262
|
+
},
|
|
263
|
+
cardMetaDot: {
|
|
264
|
+
fontSize: 10,
|
|
265
|
+
color: AppColors.whiteAlpha30,
|
|
266
|
+
},
|
|
267
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CapturedMediaItem } from '../../capture';
|
|
3
|
+
interface MediaPreviewModalProps {
|
|
4
|
+
item: CapturedMediaItem | null;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onDelete: (item: CapturedMediaItem) => void;
|
|
8
|
+
onConvertToGif?: (item: CapturedMediaItem) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const MediaPreviewModal: React.FC<MediaPreviewModalProps>;
|
|
11
|
+
export {};
|