react-native-inapp-inspector 2.0.7 → 2.2.0
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 +0 -11
- package/dist/commonjs/components/Inspector/InspectorHeader.js +25 -28
- package/dist/commonjs/components/Inspector/MainScreen.js +2 -19
- package/dist/commonjs/components/Inspector/NetworkDetail.js +0 -15
- package/dist/commonjs/components/Inspector/PerformanceTab.js +18 -30
- package/dist/commonjs/components/Inspector/SettingsPanel.js +49 -448
- package/dist/commonjs/components/Inspector/TabBar.js +2 -23
- package/dist/commonjs/components/NetworkIcons.d.ts +0 -12
- package/dist/commonjs/components/NetworkIcons.js +3 -72
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/index.d.ts +0 -2
- package/dist/commonjs/helpers/index.js +1 -12
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -1
- package/dist/commonjs/helpers/settingsStore.js +2 -4
- package/dist/commonjs/i18n/locales/en.json +2 -3
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/commonjs/index.js +9 -127
- package/dist/commonjs/native/NativeInspector.d.ts +0 -1
- package/dist/commonjs/types/enums.d.ts +0 -7
- package/dist/commonjs/types/enums.js +0 -7
- package/dist/commonjs/types/interfaces.d.ts +0 -77
- package/dist/esm/components/Inspector/InspectorHeader.js +25 -28
- package/dist/esm/components/Inspector/MainScreen.js +2 -19
- package/dist/esm/components/Inspector/NetworkDetail.js +1 -16
- package/dist/esm/components/Inspector/PerformanceTab.js +19 -31
- package/dist/esm/components/Inspector/SettingsPanel.js +50 -449
- package/dist/esm/components/Inspector/TabBar.js +3 -24
- package/dist/esm/components/NetworkIcons.d.ts +0 -12
- package/dist/esm/components/NetworkIcons.js +0 -57
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/index.d.ts +0 -2
- package/dist/esm/helpers/index.js +0 -10
- package/dist/esm/helpers/settingsStore.d.ts +1 -1
- package/dist/esm/helpers/settingsStore.js +2 -4
- package/dist/esm/i18n/locales/en.json +2 -3
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +8 -123
- package/dist/esm/native/NativeInspector.d.ts +0 -1
- package/dist/esm/types/enums.d.ts +0 -7
- package/dist/esm/types/enums.js +0 -7
- package/dist/esm/types/interfaces.d.ts +0 -77
- package/ios/NetworkInspectorModule.mm +5 -12
- package/package.json +1 -4
- package/dist/commonjs/components/Inspector/AuditTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/AuditTab.js +0 -741
- package/dist/commonjs/components/Inspector/DeviceTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/DeviceTab.js +0 -717
- package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.d.ts +0 -7
- package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.js +0 -600
- package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +0 -7
- package/dist/commonjs/components/Inspector/PerformanceHud.js +0 -210
- package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +0 -9
- package/dist/commonjs/components/Inspector/RequestReplayModal.js +0 -792
- package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +0 -8
- package/dist/commonjs/components/Inspector/RequestReplayView.js +0 -871
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/StorageTab.js +0 -610
- package/dist/commonjs/customHooks/storageInspector.d.ts +0 -13
- package/dist/commonjs/customHooks/storageInspector.js +0 -179
- package/dist/commonjs/helpers/deviceInfo.d.ts +0 -4
- package/dist/commonjs/helpers/deviceInfo.js +0 -94
- package/dist/commonjs/helpers/packageAuditor.d.ts +0 -5
- package/dist/commonjs/helpers/packageAuditor.js +0 -182
- package/dist/esm/components/Inspector/AuditTab.d.ts +0 -3
- package/dist/esm/components/Inspector/AuditTab.js +0 -702
- package/dist/esm/components/Inspector/DeviceTab.d.ts +0 -3
- package/dist/esm/components/Inspector/DeviceTab.js +0 -678
- package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.d.ts +0 -7
- package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.js +0 -560
- package/dist/esm/components/Inspector/PerformanceHud.d.ts +0 -7
- package/dist/esm/components/Inspector/PerformanceHud.js +0 -170
- package/dist/esm/components/Inspector/RequestReplayModal.d.ts +0 -9
- package/dist/esm/components/Inspector/RequestReplayModal.js +0 -752
- package/dist/esm/components/Inspector/RequestReplayView.d.ts +0 -8
- package/dist/esm/components/Inspector/RequestReplayView.js +0 -831
- package/dist/esm/components/Inspector/StorageTab.d.ts +0 -3
- package/dist/esm/components/Inspector/StorageTab.js +0 -571
- package/dist/esm/customHooks/storageInspector.d.ts +0 -13
- package/dist/esm/customHooks/storageInspector.js +0 -170
- package/dist/esm/helpers/deviceInfo.d.ts +0 -4
- package/dist/esm/helpers/deviceInfo.js +0 -89
- package/dist/esm/helpers/packageAuditor.d.ts +0 -5
- package/dist/esm/helpers/packageAuditor.js +0 -173
|
@@ -3,64 +3,6 @@ import { ViewStyle } from 'react-native';
|
|
|
3
3
|
import { Animated, PanResponderInstance } from 'react-native';
|
|
4
4
|
import type { ActiveTab, BreadcrumbType, CrashType, GroupedListItem, LocalFilter, LogFilter, Method, SettingsPage, SettingsSubTab, SortOrder, StatusFilter } from './index';
|
|
5
5
|
export type SearchScope = 'all' | 'url' | 'reqBody' | 'resBody' | 'headers';
|
|
6
|
-
export interface StorageEntry {
|
|
7
|
-
key: string;
|
|
8
|
-
value: string;
|
|
9
|
-
sizeBytes: number;
|
|
10
|
-
isJson: boolean;
|
|
11
|
-
parsedJson?: any;
|
|
12
|
-
updatedAt: number;
|
|
13
|
-
}
|
|
14
|
-
export interface DeviceInfoData {
|
|
15
|
-
appName: string;
|
|
16
|
-
bundleId: string;
|
|
17
|
-
appVersion: string;
|
|
18
|
-
buildNumber: string;
|
|
19
|
-
reactNativeVersion: string;
|
|
20
|
-
jsEngine: string;
|
|
21
|
-
isHermes: boolean;
|
|
22
|
-
isFabric: boolean;
|
|
23
|
-
isTurboModule: boolean;
|
|
24
|
-
platform: 'ios' | 'android' | 'windows' | 'macos' | 'web';
|
|
25
|
-
osVersion: string;
|
|
26
|
-
deviceModel: string;
|
|
27
|
-
deviceId?: string;
|
|
28
|
-
isDevice: boolean;
|
|
29
|
-
screenWidth: number;
|
|
30
|
-
screenHeight: number;
|
|
31
|
-
screenScale: number;
|
|
32
|
-
screenFontScale: number;
|
|
33
|
-
statusBarHeight: number;
|
|
34
|
-
memoryMb?: number;
|
|
35
|
-
arch?: string;
|
|
36
|
-
locale?: string;
|
|
37
|
-
timeZone?: string;
|
|
38
|
-
}
|
|
39
|
-
export type AuditSeverity = 'critical' | 'warning' | 'info' | 'optimal';
|
|
40
|
-
export type AuditCategory = 'dependency' | 'typescript' | 'peer' | 'performance' | 'security';
|
|
41
|
-
export interface AuditIssue {
|
|
42
|
-
id: string;
|
|
43
|
-
title: string;
|
|
44
|
-
message: string;
|
|
45
|
-
severity: AuditSeverity;
|
|
46
|
-
category: AuditCategory;
|
|
47
|
-
packageName?: string;
|
|
48
|
-
currentVersion?: string;
|
|
49
|
-
requiredVersion?: string;
|
|
50
|
-
fixCommand?: string;
|
|
51
|
-
fixSnippet?: string;
|
|
52
|
-
timestamp: number;
|
|
53
|
-
}
|
|
54
|
-
export interface PackageHealthReport {
|
|
55
|
-
score: number;
|
|
56
|
-
grade: 'A+' | 'A' | 'B' | 'C' | 'D';
|
|
57
|
-
totalIssues: number;
|
|
58
|
-
criticalCount: number;
|
|
59
|
-
warningCount: number;
|
|
60
|
-
infoCount: number;
|
|
61
|
-
issues: AuditIssue[];
|
|
62
|
-
scannedAt: number;
|
|
63
|
-
}
|
|
64
6
|
export interface ParsedStackFrame {
|
|
65
7
|
method: string;
|
|
66
8
|
file: string;
|
|
@@ -211,7 +153,6 @@ export interface PersistedSettings {
|
|
|
211
153
|
reduxExpandDepth?: number;
|
|
212
154
|
showDuplicateLogs?: boolean;
|
|
213
155
|
showUpdateToast?: boolean;
|
|
214
|
-
hasCompletedWalkthrough?: boolean;
|
|
215
156
|
}
|
|
216
157
|
export interface NetworkInspectorProps {
|
|
217
158
|
enabled?: boolean;
|
|
@@ -223,8 +164,6 @@ export interface NetworkInspectorProps {
|
|
|
223
164
|
environment?: 'DEV' | 'UAT' | 'PrePROD' | 'PROD' | 'QA' | 'Staging' | string;
|
|
224
165
|
initialVisible?: boolean;
|
|
225
166
|
visible?: boolean;
|
|
226
|
-
initialTab?: ActiveTab;
|
|
227
|
-
enablePerformanceHud?: boolean;
|
|
228
167
|
}
|
|
229
168
|
export interface NavigationTrackerProps {
|
|
230
169
|
onStateChange: (state: any) => void;
|
|
@@ -237,17 +176,12 @@ export interface InspectorContextValue {
|
|
|
237
176
|
isEnabled: boolean;
|
|
238
177
|
appIcon?: any;
|
|
239
178
|
environment?: string;
|
|
240
|
-
isPerformanceHudEnabled: boolean;
|
|
241
|
-
setIsPerformanceHudEnabled: React.Dispatch<React.SetStateAction<boolean>>;
|
|
242
179
|
modalHeightPercent: number;
|
|
243
180
|
setModalHeightPercent: React.Dispatch<React.SetStateAction<number>>;
|
|
244
181
|
modalAnimationType: 'slide' | 'fade' | 'none';
|
|
245
182
|
setModalAnimationType: React.Dispatch<React.SetStateAction<'slide' | 'fade' | 'none'>>;
|
|
246
183
|
hasNavigationContext: boolean;
|
|
247
184
|
setNavState: React.Dispatch<React.SetStateAction<any>>;
|
|
248
|
-
isWalkthroughVisible: boolean;
|
|
249
|
-
setIsWalkthroughVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
250
|
-
openWalkthrough: () => void;
|
|
251
185
|
activeTab: ActiveTab;
|
|
252
186
|
switchActiveTab: (key: ActiveTab) => void;
|
|
253
187
|
tabVisibility: Record<ActiveTab, boolean>;
|
|
@@ -371,17 +305,6 @@ export interface InspectorContextValue {
|
|
|
371
305
|
maxCrashLogs: number;
|
|
372
306
|
setMaxCrashLogs: React.Dispatch<React.SetStateAction<number>>;
|
|
373
307
|
clearAllCrashes: () => void;
|
|
374
|
-
storageEntries: StorageEntry[];
|
|
375
|
-
refreshStorageEntries: () => Promise<void>;
|
|
376
|
-
updateStorageEntry: (key: string, value: string) => Promise<void>;
|
|
377
|
-
deleteStorageEntry: (key: string) => Promise<void>;
|
|
378
|
-
clearAllStorageEntries: () => Promise<void>;
|
|
379
|
-
selectedStorageKey: string | null;
|
|
380
|
-
setSelectedStorageKey: React.Dispatch<React.SetStateAction<string | null>>;
|
|
381
|
-
deviceInfo: DeviceInfoData;
|
|
382
|
-
auditReport: PackageHealthReport;
|
|
383
|
-
refreshAuditReport: () => void;
|
|
384
|
-
logCustomAuditIssue: (issue: Omit<AuditIssue, 'id' | 'timestamp'>) => void;
|
|
385
308
|
settingsActiveSubTab: SettingsSubTab;
|
|
386
309
|
setSettingsActiveSubTab: React.Dispatch<React.SetStateAction<SettingsSubTab>>;
|
|
387
310
|
defaultTab: ActiveTab;
|
|
@@ -14,7 +14,7 @@ import { getTelemetryConsentStatus } from '../../helpers/telemetry';
|
|
|
14
14
|
import { UpdateAvailableModal } from './UpdateAvailableModal';
|
|
15
15
|
import { WhiteBackNavigation, TrashIcon, SettingsIcon, CloseWhite, ClockIcon, SizeIcon, AppleIcon, AndroidIcon, NpmIcon, ResetIcon, } from '../NetworkIcons';
|
|
16
16
|
const InspectorHeader = React.memo(() => {
|
|
17
|
-
const { modalHeightPercent, appIcon, selected, setSelected, selectedEvent, setSelectedEvent, selectedLog, setSelectedLog, selectedReduxSlice, setSelectedReduxSlice, selectedReduxAction, setSelectedReduxAction, reduxState, reduxLastActionMap, showHeaderInfo, setShowHeaderInfo, updateAvailable, latestNpmVersion, clearAnim, activePulseAnim, unreadPulseAnim, runClearAllWithAnimation, settingsPage, setSettingsPage, resetToDefaults, closeModal, detailTitle, activeTab, environment, visible, selectedCrash, setSelectedCrash,
|
|
17
|
+
const { modalHeightPercent, appIcon, selected, setSelected, selectedEvent, setSelectedEvent, selectedLog, setSelectedLog, selectedReduxSlice, setSelectedReduxSlice, selectedReduxAction, setSelectedReduxAction, reduxState, reduxLastActionMap, showHeaderInfo, setShowHeaderInfo, updateAvailable, latestNpmVersion, clearAnim, activePulseAnim, unreadPulseAnim, runClearAllWithAnimation, settingsPage, setSettingsPage, resetToDefaults, closeModal, detailTitle, activeTab, environment, visible, selectedCrash, setSelectedCrash, } = useInspector();
|
|
18
18
|
const [showUpdateModal, setShowUpdateModal] = React.useState(false);
|
|
19
19
|
const [isTelemetryActive, setIsTelemetryActive] = React.useState(false);
|
|
20
20
|
const telemetryPulseAnim = React.useRef(new Animated.Value(1)).current;
|
|
@@ -264,44 +264,38 @@ const InspectorHeader = React.memo(() => {
|
|
|
264
264
|
</Pressable>)}
|
|
265
265
|
</View>
|
|
266
266
|
|
|
267
|
-
{/* OS & NPM Version
|
|
267
|
+
{/* OS & NPM Version Representation */}
|
|
268
268
|
<View style={{
|
|
269
269
|
flexDirection: 'row',
|
|
270
270
|
alignItems: 'center',
|
|
271
271
|
gap: 5,
|
|
272
272
|
minWidth: 0,
|
|
273
273
|
}}>
|
|
274
|
-
{/* Unified Platform & Build Chip */}
|
|
275
274
|
<View style={{
|
|
276
275
|
flexDirection: 'row',
|
|
277
276
|
alignItems: 'center',
|
|
278
|
-
backgroundColor:
|
|
279
|
-
borderRadius:
|
|
280
|
-
paddingHorizontal: 6
|
|
281
|
-
paddingVertical: 2
|
|
282
|
-
gap: 4
|
|
277
|
+
backgroundColor: `${AppColors.white}1F`,
|
|
278
|
+
borderRadius: 5,
|
|
279
|
+
paddingHorizontal: 6,
|
|
280
|
+
paddingVertical: 2,
|
|
281
|
+
gap: 4,
|
|
283
282
|
borderWidth: 1,
|
|
284
|
-
borderColor:
|
|
283
|
+
borderColor: `${AppColors.white}2E`,
|
|
285
284
|
flexShrink: 0,
|
|
286
285
|
}}>
|
|
287
|
-
{Platform.OS === 'ios' ? (<AppleIcon color=
|
|
286
|
+
{Platform.OS === 'ios' ? (<AppleIcon color={`${AppColors.white}E6`} size={10}/>) : (<AndroidIcon color={`${AppColors.white}E6`} size={10}/>)}
|
|
288
287
|
<Text style={{
|
|
289
|
-
fontFamily: AppFonts.
|
|
288
|
+
fontFamily: AppFonts.interMedium,
|
|
290
289
|
fontSize: 9.5,
|
|
291
|
-
color:
|
|
290
|
+
color: `${AppColors.white}EB`,
|
|
292
291
|
letterSpacing: 0.1,
|
|
293
292
|
}} numberOfLines={1}>
|
|
294
293
|
{Platform.OS === 'ios'
|
|
295
|
-
? `iOS ${
|
|
296
|
-
|
|
297
|
-
: ''}`
|
|
298
|
-
: `Android ${String(deviceInfo?.osVersion || Platform.Version).replace(/^(android\s*)+/i, '').trim()}${deviceInfo?.buildNumber || deviceInfo?.appVersion
|
|
299
|
-
? ` (${deviceInfo.buildNumber || deviceInfo.appVersion})`
|
|
300
|
-
: ''}`}
|
|
294
|
+
? `iOS ${Platform.Version}`
|
|
295
|
+
: `Android ${Platform.Version}`}
|
|
301
296
|
</Text>
|
|
302
297
|
</View>
|
|
303
298
|
|
|
304
|
-
{/* Unified NPM Version Chip */}
|
|
305
299
|
<Pressable onPress={() => {
|
|
306
300
|
if (updateAvailable) {
|
|
307
301
|
setShowUpdateModal(true);
|
|
@@ -310,23 +304,26 @@ const InspectorHeader = React.memo(() => {
|
|
|
310
304
|
Linking.openURL('https://www.npmjs.com/package/react-native-inapp-inspector').catch(() => { });
|
|
311
305
|
}
|
|
312
306
|
}} style={{
|
|
313
|
-
backgroundColor: '
|
|
314
|
-
borderRadius:
|
|
315
|
-
paddingHorizontal: 6
|
|
316
|
-
paddingVertical: 2
|
|
307
|
+
backgroundColor: '#FFFFFF',
|
|
308
|
+
borderRadius: 5,
|
|
309
|
+
paddingHorizontal: 6,
|
|
310
|
+
paddingVertical: 2,
|
|
317
311
|
flexDirection: 'row',
|
|
318
312
|
alignItems: 'center',
|
|
319
313
|
gap: 4,
|
|
320
|
-
borderWidth: 1,
|
|
321
|
-
borderColor: 'rgba(255, 255, 255, 0.28)',
|
|
322
314
|
flexShrink: 0,
|
|
315
|
+
shadowColor: '#000000',
|
|
316
|
+
shadowOffset: { width: 0, height: 1 },
|
|
317
|
+
shadowOpacity: 0.15,
|
|
318
|
+
shadowRadius: 2,
|
|
319
|
+
elevation: 2,
|
|
323
320
|
}}>
|
|
324
|
-
<NpmIcon size={11} color="#
|
|
321
|
+
<NpmIcon size={11} color="#CB3837"/>
|
|
325
322
|
<Text style={{
|
|
326
323
|
fontFamily: AppFonts.interBold,
|
|
327
324
|
fontSize: 9.5,
|
|
328
|
-
color: '#
|
|
329
|
-
letterSpacing: 0.
|
|
325
|
+
color: '#CB3837',
|
|
326
|
+
letterSpacing: 0.2,
|
|
330
327
|
}} numberOfLines={1}>
|
|
331
328
|
v{LIB_VERSION}
|
|
332
329
|
</Text>
|
|
@@ -17,20 +17,15 @@ import BundleTab from './BundleTab';
|
|
|
17
17
|
import PerformanceTab from './PerformanceTab';
|
|
18
18
|
import CrashTab from './CrashTab';
|
|
19
19
|
import CrashDetail from './CrashDetail';
|
|
20
|
-
import StorageTab from './StorageTab';
|
|
21
|
-
import DeviceTab from './DeviceTab';
|
|
22
|
-
import AuditTab from './AuditTab';
|
|
23
20
|
import SettingsPanel from './SettingsPanel';
|
|
24
21
|
import TelemetryConsentModal from './TelemetryConsentModal';
|
|
25
|
-
import FirstTimeWalkthroughModal from './FirstTimeWalkthroughModal';
|
|
26
22
|
import NpmUpdateToast from './NpmUpdateToast';
|
|
27
23
|
import Toast from '../Toast';
|
|
28
24
|
import styles from '../../styles';
|
|
29
25
|
import { AppColors } from '../../styles/AppColors';
|
|
30
26
|
import NavigationTracker from './NavigationTracker';
|
|
31
|
-
import PerformanceHud from './PerformanceHud';
|
|
32
27
|
const MainScreen = () => {
|
|
33
|
-
const { visible,
|
|
28
|
+
const { visible, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, activeTab, isReady, isEnabled, useNativeFab, hasNavigationContext, setNavState, } = useInspector();
|
|
34
29
|
const isDetailActive = (activeTab === 'apis' && selected != null) ||
|
|
35
30
|
(activeTab === 'analytics' && selectedEvent != null) ||
|
|
36
31
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
@@ -71,16 +66,10 @@ const MainScreen = () => {
|
|
|
71
66
|
}).start();
|
|
72
67
|
}, [activeTab]);
|
|
73
68
|
return (<>
|
|
74
|
-
|
|
75
|
-
{(Platform.OS === 'ios' || Platform.OS === 'android') &&
|
|
69
|
+
{(Platform.OS === 'ios' || Platform.OS === 'android') &&
|
|
76
70
|
isEnabled &&
|
|
77
71
|
!visible &&
|
|
78
72
|
!useNativeFab && <FabLauncher />}
|
|
79
|
-
{isEnabled && !visible && isPerformanceHudEnabled && (<PerformanceHud visible={true} onPress={() => {
|
|
80
|
-
setVisible(true);
|
|
81
|
-
switchActiveTab('performance');
|
|
82
|
-
}}/>)}
|
|
83
|
-
</View>
|
|
84
73
|
<Modal visible={visible} animationType={modalAnimationType} transparent statusBarTranslucent={true}>
|
|
85
74
|
{visible && (<ErrorBoundary onClose={closeModal}>
|
|
86
75
|
<View style={styles.modalBackdrop}>
|
|
@@ -124,9 +113,6 @@ const MainScreen = () => {
|
|
|
124
113
|
{activeTab === 'logs' && <ConsoleTab />}
|
|
125
114
|
{activeTab === 'analytics' && <AnalyticsTab />}
|
|
126
115
|
{activeTab === 'redux' && <ReduxTab />}
|
|
127
|
-
{activeTab === 'storage' && <StorageTab />}
|
|
128
|
-
{activeTab === 'device' && <DeviceTab />}
|
|
129
|
-
{activeTab === 'audit' && <AuditTab />}
|
|
130
116
|
{activeTab === 'bundle' && <BundleTab />}
|
|
131
117
|
{activeTab === 'performance' && <PerformanceTab />}
|
|
132
118
|
{activeTab === 'crash' && <CrashTab />}
|
|
@@ -186,9 +172,6 @@ const MainScreen = () => {
|
|
|
186
172
|
|
|
187
173
|
{/* NPM Version Update Toast with timeout progress bar */}
|
|
188
174
|
<NpmUpdateToast />
|
|
189
|
-
|
|
190
|
-
{/* First-Time Walkthrough & Quick Guide Modal */}
|
|
191
|
-
<FirstTimeWalkthroughModal visible={isWalkthroughVisible} onClose={() => setIsWalkthroughVisible(false)}/>
|
|
192
175
|
</View>
|
|
193
176
|
</View>
|
|
194
177
|
</ErrorBoundary>)}
|
|
@@ -16,11 +16,9 @@ import { AppColors } from '../../styles/AppColors';
|
|
|
16
16
|
import { AppFonts } from '../../styles/AppFonts';
|
|
17
17
|
import { METHOD_COLORS } from '../../constants';
|
|
18
18
|
import { getStatusColor, getSize, formatDateTime, getFetchCommand, getCurlCommand, } from '../../helpers';
|
|
19
|
-
import { FailIcon, StatusIcon, HeadersIcon, RequestIcon, ResponseIcon, DownloadIcon, ClearIcon, SizeIcon, ExternalLinkIcon, ClockIcon,
|
|
20
|
-
import RequestReplayView from './RequestReplayView';
|
|
19
|
+
import { FailIcon, StatusIcon, HeadersIcon, RequestIcon, ResponseIcon, DownloadIcon, ClearIcon, SizeIcon, ExternalLinkIcon, ClockIcon, } from '../NetworkIcons';
|
|
21
20
|
const NetworkDetail = React.memo(() => {
|
|
22
21
|
const { t } = useTranslation();
|
|
23
|
-
const [isReplayScreenActive, setIsReplayScreenActive] = React.useState(false);
|
|
24
22
|
const { selected, detailDisplayUrl, apiDetailActiveTab, setApiDetailActiveTab, detailSearch, setDetailSearch, reqExpanded, setReqExpanded, resExpanded, setResExpanded, showReqDiff, setShowReqDiff, showResDiff, setShowResDiff, prevRequestData, prevResponseData, logRouteMapRef, } = useInspector();
|
|
25
23
|
const handleOpenUrl = () => {
|
|
26
24
|
Alert.alert(t('common.openInBrowser') || 'Open in Browser', `${t('common.openInBrowserPrompt') || 'Are you sure you want to open this URL in your external browser?'}\n\n${detailDisplayUrl}`, [
|
|
@@ -44,9 +42,6 @@ const NetworkDetail = React.memo(() => {
|
|
|
44
42
|
};
|
|
45
43
|
if (!selected)
|
|
46
44
|
return null;
|
|
47
|
-
if (isReplayScreenActive) {
|
|
48
|
-
return (<RequestReplayView request={selected} onBack={() => setIsReplayScreenActive(false)}/>);
|
|
49
|
-
}
|
|
50
45
|
return (<View style={{ flex: 1 }}>
|
|
51
46
|
{/* Non-scrollable details header */}
|
|
52
47
|
<View style={{ paddingHorizontal: 6, paddingTop: 4 }}>
|
|
@@ -252,16 +247,6 @@ const NetworkDetail = React.memo(() => {
|
|
|
252
247
|
</View>
|
|
253
248
|
|
|
254
249
|
<View style={styles.detailInfoRight}>
|
|
255
|
-
<TouchableScale style={[
|
|
256
|
-
styles.iconSquareBtn,
|
|
257
|
-
{
|
|
258
|
-
backgroundColor: `${AppColors.purple}15`,
|
|
259
|
-
borderColor: `${AppColors.purple}30`,
|
|
260
|
-
borderWidth: 1,
|
|
261
|
-
},
|
|
262
|
-
]} onPress={() => setIsReplayScreenActive(true)} accessible={true} accessibilityRole="button" accessibilityLabel="Edit & Resend Request" hitSlop={12}>
|
|
263
|
-
<ReplayIcon color={AppColors.purple} size={14}/>
|
|
264
|
-
</TouchableScale>
|
|
265
250
|
<TouchableScale style={[styles.iconSquareBtn, { backgroundColor: `${AppColors.sky600}15` }]} onPress={handleOpenUrl} hitSlop={12}>
|
|
266
251
|
<ExternalLinkIcon color={AppColors.sky600} size={14}/>
|
|
267
252
|
</TouchableScale>
|
|
@@ -9,7 +9,7 @@ import { AppColors } from '../../styles/AppColors';
|
|
|
9
9
|
import { AppFonts } from '../../styles/AppFonts';
|
|
10
10
|
import { useTranslation } from '../../i18n';
|
|
11
11
|
import { getRuntimeDiagnostics } from '../../helpers';
|
|
12
|
-
import { SearchIcon, CircleXIcon, PerformanceIcon, BoltIcon, LightbulbIcon,
|
|
12
|
+
import { SearchIcon, CircleXIcon, PerformanceIcon, BoltIcon, LightbulbIcon, } from '../NetworkIcons';
|
|
13
13
|
import { getPerformanceEvents, subscribePerformanceEvents, logPerformanceEvent, clearPerformanceEvents, } from '../../customHooks/performanceTracker';
|
|
14
14
|
import { startNativeFpsMonitoring, stopNativeFpsMonitoring, getNativeFpsMetrics, getNativeSystemMetrics, isNativeModuleAvailable, } from '../../native/NativeInspector';
|
|
15
15
|
const PerformanceTab = React.memo(() => {
|
|
@@ -373,33 +373,24 @@ const PerformanceTab = React.memo(() => {
|
|
|
373
373
|
<View style={perfStyles.categoryScrollWrapper}>
|
|
374
374
|
<ScrollView horizontal showsHorizontalScrollIndicator={false} style={perfStyles.categoryScrollView} contentContainerStyle={perfStyles.categoryScroll}>
|
|
375
375
|
{[
|
|
376
|
-
{ key: 'ALL', label: t('performance.catAll')
|
|
377
|
-
{ key: 'JANKY', label: t('performance.catJanky')
|
|
378
|
-
{ key: 'NAVIGATION', label: t('performance.catNavigation')
|
|
379
|
-
{ key: 'RENDER', label: t('performance.catRender')
|
|
380
|
-
{ key: 'MEMORY', label: t('performance.catMemory')
|
|
381
|
-
{ key: 'IO', label: t('performance.catIo')
|
|
376
|
+
{ key: 'ALL', label: t('performance.catAll') },
|
|
377
|
+
{ key: 'JANKY', label: t('performance.catJanky') },
|
|
378
|
+
{ key: 'NAVIGATION', label: t('performance.catNavigation') },
|
|
379
|
+
{ key: 'RENDER', label: t('performance.catRender') },
|
|
380
|
+
{ key: 'MEMORY', label: t('performance.catMemory') },
|
|
381
|
+
{ key: 'IO', label: t('performance.catIo') },
|
|
382
382
|
].map(cat => {
|
|
383
383
|
const isSelected = filterCategory === cat.key;
|
|
384
|
-
const iconColor = isSelected ? AppColors.white : AppColors.grayText;
|
|
385
384
|
return (<TouchableScale key={cat.key} onPress={() => setFilterCategory(cat.key)} style={[
|
|
386
385
|
perfStyles.categoryChip,
|
|
387
386
|
isSelected && perfStyles.categoryChipActive,
|
|
388
387
|
]}>
|
|
389
|
-
<
|
|
390
|
-
{cat.icon === 'all' && <SparklesIcon size={12} color={iconColor}/>}
|
|
391
|
-
{cat.icon === 'janky' && <WarningTriangleIcon size={12} color={isSelected ? AppColors.white : AppColors.errorColor}/>}
|
|
392
|
-
{cat.icon === 'nav' && <MapIcon size={12} color={iconColor}/>}
|
|
393
|
-
{cat.icon === 'render' && <AtomIcon size={12} color={iconColor}/>}
|
|
394
|
-
{cat.icon === 'memory' && <BrainIcon size={12} color={iconColor}/>}
|
|
395
|
-
{cat.icon === 'io' && <GlobeIcon size={12} color={iconColor}/>}
|
|
396
|
-
<Text style={[
|
|
388
|
+
<Text style={[
|
|
397
389
|
perfStyles.categoryChipText,
|
|
398
390
|
isSelected && perfStyles.categoryChipTextActive,
|
|
399
391
|
]}>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
</View>
|
|
392
|
+
{cat.label}
|
|
393
|
+
</Text>
|
|
403
394
|
</TouchableScale>);
|
|
404
395
|
})}
|
|
405
396
|
</ScrollView>
|
|
@@ -410,13 +401,13 @@ const PerformanceTab = React.memo(() => {
|
|
|
410
401
|
{/* ── 1. REAL-TIME FPS SCORECARD & SMOOTH AREA GRAPH ── */}
|
|
411
402
|
<View style={perfStyles.heroCard}>
|
|
412
403
|
<View style={perfStyles.heroHeaderRow}>
|
|
413
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap:
|
|
414
|
-
<PerformanceIcon color={AppColors.purple} size={
|
|
415
|
-
<View
|
|
416
|
-
<Text style={perfStyles.heroTitle}
|
|
404
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
405
|
+
<PerformanceIcon color={AppColors.purple} size={17}/>
|
|
406
|
+
<View>
|
|
407
|
+
<Text style={perfStyles.heroTitle}>
|
|
417
408
|
{t('performance.fpsAreaChartTitle')}
|
|
418
409
|
</Text>
|
|
419
|
-
<Text style={perfStyles.heroSubTitle}
|
|
410
|
+
<Text style={perfStyles.heroSubTitle}>
|
|
420
411
|
{t('performance.fpsAreaChartSub')}
|
|
421
412
|
</Text>
|
|
422
413
|
</View>
|
|
@@ -1131,21 +1122,18 @@ const perfStyles = StyleSheet.create({
|
|
|
1131
1122
|
color: AppColors.grayTextWeak,
|
|
1132
1123
|
},
|
|
1133
1124
|
fpsStatsGrid: {
|
|
1134
|
-
flex: 1,
|
|
1135
1125
|
flexDirection: 'row',
|
|
1136
1126
|
alignItems: 'center',
|
|
1137
|
-
|
|
1138
|
-
marginLeft: 8,
|
|
1127
|
+
gap: 8,
|
|
1139
1128
|
},
|
|
1140
1129
|
statItem: {
|
|
1141
1130
|
alignItems: 'center',
|
|
1142
|
-
|
|
1131
|
+
minWidth: 50,
|
|
1143
1132
|
},
|
|
1144
1133
|
statLabel: {
|
|
1145
|
-
fontFamily: AppFonts.
|
|
1146
|
-
fontSize:
|
|
1134
|
+
fontFamily: AppFonts.interRegular,
|
|
1135
|
+
fontSize: 10,
|
|
1147
1136
|
color: AppColors.grayTextWeak,
|
|
1148
|
-
textAlign: 'center',
|
|
1149
1137
|
},
|
|
1150
1138
|
statValue: {
|
|
1151
1139
|
fontFamily: AppFonts.interBold,
|