react-native-inapp-inspector 2.2.2 → 2.2.4
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/dist/commonjs/components/AnalyticsDetail.js +5 -1
- package/dist/commonjs/components/AnalyticsEventCard.js +2 -1
- package/dist/commonjs/components/DiffViewer.js +1 -1
- package/dist/commonjs/components/Inspector/BundleTab.js +22 -0
- package/dist/commonjs/components/Inspector/DeviceInfoTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +835 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +12 -14
- package/dist/commonjs/components/Inspector/LogDetail.js +6 -3
- package/dist/commonjs/components/Inspector/MainScreen.js +7 -3
- package/dist/commonjs/components/Inspector/NetworkTab.js +92 -15
- package/dist/commonjs/components/Inspector/PerformanceTab.js +38 -12
- package/dist/commonjs/components/Inspector/SettingsPanel.js +440 -229
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +892 -0
- package/dist/commonjs/components/Inspector/TabBar.js +14 -0
- package/dist/commonjs/components/Inspector/TelemetryConsentModal.js +11 -2
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +4 -1
- package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
- package/dist/commonjs/components/NetworkIcons.js +30 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.js +44 -22
- package/dist/commonjs/customHooks/storageInspector.d.ts +67 -0
- package/dist/commonjs/customHooks/storageInspector.js +486 -0
- package/dist/commonjs/i18n/locales/en.json +8 -2
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +16 -1
- package/dist/commonjs/storage.d.ts +5 -0
- package/dist/commonjs/storage.js +18 -0
- package/dist/commonjs/types/enums.d.ts +5 -0
- package/dist/commonjs/types/enums.js +5 -0
- package/dist/esm/components/AnalyticsDetail.js +6 -2
- package/dist/esm/components/AnalyticsEventCard.js +2 -1
- package/dist/esm/components/DiffViewer.js +1 -1
- package/dist/esm/components/Inspector/BundleTab.js +22 -0
- package/dist/esm/components/Inspector/DeviceInfoTab.d.ts +3 -0
- package/dist/esm/components/Inspector/DeviceInfoTab.js +796 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +13 -15
- package/dist/esm/components/Inspector/LogDetail.js +7 -4
- package/dist/esm/components/Inspector/MainScreen.js +7 -3
- package/dist/esm/components/Inspector/NetworkTab.js +93 -16
- package/dist/esm/components/Inspector/PerformanceTab.js +39 -13
- package/dist/esm/components/Inspector/SettingsPanel.js +441 -230
- package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/esm/components/Inspector/StorageTab.js +853 -0
- package/dist/esm/components/Inspector/TabBar.js +15 -1
- package/dist/esm/components/Inspector/TelemetryConsentModal.js +11 -2
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +4 -1
- package/dist/esm/components/NetworkIcons.d.ts +6 -0
- package/dist/esm/components/NetworkIcons.js +23 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/bundleAnalyzer.js +44 -22
- package/dist/esm/customHooks/storageInspector.d.ts +67 -0
- package/dist/esm/customHooks/storageInspector.js +469 -0
- package/dist/esm/i18n/locales/en.json +8 -2
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/storage.d.ts +5 -0
- package/dist/esm/storage.js +5 -0
- package/dist/esm/types/enums.d.ts +5 -0
- package/dist/esm/types/enums.js +5 -0
- package/package.json +9 -1
- package/src/analytics.ts +35 -0
- package/src/bundle.ts +25 -0
- package/src/components/AnalyticsDetail.tsx +870 -0
- package/src/components/AnalyticsEventCard.tsx +442 -0
- package/src/components/AnalyticsGraph.tsx +583 -0
- package/src/components/AnimatedEntrance.tsx +64 -0
- package/src/components/AppHeaderLogo.tsx +109 -0
- package/src/components/BrandCircleIcon.tsx +144 -0
- package/src/components/BrandSquareIcon.tsx +144 -0
- package/src/components/CodeSnippet.tsx +725 -0
- package/src/components/ConsoleLogCard.tsx +628 -0
- package/src/components/CopyButton.tsx +87 -0
- package/src/components/DiffViewer.tsx +82 -0
- package/src/components/DomainHeader.tsx +237 -0
- package/src/components/EmptyState.tsx +73 -0
- package/src/components/EndOfListFooter.tsx +100 -0
- package/src/components/ErrorBoundary.tsx +688 -0
- package/src/components/HeadersSection.tsx +192 -0
- package/src/components/HighlightText.tsx +100 -0
- package/src/components/Inspector/AnalyticsFilterModal.tsx +1250 -0
- package/src/components/Inspector/AnalyticsTab.tsx +1336 -0
- package/src/components/Inspector/BundleTab.tsx +4760 -0
- package/src/components/Inspector/ConsoleTab.tsx +702 -0
- package/src/components/Inspector/CrashDetail.tsx +941 -0
- package/src/components/Inspector/CrashFilterModal.tsx +721 -0
- package/src/components/Inspector/CrashTab.tsx +871 -0
- package/src/components/Inspector/DeviceInfoTab.tsx +1204 -0
- package/src/components/Inspector/FabLauncher.tsx +80 -0
- package/src/components/Inspector/InspectorContext.tsx +28 -0
- package/src/components/Inspector/InspectorHeader.tsx +972 -0
- package/src/components/Inspector/LogDetail.tsx +1431 -0
- package/src/components/Inspector/MainScreen.tsx +262 -0
- package/src/components/Inspector/NavigationTracker.tsx +13 -0
- package/src/components/Inspector/NetworkDetail.tsx +794 -0
- package/src/components/Inspector/NetworkTab.tsx +1183 -0
- package/src/components/Inspector/NpmUpdateToast.tsx +392 -0
- package/src/components/Inspector/PerformanceTab.tsx +1928 -0
- package/src/components/Inspector/ReduxDetail.tsx +1651 -0
- package/src/components/Inspector/ReduxTab.tsx +954 -0
- package/src/components/Inspector/SettingsPanel.tsx +3447 -0
- package/src/components/Inspector/StorageTab.tsx +1048 -0
- package/src/components/Inspector/TabBar.tsx +207 -0
- package/src/components/Inspector/TelemetryConsentModal.tsx +416 -0
- package/src/components/Inspector/UpdateAvailableModal.tsx +557 -0
- package/src/components/JsonViewer.tsx +486 -0
- package/src/components/LogCard.tsx +491 -0
- package/src/components/LogSyntaxHighlighter.tsx +178 -0
- package/src/components/MetaAccordion.tsx +340 -0
- package/src/components/MiniBarChart.tsx +42 -0
- package/src/components/MiniLineChart.tsx +33 -0
- package/src/components/NetworkIcons.tsx +2221 -0
- package/src/components/SectionHeader.tsx +113 -0
- package/src/components/SegmentedTabs.tsx +83 -0
- package/src/components/Slider.tsx +300 -0
- package/src/components/SourcePageCard.tsx +148 -0
- package/src/components/Toast.tsx +131 -0
- package/src/components/TouchableScale.tsx +91 -0
- package/src/components/TreeNode.tsx +186 -0
- package/src/console.ts +24 -0
- package/src/constants/index.ts +38 -0
- package/src/constants/version.ts +3 -0
- package/src/crash.ts +32 -0
- package/src/customHooks/analyticsLogger.ts +336 -0
- package/src/customHooks/bundleAnalyzer.ts +1256 -0
- package/src/customHooks/consoleLogger.ts +497 -0
- package/src/customHooks/crashHandler.ts +944 -0
- package/src/customHooks/logFilters.ts +32 -0
- package/src/customHooks/networkLogger.ts +419 -0
- package/src/customHooks/performanceTracker.ts +1014 -0
- package/src/customHooks/reduxLogger.ts +406 -0
- package/src/customHooks/storageInspector.ts +509 -0
- package/src/customHooks/useAccordion.tsx +60 -0
- package/src/decorators/index.ts +184 -0
- package/src/helpers/gaAnalyticsRegistry.ts +204 -0
- package/src/helpers/index.ts +860 -0
- package/src/helpers/memoryManager.ts +138 -0
- package/src/helpers/searchQueryParser.ts +283 -0
- package/src/helpers/settingsStore.ts +171 -0
- package/src/helpers/telemetry.ts +505 -0
- package/src/helpers/toast.ts +17 -0
- package/src/i18n/index.ts +69 -0
- package/src/i18n/locales/en.json +1058 -0
- package/src/index.tsx +2356 -0
- package/src/native/NativeInspector.ts +397 -0
- package/src/native/NativeNetworkInspector.ts +24 -0
- package/src/network.ts +22 -0
- package/src/performance.ts +38 -0
- package/src/redux.ts +23 -0
- package/src/storage.ts +18 -0
- package/src/styles/AppColors.ts +408 -0
- package/src/styles/AppFonts.ts +8 -0
- package/src/styles/common.ts +209 -0
- package/src/styles/index.ts +1570 -0
- package/src/types/enums.ts +199 -0
- package/src/types/index.ts +34 -0
- package/src/types/interfaces.ts +515 -0
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {ViewStyle} from 'react-native';
|
|
3
|
+
import {Animated, PanResponderInstance} from 'react-native';
|
|
4
|
+
import type {
|
|
5
|
+
ActiveTab,
|
|
6
|
+
BreadcrumbType,
|
|
7
|
+
CrashType,
|
|
8
|
+
GroupedListItem,
|
|
9
|
+
LocalFilter,
|
|
10
|
+
LogFilter,
|
|
11
|
+
Method,
|
|
12
|
+
SettingsPage,
|
|
13
|
+
SettingsSubTab,
|
|
14
|
+
SortOrder,
|
|
15
|
+
StatusFilter,
|
|
16
|
+
} from './index';
|
|
17
|
+
|
|
18
|
+
export type SearchScope = 'all' | 'url' | 'reqBody' | 'resBody' | 'headers';
|
|
19
|
+
|
|
20
|
+
export interface ParsedStackFrame {
|
|
21
|
+
method: string;
|
|
22
|
+
file: string;
|
|
23
|
+
lineNumber: number;
|
|
24
|
+
column: number;
|
|
25
|
+
raw?: string;
|
|
26
|
+
isAppCode?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface CrashBreadcrumb {
|
|
30
|
+
type: BreadcrumbType;
|
|
31
|
+
message: string;
|
|
32
|
+
timestamp: number;
|
|
33
|
+
data?: any;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface CrashRecord {
|
|
37
|
+
id: string;
|
|
38
|
+
error?: Error | any;
|
|
39
|
+
isFatal: boolean;
|
|
40
|
+
type: CrashType;
|
|
41
|
+
message: string;
|
|
42
|
+
name?: string;
|
|
43
|
+
stack?: string;
|
|
44
|
+
parsedStack?: ParsedStackFrame[];
|
|
45
|
+
componentStack?: string;
|
|
46
|
+
timestamp: number;
|
|
47
|
+
dateStr: string;
|
|
48
|
+
timeStr: string;
|
|
49
|
+
deviceInfo?: {
|
|
50
|
+
platform: string;
|
|
51
|
+
osVersion?: string;
|
|
52
|
+
rnVersion?: string;
|
|
53
|
+
isHermes?: boolean;
|
|
54
|
+
isFabric?: boolean;
|
|
55
|
+
appState?: string;
|
|
56
|
+
};
|
|
57
|
+
memoryInfo?: {
|
|
58
|
+
usedJSHeapSize?: number;
|
|
59
|
+
totalJSHeapSize?: number;
|
|
60
|
+
};
|
|
61
|
+
breadcrumbs?: CrashBreadcrumb[];
|
|
62
|
+
logId?: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ConsoleLog {
|
|
66
|
+
id: number;
|
|
67
|
+
type: 'info' | 'warn' | 'error';
|
|
68
|
+
message: string;
|
|
69
|
+
timestamp: number;
|
|
70
|
+
caller?: string;
|
|
71
|
+
stack?: string;
|
|
72
|
+
errorStack?: string;
|
|
73
|
+
rawArgs?: any[];
|
|
74
|
+
sourceMethod?: 'log' | 'info' | 'warn' | 'error';
|
|
75
|
+
/** #9 — number of consecutive identical logs collapsed into this entry. */
|
|
76
|
+
duplicateCount?: number;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface AnalyticsEvent {
|
|
80
|
+
id: number;
|
|
81
|
+
name: string;
|
|
82
|
+
screenName: string;
|
|
83
|
+
screenClass: string;
|
|
84
|
+
userId: string;
|
|
85
|
+
params: Record<string, any>;
|
|
86
|
+
userProperties: Record<string, any>;
|
|
87
|
+
timestamp: number;
|
|
88
|
+
source: 'firebase' | 'manual';
|
|
89
|
+
raw?: string;
|
|
90
|
+
trackingId?: string;
|
|
91
|
+
clientId?: string;
|
|
92
|
+
sessionId?: string;
|
|
93
|
+
pageTitle?: string;
|
|
94
|
+
pageLocation?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface AnalyticsFilters {
|
|
98
|
+
categories: Set<string>;
|
|
99
|
+
screens: Set<string>;
|
|
100
|
+
sources: Set<string>;
|
|
101
|
+
userTypes: Set<string>;
|
|
102
|
+
timeWindow: 'all' | '1m' | '5m' | '15m' | '1h';
|
|
103
|
+
payloadComplexity: 'all' | 'none' | 'simple' | 'heavy';
|
|
104
|
+
hasRevenue: boolean;
|
|
105
|
+
hasItems: boolean;
|
|
106
|
+
hasUserProps: boolean;
|
|
107
|
+
hasParams: boolean;
|
|
108
|
+
onlyDuplicates: boolean;
|
|
109
|
+
onlyConversions: boolean;
|
|
110
|
+
sortBy: 'time_desc' | 'time_asc' | 'revenue_desc' | 'count_desc';
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// ─── Network ──────────────────────────────────────────────────────────────────
|
|
114
|
+
|
|
115
|
+
export interface NetworkLog {
|
|
116
|
+
id: number;
|
|
117
|
+
url: string;
|
|
118
|
+
method: string;
|
|
119
|
+
status: number | null;
|
|
120
|
+
duration: number | null;
|
|
121
|
+
startTime: number;
|
|
122
|
+
request?: unknown;
|
|
123
|
+
response?: unknown;
|
|
124
|
+
requestHeaders?: Record<string, string>;
|
|
125
|
+
responseHeaders?: Record<string, string>;
|
|
126
|
+
/** #9 — number of consecutive identical requests collapsed into this entry. */
|
|
127
|
+
duplicateCount?: number;
|
|
128
|
+
/** Client identifier: axios, fetch, xhr, apollo, etc. */
|
|
129
|
+
client?: 'axios' | 'fetch' | 'xhr' | 'apollo' | 'graphql' | string;
|
|
130
|
+
caller?: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface RouteInfo {
|
|
134
|
+
path: string;
|
|
135
|
+
params: any;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// ─── Redux ────────────────────────────────────────────────────────────────────
|
|
139
|
+
|
|
140
|
+
export interface ReduxHistoryEntry {
|
|
141
|
+
id: number;
|
|
142
|
+
type: string;
|
|
143
|
+
payload: any;
|
|
144
|
+
timestamp: string;
|
|
145
|
+
updatedAt?: number;
|
|
146
|
+
affectedSlices: string[];
|
|
147
|
+
prevState?: any;
|
|
148
|
+
nextState?: any;
|
|
149
|
+
stack?: string;
|
|
150
|
+
caller?: string;
|
|
151
|
+
callerFile?: string;
|
|
152
|
+
callerLine?: number;
|
|
153
|
+
callerCol?: number;
|
|
154
|
+
originType?: 'saga' | 'thunk' | 'ui' | 'direct' | 'listener';
|
|
155
|
+
sliceName?: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// ─── Settings persistence ─────────────────────────────────────────────────────
|
|
159
|
+
|
|
160
|
+
export interface InspectorStorage {
|
|
161
|
+
getItem: (key: string) => string | null | Promise<string | null>;
|
|
162
|
+
setItem: (key: string, value: string) => void | Promise<void>;
|
|
163
|
+
removeItem?: (key: string) => void | Promise<void>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface PersistedSettings {
|
|
167
|
+
isDark?: boolean;
|
|
168
|
+
modalHeightPercent?: number;
|
|
169
|
+
modalAnimationType?: string;
|
|
170
|
+
tabVisibility?: Record<string, boolean>;
|
|
171
|
+
defaultTab?: string;
|
|
172
|
+
maxNetworkLogs?: number;
|
|
173
|
+
maxConsoleLogs?: number;
|
|
174
|
+
maxAnalyticsEventsLimit?: number;
|
|
175
|
+
maxCrashLogs?: number;
|
|
176
|
+
isAutoRamLimitEnabled?: boolean;
|
|
177
|
+
showConsoleLevels?: {info: boolean; warn: boolean; error: boolean};
|
|
178
|
+
reduxAutoRefresh?: boolean;
|
|
179
|
+
reduxExpandDepth?: number;
|
|
180
|
+
showDuplicateLogs?: boolean;
|
|
181
|
+
showUpdateToast?: boolean;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// ─── Inspector component props / context ──────────────────────────────────────
|
|
185
|
+
|
|
186
|
+
export interface NetworkInspectorProps {
|
|
187
|
+
enabled?: boolean;
|
|
188
|
+
isEnabled?: boolean;
|
|
189
|
+
forceEnable?: boolean;
|
|
190
|
+
storage?: InspectorStorage;
|
|
191
|
+
navigationRef?: any;
|
|
192
|
+
appIcon?: any;
|
|
193
|
+
environment?: 'DEV' | 'UAT' | 'PrePROD' | 'PROD' | 'QA' | 'Staging' | string;
|
|
194
|
+
initialVisible?: boolean;
|
|
195
|
+
visible?: boolean;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface NavigationTrackerProps {
|
|
199
|
+
onStateChange: (state: any) => void;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface InspectorContextValue {
|
|
203
|
+
// ─── Modal / launcher ──────────────────────────────────────────────────────
|
|
204
|
+
visible: boolean;
|
|
205
|
+
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
206
|
+
closeModal: () => void;
|
|
207
|
+
isReady: boolean;
|
|
208
|
+
isEnabled: boolean;
|
|
209
|
+
appIcon?: any;
|
|
210
|
+
environment?: string;
|
|
211
|
+
modalHeightPercent: number;
|
|
212
|
+
setModalHeightPercent: React.Dispatch<React.SetStateAction<number>>;
|
|
213
|
+
modalAnimationType: 'slide' | 'fade' | 'none';
|
|
214
|
+
setModalAnimationType: React.Dispatch<
|
|
215
|
+
React.SetStateAction<'slide' | 'fade' | 'none'>
|
|
216
|
+
>;
|
|
217
|
+
hasNavigationContext: boolean;
|
|
218
|
+
setNavState: React.Dispatch<React.SetStateAction<any>>;
|
|
219
|
+
|
|
220
|
+
// ─── Tabs ──────────────────────────────────────────────────────────────────
|
|
221
|
+
activeTab: ActiveTab;
|
|
222
|
+
switchActiveTab: (key: ActiveTab) => void;
|
|
223
|
+
tabVisibility: Record<ActiveTab, boolean>;
|
|
224
|
+
toggleTabVisibility: (key: ActiveTab) => void;
|
|
225
|
+
lastReadApisCount: number;
|
|
226
|
+
lastReadLogsCount: number;
|
|
227
|
+
|
|
228
|
+
// ─── Selection / header state ──────────────────────────────────────────────
|
|
229
|
+
selected: NetworkLog | null;
|
|
230
|
+
setSelected: React.Dispatch<React.SetStateAction<NetworkLog | null>>;
|
|
231
|
+
selectedEvent: AnalyticsEvent | null;
|
|
232
|
+
setSelectedEvent: React.Dispatch<React.SetStateAction<AnalyticsEvent | null>>;
|
|
233
|
+
selectedLog: ConsoleLog | null;
|
|
234
|
+
setSelectedLog: React.Dispatch<React.SetStateAction<ConsoleLog | null>>;
|
|
235
|
+
showHeaderInfo: boolean;
|
|
236
|
+
setShowHeaderInfo: React.Dispatch<React.SetStateAction<boolean>>;
|
|
237
|
+
settingsPage: SettingsPage;
|
|
238
|
+
setSettingsPage: React.Dispatch<React.SetStateAction<SettingsPage>>;
|
|
239
|
+
updateAvailable: boolean;
|
|
240
|
+
latestNpmVersion: string | null;
|
|
241
|
+
clearAnim: Animated.Value;
|
|
242
|
+
activePulseAnim: Animated.Value;
|
|
243
|
+
unreadPulseAnim: Animated.Value;
|
|
244
|
+
runClearAllWithAnimation: () => void;
|
|
245
|
+
|
|
246
|
+
// ─── FAB / launcher ────────────────────────────────────────────────────────
|
|
247
|
+
useNativeFab: boolean;
|
|
248
|
+
fabPan: Animated.ValueXY;
|
|
249
|
+
fabPanResponder: PanResponderInstance;
|
|
250
|
+
fabDraggedRef: React.MutableRefObject<boolean>;
|
|
251
|
+
pulseAnim: Animated.Value;
|
|
252
|
+
fabShineAnim: Animated.Value;
|
|
253
|
+
|
|
254
|
+
// ─── Network (APIs) ────────────────────────────────────────────────────────
|
|
255
|
+
logs: NetworkLog[];
|
|
256
|
+
filteredLogs: NetworkLog[];
|
|
257
|
+
groupedData: GroupedListItem[];
|
|
258
|
+
search: string;
|
|
259
|
+
setSearch: React.Dispatch<React.SetStateAction<string>>;
|
|
260
|
+
searchScope: SearchScope;
|
|
261
|
+
setSearchScope: React.Dispatch<React.SetStateAction<SearchScope>>;
|
|
262
|
+
isRegexSearch: boolean;
|
|
263
|
+
setIsRegexSearch: React.Dispatch<React.SetStateAction<boolean>>;
|
|
264
|
+
isCaseSensitive: boolean;
|
|
265
|
+
setIsCaseSensitive: React.Dispatch<React.SetStateAction<boolean>>;
|
|
266
|
+
quickFilter: string;
|
|
267
|
+
setQuickFilter: React.Dispatch<React.SetStateAction<string>>;
|
|
268
|
+
statusFilters: Set<StatusFilter>;
|
|
269
|
+
setStatusFilters: React.Dispatch<React.SetStateAction<Set<StatusFilter>>>;
|
|
270
|
+
methodFilters: Set<Method>;
|
|
271
|
+
setMethodFilters: React.Dispatch<React.SetStateAction<Set<Method>>>;
|
|
272
|
+
availableMethods: Method[];
|
|
273
|
+
sortOrder: SortOrder;
|
|
274
|
+
setSortOrder: React.Dispatch<React.SetStateAction<SortOrder>>;
|
|
275
|
+
selectedLogs: Set<number>;
|
|
276
|
+
toggleSelect: (id: number) => void;
|
|
277
|
+
minStart: number;
|
|
278
|
+
totalRange: number;
|
|
279
|
+
newLogIds: Set<number>;
|
|
280
|
+
toggleSectionFilter: (pageName: string, filter: LocalFilter) => void;
|
|
281
|
+
toggleSectionCollapse: (pageName: string) => void;
|
|
282
|
+
handleDelete: () => void;
|
|
283
|
+
isNetworkPaused: boolean;
|
|
284
|
+
setIsNetworkPaused: React.Dispatch<React.SetStateAction<boolean>>;
|
|
285
|
+
|
|
286
|
+
// ─── Network detail ────────────────────────────────────────────────────────
|
|
287
|
+
detailTitle: string;
|
|
288
|
+
detailDisplayUrl: string;
|
|
289
|
+
apiDetailActiveTab: 'metadata' | 'headers' | 'request' | 'response';
|
|
290
|
+
setApiDetailActiveTab: React.Dispatch<
|
|
291
|
+
React.SetStateAction<'metadata' | 'headers' | 'request' | 'response'>
|
|
292
|
+
>;
|
|
293
|
+
detailSearch: string;
|
|
294
|
+
setDetailSearch: React.Dispatch<React.SetStateAction<string>>;
|
|
295
|
+
reqExpanded: boolean | undefined;
|
|
296
|
+
setReqExpanded: React.Dispatch<React.SetStateAction<boolean | undefined>>;
|
|
297
|
+
resExpanded: boolean | undefined;
|
|
298
|
+
setResExpanded: React.Dispatch<React.SetStateAction<boolean | undefined>>;
|
|
299
|
+
showReqDiff: boolean;
|
|
300
|
+
setShowReqDiff: React.Dispatch<React.SetStateAction<boolean>>;
|
|
301
|
+
showResDiff: boolean;
|
|
302
|
+
setShowResDiff: React.Dispatch<React.SetStateAction<boolean>>;
|
|
303
|
+
prevRequestData: unknown;
|
|
304
|
+
prevResponseData: unknown;
|
|
305
|
+
logRouteMapRef: React.MutableRefObject<Map<number, RouteInfo>>;
|
|
306
|
+
|
|
307
|
+
// ─── Console (Logs) ────────────────────────────────────────────────────────
|
|
308
|
+
consoleLogs: ConsoleLog[];
|
|
309
|
+
visibleConsoleLogs: ConsoleLog[];
|
|
310
|
+
filteredConsoleLogs: ConsoleLog[];
|
|
311
|
+
logSearch: string;
|
|
312
|
+
setLogSearch: React.Dispatch<React.SetStateAction<string>>;
|
|
313
|
+
logFilters: Set<LogFilter>;
|
|
314
|
+
setLogFilters: React.Dispatch<React.SetStateAction<Set<LogFilter>>>;
|
|
315
|
+
logCounts: Record<string, string>;
|
|
316
|
+
logSortOrder: SortOrder;
|
|
317
|
+
setLogSortOrder: React.Dispatch<React.SetStateAction<SortOrder>>;
|
|
318
|
+
isConsolePaused: boolean;
|
|
319
|
+
setIsConsolePaused: React.Dispatch<React.SetStateAction<boolean>>;
|
|
320
|
+
|
|
321
|
+
// ─── Analytics ─────────────────────────────────────────────────────────────
|
|
322
|
+
analyticsEvents: AnalyticsEvent[];
|
|
323
|
+
filteredAnalyticsEvents: (AnalyticsEvent & {count?: number})[];
|
|
324
|
+
analyticsSearch: string;
|
|
325
|
+
setAnalyticsSearch: React.Dispatch<React.SetStateAction<string>>;
|
|
326
|
+
analyticsFilters: AnalyticsFilters;
|
|
327
|
+
setAnalyticsFilters: React.Dispatch<React.SetStateAction<AnalyticsFilters>>;
|
|
328
|
+
isAnalyticsFilterApplied: boolean;
|
|
329
|
+
resetAnalyticsFilters: () => void;
|
|
330
|
+
newEventIds: Set<number>;
|
|
331
|
+
isAnalyticsLayoutReady: boolean;
|
|
332
|
+
setIsAnalyticsLayoutReady: React.Dispatch<React.SetStateAction<boolean>>;
|
|
333
|
+
analyticsHeaderExpanded: boolean;
|
|
334
|
+
setAnalyticsHeaderExpanded: React.Dispatch<React.SetStateAction<boolean>>;
|
|
335
|
+
isAnalyticsPaused: boolean;
|
|
336
|
+
setIsAnalyticsPaused: React.Dispatch<React.SetStateAction<boolean>>;
|
|
337
|
+
|
|
338
|
+
// ─── Redux ─────────────────────────────────────────────────────────────────
|
|
339
|
+
reduxState: any;
|
|
340
|
+
setReduxState: React.Dispatch<React.SetStateAction<any>>;
|
|
341
|
+
reduxLastActionMap: Record<string, any>;
|
|
342
|
+
reduxSearch: string;
|
|
343
|
+
setReduxSearch: React.Dispatch<React.SetStateAction<string>>;
|
|
344
|
+
selectedReduxSlice: string | null;
|
|
345
|
+
setSelectedReduxSlice: React.Dispatch<React.SetStateAction<string | null>>;
|
|
346
|
+
selectedReduxAction: any | null;
|
|
347
|
+
setSelectedReduxAction: React.Dispatch<React.SetStateAction<any | null>>;
|
|
348
|
+
reduxActiveSubTab: 'state' | 'timeline';
|
|
349
|
+
setReduxActiveSubTab: React.Dispatch<React.SetStateAction<'state' | 'timeline'>>;
|
|
350
|
+
|
|
351
|
+
// ─── Crash ─────────────────────────────────────────────────────────────────
|
|
352
|
+
crashRecords: CrashRecord[];
|
|
353
|
+
setCrashRecords: React.Dispatch<React.SetStateAction<CrashRecord[]>>;
|
|
354
|
+
selectedCrash: CrashRecord | null;
|
|
355
|
+
setSelectedCrash: React.Dispatch<React.SetStateAction<CrashRecord | null>>;
|
|
356
|
+
lastReadCrashesCount: number;
|
|
357
|
+
maxCrashLogs: number;
|
|
358
|
+
setMaxCrashLogs: React.Dispatch<React.SetStateAction<number>>;
|
|
359
|
+
clearAllCrashes: () => void;
|
|
360
|
+
|
|
361
|
+
// ─── Settings ──────────────────────────────────────────────────────────────
|
|
362
|
+
settingsActiveSubTab: SettingsSubTab;
|
|
363
|
+
setSettingsActiveSubTab: React.Dispatch<React.SetStateAction<SettingsSubTab>>;
|
|
364
|
+
defaultTab: ActiveTab;
|
|
365
|
+
setDefaultTab: React.Dispatch<React.SetStateAction<ActiveTab>>;
|
|
366
|
+
isDark: boolean;
|
|
367
|
+
setIsDark: React.Dispatch<React.SetStateAction<boolean>>;
|
|
368
|
+
showDuplicateLogs: boolean;
|
|
369
|
+
setShowDuplicateLogs: React.Dispatch<React.SetStateAction<boolean>>;
|
|
370
|
+
showUpdateToast: boolean;
|
|
371
|
+
setShowUpdateToast: React.Dispatch<React.SetStateAction<boolean>>;
|
|
372
|
+
showConsoleLevels: {info: boolean; warn: boolean; error: boolean};
|
|
373
|
+
setShowConsoleLevels: React.Dispatch<
|
|
374
|
+
React.SetStateAction<{info: boolean; warn: boolean; error: boolean}>
|
|
375
|
+
>;
|
|
376
|
+
resetToDefaults: () => Promise<void>;
|
|
377
|
+
storage: InspectorStorage | undefined;
|
|
378
|
+
maxNetworkLogs: number;
|
|
379
|
+
setMaxNetworkLogs: React.Dispatch<React.SetStateAction<number>>;
|
|
380
|
+
maxConsoleLogs: number;
|
|
381
|
+
setMaxConsoleLogs: React.Dispatch<React.SetStateAction<number>>;
|
|
382
|
+
maxAnalyticsEventsLimit: number;
|
|
383
|
+
setMaxAnalyticsEventsLimit: React.Dispatch<React.SetStateAction<number>>;
|
|
384
|
+
isAutoRamLimitEnabled: boolean;
|
|
385
|
+
setIsAutoRamLimitEnabled: React.Dispatch<React.SetStateAction<boolean>>;
|
|
386
|
+
deviceFreeRamMb: number;
|
|
387
|
+
reduxAutoRefresh: boolean;
|
|
388
|
+
setReduxAutoRefreshState: React.Dispatch<React.SetStateAction<boolean>>;
|
|
389
|
+
reduxExpandDepth: number;
|
|
390
|
+
setReduxExpandDepth: React.Dispatch<React.SetStateAction<number>>;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// ─── Shared component props ───────────────────────────────────────────────────
|
|
394
|
+
|
|
395
|
+
export interface CopyButtonProps {
|
|
396
|
+
value: unknown | (() => unknown);
|
|
397
|
+
label: string;
|
|
398
|
+
iconType?: 'copy' | 'terminal' | 'fetch';
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export interface SectionHeaderProps {
|
|
402
|
+
title: string;
|
|
403
|
+
value: unknown;
|
|
404
|
+
expanded: boolean | undefined;
|
|
405
|
+
onToggleExpand: () => void;
|
|
406
|
+
showDiff?: boolean;
|
|
407
|
+
isDiffing?: boolean;
|
|
408
|
+
onToggleDiff?: () => void;
|
|
409
|
+
showSearch?: boolean;
|
|
410
|
+
isSearching?: boolean;
|
|
411
|
+
onToggleSearch?: () => void;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export interface TreeNodeProps {
|
|
415
|
+
data: unknown;
|
|
416
|
+
name?: string | number;
|
|
417
|
+
level?: number;
|
|
418
|
+
search?: string;
|
|
419
|
+
forceOpen?: boolean;
|
|
420
|
+
defaultExpandDepth?: number;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export interface LogCardProps {
|
|
424
|
+
item: NetworkLog;
|
|
425
|
+
onPress: () => void;
|
|
426
|
+
timelineMinStart: number;
|
|
427
|
+
timelineTotalRange: number;
|
|
428
|
+
isNew?: boolean;
|
|
429
|
+
isSelected: boolean;
|
|
430
|
+
onToggleSelect: (id: number) => void;
|
|
431
|
+
searchStr?: string;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export interface MetaAccordionProps {
|
|
435
|
+
status: number | null | undefined;
|
|
436
|
+
statusColor: string;
|
|
437
|
+
duration: number | null | undefined;
|
|
438
|
+
size: string;
|
|
439
|
+
triggeredAt: string;
|
|
440
|
+
method: string;
|
|
441
|
+
contentType?: string;
|
|
442
|
+
url: string;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export interface HeadersSectionProps {
|
|
446
|
+
title: string;
|
|
447
|
+
headers: Record<string, string> | undefined;
|
|
448
|
+
search?: string;
|
|
449
|
+
resetKey?: string | number;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export interface SourcePageCardProps {
|
|
453
|
+
routeInfo: RouteInfo;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export interface SectionCardProps {
|
|
457
|
+
title?: string;
|
|
458
|
+
count?: number;
|
|
459
|
+
accentColor?: string;
|
|
460
|
+
children?: React.ReactNode;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export interface AnalyticsEventCardProps {
|
|
464
|
+
event: AnalyticsEvent & {count?: number};
|
|
465
|
+
onPress: () => void;
|
|
466
|
+
isNew?: boolean;
|
|
467
|
+
searchStr?: string;
|
|
468
|
+
isFirst: boolean;
|
|
469
|
+
isLast: boolean;
|
|
470
|
+
msSincePrev?: number;
|
|
471
|
+
showTimestamp?: boolean;
|
|
472
|
+
computedScreenName?: string;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export interface CodeSnippetProps {
|
|
476
|
+
code: string;
|
|
477
|
+
language: 'html' | 'css' | 'javascript';
|
|
478
|
+
search?: string;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
export interface AnimatedEntranceProps {
|
|
482
|
+
children: React.ReactNode;
|
|
483
|
+
delay?: number;
|
|
484
|
+
distance?: number;
|
|
485
|
+
duration?: number;
|
|
486
|
+
index?: number;
|
|
487
|
+
style?: ViewStyle | ViewStyle[];
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export interface ConsoleLogCardProps {
|
|
491
|
+
item: ConsoleLog;
|
|
492
|
+
searchStr?: string;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
export interface JsonContent {
|
|
496
|
+
header: string;
|
|
497
|
+
data: any;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export interface AnalyticsGraphProps {
|
|
501
|
+
event: AnalyticsEvent;
|
|
502
|
+
accentColor: string;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export interface ErrorBoundaryProps {
|
|
506
|
+
children: React.ReactNode;
|
|
507
|
+
onClose?: () => void;
|
|
508
|
+
onReset?: () => void;
|
|
509
|
+
fallbackType?: 'modal' | 'inline';
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export interface ErrorBoundaryState {
|
|
513
|
+
hasError: boolean;
|
|
514
|
+
error: Error | null;
|
|
515
|
+
}
|