react-native-inapp-inspector 1.1.35 → 2.0.1
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 +123 -101
- package/android/build.gradle +13 -1
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +890 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorPackage.kt +17 -0
- package/dist/commonjs/components/ConsoleLogCard.js +5 -5
- package/dist/commonjs/components/CopyButton.js +3 -0
- package/dist/commonjs/components/EndOfListFooter.js +1 -1
- package/dist/commonjs/components/ErrorBoundary.js +3 -0
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +25 -73
- package/dist/commonjs/components/Inspector/BundleTab.js +671 -189
- package/dist/commonjs/components/Inspector/ConsoleTab.js +110 -99
- package/dist/commonjs/components/Inspector/CrashTab.js +99 -91
- package/dist/commonjs/components/Inspector/InspectorHeader.js +107 -20
- package/dist/commonjs/components/Inspector/MainScreen.js +111 -68
- package/dist/commonjs/components/Inspector/NetworkTab.js +151 -30
- package/dist/commonjs/components/Inspector/PerformanceTab.js +96 -3
- package/dist/commonjs/components/Inspector/ReduxTab.js +18 -10
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1218 -1238
- package/dist/commonjs/components/Inspector/TabBar.js +4 -2
- package/dist/commonjs/components/JsonViewer.js +9 -4
- package/dist/commonjs/components/LogCard.js +31 -1
- package/dist/commonjs/components/LogSyntaxHighlighter.d.ts +16 -0
- package/dist/commonjs/components/LogSyntaxHighlighter.js +130 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +3 -0
- package/dist/commonjs/components/NetworkIcons.js +15 -1
- package/dist/commonjs/components/Slider.d.ts +13 -0
- package/dist/commonjs/components/Slider.js +261 -0
- package/dist/commonjs/components/TouchableScale.d.ts +1 -0
- package/dist/commonjs/components/TouchableScale.js +30 -32
- package/dist/commonjs/constants/index.d.ts +1 -2
- package/dist/commonjs/constants/index.js +4 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +4 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +8 -6
- package/dist/commonjs/customHooks/crashHandler.js +8 -1
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +25 -1
- package/dist/commonjs/helpers/searchQueryParser.d.ts +6 -0
- package/dist/commonjs/helpers/searchQueryParser.js +236 -0
- package/dist/commonjs/helpers/settingsStore.d.ts +9 -0
- package/dist/commonjs/helpers/settingsStore.js +59 -3
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +220 -43
- package/dist/commonjs/native/NativeInspector.d.ts +125 -0
- package/dist/commonjs/native/NativeInspector.js +313 -0
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +22 -0
- package/dist/commonjs/native/NativeNetworkInspector.js +4 -0
- package/dist/commonjs/styles/index.js +41 -41
- package/dist/commonjs/types/enums.d.ts +1 -1
- package/dist/commonjs/types/interfaces.d.ts +9 -0
- package/dist/esm/components/ConsoleLogCard.js +5 -5
- package/dist/esm/components/CopyButton.js +3 -0
- package/dist/esm/components/EndOfListFooter.js +2 -2
- package/dist/esm/components/ErrorBoundary.js +3 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +27 -75
- package/dist/esm/components/Inspector/BundleTab.js +671 -189
- package/dist/esm/components/Inspector/ConsoleTab.js +111 -100
- package/dist/esm/components/Inspector/CrashTab.js +99 -91
- package/dist/esm/components/Inspector/InspectorHeader.js +108 -21
- package/dist/esm/components/Inspector/MainScreen.js +113 -70
- package/dist/esm/components/Inspector/NetworkTab.js +152 -31
- package/dist/esm/components/Inspector/PerformanceTab.js +96 -3
- package/dist/esm/components/Inspector/ReduxTab.js +18 -10
- package/dist/esm/components/Inspector/SettingsPanel.js +1222 -1242
- package/dist/esm/components/Inspector/TabBar.js +4 -2
- package/dist/esm/components/JsonViewer.js +9 -4
- package/dist/esm/components/LogCard.js +32 -2
- package/dist/esm/components/LogSyntaxHighlighter.d.ts +16 -0
- package/dist/esm/components/LogSyntaxHighlighter.js +123 -0
- package/dist/esm/components/NetworkIcons.d.ts +3 -0
- package/dist/esm/components/NetworkIcons.js +11 -0
- package/dist/esm/components/Slider.d.ts +13 -0
- package/dist/esm/components/Slider.js +222 -0
- package/dist/esm/components/TouchableScale.d.ts +1 -0
- package/dist/esm/components/TouchableScale.js +31 -33
- package/dist/esm/constants/index.d.ts +1 -2
- package/dist/esm/constants/index.js +4 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.d.ts +4 -0
- package/dist/esm/customHooks/analyticsLogger.js +6 -5
- package/dist/esm/customHooks/crashHandler.js +8 -1
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +11 -1
- package/dist/esm/helpers/searchQueryParser.d.ts +6 -0
- package/dist/esm/helpers/searchQueryParser.js +233 -0
- package/dist/esm/helpers/settingsStore.d.ts +9 -0
- package/dist/esm/helpers/settingsStore.js +58 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +207 -44
- package/dist/esm/native/NativeInspector.d.ts +125 -0
- package/dist/esm/native/NativeInspector.js +289 -0
- package/dist/esm/native/NativeNetworkInspector.d.ts +22 -0
- package/dist/esm/native/NativeNetworkInspector.js +2 -0
- package/dist/esm/styles/index.js +41 -41
- package/dist/esm/types/enums.d.ts +1 -1
- package/dist/esm/types/interfaces.d.ts +9 -0
- package/ios/NetworkInspectorModule.h +6 -0
- package/ios/NetworkInspectorModule.m +760 -5
- package/package.json +13 -2
- package/react-native-inapp-inspector.podspec +7 -2
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.java +0 -97
- package/android/src/main/java/com/inappinspector/NetworkInspectorPackage.java +0 -28
|
@@ -50,7 +50,7 @@ const constants_2 = require("../../constants");
|
|
|
50
50
|
const helpers_1 = require("../../helpers");
|
|
51
51
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
52
52
|
const InspectorHeader = react_1.default.memo(() => {
|
|
53
|
-
const { modalHeightPercent, appIcon, selected, setSelected, selectedEvent, setSelectedEvent, selectedLog, setSelectedLog, selectedReduxSlice, setSelectedReduxSlice, selectedReduxAction, setSelectedReduxAction, reduxState, reduxLastActionMap, showHeaderInfo, setShowHeaderInfo, updateAvailable, latestNpmVersion, clearAnim, activePulseAnim, unreadPulseAnim, runClearAllWithAnimation, setSettingsPage, closeModal, detailTitle, activeTab, environment, selectedCrash, setSelectedCrash, } = (0, InspectorContext_1.useInspector)();
|
|
53
|
+
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, selectedCrash, setSelectedCrash, } = (0, InspectorContext_1.useInspector)();
|
|
54
54
|
const envConfig = (0, react_1.useMemo)(() => {
|
|
55
55
|
const rawEnv = (environment || (__DEV__ ? 'DEV' : 'PROD')).trim();
|
|
56
56
|
const clean = rawEnv.toUpperCase();
|
|
@@ -91,9 +91,30 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
91
91
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
92
92
|
(activeTab === 'redux' && (selectedReduxSlice != null || selectedReduxAction != null)) ||
|
|
93
93
|
(activeTab === 'crash' && selectedCrash != null);
|
|
94
|
-
const
|
|
94
|
+
const isSettingsView = settingsPage !== null;
|
|
95
|
+
const isAnySelected = isDetailView || isSettingsView;
|
|
96
|
+
const settingsModuleTitle = (0, react_1.useMemo)(() => {
|
|
97
|
+
switch (settingsPage) {
|
|
98
|
+
case 'apis':
|
|
99
|
+
return 'APIs (Network)';
|
|
100
|
+
case 'logs':
|
|
101
|
+
return 'Console Logs';
|
|
102
|
+
case 'performance':
|
|
103
|
+
return 'Performance Tracker';
|
|
104
|
+
case 'bundle':
|
|
105
|
+
return 'Bundle Analyzer';
|
|
106
|
+
case 'crash':
|
|
107
|
+
return 'Crash Protection';
|
|
108
|
+
case 'analytics':
|
|
109
|
+
return 'Analytics Logger';
|
|
110
|
+
case 'redux':
|
|
111
|
+
return 'Redux Inspector';
|
|
112
|
+
default:
|
|
113
|
+
return 'Settings & Modules';
|
|
114
|
+
}
|
|
115
|
+
}, [settingsPage]);
|
|
95
116
|
const headerTopPadding = react_native_1.Platform.OS === 'ios' && modalHeightPercent >= 95 ? 44 : 0;
|
|
96
|
-
return (<react_native_linear_gradient_1.default colors={[
|
|
117
|
+
return (<react_native_linear_gradient_1.default colors={['#4F46E5', '#7C3AED']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 1 }} style={styles_1.default.headerGradient}>
|
|
97
118
|
<react_native_1.View style={{ paddingTop: headerTopPadding, width: '100%' }}>
|
|
98
119
|
<react_native_1.View style={styles_1.default.header}>
|
|
99
120
|
<react_native_1.View style={[
|
|
@@ -101,12 +122,21 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
101
122
|
{
|
|
102
123
|
flexDirection: 'row',
|
|
103
124
|
alignItems: 'center',
|
|
104
|
-
gap:
|
|
125
|
+
gap: 8,
|
|
105
126
|
flex: !isDetailView ? 1 : 0,
|
|
106
127
|
minWidth: 0,
|
|
107
128
|
},
|
|
108
129
|
]}>
|
|
109
130
|
<TouchableScale_1.default onPress={() => {
|
|
131
|
+
if (isSettingsView) {
|
|
132
|
+
if (settingsPage === 'main') {
|
|
133
|
+
setSettingsPage(null);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
setSettingsPage('main');
|
|
137
|
+
}
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
110
140
|
requestAnimationFrame(() => {
|
|
111
141
|
setSelected(null);
|
|
112
142
|
setSelectedEvent(null);
|
|
@@ -139,7 +169,43 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
139
169
|
<NetworkIcons_1.WhiteBackNavigation />
|
|
140
170
|
</TouchableScale_1.default>
|
|
141
171
|
|
|
142
|
-
{
|
|
172
|
+
{isSettingsView ? (<react_native_1.View style={{ gap: 2, flex: 1, minWidth: 0 }}>
|
|
173
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
174
|
+
<react_native_1.Text style={{
|
|
175
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
176
|
+
fontSize: 16,
|
|
177
|
+
color: AppColors_1.AppColors.white,
|
|
178
|
+
letterSpacing: -0.2,
|
|
179
|
+
}} numberOfLines={1}>
|
|
180
|
+
{settingsModuleTitle}
|
|
181
|
+
</react_native_1.Text>
|
|
182
|
+
{settingsPage === 'main' && (<react_native_1.View style={{
|
|
183
|
+
backgroundColor: `${AppColors_1.AppColors.white}26`,
|
|
184
|
+
paddingHorizontal: 6,
|
|
185
|
+
paddingVertical: 1.5,
|
|
186
|
+
borderRadius: 10,
|
|
187
|
+
borderWidth: 1,
|
|
188
|
+
borderColor: `${AppColors_1.AppColors.white}20`,
|
|
189
|
+
}}>
|
|
190
|
+
<react_native_1.Text style={{
|
|
191
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
192
|
+
fontSize: 9,
|
|
193
|
+
color: AppColors_1.AppColors.white,
|
|
194
|
+
}}>
|
|
195
|
+
v{constants_2.LIB_VERSION}
|
|
196
|
+
</react_native_1.Text>
|
|
197
|
+
</react_native_1.View>)}
|
|
198
|
+
</react_native_1.View>
|
|
199
|
+
<react_native_1.Text style={{
|
|
200
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
201
|
+
fontSize: 10.5,
|
|
202
|
+
color: `${AppColors_1.AppColors.white}CC`,
|
|
203
|
+
}} numberOfLines={1}>
|
|
204
|
+
{settingsPage === 'main'
|
|
205
|
+
? 'Manage modules and preferences'
|
|
206
|
+
: 'Configure module parameters'}
|
|
207
|
+
</react_native_1.Text>
|
|
208
|
+
</react_native_1.View>) : !isAnySelected ? (<react_native_1.View style={{
|
|
143
209
|
flexDirection: 'row',
|
|
144
210
|
alignItems: 'center',
|
|
145
211
|
gap: 8,
|
|
@@ -147,7 +213,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
147
213
|
minWidth: 0,
|
|
148
214
|
marginRight: 6,
|
|
149
215
|
}}>
|
|
150
|
-
<AppHeaderLogo_1.default size={
|
|
216
|
+
<AppHeaderLogo_1.default size={30} customIcon={appIcon}/>
|
|
151
217
|
<react_native_1.View style={{ gap: 2.5, flex: 1, minWidth: 0 }}>
|
|
152
218
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, minWidth: 0 }}>
|
|
153
219
|
<react_native_1.Text style={[styles_1.default.headerTitle, { flexShrink: 1 }]} numberOfLines={1} ellipsizeMode="tail">
|
|
@@ -226,23 +292,31 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
226
292
|
</react_native_1.Text>
|
|
227
293
|
</react_native_1.View>
|
|
228
294
|
|
|
229
|
-
<react_native_1.
|
|
230
|
-
backgroundColor:
|
|
231
|
-
borderRadius:
|
|
232
|
-
paddingHorizontal:
|
|
233
|
-
paddingVertical:
|
|
234
|
-
|
|
235
|
-
|
|
295
|
+
<react_native_1.Pressable onPress={() => react_native_1.Linking.openURL('https://www.npmjs.com/package/react-native-inapp-inspector').catch(() => { })} style={{
|
|
296
|
+
backgroundColor: '#FFFFFF',
|
|
297
|
+
borderRadius: 5,
|
|
298
|
+
paddingHorizontal: 6,
|
|
299
|
+
paddingVertical: 2,
|
|
300
|
+
flexDirection: 'row',
|
|
301
|
+
alignItems: 'center',
|
|
302
|
+
gap: 4,
|
|
236
303
|
flexShrink: 0,
|
|
304
|
+
shadowColor: '#000000',
|
|
305
|
+
shadowOffset: { width: 0, height: 1 },
|
|
306
|
+
shadowOpacity: 0.15,
|
|
307
|
+
shadowRadius: 2,
|
|
308
|
+
elevation: 2,
|
|
237
309
|
}}>
|
|
310
|
+
<NetworkIcons_1.NpmIcon size={11} color="#CB3837"/>
|
|
238
311
|
<react_native_1.Text style={{
|
|
239
|
-
fontFamily: AppFonts_1.AppFonts.
|
|
240
|
-
fontSize:
|
|
241
|
-
color:
|
|
312
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
313
|
+
fontSize: 9.5,
|
|
314
|
+
color: '#CB3837',
|
|
315
|
+
letterSpacing: 0.2,
|
|
242
316
|
}} numberOfLines={1}>
|
|
243
317
|
v{constants_2.LIB_VERSION}
|
|
244
318
|
</react_native_1.Text>
|
|
245
|
-
</react_native_1.
|
|
319
|
+
</react_native_1.Pressable>
|
|
246
320
|
</react_native_1.View>
|
|
247
321
|
</react_native_1.View>
|
|
248
322
|
</react_native_1.View>) : null}
|
|
@@ -528,6 +602,19 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
528
602
|
gap: 8,
|
|
529
603
|
},
|
|
530
604
|
]}>
|
|
605
|
+
{isSettingsView && (<TouchableScale_1.default onPress={() => {
|
|
606
|
+
react_native_1.Alert.alert('Reset All Settings', 'This restores all module visibility and UI preferences to defaults. Continue?', [
|
|
607
|
+
{ text: 'Cancel', style: 'cancel' },
|
|
608
|
+
{
|
|
609
|
+
text: 'Reset',
|
|
610
|
+
style: 'destructive',
|
|
611
|
+
onPress: resetToDefaults,
|
|
612
|
+
},
|
|
613
|
+
]);
|
|
614
|
+
}} hitSlop={15} style={styles_1.default.closeButtonSquare}>
|
|
615
|
+
<NetworkIcons_1.ResetIcon color={AppColors_1.AppColors.white} size={14}/>
|
|
616
|
+
</TouchableScale_1.default>)}
|
|
617
|
+
|
|
531
618
|
{!isAnySelected && (<TouchableScale_1.default onPress={() => {
|
|
532
619
|
react_native_1.Alert.alert('Clear Everything', 'This clears all tabs — APIs, Logs, Analytics, Redux timeline and Crash history. Continue?', [
|
|
533
620
|
{ text: 'Cancel', style: 'cancel' },
|
|
@@ -554,16 +641,16 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
554
641
|
},
|
|
555
642
|
],
|
|
556
643
|
}}>
|
|
557
|
-
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.white} size={
|
|
644
|
+
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.white} size={14}/>
|
|
558
645
|
</react_native_1.Animated.View>
|
|
559
646
|
</TouchableScale_1.default>)}
|
|
560
647
|
|
|
561
648
|
{!isAnySelected && (<TouchableScale_1.default onPress={() => setSettingsPage('main')} hitSlop={15} style={styles_1.default.closeButtonSquare}>
|
|
562
|
-
<NetworkIcons_1.SettingsIcon color={AppColors_1.AppColors.white} size={
|
|
649
|
+
<NetworkIcons_1.SettingsIcon color={AppColors_1.AppColors.white} size={14}/>
|
|
563
650
|
</TouchableScale_1.default>)}
|
|
564
651
|
|
|
565
652
|
<TouchableScale_1.default onPress={closeModal} hitSlop={15} style={styles_1.default.closeButtonSquare}>
|
|
566
|
-
<NetworkIcons_1.CloseWhite size={
|
|
653
|
+
<NetworkIcons_1.CloseWhite size={14}/>
|
|
567
654
|
</TouchableScale_1.default>
|
|
568
655
|
</react_native_1.View>
|
|
569
656
|
</react_native_1.View>
|
|
@@ -61,25 +61,50 @@ const styles_1 = __importDefault(require("../../styles"));
|
|
|
61
61
|
const AppColors_1 = require("../../styles/AppColors");
|
|
62
62
|
const NavigationTracker_1 = __importDefault(require("./NavigationTracker"));
|
|
63
63
|
const MainScreen = () => {
|
|
64
|
-
const { visible, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, activeTab, isReady, isEnabled, hasNavigationContext, setNavState, } = (0, InspectorContext_1.useInspector)();
|
|
65
|
-
// Lazy-mount each tab on first visit and cache it in memory for 0ms instantaneous switching
|
|
66
|
-
const [mountedTabs, setMountedTabs] = (0, react_1.useState)({
|
|
67
|
-
[activeTab]: true,
|
|
68
|
-
});
|
|
69
|
-
(0, react_1.useEffect)(() => {
|
|
70
|
-
setMountedTabs(prev => {
|
|
71
|
-
if (prev[activeTab])
|
|
72
|
-
return prev;
|
|
73
|
-
return { ...prev, [activeTab]: true };
|
|
74
|
-
});
|
|
75
|
-
}, [activeTab]);
|
|
64
|
+
const { visible, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, activeTab, isReady, isEnabled, useNativeFab, hasNavigationContext, setNavState, } = (0, InspectorContext_1.useInspector)();
|
|
76
65
|
const isDetailActive = (activeTab === 'apis' && selected != null) ||
|
|
77
66
|
(activeTab === 'analytics' && selectedEvent != null) ||
|
|
78
67
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
79
68
|
(activeTab === 'redux' && (selectedReduxSlice != null || selectedReduxAction != null)) ||
|
|
80
69
|
(activeTab === 'crash' && selectedCrash != null);
|
|
70
|
+
// ─── 60 FPS Transition Animations ──────────────────────────────────────────
|
|
71
|
+
const detailAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
|
|
72
|
+
(0, react_1.useEffect)(() => {
|
|
73
|
+
if (isDetailActive) {
|
|
74
|
+
detailAnim.setValue(0);
|
|
75
|
+
react_native_1.Animated.spring(detailAnim, {
|
|
76
|
+
toValue: 1,
|
|
77
|
+
friction: 8,
|
|
78
|
+
tension: 65,
|
|
79
|
+
useNativeDriver: true,
|
|
80
|
+
}).start();
|
|
81
|
+
}
|
|
82
|
+
}, [isDetailActive]);
|
|
83
|
+
const settingsAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
|
|
84
|
+
(0, react_1.useEffect)(() => {
|
|
85
|
+
if (settingsPage !== null) {
|
|
86
|
+
settingsAnim.setValue(0);
|
|
87
|
+
react_native_1.Animated.spring(settingsAnim, {
|
|
88
|
+
toValue: 1,
|
|
89
|
+
friction: 8,
|
|
90
|
+
tension: 65,
|
|
91
|
+
useNativeDriver: true,
|
|
92
|
+
}).start();
|
|
93
|
+
}
|
|
94
|
+
}, [settingsPage !== null]);
|
|
95
|
+
const tabAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
96
|
+
(0, react_1.useEffect)(() => {
|
|
97
|
+
tabAnim.setValue(0);
|
|
98
|
+
react_native_1.Animated.timing(tabAnim, {
|
|
99
|
+
toValue: 1,
|
|
100
|
+
duration: 150,
|
|
101
|
+
useNativeDriver: true,
|
|
102
|
+
}).start();
|
|
103
|
+
}, [activeTab]);
|
|
81
104
|
return (<>
|
|
82
|
-
{(react_native_1.Platform.OS === 'ios' || react_native_1.Platform.OS === 'android') &&
|
|
105
|
+
{(react_native_1.Platform.OS === 'ios' || react_native_1.Platform.OS === 'android') &&
|
|
106
|
+
isEnabled &&
|
|
107
|
+
!useNativeFab && <FabLauncher_1.default />}
|
|
83
108
|
<react_native_1.Modal visible={visible} animationType={modalAnimationType} transparent statusBarTranslucent={true}>
|
|
84
109
|
{visible && (<ErrorBoundary_1.default onClose={closeModal}>
|
|
85
110
|
<react_native_1.View style={styles_1.default.modalBackdrop}>
|
|
@@ -96,68 +121,86 @@ const MainScreen = () => {
|
|
|
96
121
|
|
|
97
122
|
<InspectorHeader_1.default />
|
|
98
123
|
|
|
99
|
-
{
|
|
100
|
-
|
|
124
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
125
|
+
{isReady ? (<react_native_1.View style={{ flex: 1 }}>
|
|
126
|
+
{/* ─── Horizontal Scrollable Tab Bar inside Content ─── */}
|
|
127
|
+
{!isDetailActive && <TabBar_1.default />}
|
|
128
|
+
|
|
129
|
+
{/* Persistent List Layer - Never unmounted, preserves 100% native scroll with smooth tab transition */}
|
|
130
|
+
<react_native_1.Animated.View style={[
|
|
131
|
+
{
|
|
132
|
+
flex: 1,
|
|
133
|
+
opacity: tabAnim,
|
|
134
|
+
transform: [
|
|
135
|
+
{
|
|
136
|
+
translateY: tabAnim.interpolate({
|
|
137
|
+
inputRange: [0, 1],
|
|
138
|
+
outputRange: [6, 0],
|
|
139
|
+
}),
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
(isDetailActive || settingsPage !== null) && {
|
|
144
|
+
pointerEvents: 'none',
|
|
145
|
+
},
|
|
146
|
+
]}>
|
|
147
|
+
{activeTab === 'apis' && <NetworkTab_1.default />}
|
|
148
|
+
{activeTab === 'logs' && <ConsoleTab_1.default />}
|
|
149
|
+
{activeTab === 'analytics' && <AnalyticsTab_1.default />}
|
|
150
|
+
{activeTab === 'redux' && <ReduxTab_1.default />}
|
|
151
|
+
{activeTab === 'bundle' && <BundleTab_1.default />}
|
|
152
|
+
{activeTab === 'performance' && <PerformanceTab_1.default />}
|
|
153
|
+
{activeTab === 'crash' && <CrashTab_1.default />}
|
|
154
|
+
</react_native_1.Animated.View>
|
|
101
155
|
|
|
102
|
-
|
|
103
|
-
<react_native_1.View style={
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}}>
|
|
131
|
-
{mountedTabs.bundle && <BundleTab_1.default />}
|
|
132
|
-
</react_native_1.View>
|
|
133
|
-
<react_native_1.View style={{
|
|
134
|
-
flex: 1,
|
|
135
|
-
display: activeTab === 'performance' ? 'flex' : 'none',
|
|
136
|
-
}}>
|
|
137
|
-
{mountedTabs.performance && <PerformanceTab_1.default />}
|
|
138
|
-
</react_native_1.View>
|
|
139
|
-
<react_native_1.View style={{
|
|
140
|
-
flex: 1,
|
|
141
|
-
display: activeTab === 'crash' ? 'flex' : 'none',
|
|
142
|
-
}}>
|
|
143
|
-
{mountedTabs.crash && <CrashTab_1.default />}
|
|
144
|
-
</react_native_1.View>
|
|
145
|
-
</>)) : (<react_native_1.View style={styles_1.default.empty}>
|
|
146
|
-
<react_native_1.ActivityIndicator size="large" color={AppColors_1.AppColors.purple}/>
|
|
147
|
-
<react_native_1.Text style={[styles_1.default.emptySub, { marginTop: 12 }]}>
|
|
148
|
-
Loading logs...
|
|
149
|
-
</react_native_1.Text>
|
|
150
|
-
</react_native_1.View>)}
|
|
156
|
+
{/* Detail View Layer - Rendered on top with smooth slide & spring transition */}
|
|
157
|
+
{isDetailActive && (<react_native_1.Animated.View style={[
|
|
158
|
+
react_native_1.StyleSheet.absoluteFill,
|
|
159
|
+
{
|
|
160
|
+
backgroundColor: AppColors_1.AppColors.contentBg,
|
|
161
|
+
opacity: detailAnim,
|
|
162
|
+
transform: [
|
|
163
|
+
{
|
|
164
|
+
translateX: detailAnim.interpolate({
|
|
165
|
+
inputRange: [0, 1],
|
|
166
|
+
outputRange: [32, 0],
|
|
167
|
+
}),
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
]}>
|
|
172
|
+
{activeTab === 'apis' && selected != null && (<NetworkDetail_1.default />)}
|
|
173
|
+
{activeTab === 'analytics' && selectedEvent != null && (<AnalyticsDetail_1.default event={selectedEvent}/>)}
|
|
174
|
+
{activeTab === 'logs' && selectedLog != null && (<LogDetail_1.default />)}
|
|
175
|
+
{activeTab === 'redux' && <ReduxDetail_1.default />}
|
|
176
|
+
{activeTab === 'crash' && selectedCrash != null && (<CrashDetail_1.default />)}
|
|
177
|
+
</react_native_1.Animated.View>)}
|
|
178
|
+
</react_native_1.View>) : (<react_native_1.View style={styles_1.default.empty}>
|
|
179
|
+
<react_native_1.ActivityIndicator size="large" color={AppColors_1.AppColors.purple}/>
|
|
180
|
+
<react_native_1.Text style={[styles_1.default.emptySub, { marginTop: 12 }]}>
|
|
181
|
+
Loading logs...
|
|
182
|
+
</react_native_1.Text>
|
|
183
|
+
</react_native_1.View>)}
|
|
151
184
|
|
|
152
|
-
|
|
185
|
+
{/* Settings Panel Layer - Rendered on top with smooth slide & spring transition */}
|
|
186
|
+
{settingsPage !== null && (<react_native_1.Animated.View style={[
|
|
153
187
|
react_native_1.StyleSheet.absoluteFill,
|
|
154
188
|
{
|
|
155
189
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
156
|
-
|
|
190
|
+
opacity: settingsAnim,
|
|
191
|
+
transform: [
|
|
192
|
+
{
|
|
193
|
+
translateY: settingsAnim.interpolate({
|
|
194
|
+
inputRange: [0, 1],
|
|
195
|
+
outputRange: [24, 0],
|
|
196
|
+
}),
|
|
197
|
+
},
|
|
198
|
+
],
|
|
157
199
|
},
|
|
158
200
|
]}>
|
|
159
|
-
|
|
160
|
-
|
|
201
|
+
<SettingsPanel_1.default />
|
|
202
|
+
</react_native_1.Animated.View>)}
|
|
203
|
+
</react_native_1.View>
|
|
161
204
|
|
|
162
205
|
{/* Bottom floating toast notification */}
|
|
163
206
|
<Toast_1.default />
|