react-native-inapp-inspector 2.3.7 → 2.3.9

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.
Files changed (56) hide show
  1. package/dist/commonjs/components/Inspector/AnalyticsTab.js +27 -2
  2. package/dist/commonjs/components/Inspector/BundleTab.js +3 -0
  3. package/dist/commonjs/components/Inspector/ConsoleTab.js +24 -1
  4. package/dist/commonjs/components/Inspector/CrashTab.js +30 -1
  5. package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.d.ts +7 -0
  6. package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +111 -0
  7. package/dist/commonjs/components/Inspector/InspectorHeader.js +225 -108
  8. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +1 -1
  9. package/dist/commonjs/components/Inspector/PerformanceTab.js +3 -0
  10. package/dist/commonjs/components/Inspector/ReduxTab.js +24 -1
  11. package/dist/commonjs/components/Inspector/SettingsPanel.js +73 -88
  12. package/dist/commonjs/components/Inspector/StorageTab.js +37 -11
  13. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -0
  14. package/dist/commonjs/components/LogCard.js +33 -3
  15. package/dist/commonjs/constants/version.d.ts +1 -1
  16. package/dist/commonjs/constants/version.js +1 -1
  17. package/dist/commonjs/customHooks/networkLogger.js +2 -0
  18. package/dist/commonjs/helpers/telemetry.js +34 -0
  19. package/dist/commonjs/index.js +3 -0
  20. package/dist/esm/components/Inspector/AnalyticsTab.js +29 -4
  21. package/dist/esm/components/Inspector/BundleTab.js +3 -0
  22. package/dist/esm/components/Inspector/ConsoleTab.js +26 -3
  23. package/dist/esm/components/Inspector/CrashTab.js +32 -3
  24. package/dist/esm/components/Inspector/FeatureUnderDevNotice.d.ts +7 -0
  25. package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +74 -0
  26. package/dist/esm/components/Inspector/InspectorHeader.js +226 -109
  27. package/dist/esm/components/Inspector/NpmUpdateToast.js +1 -1
  28. package/dist/esm/components/Inspector/PerformanceTab.js +3 -0
  29. package/dist/esm/components/Inspector/ReduxTab.js +26 -3
  30. package/dist/esm/components/Inspector/SettingsPanel.js +73 -88
  31. package/dist/esm/components/Inspector/StorageTab.js +39 -13
  32. package/dist/esm/components/Inspector/UpdateAvailableModal.js +2 -0
  33. package/dist/esm/components/LogCard.js +34 -4
  34. package/dist/esm/constants/version.d.ts +1 -1
  35. package/dist/esm/constants/version.js +1 -1
  36. package/dist/esm/customHooks/networkLogger.js +2 -0
  37. package/dist/esm/helpers/telemetry.js +34 -0
  38. package/dist/esm/index.js +3 -0
  39. package/package.json +1 -1
  40. package/src/components/Inspector/AnalyticsTab.tsx +71 -43
  41. package/src/components/Inspector/BundleTab.tsx +3 -0
  42. package/src/components/Inspector/ConsoleTab.tsx +28 -1
  43. package/src/components/Inspector/CrashTab.tsx +45 -14
  44. package/src/components/Inspector/FeatureUnderDevNotice.tsx +94 -0
  45. package/src/components/Inspector/InspectorHeader.tsx +257 -115
  46. package/src/components/Inspector/NpmUpdateToast.tsx +1 -1
  47. package/src/components/Inspector/PerformanceTab.tsx +3 -0
  48. package/src/components/Inspector/ReduxTab.tsx +28 -1
  49. package/src/components/Inspector/SettingsPanel.tsx +93 -132
  50. package/src/components/Inspector/StorageTab.tsx +56 -27
  51. package/src/components/Inspector/UpdateAvailableModal.tsx +2 -0
  52. package/src/components/LogCard.tsx +41 -4
  53. package/src/constants/version.ts +1 -1
  54. package/src/customHooks/networkLogger.ts +2 -0
  55. package/src/helpers/telemetry.ts +36 -0
  56. package/src/index.tsx +5 -0
@@ -1,4 +1,4 @@
1
- import React, {useCallback, useMemo} from 'react';
1
+ import React, {useCallback, useMemo, useRef} from 'react';
2
2
  import {
3
3
  FlatList,
4
4
  Pressable,
@@ -30,6 +30,7 @@ import {
30
30
  ErrorCircleIcon,
31
31
  AnalyticsIcon,
32
32
  HeaderPauseIcon,
33
+ ChevronIcon,
33
34
  } from '../NetworkIcons';
34
35
 
35
36
  const ConsoleTab = React.memo(() => {
@@ -49,6 +50,8 @@ const ConsoleTab = React.memo(() => {
49
50
  setIsConsolePaused,
50
51
  } = useInspector();
51
52
 
53
+ const listRef = useRef<FlatList>(null);
54
+
52
55
  const renderItem = useCallback(
53
56
  ({item, index}: {item: any; index: number}) => (
54
57
  <AnimatedEntrance index={index} distance={8}>
@@ -668,6 +671,7 @@ const ConsoleTab = React.memo(() => {
668
671
  </View>
669
672
 
670
673
  <FlatList
674
+ ref={listRef}
671
675
  data={filteredConsoleLogs}
672
676
  keyExtractor={keyExtractor}
673
677
  ListHeaderComponent={listHeader}
@@ -705,6 +709,29 @@ const ConsoleTab = React.memo(() => {
705
709
  ]}
706
710
  keyboardShouldPersistTaps="handled"
707
711
  />
712
+
713
+ <TouchableScale
714
+ onPress={() => {
715
+ try {
716
+ listRef.current?.scrollToOffset({
717
+ offset: 0,
718
+ animated: true,
719
+ });
720
+ } catch {
721
+ try {
722
+ listRef.current?.scrollToIndex({
723
+ index: 0,
724
+ animated: true,
725
+ });
726
+ } catch {}
727
+ }
728
+ }}
729
+ hitSlop={12}
730
+ style={styles.scrollTopBtn}>
731
+ <View style={{transform: [{rotate: '180deg'}]}}>
732
+ <ChevronIcon color={AppColors.white} size={18} />
733
+ </View>
734
+ </TouchableScale>
708
735
  </View>
709
736
  );
710
737
  });
@@ -1,4 +1,4 @@
1
- import React, {useCallback, useEffect, useMemo, useState} from 'react';
1
+ import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
2
2
  import {
3
3
  Alert,
4
4
  FlatList,
@@ -18,6 +18,7 @@ import TouchableScale from '../TouchableScale';
18
18
  import AnimatedEntrance from '../AnimatedEntrance';
19
19
  import EmptyState from '../EmptyState';
20
20
  import EndOfListFooter from '../EndOfListFooter';
21
+ import FeatureUnderDevNotice from './FeatureUnderDevNotice';
21
22
  import HighlightText from '../HighlightText';
22
23
  import JsonViewer from '../JsonViewer';
23
24
  import styles from '../../styles';
@@ -66,6 +67,7 @@ import {
66
67
  RepeatIcon,
67
68
  CodeBracketsIcon,
68
69
  FilterIcon,
70
+ ChevronIcon,
69
71
  } from '../NetworkIcons';
70
72
 
71
73
  const getRelativeTime = (timestamp: number): string => {
@@ -88,6 +90,7 @@ const CrashTab = React.memo(() => {
88
90
  const {t} = useTranslation();
89
91
  const {crashRecords, selectedCrash, setSelectedCrash} = useInspector();
90
92
 
93
+ const listRef = useRef<FlatList>(null);
91
94
  const [searchQuery, setSearchQuery] = useState('');
92
95
  const [filterType, setFilterType] = useState<CrashFilterType>('all');
93
96
  const [crashFilters, setCrashFilters] = useState<CrashFilters>(
@@ -500,6 +503,8 @@ const CrashTab = React.memo(() => {
500
503
  </TouchableScale>
501
504
  </View>
502
505
 
506
+ <FeatureUnderDevNotice featureName="Crash & Exception Sentinel" />
507
+
503
508
  {/* ─── Filter Chips ─── */}
504
509
  <ScrollView
505
510
  horizontal
@@ -579,19 +584,45 @@ const CrashTab = React.memo(() => {
579
584
  )}
580
585
  </ScrollView>
581
586
  ) : (
582
- <FlatList
583
- data={filteredList}
584
- keyExtractor={item => item.id}
585
- renderItem={renderCard}
586
- initialNumToRender={12}
587
- maxToRenderPerBatch={8}
588
- windowSize={5}
589
- removeClippedSubviews={true}
590
- renderToHardwareTextureAndroid={true}
591
- contentContainerStyle={localStyles.listContent}
592
- showsVerticalScrollIndicator={false}
593
- ListFooterComponent={<EndOfListFooter />}
594
- />
587
+ <>
588
+ <FlatList
589
+ ref={listRef}
590
+ data={filteredList}
591
+ keyExtractor={item => item.id}
592
+ renderItem={renderCard}
593
+ initialNumToRender={12}
594
+ maxToRenderPerBatch={8}
595
+ windowSize={5}
596
+ removeClippedSubviews={true}
597
+ renderToHardwareTextureAndroid={true}
598
+ contentContainerStyle={localStyles.listContent}
599
+ showsVerticalScrollIndicator={false}
600
+ ListFooterComponent={<EndOfListFooter />}
601
+ />
602
+
603
+ <TouchableScale
604
+ onPress={() => {
605
+ try {
606
+ listRef.current?.scrollToOffset({
607
+ offset: 0,
608
+ animated: true,
609
+ });
610
+ } catch {
611
+ try {
612
+ listRef.current?.scrollToIndex({
613
+ index: 0,
614
+ animated: true,
615
+ });
616
+ } catch {}
617
+ }
618
+ }}
619
+ hitSlop={12}
620
+ style={styles.scrollTopBtn}>
621
+ <View style={{transform: [{rotate: '180deg'}]}}>
622
+ <ChevronIcon color={AppColors.white} size={18} />
623
+ </View>
624
+ </TouchableScale>
625
+ </>
595
626
  )}
596
627
 
597
628
  {/* Filter Modal */}
@@ -0,0 +1,94 @@
1
+ import React, {useState} from 'react';
2
+ import {StyleSheet, Text, View, Pressable} from 'react-native';
3
+ import {AppColors} from '../../styles/AppColors';
4
+ import {AppFonts} from '../../styles/AppFonts';
5
+ import {WarningTriangleIcon, SparkleIcon, ClearIcon} from '../NetworkIcons';
6
+
7
+ interface FeatureUnderDevNoticeProps {
8
+ featureName?: string;
9
+ compact?: boolean;
10
+ }
11
+
12
+ export const FeatureUnderDevNotice: React.FC<FeatureUnderDevNoticeProps> = ({
13
+ featureName,
14
+ compact = false,
15
+ }) => {
16
+ const [isDismissed, setIsDismissed] = useState(false);
17
+
18
+ if (isDismissed) return null;
19
+
20
+ return (
21
+ <View style={[styles.container, compact && styles.containerCompact]}>
22
+ <View style={styles.contentRow}>
23
+ <View style={styles.badgeWrap}>
24
+ <WarningTriangleIcon color={AppColors.warningIconGold} size={12} />
25
+ <Text style={styles.badgeText}>IN ACTIVE DEVELOPMENT</Text>
26
+ </View>
27
+
28
+ <Pressable
29
+ onPress={() => setIsDismissed(true)}
30
+ hitSlop={8}
31
+ style={styles.dismissBtn}
32
+ accessible={true}
33
+ accessibilityRole="button"
34
+ accessibilityLabel="Dismiss notice">
35
+ <ClearIcon color={AppColors.grayTextWeak} size={11} />
36
+ </Pressable>
37
+ </View>
38
+
39
+ <Text style={styles.messageText}>
40
+ {featureName ? `${featureName} is` : 'This module is'} currently in active
41
+ development. Results and metrics may vary in accuracy. We are continuously
42
+ improving this feature for upcoming releases.
43
+ </Text>
44
+ </View>
45
+ );
46
+ };
47
+
48
+ const styles = StyleSheet.create({
49
+ container: {
50
+ marginHorizontal: 12,
51
+ marginTop: 8,
52
+ marginBottom: 6,
53
+ paddingHorizontal: 12,
54
+ paddingVertical: 9,
55
+ borderRadius: 8,
56
+ backgroundColor: `${AppColors.warningIconGold}12`,
57
+ borderWidth: 1,
58
+ borderColor: `${AppColors.warningIconGold}30`,
59
+ },
60
+ containerCompact: {
61
+ marginTop: 4,
62
+ marginBottom: 4,
63
+ paddingVertical: 7,
64
+ paddingHorizontal: 10,
65
+ },
66
+ contentRow: {
67
+ flexDirection: 'row',
68
+ alignItems: 'center',
69
+ justifyContent: 'space-between',
70
+ marginBottom: 4,
71
+ },
72
+ badgeWrap: {
73
+ flexDirection: 'row',
74
+ alignItems: 'center',
75
+ gap: 4.5,
76
+ },
77
+ badgeText: {
78
+ fontFamily: AppFonts.interBold,
79
+ fontSize: 9.5,
80
+ color: AppColors.warningIconGold,
81
+ letterSpacing: 0.4,
82
+ },
83
+ dismissBtn: {
84
+ padding: 2,
85
+ },
86
+ messageText: {
87
+ fontFamily: AppFonts.interRegular,
88
+ fontSize: 10.5,
89
+ color: AppColors.grayText,
90
+ lineHeight: 15,
91
+ },
92
+ });
93
+
94
+ export default FeatureUnderDevNotice;