react-native-inapp-inspector 1.0.15 → 1.0.16

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/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useMemo, useRef, useState, useCallback } from 'react';
2
- import { Alert, Animated, StyleSheet, FlatList, Modal, Platform, Pressable, ScrollView, Text, TextInput, View, Linking, Image, InteractionManager, ActivityIndicator, StatusBar, TouchableOpacity, LogBox, } from 'react-native';
2
+ import { Alert, Animated, StyleSheet, FlatList, LayoutAnimation, Modal, Platform, Pressable, ScrollView, Text, TextInput, View, Linking, Image, InteractionManager, ActivityIndicator, StatusBar, TouchableOpacity, UIManager, LogBox, } from 'react-native';
3
3
  import Svg, { Circle, Path } from 'react-native-svg';
4
4
  import LinearGradient from 'react-native-linear-gradient';
5
5
  import { useNavigationState, NavigationContext } from '@react-navigation/native';
@@ -20,6 +20,7 @@ import SourcePageCard from './components/SourcePageCard';
20
20
  import { ConsoleLogCard } from './components/ConsoleLogCard';
21
21
  import HighlightText from './components/HighlightText';
22
22
  import CodeSnippet from './components/CodeSnippet';
23
+ import AnimatedEntrance from './components/AnimatedEntrance';
23
24
  // Helpers
24
25
  import { formatDateTime, getStatusColor, getNavigationInfo, deduplicateLogs, getDomainColor, formatDisplayUrl, getFetchCommand, getCurlCommand, getSize, } from './helpers';
25
26
  // Assets
@@ -107,6 +108,9 @@ const NavigationTracker = ({ onStateChange }) => {
107
108
  }, [navState, onStateChange]);
108
109
  return null;
109
110
  };
111
+ const animateNextLayout = () => {
112
+ LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
113
+ };
110
114
  const NetworkInspector = ({ enabled = true, }) => {
111
115
  const [isDark, setIsDark] = useState(false);
112
116
  const [reduxState, setReduxState] = useState(null);
@@ -235,12 +239,18 @@ const NetworkInspector = ({ enabled = true, }) => {
235
239
  const nextVal = !prev[key];
236
240
  const newVisibility = { ...prev, [key]: nextVal };
237
241
  if (!nextVal && activeTab === key) {
242
+ animateNextLayout();
238
243
  setActiveTab('apis');
239
244
  }
240
245
  return newVisibility;
241
246
  });
242
247
  };
248
+ const switchActiveTab = useCallback((key) => {
249
+ animateNextLayout();
250
+ setActiveTab(key);
251
+ }, []);
243
252
  const navigateFromDashboard = (key) => {
253
+ animateNextLayout();
244
254
  setTabVisibility(prev => ({ ...prev, [key]: true }));
245
255
  setActiveTab(key);
246
256
  };
@@ -313,6 +323,11 @@ const NetworkInspector = ({ enabled = true, }) => {
313
323
  const badgeAnim = useRef(new Animated.Value(1)).current;
314
324
  const activePulseAnim = useRef(new Animated.Value(0.4)).current;
315
325
  const unreadPulseAnim = useRef(new Animated.Value(1)).current;
326
+ useEffect(() => {
327
+ if (Platform.OS === 'android') {
328
+ UIManager.setLayoutAnimationEnabledExperimental?.(true);
329
+ }
330
+ }, []);
316
331
  useEffect(() => {
317
332
  const loop = Animated.loop(Animated.sequence([
318
333
  Animated.timing(pulseAnim, {
@@ -772,6 +787,7 @@ const NetworkInspector = ({ enabled = true, }) => {
772
787
  return Object.entries(freq).sort((a, b) => b[1] - a[1]);
773
788
  }, [filteredAnalyticsEvents]);
774
789
  function closeModal() {
790
+ animateNextLayout();
775
791
  setVisible(false);
776
792
  setSelected(null);
777
793
  setSelectedEvent(null);
@@ -889,12 +905,14 @@ const NetworkInspector = ({ enabled = true, }) => {
889
905
  return next;
890
906
  });
891
907
  }, []);
892
- const renderItem = useCallback(({ item }) => {
908
+ const renderItem = useCallback(({ item, index }) => {
893
909
  if (item.type === 'header') {
894
- return (<DomainHeader pageName={item.pageName} color={item.color} stats={item.stats} activeFilters={item.activeFilters} onToggleFilter={toggleSectionFilter} isCollapsed={item.isCollapsed} onToggleCollapse={toggleSectionCollapse} isFirst={item.isFirst} timestamp={item.timestamp}/>);
910
+ return (<AnimatedEntrance index={index} distance={8}>
911
+ <DomainHeader pageName={item.pageName} color={item.color} stats={item.stats} activeFilters={item.activeFilters} onToggleFilter={toggleSectionFilter} isCollapsed={item.isCollapsed} onToggleCollapse={toggleSectionCollapse} isFirst={item.isFirst} timestamp={item.timestamp}/>
912
+ </AnimatedEntrance>);
895
913
  }
896
914
  const { log, isLast, color } = item;
897
- return (<View style={styles.treeNodeRow}>
915
+ return (<AnimatedEntrance index={index} distance={8} style={styles.treeNodeRow}>
898
916
  <View style={styles.treeLines}>
899
917
  <View style={[
900
918
  styles.modernTreeLine,
@@ -904,9 +922,12 @@ const NetworkInspector = ({ enabled = true, }) => {
904
922
  {!isLast && (<View style={[styles.modernTreeBranch, { borderColor: color }]}/>)}
905
923
  </View>
906
924
  <View style={styles.treeCardWrapper}>
907
- <LogCard item={log} isSelected={selectedLogs.has(log.id)} onToggleSelect={toggleSelect} onPress={() => setSelected(log)} timelineMinStart={minStart} timelineTotalRange={totalRange} isNew={newLogIds.has(log.id)} searchStr={search}/>
925
+ <LogCard item={log} isSelected={selectedLogs.has(log.id)} onToggleSelect={toggleSelect} onPress={() => {
926
+ animateNextLayout();
927
+ setSelected(log);
928
+ }} timelineMinStart={minStart} timelineTotalRange={totalRange} isNew={newLogIds.has(log.id)} searchStr={search}/>
908
929
  </View>
909
- </View>);
930
+ </AnimatedEntrance>);
910
931
  }, [
911
932
  minStart,
912
933
  totalRange,
@@ -932,8 +953,9 @@ const NetworkInspector = ({ enabled = true, }) => {
932
953
  <LinearGradient colors={[AppColors.purple, '#6B4EFF']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }} style={styles.headerGradient}>
933
954
  <View style={[styles.header, { paddingHorizontal: 16, gap: 12 }]}>
934
955
  <TouchableScale onPress={() => {
956
+ animateNextLayout();
935
957
  setSettingsPage(null);
936
- setActiveTab('apis');
958
+ switchActiveTab('apis');
937
959
  }} hitSlop={12} style={{
938
960
  padding: 8,
939
961
  borderRadius: 10,
@@ -1114,7 +1136,10 @@ const NetworkInspector = ({ enabled = true, }) => {
1114
1136
  </View>)}
1115
1137
 
1116
1138
  {/* Settings gear icon next to label */}
1117
- <TouchableScale onPress={() => setSettingsPage(tab.key)} hitSlop={8} style={{
1139
+ <TouchableScale onPress={() => {
1140
+ animateNextLayout();
1141
+ setSettingsPage(tab.key);
1142
+ }} hitSlop={8} style={{
1118
1143
  marginLeft: 4,
1119
1144
  padding: 4,
1120
1145
  borderRadius: 6,
@@ -1249,7 +1274,10 @@ const NetworkInspector = ({ enabled = true, }) => {
1249
1274
  </ScrollView>
1250
1275
  </View>);
1251
1276
  }
1252
- const goBackToMain = () => setSettingsPage('main');
1277
+ const goBackToMain = () => {
1278
+ animateNextLayout();
1279
+ setSettingsPage('main');
1280
+ };
1253
1281
  const renderSubHeader = (title, icon, rightInfo) => (<View style={{
1254
1282
  flexDirection: 'row',
1255
1283
  alignItems: 'center',
@@ -1846,7 +1874,7 @@ const NetworkInspector = ({ enabled = true, }) => {
1846
1874
  const webviewTotal = webViewNavHistory.length;
1847
1875
  return (<View style={styles.dashboardContainer}>
1848
1876
  {/* Module 1: APIs */}
1849
- {tabVisibility.apis && (<TouchableScale style={styles.dashboardModuleCard} onPress={() => setActiveTab('apis')}>
1877
+ {tabVisibility.apis && (<TouchableScale style={styles.dashboardModuleCard} onPress={() => switchActiveTab('apis')}>
1850
1878
  <View style={styles.dashboardModuleHeader}>
1851
1879
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
1852
1880
  <SignalIcon color={AppColors.purple} size={18}/>
@@ -1887,7 +1915,7 @@ const NetworkInspector = ({ enabled = true, }) => {
1887
1915
  </TouchableScale>)}
1888
1916
 
1889
1917
  {/* Module 2: Logs */}
1890
- {tabVisibility.logs && (<TouchableScale style={styles.dashboardModuleCard} onPress={() => setActiveTab('logs')}>
1918
+ {tabVisibility.logs && (<TouchableScale style={styles.dashboardModuleCard} onPress={() => switchActiveTab('logs')}>
1891
1919
  <View style={styles.dashboardModuleHeader}>
1892
1920
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
1893
1921
  <TerminalIcon color="#0D9488" size={18}/>
@@ -1928,7 +1956,7 @@ const NetworkInspector = ({ enabled = true, }) => {
1928
1956
  </TouchableScale>)}
1929
1957
 
1930
1958
  {/* Module 3: Analytics */}
1931
- {tabVisibility.analytics && (<TouchableScale style={styles.dashboardModuleCard} onPress={() => setActiveTab('analytics')}>
1959
+ {tabVisibility.analytics && (<TouchableScale style={styles.dashboardModuleCard} onPress={() => switchActiveTab('analytics')}>
1932
1960
  <View style={styles.dashboardModuleHeader}>
1933
1961
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
1934
1962
  <AnalyticsIcon color="#EA580C" size={18}/>
@@ -1965,7 +1993,7 @@ const NetworkInspector = ({ enabled = true, }) => {
1965
1993
  </TouchableScale>)}
1966
1994
 
1967
1995
  {/* Module 4: WebView */}
1968
- {tabVisibility.webview && (<TouchableScale style={styles.dashboardModuleCard} onPress={() => setActiveTab('webview')}>
1996
+ {tabVisibility.webview && (<TouchableScale style={styles.dashboardModuleCard} onPress={() => switchActiveTab('webview')}>
1969
1997
  <View style={styles.dashboardModuleHeader}>
1970
1998
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
1971
1999
  <GlobeIcon color="#2563EB" size={18}/>
@@ -1998,7 +2026,7 @@ const NetworkInspector = ({ enabled = true, }) => {
1998
2026
  </TouchableScale>)}
1999
2027
 
2000
2028
  {/* Module 5: Redux Store */}
2001
- {tabVisibility.redux && (<TouchableScale style={styles.dashboardModuleCard} onPress={() => setActiveTab('redux')}>
2029
+ {tabVisibility.redux && (<TouchableScale style={styles.dashboardModuleCard} onPress={() => switchActiveTab('redux')}>
2002
2030
  <View style={styles.dashboardModuleHeader}>
2003
2031
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
2004
2032
  <TerminalIcon color={AppColors.purple} size={18}/>
@@ -2149,7 +2177,10 @@ const NetworkInspector = ({ enabled = true, }) => {
2149
2177
  borderWidth: 1,
2150
2178
  borderColor: AppColors.dividerColor,
2151
2179
  }}>
2152
- <TouchableOpacity onPress={() => setReduxActiveSubTab('timeline')} style={{
2180
+ <TouchableOpacity onPress={() => {
2181
+ animateNextLayout();
2182
+ setReduxActiveSubTab('timeline');
2183
+ }} style={{
2153
2184
  flex: 1,
2154
2185
  paddingVertical: 6,
2155
2186
  alignItems: 'center',
@@ -2169,7 +2200,10 @@ const NetworkInspector = ({ enabled = true, }) => {
2169
2200
  ⚡ Action Timeline
2170
2201
  </Text>
2171
2202
  </TouchableOpacity>
2172
- <TouchableOpacity onPress={() => setReduxActiveSubTab('tree')} style={{
2203
+ <TouchableOpacity onPress={() => {
2204
+ animateNextLayout();
2205
+ setReduxActiveSubTab('tree');
2206
+ }} style={{
2173
2207
  flex: 1,
2174
2208
  paddingVertical: 6,
2175
2209
  alignItems: 'center',
@@ -2265,6 +2299,7 @@ const NetworkInspector = ({ enabled = true, }) => {
2265
2299
  ]}>
2266
2300
  <TouchableScale onPress={() => {
2267
2301
  requestAnimationFrame(() => {
2302
+ animateNextLayout();
2268
2303
  setSelected(null);
2269
2304
  setSelectedEvent(null);
2270
2305
  });
@@ -2482,7 +2517,7 @@ const NetworkInspector = ({ enabled = true, }) => {
2482
2517
  consoleLogs.length > lastReadLogsCount;
2483
2518
  return (<TouchableScale key={tab.key} onPress={() => {
2484
2519
  requestAnimationFrame(() => {
2485
- setActiveTab(tab.key);
2520
+ switchActiveTab(tab.key);
2486
2521
  });
2487
2522
  }} style={[
2488
2523
  styles.contentTabButton,
@@ -2581,7 +2616,10 @@ const NetworkInspector = ({ enabled = true, }) => {
2581
2616
  shadowOffset: { width: 0, height: 1 },
2582
2617
  elevation: 2,
2583
2618
  },
2584
- ]} onPress={() => setAnalyticsSubTab('ga_events')}>
2619
+ ]} onPress={() => {
2620
+ animateNextLayout();
2621
+ setAnalyticsSubTab('ga_events');
2622
+ }}>
2585
2623
  <Text style={[
2586
2624
  {
2587
2625
  fontFamily: AppFonts.interMedium,
@@ -2615,7 +2653,10 @@ const NetworkInspector = ({ enabled = true, }) => {
2615
2653
  shadowOffset: { width: 0, height: 1 },
2616
2654
  elevation: 2,
2617
2655
  },
2618
- ]} onPress={() => setAnalyticsSubTab('top_events')}>
2656
+ ]} onPress={() => {
2657
+ animateNextLayout();
2658
+ setAnalyticsSubTab('top_events');
2659
+ }}>
2619
2660
  <Text style={[
2620
2661
  {
2621
2662
  fontFamily: AppFonts.interMedium,
@@ -2638,10 +2679,10 @@ const NetworkInspector = ({ enabled = true, }) => {
2638
2679
  </ScrollView>) : activeTab === 'analytics' ? (selectedEvent != null ? (<AnalyticsDetail event={selectedEvent}/>) : analyticsSubTab === 'top_events' ? (<FlatList data={topEventsArray} keyExtractor={item => item[0]} contentContainerStyle={[
2639
2680
  styles.listContent,
2640
2681
  { paddingHorizontal: 16, paddingTop: 16 },
2641
- ]} renderItem={({ item: [name, count] }) => {
2682
+ ]} renderItem={({ item: [name, count], index }) => {
2642
2683
  const maxCount = topEventsArray[0]?.[1] || 1;
2643
2684
  const color = getEventColor(name);
2644
- return (<View style={[
2685
+ return (<AnimatedEntrance index={index} distance={8} style={[
2645
2686
  styles.analyticsTopEventsCard,
2646
2687
  { marginBottom: 12, paddingVertical: 16 },
2647
2688
  ]}>
@@ -2677,7 +2718,7 @@ const NetworkInspector = ({ enabled = true, }) => {
2677
2718
  {count}
2678
2719
  </Text>
2679
2720
  </View>
2680
- </View>);
2721
+ </AnimatedEntrance>);
2681
2722
  }} ListEmptyComponent={<View style={styles.emptyContainer}>
2682
2723
  <View style={styles.emptyIconWrap}>
2683
2724
  <EmptyRadarIcon color={AppColors.purple} size={32}/>
@@ -2694,7 +2735,11 @@ const NetworkInspector = ({ enabled = true, }) => {
2694
2735
  ? Math.floor(next.timestamp / 60000)
2695
2736
  : -1;
2696
2737
  const showTimestamp = index === 0 || thisMin !== nextMin;
2697
- return (<AnalyticsEventCard event={item} onPress={() => setSelectedEvent(item)} isNew={newEventIds.has(item.id)} searchStr={analyticsSearch} isFirst={index === 0} isLast={index === filteredAnalyticsEvents.length - 1} msSincePrev={msSincePrev} showTimestamp={showTimestamp} computedScreenName={(() => {
2738
+ return (<AnimatedEntrance index={index} distance={8}>
2739
+ <AnalyticsEventCard event={item} onPress={() => {
2740
+ animateNextLayout();
2741
+ setSelectedEvent(item);
2742
+ }} isNew={newEventIds.has(item.id)} searchStr={analyticsSearch} isFirst={index === 0} isLast={index === filteredAnalyticsEvents.length - 1} msSincePrev={msSincePrev} showTimestamp={showTimestamp} computedScreenName={(() => {
2698
2743
  let screenName = item.screenName ||
2699
2744
  item.screenClass ||
2700
2745
  item.pageTitle ||
@@ -2712,7 +2757,8 @@ const NetworkInspector = ({ enabled = true, }) => {
2712
2757
  }
2713
2758
  }
2714
2759
  return screenName;
2715
- })()}/>);
2760
+ })()}/>
2761
+ </AnimatedEntrance>);
2716
2762
  }} initialNumToRender={20} maxToRenderPerBatch={20} windowSize={5} removeClippedSubviews ListEmptyComponent={<View style={styles.emptyContainer}>
2717
2763
  <View style={styles.emptyIconWrap}>
2718
2764
  <EmptyRadarIcon color={AppColors.purple} size={32}/>
@@ -3143,7 +3189,9 @@ const NetworkInspector = ({ enabled = true, }) => {
3143
3189
  {filtered}/{total}) logs is showing
3144
3190
  </Text>);
3145
3191
  }
3146
- })()} renderItem={({ item }) => (<ConsoleLogCard item={item} searchStr={logSearch}/>)} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState isSearch={logSearch.length > 0 || logFilters.size > 0}/>} contentContainerStyle={[
3192
+ })()} renderItem={({ item, index }) => (<AnimatedEntrance index={index} distance={8}>
3193
+ <ConsoleLogCard item={item} searchStr={logSearch}/>
3194
+ </AnimatedEntrance>)} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState isSearch={logSearch.length > 0 || logFilters.size > 0}/>} contentContainerStyle={[
3147
3195
  styles.listContent,
3148
3196
  filteredConsoleLogs.length === 0 && { flexGrow: 1 },
3149
3197
  ]} keyboardShouldPersistTaps="handled"/>
@@ -3263,7 +3311,10 @@ const NetworkInspector = ({ enabled = true, }) => {
3263
3311
  backgroundColor: AppColors.purple,
3264
3312
  borderColor: AppColors.purple,
3265
3313
  },
3266
- ]} onPress={() => setWebViewSubTab('preview')}>
3314
+ ]} onPress={() => {
3315
+ animateNextLayout();
3316
+ setWebViewSubTab('preview');
3317
+ }}>
3267
3318
  <EyeIcon color={webViewSubTab === 'preview'
3268
3319
  ? '#FFFFFF'
3269
3320
  : AppColors.grayTextWeak} size={13}/>
@@ -3297,7 +3348,10 @@ const NetworkInspector = ({ enabled = true, }) => {
3297
3348
  backgroundColor: AppColors.purple,
3298
3349
  borderColor: AppColors.purple,
3299
3350
  },
3300
- ]} onPress={() => setWebViewSubTab('html')}>
3351
+ ]} onPress={() => {
3352
+ animateNextLayout();
3353
+ setWebViewSubTab('html');
3354
+ }}>
3301
3355
  <HtmlIcon color={webViewSubTab === 'html'
3302
3356
  ? '#FFFFFF'
3303
3357
  : AppColors.grayTextWeak} size={13}/>
@@ -3331,7 +3385,10 @@ const NetworkInspector = ({ enabled = true, }) => {
3331
3385
  backgroundColor: AppColors.purple,
3332
3386
  borderColor: AppColors.purple,
3333
3387
  },
3334
- ]} onPress={() => setWebViewSubTab('navigation')}>
3388
+ ]} onPress={() => {
3389
+ animateNextLayout();
3390
+ setWebViewSubTab('navigation');
3391
+ }}>
3335
3392
  <ClockIcon color={webViewSubTab === 'navigation'
3336
3393
  ? '#FFFFFF'
3337
3394
  : AppColors.grayTextWeak} size={13}/>
@@ -3365,7 +3422,10 @@ const NetworkInspector = ({ enabled = true, }) => {
3365
3422
  backgroundColor: AppColors.purple,
3366
3423
  borderColor: AppColors.purple,
3367
3424
  },
3368
- ]} onPress={() => setWebViewSubTab('console')}>
3425
+ ]} onPress={() => {
3426
+ animateNextLayout();
3427
+ setWebViewSubTab('console');
3428
+ }}>
3369
3429
  <TerminalIcon color={webViewSubTab === 'console'
3370
3430
  ? '#FFFFFF'
3371
3431
  : AppColors.grayTextWeak} size={13}/>
@@ -3454,7 +3514,10 @@ const NetworkInspector = ({ enabled = true, }) => {
3454
3514
  : tab === 'css'
3455
3515
  ? '#2563EB' // Blue
3456
3516
  : '#D97706'; // Dark Yellow/Amber
3457
- return (<Pressable key={tab} onPress={() => setHtmlSubTab(tab)} style={{
3517
+ return (<Pressable key={tab} onPress={() => {
3518
+ animateNextLayout();
3519
+ setHtmlSubTab(tab);
3520
+ }} style={{
3458
3521
  paddingVertical: 8,
3459
3522
  paddingHorizontal: 4,
3460
3523
  borderBottomWidth: 2,
@@ -3549,7 +3612,7 @@ const NetworkInspector = ({ enabled = true, }) => {
3549
3612
  const d = new Date(ts);
3550
3613
  return `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
3551
3614
  };
3552
- return (<View style={{
3615
+ return (<AnimatedEntrance index={index} distance={8} style={{
3553
3616
  marginHorizontal: 16,
3554
3617
  marginVertical: 6,
3555
3618
  borderRadius: 12,
@@ -3642,7 +3705,7 @@ const NetworkInspector = ({ enabled = true, }) => {
3642
3705
  </View>
3643
3706
  </View>
3644
3707
  <CopyButton value={item.url} label="URL"/>
3645
- </View>);
3708
+ </AnimatedEntrance>);
3646
3709
  }} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState isSearch={webViewSearch.length > 0}/>} contentContainerStyle={[
3647
3710
  styles.listContent,
3648
3711
  filteredNavHistory.length === 0 && {
@@ -3687,7 +3750,7 @@ const NetworkInspector = ({ enabled = true, }) => {
3687
3750
  : AppColors.primaryLight;
3688
3751
  const d = new Date(item.timestamp);
3689
3752
  const timeStr = `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
3690
- return (<View style={{
3753
+ return (<AnimatedEntrance index={item.id} distance={8} style={{
3691
3754
  marginHorizontal: 12,
3692
3755
  marginVertical: 3,
3693
3756
  borderRadius: 8,
@@ -3736,7 +3799,7 @@ const NetworkInspector = ({ enabled = true, }) => {
3736
3799
  {item.message}
3737
3800
  </Text>
3738
3801
  </View>
3739
- </View>);
3802
+ </AnimatedEntrance>);
3740
3803
  }} initialNumToRender={20} maxToRenderPerBatch={20} windowSize={7} contentContainerStyle={[
3741
3804
  styles.listContent,
3742
3805
  webViewLogs.length === 0 && { flexGrow: 1 },
@@ -4011,7 +4074,10 @@ const NetworkInspector = ({ enabled = true, }) => {
4011
4074
  return <RequestIcon color={iconColor}/>;
4012
4075
  return <ResponseIcon color={iconColor}/>;
4013
4076
  };
4014
- return (<TouchableOpacity key={tab} onPress={() => setApiDetailActiveTab(tab)} style={{
4077
+ return (<TouchableOpacity key={tab} onPress={() => {
4078
+ animateNextLayout();
4079
+ setApiDetailActiveTab(tab);
4080
+ }} style={{
4015
4081
  flex: 1,
4016
4082
  paddingVertical: 6,
4017
4083
  flexDirection: 'row',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-inapp-inspector",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "A self-contained network, console, analytics, and webview inspector for React Native applications.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,7 +30,8 @@
30
30
  "scripts": {
31
31
  "build": "tsc && tsc -p tsconfig.esm.json",
32
32
  "watch": "tsc -w",
33
- "prepack": "npm run build"
33
+ "prepack": "npm run build",
34
+ "publish": "node scripts/publish.js"
34
35
  },
35
36
  "keywords": [
36
37
  "react-native",