react-native-inapp-inspector 2.3.19 → 2.3.21
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/README.md +14 -14
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +67 -0
- package/dist/commonjs/analytics.js +1 -24
- package/dist/commonjs/bundle.js +1 -16
- package/dist/commonjs/capture.js +1 -35
- package/dist/commonjs/components/AnalyticsDetail.js +92 -623
- package/dist/commonjs/components/AnalyticsEventCard.js +54 -350
- package/dist/commonjs/components/AnalyticsGraph.js +70 -370
- package/dist/commonjs/components/AnimatedEntrance.js +1 -11
- package/dist/commonjs/components/AppHeaderLogo.js +7 -134
- package/dist/commonjs/components/BrandCircleIcon.js +73 -118
- package/dist/commonjs/components/BrandSquareIcon.js +63 -108
- package/dist/commonjs/components/CodeSnippet.js +48 -623
- package/dist/commonjs/components/ConsoleLogCard.js +63 -537
- package/dist/commonjs/components/CopyButton.js +3 -89
- package/dist/commonjs/components/DiffViewer.js +19 -83
- package/dist/commonjs/components/DomainHeader.js +27 -127
- package/dist/commonjs/components/EmptyState.js +10 -87
- package/dist/commonjs/components/EndOfListFooter.js +7 -81
- package/dist/commonjs/components/ErrorBoundary.js +72 -566
- package/dist/commonjs/components/HeadersSection.js +31 -110
- package/dist/commonjs/components/HighlightText.js +17 -58
- package/dist/commonjs/components/Inspector/AboutModal.d.ts +6 -0
- package/dist/commonjs/components/Inspector/AboutModal.js +243 -0
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +98 -797
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +284 -930
- package/dist/commonjs/components/Inspector/BundleTab.js +551 -2918
- package/dist/commonjs/components/Inspector/ConsoleTab.js +79 -492
- package/dist/commonjs/components/Inspector/CrashDetail.js +123 -672
- package/dist/commonjs/components/Inspector/CrashFilterModal.js +66 -498
- package/dist/commonjs/components/Inspector/CrashTab.js +98 -670
- package/dist/commonjs/components/Inspector/DebuggingTab.js +74 -875
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +143 -907
- package/dist/commonjs/components/Inspector/FabLauncher.js +42 -466
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +6 -99
- package/dist/commonjs/components/Inspector/InspectorContext.js +1 -21
- package/dist/commonjs/components/Inspector/InspectorHeader.js +191 -1110
- package/dist/commonjs/components/Inspector/LogDetail.js +168 -994
- package/dist/commonjs/components/Inspector/MainScreen.js +52 -335
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +97 -644
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +90 -605
- package/dist/commonjs/components/Inspector/NavigationTracker.js +1 -12
- package/dist/commonjs/components/Inspector/NetworkDetail.js +89 -411
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +60 -576
- package/dist/commonjs/components/Inspector/NetworkTab.js +84 -514
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +18 -434
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +25 -298
- package/dist/commonjs/components/Inspector/PerformanceTab.js +182 -1397
- package/dist/commonjs/components/Inspector/ReduxDetail.js +188 -1089
- package/dist/commonjs/components/Inspector/ReduxTab.js +85 -701
- package/dist/commonjs/components/Inspector/SettingsPanel.js +427 -3807
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +11 -180
- package/dist/commonjs/components/Inspector/StorageTab.js +93 -826
- package/dist/commonjs/components/Inspector/TabBar.js +36 -334
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +37 -412
- package/dist/commonjs/components/JsonViewer.js +168 -381
- package/dist/commonjs/components/LogCard.js +57 -567
- package/dist/commonjs/components/LogSyntaxHighlighter.js +11 -130
- package/dist/commonjs/components/MetaAccordion.js +69 -238
- package/dist/commonjs/components/MiniBarChart.js +3 -56
- package/dist/commonjs/components/MiniLineChart.js +3 -58
- package/dist/commonjs/components/NetworkIcons.d.ts +13 -0
- package/dist/commonjs/components/NetworkIcons.js +521 -1022
- package/dist/commonjs/components/QRCodeView.js +5 -79
- package/dist/commonjs/components/SectionHeader.js +15 -37
- package/dist/commonjs/components/SegmentedTabs.js +7 -62
- package/dist/commonjs/components/SkeletonPlaceholder.js +11 -180
- package/dist/commonjs/components/Slider.js +15 -243
- package/dist/commonjs/components/SourcePageCard.js +30 -89
- package/dist/commonjs/components/Toast.js +5 -147
- package/dist/commonjs/components/TouchableScale.js +3 -24
- package/dist/commonjs/components/TreeNode.js +55 -130
- package/dist/commonjs/console.js +1 -16
- package/dist/commonjs/constants/index.js +1 -32
- package/dist/commonjs/constants/telemetryConfig.js +1 -6
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -4
- package/dist/commonjs/crash.js +1 -23
- package/dist/commonjs/customHooks/analyticsLogger.js +1 -250
- package/dist/commonjs/customHooks/bundleAnalyzer.js +1 -957
- package/dist/commonjs/customHooks/consoleLogger.js +6 -445
- package/dist/commonjs/customHooks/crashHandler.js +7 -656
- package/dist/commonjs/customHooks/logFilters.js +1 -23
- package/dist/commonjs/customHooks/networkLogger.js +2 -536
- package/dist/commonjs/customHooks/performanceTracker.js +63 -750
- package/dist/commonjs/customHooks/reduxLogger.js +2 -313
- package/dist/commonjs/customHooks/storageInspector.js +1 -435
- package/dist/commonjs/customHooks/useAccordion.js +1 -18
- package/dist/commonjs/decorators/index.js +1 -100
- package/dist/commonjs/helpers/gaAnalyticsRegistry.js +1 -148
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +8 -921
- package/dist/commonjs/helpers/memoryManager.js +1 -99
- package/dist/commonjs/helpers/qrGenerator.js +1 -367
- package/dist/commonjs/helpers/remoteConfig.js +1 -165
- package/dist/commonjs/helpers/searchQueryParser.js +1 -62
- package/dist/commonjs/helpers/settingsStore.js +1 -144
- package/dist/commonjs/helpers/telemetry.js +1 -501
- package/dist/commonjs/helpers/toast.js +1 -20
- package/dist/commonjs/i18n/index.js +1 -90
- package/dist/commonjs/i18n/locales/en.json +1 -1140
- package/dist/commonjs/index.js +5 -2168
- package/dist/commonjs/metro.js +6 -468
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/native/NativeInspector.js +1 -415
- package/dist/commonjs/native/NativeNetworkInspector.js +1 -4
- package/dist/commonjs/network.js +1 -13
- package/dist/commonjs/performance.js +1 -29
- package/dist/commonjs/redux.js +1 -20
- package/dist/commonjs/storage.js +1 -14
- package/dist/commonjs/styles/AppColors.js +1 -423
- package/dist/commonjs/styles/AppFonts.js +1 -17
- package/dist/commonjs/styles/common.js +1 -190
- package/dist/commonjs/styles/index.d.ts +6 -0
- package/dist/commonjs/styles/index.js +1 -1589
- package/dist/commonjs/types/enums.d.ts +0 -1
- package/dist/commonjs/types/enums.js +1 -152
- package/dist/commonjs/types/index.js +1 -18
- package/dist/commonjs/types/interfaces.d.ts +2 -2
- package/dist/commonjs/types/interfaces.js +1 -2
- package/dist/esm/analytics.js +1 -2
- package/dist/esm/bundle.js +1 -2
- package/dist/esm/capture.js +1 -32
- package/dist/esm/components/AnalyticsDetail.js +171 -664
- package/dist/esm/components/AnalyticsEventCard.js +77 -335
- package/dist/esm/components/AnalyticsGraph.js +95 -357
- package/dist/esm/components/AnimatedEntrance.js +1 -6
- package/dist/esm/components/AppHeaderLogo.js +7 -94
- package/dist/esm/components/BrandCircleIcon.js +114 -119
- package/dist/esm/components/BrandSquareIcon.js +73 -78
- package/dist/esm/components/CodeSnippet.js +58 -595
- package/dist/esm/components/ConsoleLogCard.js +91 -526
- package/dist/esm/components/CopyButton.js +3 -51
- package/dist/esm/components/DiffViewer.js +22 -48
- package/dist/esm/components/DomainHeader.js +43 -138
- package/dist/esm/components/EmptyState.js +17 -56
- package/dist/esm/components/EndOfListFooter.js +15 -83
- package/dist/esm/components/ErrorBoundary.js +125 -582
- package/dist/esm/components/HeadersSection.js +52 -93
- package/dist/esm/components/HighlightText.js +17 -53
- package/dist/esm/components/Inspector/AboutModal.d.ts +6 -0
- package/dist/esm/components/Inspector/AboutModal.js +243 -0
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +225 -886
- package/dist/esm/components/Inspector/AnalyticsTab.js +296 -904
- package/dist/esm/components/Inspector/BundleTab.js +1175 -3502
- package/dist/esm/components/Inspector/ConsoleTab.js +113 -488
- package/dist/esm/components/Inspector/CrashDetail.js +236 -747
- package/dist/esm/components/Inspector/CrashFilterModal.js +149 -541
- package/dist/esm/components/Inspector/CrashTab.js +177 -711
- package/dist/esm/components/Inspector/DebuggingTab.js +164 -925
- package/dist/esm/components/Inspector/DeviceInfoTab.js +199 -924
- package/dist/esm/components/Inspector/FabLauncher.js +68 -454
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +14 -70
- package/dist/esm/components/Inspector/InspectorContext.js +1 -12
- package/dist/esm/components/Inspector/InspectorHeader.js +282 -1163
- package/dist/esm/components/Inspector/LogDetail.js +235 -1023
- package/dist/esm/components/Inspector/MainScreen.js +78 -323
- package/dist/esm/components/Inspector/MediaGalleryTab.js +143 -650
- package/dist/esm/components/Inspector/MediaPreviewModal.js +138 -613
- package/dist/esm/components/Inspector/NavigationTracker.js +1 -10
- package/dist/esm/components/Inspector/NetworkDetail.js +138 -455
- package/dist/esm/components/Inspector/NetworkFilterModal.js +122 -597
- package/dist/esm/components/Inspector/NetworkTab.js +125 -517
- package/dist/esm/components/Inspector/NpmStarPrompt.js +58 -434
- package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -281
- package/dist/esm/components/Inspector/PerformanceTab.js +393 -1570
- package/dist/esm/components/Inspector/ReduxDetail.js +307 -1170
- package/dist/esm/components/Inspector/ReduxTab.js +144 -722
- package/dist/esm/components/Inspector/SettingsPanel.js +643 -3985
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +30 -163
- package/dist/esm/components/Inspector/StorageTab.js +172 -866
- package/dist/esm/components/Inspector/TabBar.js +45 -305
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +80 -418
- package/dist/esm/components/JsonViewer.js +179 -354
- package/dist/esm/components/LogCard.js +93 -565
- package/dist/esm/components/LogSyntaxHighlighter.js +11 -123
- package/dist/esm/components/MetaAccordion.js +136 -267
- package/dist/esm/components/MiniBarChart.js +3 -18
- package/dist/esm/components/MiniLineChart.js +3 -20
- package/dist/esm/components/NetworkIcons.d.ts +13 -0
- package/dist/esm/components/NetworkIcons.js +523 -838
- package/dist/esm/components/QRCodeView.js +8 -45
- package/dist/esm/components/SectionHeader.js +22 -39
- package/dist/esm/components/SegmentedTabs.js +8 -58
- package/dist/esm/components/SkeletonPlaceholder.js +30 -163
- package/dist/esm/components/Slider.js +24 -213
- package/dist/esm/components/SourcePageCard.js +65 -86
- package/dist/esm/components/Toast.js +10 -117
- package/dist/esm/components/TouchableScale.js +3 -19
- package/dist/esm/components/TreeNode.js +58 -95
- package/dist/esm/console.js +1 -2
- package/dist/esm/constants/index.js +1 -28
- package/dist/esm/constants/telemetryConfig.js +1 -3
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/crash.js +1 -2
- package/dist/esm/customHooks/analyticsLogger.js +1 -230
- package/dist/esm/customHooks/bundleAnalyzer.js +1 -944
- package/dist/esm/customHooks/consoleLogger.js +6 -432
- package/dist/esm/customHooks/crashHandler.js +7 -630
- package/dist/esm/customHooks/logFilters.js +1 -20
- package/dist/esm/customHooks/networkLogger.js +2 -519
- package/dist/esm/customHooks/performanceTracker.js +63 -723
- package/dist/esm/customHooks/reduxLogger.js +2 -293
- package/dist/esm/customHooks/storageInspector.js +1 -418
- package/dist/esm/customHooks/useAccordion.js +1 -16
- package/dist/esm/decorators/index.js +1 -95
- package/dist/esm/helpers/gaAnalyticsRegistry.js +1 -143
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +8 -861
- package/dist/esm/helpers/memoryManager.js +1 -91
- package/dist/esm/helpers/qrGenerator.js +1 -364
- package/dist/esm/helpers/remoteConfig.js +1 -160
- package/dist/esm/helpers/searchQueryParser.js +1 -59
- package/dist/esm/helpers/settingsStore.js +1 -134
- package/dist/esm/helpers/telemetry.js +1 -489
- package/dist/esm/helpers/toast.js +1 -15
- package/dist/esm/i18n/index.js +1 -78
- package/dist/esm/i18n/locales/en.json +1 -1140
- package/dist/esm/index.js +7 -1982
- package/dist/esm/metro.js +6 -459
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/native/NativeInspector.js +1 -382
- package/dist/esm/native/NativeNetworkInspector.js +1 -2
- package/dist/esm/network.js +1 -1
- package/dist/esm/performance.js +1 -2
- package/dist/esm/redux.js +1 -1
- package/dist/esm/storage.js +1 -1
- package/dist/esm/styles/AppColors.js +1 -417
- package/dist/esm/styles/AppFonts.js +1 -13
- package/dist/esm/styles/common.js +1 -186
- package/dist/esm/styles/index.d.ts +6 -0
- package/dist/esm/styles/index.js +1 -1551
- package/dist/esm/types/enums.d.ts +0 -1
- package/dist/esm/types/enums.js +1 -149
- package/dist/esm/types/index.js +1 -2
- package/dist/esm/types/interfaces.d.ts +2 -2
- package/dist/esm/types/interfaces.js +1 -1
- package/ios/NetworkInspectorModule.mm +60 -12
- package/package.json +5 -3
- package/src/native/NativeInspector.ts +18 -0
- package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +0 -7
- package/dist/commonjs/components/Inspector/FeedbackModal.js +0 -552
- package/dist/esm/components/Inspector/FeedbackModal.d.ts +0 -7
- package/dist/esm/components/Inspector/FeedbackModal.js +0 -515
- package/src/analytics.ts +0 -35
- package/src/bundle.ts +0 -25
- package/src/capture.ts +0 -109
- package/src/components/AnalyticsDetail.tsx +0 -870
- package/src/components/AnalyticsEventCard.tsx +0 -444
- package/src/components/AnalyticsGraph.tsx +0 -583
- package/src/components/AnimatedEntrance.tsx +0 -20
- package/src/components/AppHeaderLogo.tsx +0 -143
- package/src/components/BrandCircleIcon.tsx +0 -144
- package/src/components/BrandSquareIcon.tsx +0 -184
- package/src/components/CodeSnippet.tsx +0 -725
- package/src/components/ConsoleLogCard.tsx +0 -679
- package/src/components/CopyButton.tsx +0 -87
- package/src/components/DiffViewer.tsx +0 -82
- package/src/components/DomainHeader.tsx +0 -224
- package/src/components/EmptyState.tsx +0 -97
- package/src/components/EndOfListFooter.tsx +0 -100
- package/src/components/ErrorBoundary.tsx +0 -688
- package/src/components/HeadersSection.tsx +0 -172
- package/src/components/HighlightText.tsx +0 -100
- package/src/components/Inspector/AnalyticsFilterModal.tsx +0 -1250
- package/src/components/Inspector/AnalyticsTab.tsx +0 -1362
- package/src/components/Inspector/BundleTab.tsx +0 -4768
- package/src/components/Inspector/ConsoleTab.tsx +0 -726
- package/src/components/Inspector/CrashDetail.tsx +0 -997
- package/src/components/Inspector/CrashFilterModal.tsx +0 -721
- package/src/components/Inspector/CrashTab.tsx +0 -933
- package/src/components/Inspector/DebuggingTab.tsx +0 -1103
- package/src/components/Inspector/DeviceInfoTab.tsx +0 -1397
- package/src/components/Inspector/FabLauncher.tsx +0 -590
- package/src/components/Inspector/FeatureUnderDevNotice.tsx +0 -94
- package/src/components/Inspector/FeedbackModal.tsx +0 -626
- package/src/components/Inspector/InspectorContext.tsx +0 -28
- package/src/components/Inspector/InspectorHeader.tsx +0 -1583
- package/src/components/Inspector/LogDetail.tsx +0 -1431
- package/src/components/Inspector/MainScreen.tsx +0 -460
- package/src/components/Inspector/MediaGalleryTab.tsx +0 -829
- package/src/components/Inspector/MediaPreviewModal.tsx +0 -783
- package/src/components/Inspector/NavigationTracker.tsx +0 -13
- package/src/components/Inspector/NetworkDetail.tsx +0 -778
- package/src/components/Inspector/NetworkFilterModal.tsx +0 -730
- package/src/components/Inspector/NetworkTab.tsx +0 -820
- package/src/components/Inspector/NpmStarPrompt.tsx +0 -532
- package/src/components/Inspector/NpmUpdateToast.tsx +0 -387
- package/src/components/Inspector/PerformanceTab.tsx +0 -1967
- package/src/components/Inspector/ReduxDetail.tsx +0 -1651
- package/src/components/Inspector/ReduxTab.tsx +0 -987
- package/src/components/Inspector/SettingsPanel.tsx +0 -5136
- package/src/components/Inspector/SkeletonPlaceholder.tsx +0 -206
- package/src/components/Inspector/StorageTab.tsx +0 -1159
- package/src/components/Inspector/TabBar.tsx +0 -431
- package/src/components/Inspector/UpdateAvailableModal.tsx +0 -555
- package/src/components/JsonViewer.tsx +0 -549
- package/src/components/LogCard.tsx +0 -694
- package/src/components/LogSyntaxHighlighter.tsx +0 -178
- package/src/components/MetaAccordion.tsx +0 -355
- package/src/components/MiniBarChart.tsx +0 -42
- package/src/components/MiniLineChart.tsx +0 -33
- package/src/components/NetworkIcons.tsx +0 -2655
- package/src/components/QRCodeView.tsx +0 -75
- package/src/components/SectionHeader.tsx +0 -101
- package/src/components/SegmentedTabs.tsx +0 -84
- package/src/components/SkeletonPlaceholder.tsx +0 -206
- package/src/components/Slider.tsx +0 -300
- package/src/components/SourcePageCard.tsx +0 -150
- package/src/components/Toast.tsx +0 -131
- package/src/components/TouchableScale.tsx +0 -61
- package/src/components/TreeNode.tsx +0 -171
- package/src/console.ts +0 -24
- package/src/constants/index.ts +0 -41
- package/src/constants/telemetryConfig.ts +0 -4
- package/src/constants/version.ts +0 -3
- package/src/crash.ts +0 -32
- package/src/customHooks/analyticsLogger.ts +0 -336
- package/src/customHooks/bundleAnalyzer.ts +0 -1256
- package/src/customHooks/consoleLogger.ts +0 -530
- package/src/customHooks/crashHandler.ts +0 -944
- package/src/customHooks/logFilters.ts +0 -32
- package/src/customHooks/networkLogger.ts +0 -624
- package/src/customHooks/performanceTracker.ts +0 -1014
- package/src/customHooks/reduxLogger.ts +0 -406
- package/src/customHooks/storageInspector.ts +0 -513
- package/src/customHooks/useAccordion.tsx +0 -27
- package/src/decorators/index.ts +0 -184
- package/src/helpers/gaAnalyticsRegistry.ts +0 -204
- package/src/helpers/index.ts +0 -1092
- package/src/helpers/memoryManager.ts +0 -138
- package/src/helpers/qrGenerator.ts +0 -430
- package/src/helpers/remoteConfig.ts +0 -212
- package/src/helpers/searchQueryParser.ts +0 -84
- package/src/helpers/settingsStore.ts +0 -171
- package/src/helpers/telemetry.ts +0 -568
- package/src/helpers/toast.ts +0 -17
- package/src/i18n/index.ts +0 -104
- package/src/i18n/locales/en.json +0 -1141
- package/src/index.tsx +0 -2650
- package/src/metro.ts +0 -598
- package/src/network.ts +0 -22
- package/src/performance.ts +0 -38
- package/src/redux.ts +0 -23
- package/src/storage.ts +0 -18
- package/src/styles/AppColors.ts +0 -455
- package/src/styles/AppFonts.ts +0 -26
- package/src/styles/common.ts +0 -209
- package/src/styles/index.ts +0 -1606
- package/src/types/enums.ts +0 -210
- package/src/types/index.ts +0 -34
- package/src/types/interfaces.ts +0 -535
|
@@ -1,471 +1,85 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Animated, PanResponder, Platform, StyleSheet, Text, TouchableOpacity, useWindowDimensions, View, } from 'react-native';
|
|
3
|
-
import LinearGradient from 'react-native-linear-gradient';
|
|
4
|
-
import { useInspector } from './InspectorContext';
|
|
5
|
-
import TouchableScale from '../TouchableScale';
|
|
6
|
-
import AppHeaderLogo from '../AppHeaderLogo';
|
|
7
|
-
import BrandCircleIcon from '../BrandCircleIcon';
|
|
8
|
-
import { AndroidIcon, AppleIcon, CameraIcon, NpmIcon, VideoCameraIcon, } from '../NetworkIcons';
|
|
9
|
-
import { ScreenCapture } from '../../capture';
|
|
10
|
-
import { triggerNativeHaptic } from '../../native/NativeInspector';
|
|
11
|
-
import { showToast } from '../../helpers/toast';
|
|
12
|
-
import { getAppName, getAppVersionAndBuild } from '../../helpers';
|
|
13
|
-
import { LIB_VERSION } from '../../constants';
|
|
14
|
-
import { AppColors } from '../../styles/AppColors';
|
|
15
|
-
import { AppFonts } from '../../styles/AppFonts';
|
|
16
|
-
import styles from '../../styles';
|
|
17
|
-
import { useTranslation } from '../../i18n';
|
|
18
|
-
import { MediaPreviewModal } from './MediaPreviewModal';
|
|
19
|
-
const FabLauncher = () => {
|
|
20
|
-
const { setVisible, isMinimized, setIsMinimized, appIcon, fabPan, fabPanResponder, fabDraggedRef, pulseAnim, fabShineAnim, unreadPulseAnim, logs, analyticsEvents, refreshMediaCount, } = useInspector();
|
|
21
|
-
const { width: screenWidth } = useWindowDimensions();
|
|
22
|
-
const { t } = useTranslation();
|
|
23
|
-
const [appVersionString] = useState(() => {
|
|
24
|
-
return getAppVersionAndBuild().formatted;
|
|
25
|
-
});
|
|
26
|
-
const [isRecording, setIsRecording] = useState(false);
|
|
27
|
-
const [recordingSeconds, setRecordingSeconds] = useState(0);
|
|
28
|
-
const recordingTimerRef = useRef(null);
|
|
29
|
-
const [previewMediaItem, setPreviewMediaItem] = useState(null);
|
|
30
|
-
const playerPan = useRef(new Animated.ValueXY({ x: 0, y: 0 })).current;
|
|
31
|
-
const playerPanRef = useRef({ x: 0, y: 0 });
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
const idX = playerPan.x.addListener(v => (playerPanRef.current.x = v.value));
|
|
34
|
-
const idY = playerPan.y.addListener(v => (playerPanRef.current.y = v.value));
|
|
35
|
-
return () => {
|
|
36
|
-
playerPan.x.removeListener(idX);
|
|
37
|
-
playerPan.y.removeListener(idY);
|
|
38
|
-
};
|
|
39
|
-
}, [playerPan]);
|
|
40
|
-
const playerDraggedRef = useRef(false);
|
|
41
|
-
const playerPanResponder = useRef(PanResponder.create({
|
|
42
|
-
onStartShouldSetPanResponder: () => false,
|
|
43
|
-
onMoveShouldSetPanResponder: (_e, g) => Math.abs(g.dx) > 4 || Math.abs(g.dy) > 4,
|
|
44
|
-
onPanResponderGrant: () => {
|
|
45
|
-
playerDraggedRef.current = true;
|
|
46
|
-
playerPan.setOffset({
|
|
47
|
-
x: playerPanRef.current.x,
|
|
48
|
-
y: playerPanRef.current.y,
|
|
49
|
-
});
|
|
50
|
-
playerPan.setValue({ x: 0, y: 0 });
|
|
51
|
-
},
|
|
52
|
-
onPanResponderMove: Animated.event([null, { dx: playerPan.x, dy: playerPan.y }], { useNativeDriver: false }),
|
|
53
|
-
onPanResponderRelease: () => {
|
|
54
|
-
playerPan.flattenOffset();
|
|
55
|
-
setTimeout(() => {
|
|
56
|
-
playerDraggedRef.current = false;
|
|
57
|
-
}, 50);
|
|
58
|
-
},
|
|
59
|
-
onPanResponderTerminate: () => {
|
|
60
|
-
playerPan.flattenOffset();
|
|
61
|
-
playerDraggedRef.current = false;
|
|
62
|
-
},
|
|
63
|
-
})).current;
|
|
64
|
-
useEffect(() => {
|
|
65
|
-
ScreenCapture.isRecording()
|
|
66
|
-
.then(active => {
|
|
67
|
-
setIsRecording(Boolean(active));
|
|
68
|
-
})
|
|
69
|
-
.catch(() => { });
|
|
70
|
-
}, []);
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
if (isRecording) {
|
|
73
|
-
setRecordingSeconds(0);
|
|
74
|
-
recordingTimerRef.current = setInterval(() => {
|
|
75
|
-
setRecordingSeconds(prev => prev + 1);
|
|
76
|
-
}, 1000);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
if (recordingTimerRef.current) {
|
|
80
|
-
clearInterval(recordingTimerRef.current);
|
|
81
|
-
recordingTimerRef.current = null;
|
|
82
|
-
}
|
|
83
|
-
setRecordingSeconds(0);
|
|
84
|
-
}
|
|
85
|
-
return () => {
|
|
86
|
-
if (recordingTimerRef.current) {
|
|
87
|
-
clearInterval(recordingTimerRef.current);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
}, [isRecording]);
|
|
91
|
-
const handleTakeScreenshot = useCallback(async () => {
|
|
92
|
-
if (playerDraggedRef.current)
|
|
93
|
-
return;
|
|
94
|
-
try {
|
|
95
|
-
triggerNativeHaptic('light');
|
|
96
|
-
const result = await ScreenCapture.takeScreenshot({
|
|
97
|
-
format: 'png',
|
|
98
|
-
quality: 0.9,
|
|
99
|
-
hideInspector: true,
|
|
100
|
-
});
|
|
101
|
-
if (result) {
|
|
102
|
-
triggerNativeHaptic('success');
|
|
103
|
-
const newItem = {
|
|
104
|
-
id: `screenshot_${result.timestamp}.png`,
|
|
105
|
-
type: 'image',
|
|
106
|
-
format: result.format,
|
|
107
|
-
uri: result.uri,
|
|
108
|
-
filename: result.uri.split('/').pop() || `screenshot_${result.timestamp}.png`,
|
|
109
|
-
sizeBytes: result.sizeBytes,
|
|
110
|
-
timestamp: result.timestamp,
|
|
111
|
-
width: result.width,
|
|
112
|
-
height: result.height,
|
|
113
|
-
};
|
|
114
|
-
setPreviewMediaItem(newItem);
|
|
115
|
-
refreshMediaCount?.().catch(() => { });
|
|
116
|
-
showToast(t('header.screenshotCaptured', 'Screenshot captured'));
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
showToast(t('header.screenshotFailed', 'Failed to capture screenshot'));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
catch {
|
|
123
|
-
showToast(t('header.screenshotError', 'Error capturing screenshot'));
|
|
124
|
-
}
|
|
125
|
-
}, [refreshMediaCount, t]);
|
|
126
|
-
const handleToggleVideoRecording = useCallback(async () => {
|
|
127
|
-
if (playerDraggedRef.current)
|
|
128
|
-
return;
|
|
129
|
-
try {
|
|
130
|
-
if (isRecording) {
|
|
131
|
-
triggerNativeHaptic('medium');
|
|
132
|
-
const result = await ScreenCapture.stopRecording();
|
|
133
|
-
setIsRecording(false);
|
|
134
|
-
if (result) {
|
|
135
|
-
triggerNativeHaptic('success');
|
|
136
|
-
const newItem = {
|
|
137
|
-
id: `video_${result.timestamp}.${result.format}`,
|
|
138
|
-
type: result.format === 'gif' ? 'gif' : 'video',
|
|
139
|
-
format: result.format,
|
|
140
|
-
uri: result.uri,
|
|
141
|
-
filename: result.uri.split('/').pop() ||
|
|
142
|
-
`video_${result.timestamp}.${result.format}`,
|
|
143
|
-
sizeBytes: result.sizeBytes,
|
|
144
|
-
timestamp: result.timestamp,
|
|
145
|
-
durationMs: result.durationMs,
|
|
146
|
-
width: result.width,
|
|
147
|
-
height: result.height,
|
|
148
|
-
hasAudio: result.hasAudio,
|
|
149
|
-
};
|
|
150
|
-
setPreviewMediaItem(newItem);
|
|
151
|
-
refreshMediaCount?.().catch(() => { });
|
|
152
|
-
showToast(t('header.recordingSaved', {
|
|
153
|
-
duration: (result.durationMs / 1000).toFixed(1),
|
|
154
|
-
defaultValue: `Recording saved (${(result.durationMs / 1000).toFixed(1)}s)`,
|
|
155
|
-
}));
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
triggerNativeHaptic('medium');
|
|
160
|
-
const started = await ScreenCapture.startRecording({
|
|
161
|
-
fps: 24,
|
|
162
|
-
audioSource: 'none',
|
|
163
|
-
});
|
|
164
|
-
if (started) {
|
|
165
|
-
setIsRecording(true);
|
|
166
|
-
showToast(t('header.recordingStarted', 'Recording started'));
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
showToast(t('header.recordingStartFailed', 'Failed to start recording'));
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
catch {
|
|
174
|
-
showToast(t('header.recordingError', 'Error during screen recording'));
|
|
175
|
-
setIsRecording(false);
|
|
176
|
-
}
|
|
177
|
-
}, [isRecording, refreshMediaCount, t]);
|
|
178
|
-
const handleExpandInspector = useCallback(() => {
|
|
179
|
-
if (playerDraggedRef.current)
|
|
180
|
-
return;
|
|
181
|
-
triggerNativeHaptic('light');
|
|
182
|
-
setIsMinimized?.(false);
|
|
183
|
-
setVisible(true);
|
|
184
|
-
}, [setIsMinimized, setVisible]);
|
|
185
|
-
const formatTime = (secs) => {
|
|
186
|
-
const mins = Math.floor(secs / 60);
|
|
187
|
-
const remainingSecs = secs % 60;
|
|
188
|
-
return `${mins}:${remainingSecs < 10 ? '0' : ''}${remainingSecs}`;
|
|
189
|
-
};
|
|
190
|
-
return (<>
|
|
1
|
+
import{useCallback as O,useEffect as F,useRef as B,useState as W}from"react";import{Animated as s,PanResponder as de,Platform as q,StyleSheet as pe,Text as M,TouchableOpacity as Se,useWindowDimensions as xe,View as S}from"react-native";import H from"react-native-linear-gradient";import{useInspector as Re}from"./InspectorContext";import A from"../TouchableScale";import Ce from"../AppHeaderLogo";import Te from"../BrandCircleIcon";import{AndroidIcon as Ie,AppleIcon as Ve,CameraIcon as Pe,CloseWhite as Be,MaximizeIcon as Me,NpmIcon as Ae,VideoCameraIcon as $e}from"../NetworkIcons";import{ScreenCapture as V}from"../../capture";import{triggerNativeHaptic as x}from"../../native/NativeInspector";import{showToast as v}from"../../helpers/toast";import{getAppName as Ee,getAppVersionAndBuild as Le}from"../../helpers";import{LIB_VERSION as De}from"../../constants";import{AppColors as i}from"../../styles/AppColors";import{AppFonts as _}from"../../styles/AppFonts";import $ from"../../styles";import{useTranslation as Oe}from"../../i18n";import{MediaPreviewModal as We}from"./MediaPreviewModal";const ke=()=>{const{setVisible:z,isMinimized:X,setIsMinimized:E,appIcon:Y,fabPan:J,fabPanResponder:K,fabDraggedRef:Q,pulseAnim:U,fabShineAnim:G,unreadPulseAnim:Z,logs:ee,analyticsEvents:te,refreshMediaCount:C}=Re(),{width:re}=xe(),{t:o}=Oe(),[ie]=W(()=>Le().formatted),[a,L]=W(!1),[oe,k]=W(0),T=B(null),[N,P]=W(null),n=B(new s.ValueXY({x:0,y:0})).current,D=B({x:0,y:0});F(()=>{const e=n.x.addListener(I=>D.current.x=I.value),r=n.y.addListener(I=>D.current.y=I.value);return()=>{n.x.removeListener(e),n.y.removeListener(r)}},[n]);const R=B(!1),ne=B(de.create({onStartShouldSetPanResponder:()=>!1,onMoveShouldSetPanResponder:(e,r)=>Math.abs(r.dx)>4||Math.abs(r.dy)>4,onPanResponderGrant:()=>{R.current=!0,n.setOffset({x:D.current.x,y:D.current.y}),n.setValue({x:0,y:0})},onPanResponderMove:s.event([null,{dx:n.x,dy:n.y}],{useNativeDriver:!1}),onPanResponderRelease:()=>{n.flattenOffset(),setTimeout(()=>{R.current=!1},50)},onPanResponderTerminate:()=>{n.flattenOffset(),R.current=!1}})).current;F(()=>{V.isRecording().then(e=>{L(!!e)}).catch(()=>{})},[]),F(()=>(a?(k(0),T.current=setInterval(()=>{k(e=>e+1)},1e3)):(T.current&&(clearInterval(T.current),T.current=null),k(0)),()=>{T.current&&clearInterval(T.current)}),[a]);const ae=O(async()=>{if(!R.current)try{x("light");const e=await V.takeScreenshot({format:"png",quality:.9,hideInspector:!0});if(e){x("success");const r={id:`screenshot_${e.timestamp}.png`,type:"image",format:e.format,uri:e.uri,filename:e.uri.split("/").pop()||`screenshot_${e.timestamp}.png`,sizeBytes:e.sizeBytes,timestamp:e.timestamp,width:e.width,height:e.height};P(r),C?.().catch(()=>{}),v(o("header.screenshotCaptured","Screenshot captured"))}else v(o("header.screenshotFailed","Failed to capture screenshot"))}catch{v(o("header.screenshotError","Error capturing screenshot"))}},[C,o]),se=O(async()=>{if(!R.current)try{if(a){x("medium");const e=await V.stopRecording();if(L(!1),e){x("success");const r={id:`video_${e.timestamp}.${e.format}`,type:e.format==="gif"?"gif":"video",format:e.format,uri:e.uri,filename:e.uri.split("/").pop()||`video_${e.timestamp}.${e.format}`,sizeBytes:e.sizeBytes,timestamp:e.timestamp,durationMs:e.durationMs,width:e.width,height:e.height,hasAudio:e.hasAudio};P(r),C?.().catch(()=>{}),v(o("header.recordingSaved",{duration:(e.durationMs/1e3).toFixed(1),defaultValue:`Recording saved (${(e.durationMs/1e3).toFixed(1)}s)`}))}}else x("medium"),await V.startRecording({fps:24,audioSource:"none"})?(L(!0),v(o("header.recordingStarted","Recording started"))):v(o("header.recordingStartFailed","Failed to start recording"))}catch{v(o("header.recordingError","Error during screen recording")),L(!1)}},[a,C,o]),j=O(()=>{R.current||(x("light"),E?.(!1),z(!0))},[E,z]),le=O(()=>{R.current||(x("light"),E?.(!1),z(!1))},[E,z]),ce=e=>{const r=Math.floor(e/60),I=e%60;return`${r}:${I<10?"0":""}${I}`};return<>
|
|
191
2
|
|
|
192
|
-
{
|
|
193
|
-
fabStyles.playerContainer,
|
|
194
|
-
{ transform: playerPan.getTranslateTransform() },
|
|
195
|
-
]} {...playerPanResponder.panHandlers}>
|
|
3
|
+
{X?<s.View style={[t.playerContainer,{transform:n.getTranslateTransform()}]}{...ne.panHandlers}>
|
|
196
4
|
|
|
197
|
-
<
|
|
5
|
+
<H colors={[i.indigo600,i.violet600]}start={{x:0,y:0}}end={{x:1,y:1}}style={t.gradientBg}pointerEvents="none"/>
|
|
198
6
|
|
|
199
7
|
|
|
200
|
-
<
|
|
201
|
-
<
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
{
|
|
206
|
-
translateX: fabShineAnim.interpolate({
|
|
207
|
-
inputRange: [0, 1],
|
|
208
|
-
outputRange: [-80, screenWidth + 80],
|
|
209
|
-
}),
|
|
210
|
-
},
|
|
211
|
-
{ rotate: '28deg' },
|
|
212
|
-
],
|
|
213
|
-
},
|
|
214
|
-
]}>
|
|
215
|
-
<LinearGradient colors={[
|
|
216
|
-
'rgba(255, 255, 255, 0)',
|
|
217
|
-
'rgba(255, 255, 255, 0.18)',
|
|
218
|
-
'rgba(255, 255, 255, 0.70)',
|
|
219
|
-
'rgba(255, 255, 255, 1)',
|
|
220
|
-
'rgba(255, 255, 255, 0.70)',
|
|
221
|
-
'rgba(255, 255, 255, 0.18)',
|
|
222
|
-
'rgba(255, 255, 255, 0)',
|
|
223
|
-
]} locations={[0, 0.22, 0.44, 0.5, 0.56, 0.78, 1]} start={{ x: 0, y: 0.5 }} end={{ x: 1, y: 0.5 }} style={{ flex: 1 }}/>
|
|
224
|
-
</Animated.View>
|
|
225
|
-
</View>
|
|
8
|
+
<S pointerEvents="none"style={t.playerShineClip}>
|
|
9
|
+
<s.View style={[t.playerShineStreak,{transform:[{translateX:G.interpolate({inputRange:[0,1],outputRange:[-80,re+80]})},{rotate:"28deg"}]}]}>
|
|
10
|
+
<H colors={["rgba(255, 255, 255, 0)","rgba(255, 255, 255, 0.18)","rgba(255, 255, 255, 0.70)","rgba(255, 255, 255, 1)","rgba(255, 255, 255, 0.70)","rgba(255, 255, 255, 0.18)","rgba(255, 255, 255, 0)"]}locations={[0,.22,.44,.5,.56,.78,1]}start={{x:0,y:.5}}end={{x:1,y:.5}}style={{flex:1}}/>
|
|
11
|
+
</s.View>
|
|
12
|
+
</S>
|
|
226
13
|
|
|
227
14
|
|
|
228
|
-
<
|
|
229
|
-
<
|
|
230
|
-
<
|
|
231
|
-
<
|
|
232
|
-
{
|
|
233
|
-
</
|
|
234
|
-
<
|
|
15
|
+
<Se activeOpacity={.75}onPress={j}style={t.brandSection}accessibilityRole="button"accessibilityLabel={o("mediaGallery.expand","Expand Inspector")}>
|
|
16
|
+
<Ce size={36}customIcon={Y}/>
|
|
17
|
+
<S style={t.titleWrapper}>
|
|
18
|
+
<M style={t.appTitle}numberOfLines={1}>
|
|
19
|
+
{Ee()}
|
|
20
|
+
</M>
|
|
21
|
+
<S style={t.versionRow}>
|
|
235
22
|
|
|
236
|
-
<
|
|
237
|
-
{
|
|
238
|
-
<
|
|
239
|
-
{
|
|
240
|
-
</
|
|
241
|
-
</
|
|
23
|
+
<S style={t.versionChip}>
|
|
24
|
+
{q.OS==="ios"?<Ve color={`${i.white}E6`}size={9}/>:<Ie color={`${i.white}E6`}size={9}/>}
|
|
25
|
+
<M style={t.versionChipText}numberOfLines={1}>
|
|
26
|
+
{ie}
|
|
27
|
+
</M>
|
|
28
|
+
</S>
|
|
242
29
|
|
|
243
30
|
|
|
244
|
-
<
|
|
245
|
-
<
|
|
246
|
-
<
|
|
247
|
-
v{
|
|
248
|
-
</
|
|
249
|
-
</
|
|
250
|
-
</
|
|
251
|
-
</
|
|
252
|
-
</
|
|
31
|
+
<S style={t.versionChip}>
|
|
32
|
+
<Ae size={9}color={i.npmRedLight}/>
|
|
33
|
+
<M style={t.versionChipText}numberOfLines={1}>
|
|
34
|
+
v{De}
|
|
35
|
+
</M>
|
|
36
|
+
</S>
|
|
37
|
+
</S>
|
|
38
|
+
</S>
|
|
39
|
+
</Se>
|
|
253
40
|
|
|
254
41
|
|
|
255
|
-
<
|
|
42
|
+
<S style={t.actionsRow}>
|
|
256
43
|
|
|
257
|
-
<
|
|
258
|
-
<
|
|
259
|
-
<
|
|
260
|
-
{
|
|
261
|
-
</
|
|
262
|
-
</
|
|
44
|
+
<A onPress={ae}hitSlop={{top:6,bottom:6,left:4,right:4}}style={t.actionBtn}>
|
|
45
|
+
<Pe size={12}color={i.white}/>
|
|
46
|
+
<M style={t.actionText}>
|
|
47
|
+
{o("header.photo","Photo")}
|
|
48
|
+
</M>
|
|
49
|
+
</A>
|
|
263
50
|
|
|
264
51
|
|
|
265
|
-
<
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}} hitSlop={10}>
|
|
287
|
-
<Animated.View style={[styles.fabPulseRing, { transform: [{ scale: pulseAnim }] }]}/>
|
|
288
|
-
<BrandCircleIcon size={62}/>
|
|
52
|
+
<A onPress={se}hitSlop={{top:6,bottom:6,left:4,right:4}}style={[t.actionBtn,a&&t.recordingBtnActive]}>
|
|
53
|
+
{a?<S style={t.recordingDot}/>:<$e size={12}color={i.white}/>}
|
|
54
|
+
<M style={[t.actionText,a&&{color:i.red300}]}>
|
|
55
|
+
{a?`${o("header.rec","REC")} ${ce(oe)}`:o("header.record","Record")}
|
|
56
|
+
</M>
|
|
57
|
+
</A>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<A onPress={j}hitSlop={{top:6,bottom:6,left:4,right:4}}accessibilityRole="button"accessibilityLabel={o("common.expand","Expand")}style={t.actionBtnSquare}>
|
|
61
|
+
<Me size={12}color={i.white}/>
|
|
62
|
+
</A>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
<A onPress={le}hitSlop={{top:6,bottom:6,left:4,right:6}}accessibilityRole="button"accessibilityLabel={o("common.close","Close")}style={t.actionBtnSquare}>
|
|
66
|
+
<Be size={10}color={i.white}/>
|
|
67
|
+
</A>
|
|
68
|
+
</S>
|
|
69
|
+
</s.View>:<s.View style={[$.fabWrapper,{transform:J.getTranslateTransform()}]}{...K.panHandlers}>
|
|
70
|
+
<A style={{alignItems:"center",justifyContent:"center"}}onPress={()=>{Q.current||(x("light"),z(!0))}}hitSlop={10}>
|
|
71
|
+
<s.View style={[$.fabPulseRing,{transform:[{scale:U}]}]}/>
|
|
72
|
+
<Te size={62}/>
|
|
289
73
|
|
|
290
|
-
<
|
|
291
|
-
<
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
outputRange: [-48, 96],
|
|
299
|
-
}),
|
|
300
|
-
},
|
|
301
|
-
{ rotate: '25deg' },
|
|
302
|
-
],
|
|
303
|
-
},
|
|
304
|
-
]}>
|
|
305
|
-
<LinearGradient colors={[
|
|
306
|
-
'rgba(255, 255, 255, 0)',
|
|
307
|
-
'rgba(255, 255, 255, 0.25)',
|
|
308
|
-
'rgba(255, 255, 255, 0.95)',
|
|
309
|
-
'rgba(255, 255, 255, 0.25)',
|
|
310
|
-
'rgba(255, 255, 255, 0)',
|
|
311
|
-
]} locations={[0, 0.25, 0.5, 0.75, 1]} start={{ x: 0, y: 0.5 }} end={{ x: 1, y: 0.5 }} style={{ flex: 1 }}/>
|
|
312
|
-
</Animated.View>
|
|
313
|
-
</View>
|
|
314
|
-
{(logs.length > 0 || analyticsEvents.length > 0) && (<Animated.View style={[
|
|
315
|
-
styles.fabGreenDot,
|
|
316
|
-
{ transform: [{ scale: unreadPulseAnim }] },
|
|
317
|
-
]}/>)}
|
|
318
|
-
</TouchableScale>
|
|
319
|
-
</Animated.View>)}
|
|
74
|
+
<S pointerEvents="none"style={$.fabShineClip}>
|
|
75
|
+
<s.View style={[$.fabShineStreak,{transform:[{translateX:G.interpolate({inputRange:[0,1],outputRange:[-48,96]})},{rotate:"25deg"}]}]}>
|
|
76
|
+
<H colors={["rgba(255, 255, 255, 0)","rgba(255, 255, 255, 0.25)","rgba(255, 255, 255, 0.95)","rgba(255, 255, 255, 0.25)","rgba(255, 255, 255, 0)"]}locations={[0,.25,.5,.75,1]}start={{x:0,y:.5}}end={{x:1,y:.5}}style={{flex:1}}/>
|
|
77
|
+
</s.View>
|
|
78
|
+
</S>
|
|
79
|
+
{(ee.length>0||te.length>0)&&<s.View style={[$.fabGreenDot,{transform:[{scale:Z}]}]}/>}
|
|
80
|
+
</A>
|
|
81
|
+
</s.View>}
|
|
320
82
|
|
|
321
83
|
|
|
322
|
-
<
|
|
323
|
-
|
|
324
|
-
refreshMediaCount?.().catch(() => { });
|
|
325
|
-
setPreviewMediaItem(null);
|
|
326
|
-
}} onConvertToGif={async (item) => {
|
|
327
|
-
const gif = await ScreenCapture.convertToGif(item.uri, {
|
|
328
|
-
fps: 12,
|
|
329
|
-
width: 480,
|
|
330
|
-
});
|
|
331
|
-
if (gif) {
|
|
332
|
-
refreshMediaCount?.().catch(() => { });
|
|
333
|
-
setPreviewMediaItem({
|
|
334
|
-
id: `anim_${gif.timestamp}.gif`,
|
|
335
|
-
type: 'gif',
|
|
336
|
-
format: 'gif',
|
|
337
|
-
uri: gif.uri,
|
|
338
|
-
filename: gif.uri.split('/').pop() || `anim_${gif.timestamp}.gif`,
|
|
339
|
-
sizeBytes: gif.sizeBytes,
|
|
340
|
-
timestamp: gif.timestamp,
|
|
341
|
-
durationMs: gif.durationMs,
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
}}/>
|
|
345
|
-
</>);
|
|
346
|
-
};
|
|
347
|
-
const fabStyles = StyleSheet.create({
|
|
348
|
-
playerContainer: {
|
|
349
|
-
position: 'absolute',
|
|
350
|
-
bottom: Platform.OS === 'ios' ? 34 : 18,
|
|
351
|
-
left: 12,
|
|
352
|
-
right: 12,
|
|
353
|
-
minHeight: 58,
|
|
354
|
-
flexDirection: 'row',
|
|
355
|
-
alignItems: 'center',
|
|
356
|
-
justifyContent: 'space-between',
|
|
357
|
-
borderRadius: 16,
|
|
358
|
-
borderWidth: 1,
|
|
359
|
-
borderColor: 'rgba(255, 255, 255, 0.28)',
|
|
360
|
-
paddingHorizontal: 12,
|
|
361
|
-
paddingVertical: 7,
|
|
362
|
-
gap: 8,
|
|
363
|
-
zIndex: 99999,
|
|
364
|
-
elevation: 25,
|
|
365
|
-
shadowColor: AppColors.indigo600,
|
|
366
|
-
shadowOffset: { width: 0, height: 8 },
|
|
367
|
-
shadowOpacity: 0.45,
|
|
368
|
-
shadowRadius: 14,
|
|
369
|
-
overflow: 'hidden',
|
|
370
|
-
},
|
|
371
|
-
gradientBg: {
|
|
372
|
-
position: 'absolute',
|
|
373
|
-
top: 0,
|
|
374
|
-
left: 0,
|
|
375
|
-
right: 0,
|
|
376
|
-
bottom: 0,
|
|
377
|
-
borderRadius: 16,
|
|
378
|
-
},
|
|
379
|
-
playerShineClip: {
|
|
380
|
-
position: 'absolute',
|
|
381
|
-
top: 0,
|
|
382
|
-
left: 0,
|
|
383
|
-
right: 0,
|
|
384
|
-
bottom: 0,
|
|
385
|
-
borderRadius: 16,
|
|
386
|
-
overflow: 'hidden',
|
|
387
|
-
},
|
|
388
|
-
playerShineStreak: {
|
|
389
|
-
position: 'absolute',
|
|
390
|
-
top: -60,
|
|
391
|
-
width: 75,
|
|
392
|
-
height: 200,
|
|
393
|
-
},
|
|
394
|
-
brandSection: {
|
|
395
|
-
flexDirection: 'row',
|
|
396
|
-
alignItems: 'center',
|
|
397
|
-
gap: 9,
|
|
398
|
-
flex: 1,
|
|
399
|
-
minWidth: 0,
|
|
400
|
-
paddingVertical: 2,
|
|
401
|
-
},
|
|
402
|
-
titleWrapper: {
|
|
403
|
-
flex: 1,
|
|
404
|
-
minWidth: 0,
|
|
405
|
-
justifyContent: 'center',
|
|
406
|
-
gap: 2,
|
|
407
|
-
},
|
|
408
|
-
appTitle: {
|
|
409
|
-
fontFamily: AppFonts.interBold,
|
|
410
|
-
fontSize: 13.5,
|
|
411
|
-
color: AppColors.white,
|
|
412
|
-
letterSpacing: -0.2,
|
|
413
|
-
},
|
|
414
|
-
versionRow: {
|
|
415
|
-
flexDirection: 'row',
|
|
416
|
-
alignItems: 'center',
|
|
417
|
-
gap: 4,
|
|
418
|
-
minWidth: 0,
|
|
419
|
-
},
|
|
420
|
-
versionChip: {
|
|
421
|
-
flexDirection: 'row',
|
|
422
|
-
alignItems: 'center',
|
|
423
|
-
backgroundColor: `${AppColors.white}1F`,
|
|
424
|
-
borderRadius: 5,
|
|
425
|
-
paddingHorizontal: 5,
|
|
426
|
-
paddingVertical: 1.5,
|
|
427
|
-
gap: 3,
|
|
428
|
-
borderWidth: 1,
|
|
429
|
-
borderColor: `${AppColors.white}2E`,
|
|
430
|
-
flexShrink: 1,
|
|
431
|
-
minWidth: 0,
|
|
432
|
-
},
|
|
433
|
-
versionChipText: {
|
|
434
|
-
fontFamily: AppFonts.interMedium,
|
|
435
|
-
fontSize: 8.5,
|
|
436
|
-
color: `${AppColors.white}EB`,
|
|
437
|
-
letterSpacing: 0.1,
|
|
438
|
-
},
|
|
439
|
-
actionsRow: {
|
|
440
|
-
flexDirection: 'row',
|
|
441
|
-
alignItems: 'center',
|
|
442
|
-
gap: 6,
|
|
443
|
-
},
|
|
444
|
-
actionBtn: {
|
|
445
|
-
flexDirection: 'row',
|
|
446
|
-
alignItems: 'center',
|
|
447
|
-
gap: 4.5,
|
|
448
|
-
backgroundColor: 'rgba(255, 255, 255, 0.22)',
|
|
449
|
-
paddingHorizontal: 10,
|
|
450
|
-
paddingVertical: 6,
|
|
451
|
-
borderRadius: 7,
|
|
452
|
-
borderWidth: 1,
|
|
453
|
-
borderColor: 'rgba(255, 255, 255, 0.32)',
|
|
454
|
-
},
|
|
455
|
-
recordingBtnActive: {
|
|
456
|
-
backgroundColor: 'rgba(239, 68, 68, 0.32)',
|
|
457
|
-
borderColor: AppColors.red500,
|
|
458
|
-
},
|
|
459
|
-
recordingDot: {
|
|
460
|
-
width: 6,
|
|
461
|
-
height: 6,
|
|
462
|
-
borderRadius: 3,
|
|
463
|
-
backgroundColor: AppColors.red500,
|
|
464
|
-
},
|
|
465
|
-
actionText: {
|
|
466
|
-
fontFamily: AppFonts.interSemiBold,
|
|
467
|
-
fontSize: 11,
|
|
468
|
-
color: AppColors.white,
|
|
469
|
-
},
|
|
470
|
-
});
|
|
471
|
-
export default FabLauncher;
|
|
84
|
+
<We item={N}visible={!!N}onClose={()=>P(null)}onDelete={async e=>{await V.deleteMedia(e.uri),C?.().catch(()=>{}),P(null)}}onConvertToGif={async e=>{const r=await V.convertToGif(e.uri,{fps:12,width:480});r&&(C?.().catch(()=>{}),P({id:`anim_${r.timestamp}.gif`,type:"gif",format:"gif",uri:r.uri,filename:r.uri.split("/").pop()||`anim_${r.timestamp}.gif`,sizeBytes:r.sizeBytes,timestamp:r.timestamp,durationMs:r.durationMs}))}}/>
|
|
85
|
+
</>},t=pe.create({playerContainer:{position:"absolute",bottom:q.OS==="ios"?34:18,left:12,right:12,minHeight:58,flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderRadius:16,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.28)",paddingHorizontal:12,paddingVertical:7,gap:8,zIndex:99999,elevation:25,shadowColor:i.indigo600,shadowOffset:{width:0,height:8},shadowOpacity:.45,shadowRadius:14,overflow:"hidden"},gradientBg:{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:16},playerShineClip:{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:16,overflow:"hidden"},playerShineStreak:{position:"absolute",top:-60,width:75,height:200},brandSection:{flexDirection:"row",alignItems:"center",gap:9,flex:1,minWidth:0,paddingVertical:2},titleWrapper:{flex:1,minWidth:0,justifyContent:"center",gap:2},appTitle:{fontFamily:_.interBold,fontSize:13.5,color:i.white,letterSpacing:-.2},versionRow:{flexDirection:"row",alignItems:"center",gap:4,minWidth:0},versionChip:{flexDirection:"row",alignItems:"center",backgroundColor:`${i.white}1F`,borderRadius:5,paddingHorizontal:5,paddingVertical:1.5,gap:3,borderWidth:1,borderColor:`${i.white}2E`,flexShrink:1,minWidth:0},versionChipText:{fontFamily:_.interMedium,fontSize:8.5,color:`${i.white}EB`,letterSpacing:.1},actionsRow:{flexDirection:"row",alignItems:"center",gap:4.5,flexShrink:0},actionBtn:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:"rgba(255, 255, 255, 0.22)",paddingHorizontal:8,paddingVertical:5.5,borderRadius:7,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.32)"},actionBtnSquare:{alignItems:"center",justifyContent:"center",width:27,height:27,backgroundColor:"rgba(255, 255, 255, 0.22)",borderRadius:7,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.32)"},recordingBtnActive:{backgroundColor:"rgba(239, 68, 68, 0.32)",borderColor:i.red500},recordingDot:{width:6,height:6,borderRadius:3,backgroundColor:i.red500},actionText:{fontFamily:_.interSemiBold,fontSize:10.5,color:i.white}});export default ke;
|
|
@@ -1,74 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const [isDismissed, setIsDismissed] = useState(false);
|
|
8
|
-
if (isDismissed)
|
|
9
|
-
return null;
|
|
10
|
-
return (<View style={[styles.container, compact && styles.containerCompact]}>
|
|
11
|
-
<View style={styles.contentRow}>
|
|
12
|
-
<View style={styles.badgeWrap}>
|
|
13
|
-
<WarningTriangleIcon color={AppColors.warningIconGold} size={12}/>
|
|
14
|
-
<Text style={styles.badgeText}>IN ACTIVE DEVELOPMENT</Text>
|
|
15
|
-
</View>
|
|
1
|
+
import{useState as R}from"react";import{StyleSheet as S,Text as I,View as T,Pressable as B}from"react-native";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as C}from"../../styles/AppFonts";import{WarningTriangleIcon as W,ClearIcon as E}from"../NetworkIcons";export const FeatureUnderDevNotice=({featureName:w,compact:V=!1})=>{const[z,D]=R(!1);return z?null:<T style={[e.container,V&&e.containerCompact]}>
|
|
2
|
+
<T style={e.contentRow}>
|
|
3
|
+
<T style={e.badgeWrap}>
|
|
4
|
+
<W color={t.warningIconGold}size={12}/>
|
|
5
|
+
<I style={e.badgeText}>IN ACTIVE DEVELOPMENT</I>
|
|
6
|
+
</T>
|
|
16
7
|
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
</
|
|
20
|
-
</
|
|
8
|
+
<B onPress={()=>D(!0)}hitSlop={8}style={e.dismissBtn}accessible={!0}accessibilityRole="button"accessibilityLabel="Dismiss notice">
|
|
9
|
+
<E color={t.grayTextWeak}size={11}/>
|
|
10
|
+
</B>
|
|
11
|
+
</T>
|
|
21
12
|
|
|
22
|
-
<
|
|
23
|
-
{
|
|
13
|
+
<I style={e.messageText}>
|
|
14
|
+
{w?`${w} is`:"This module is"} currently in active
|
|
24
15
|
development. Results and metrics may vary in accuracy. We are continuously
|
|
25
16
|
improving this feature for upcoming releases.
|
|
26
|
-
</
|
|
27
|
-
</
|
|
28
|
-
};
|
|
29
|
-
const styles = StyleSheet.create({
|
|
30
|
-
container: {
|
|
31
|
-
marginHorizontal: 12,
|
|
32
|
-
marginTop: 8,
|
|
33
|
-
marginBottom: 6,
|
|
34
|
-
paddingHorizontal: 12,
|
|
35
|
-
paddingVertical: 9,
|
|
36
|
-
borderRadius: 8,
|
|
37
|
-
backgroundColor: `${AppColors.warningIconGold}12`,
|
|
38
|
-
borderWidth: 1,
|
|
39
|
-
borderColor: `${AppColors.warningIconGold}30`,
|
|
40
|
-
},
|
|
41
|
-
containerCompact: {
|
|
42
|
-
marginTop: 4,
|
|
43
|
-
marginBottom: 4,
|
|
44
|
-
paddingVertical: 7,
|
|
45
|
-
paddingHorizontal: 10,
|
|
46
|
-
},
|
|
47
|
-
contentRow: {
|
|
48
|
-
flexDirection: 'row',
|
|
49
|
-
alignItems: 'center',
|
|
50
|
-
justifyContent: 'space-between',
|
|
51
|
-
marginBottom: 4,
|
|
52
|
-
},
|
|
53
|
-
badgeWrap: {
|
|
54
|
-
flexDirection: 'row',
|
|
55
|
-
alignItems: 'center',
|
|
56
|
-
gap: 4.5,
|
|
57
|
-
},
|
|
58
|
-
badgeText: {
|
|
59
|
-
fontFamily: AppFonts.interBold,
|
|
60
|
-
fontSize: 9.5,
|
|
61
|
-
color: AppColors.warningIconGold,
|
|
62
|
-
letterSpacing: 0.4,
|
|
63
|
-
},
|
|
64
|
-
dismissBtn: {
|
|
65
|
-
padding: 2,
|
|
66
|
-
},
|
|
67
|
-
messageText: {
|
|
68
|
-
fontFamily: AppFonts.interRegular,
|
|
69
|
-
fontSize: 10.5,
|
|
70
|
-
color: AppColors.grayText,
|
|
71
|
-
lineHeight: 15,
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
export default FeatureUnderDevNotice;
|
|
17
|
+
</I>
|
|
18
|
+
</T>};const e=S.create({container:{marginHorizontal:12,marginTop:8,marginBottom:6,paddingHorizontal:12,paddingVertical:9,borderRadius:8,backgroundColor:`${t.warningIconGold}12`,borderWidth:1,borderColor:`${t.warningIconGold}30`},containerCompact:{marginTop:4,marginBottom:4,paddingVertical:7,paddingHorizontal:10},contentRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4},badgeWrap:{flexDirection:"row",alignItems:"center",gap:4.5},badgeText:{fontFamily:C.interBold,fontSize:9.5,color:t.warningIconGold,letterSpacing:.4},dismissBtn:{padding:2},messageText:{fontFamily:C.interRegular,fontSize:10.5,color:t.grayText,lineHeight:15}});export default FeatureUnderDevNotice;
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { ModalAnimationType, SettingsPage, SettingsSubTab, LogFilter, } from '../../types';
|
|
3
|
-
export const InspectorContext = createContext(null);
|
|
4
|
-
export const useInspector = () => {
|
|
5
|
-
const ctx = useContext(InspectorContext);
|
|
6
|
-
if (!ctx) {
|
|
7
|
-
throw new Error('useInspector must be used within <InspectorContext.Provider>');
|
|
8
|
-
}
|
|
9
|
-
return ctx;
|
|
10
|
-
};
|
|
11
|
-
export const animateNextLayout = () => {
|
|
12
|
-
};
|
|
1
|
+
import{createContext as e,useContext as o}from"react";export{ModalAnimationType,SettingsPage,SettingsSubTab,LogFilter}from"../../types";export const InspectorContext=e(null),useInspector=()=>{const t=o(InspectorContext);if(!t)throw new Error("useInspector must be used within <InspectorContext.Provider>");return t},animateNextLayout=()=>{};
|