react-native-inapp-inspector 1.1.27 → 1.1.29

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 (100) hide show
  1. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.java +29 -46
  2. package/dist/commonjs/components/AppHeaderLogo.js +12 -15
  3. package/dist/commonjs/components/ConsoleLogCard.js +31 -7
  4. package/dist/commonjs/components/CopyButton.js +15 -1
  5. package/dist/commonjs/components/DomainHeader.js +56 -28
  6. package/dist/commonjs/components/ErrorBoundary.d.ts +1 -1
  7. package/dist/commonjs/components/ErrorBoundary.js +530 -100
  8. package/dist/commonjs/components/HighlightText.js +7 -1
  9. package/dist/commonjs/components/Inspector/AnalyticsTab.js +190 -126
  10. package/dist/commonjs/components/Inspector/BundleTab.d.ts +1 -0
  11. package/dist/commonjs/components/Inspector/BundleTab.js +145 -21
  12. package/dist/commonjs/components/Inspector/CrashTab.js +0 -8
  13. package/dist/commonjs/components/Inspector/InspectorHeader.js +17 -3
  14. package/dist/commonjs/components/Inspector/LogDetail.js +8 -5
  15. package/dist/commonjs/components/Inspector/MainScreen.js +4 -0
  16. package/dist/commonjs/components/Inspector/NetworkDetail.js +65 -24
  17. package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +5 -0
  18. package/dist/commonjs/components/Inspector/PerformanceTab.js +588 -155
  19. package/dist/commonjs/components/Inspector/SettingsPanel.js +57 -22
  20. package/dist/commonjs/components/Inspector/TabBar.js +13 -1
  21. package/dist/commonjs/components/JsonViewer.js +25 -3
  22. package/dist/commonjs/components/LogCard.js +173 -40
  23. package/dist/commonjs/components/NetworkIcons.d.ts +112 -102
  24. package/dist/commonjs/components/Toast.d.ts +3 -0
  25. package/dist/commonjs/components/Toast.js +152 -0
  26. package/dist/commonjs/components/TouchableScale.d.ts +1 -0
  27. package/dist/commonjs/components/TouchableScale.js +3 -3
  28. package/dist/commonjs/components/TreeNode.js +1 -1
  29. package/dist/commonjs/constants/index.js +6 -6
  30. package/dist/commonjs/constants/version.d.ts +1 -1
  31. package/dist/commonjs/constants/version.js +1 -1
  32. package/dist/commonjs/customHooks/analyticsLogger.d.ts +1 -11
  33. package/dist/commonjs/customHooks/analyticsLogger.js +8 -1
  34. package/dist/commonjs/customHooks/bundleAnalyzer.js +121 -124
  35. package/dist/commonjs/customHooks/networkLogger.d.ts +1 -0
  36. package/dist/commonjs/customHooks/networkLogger.js +16 -0
  37. package/dist/commonjs/customHooks/performanceTracker.d.ts +74 -0
  38. package/dist/commonjs/customHooks/performanceTracker.js +546 -392
  39. package/dist/commonjs/customHooks/reduxLogger.d.ts +1 -0
  40. package/dist/commonjs/customHooks/reduxLogger.js +3 -1
  41. package/dist/commonjs/helpers/index.d.ts +4 -0
  42. package/dist/commonjs/helpers/index.js +92 -69
  43. package/dist/commonjs/helpers/toast.d.ts +4 -0
  44. package/dist/commonjs/helpers/toast.js +20 -0
  45. package/dist/commonjs/i18n/locales/en.json +229 -5
  46. package/dist/commonjs/index.d.ts +1 -1
  47. package/dist/commonjs/index.js +36 -2
  48. package/dist/commonjs/styles/index.d.ts +63 -15
  49. package/dist/commonjs/styles/index.js +79 -32
  50. package/dist/commonjs/types/interfaces.d.ts +3 -0
  51. package/dist/esm/components/AppHeaderLogo.js +12 -15
  52. package/dist/esm/components/ConsoleLogCard.js +33 -9
  53. package/dist/esm/components/CopyButton.js +15 -1
  54. package/dist/esm/components/DomainHeader.js +56 -28
  55. package/dist/esm/components/ErrorBoundary.d.ts +1 -1
  56. package/dist/esm/components/ErrorBoundary.js +498 -101
  57. package/dist/esm/components/HighlightText.js +7 -1
  58. package/dist/esm/components/Inspector/AnalyticsTab.js +191 -127
  59. package/dist/esm/components/Inspector/BundleTab.d.ts +1 -0
  60. package/dist/esm/components/Inspector/BundleTab.js +145 -23
  61. package/dist/esm/components/Inspector/CrashTab.js +0 -8
  62. package/dist/esm/components/Inspector/InspectorHeader.js +18 -4
  63. package/dist/esm/components/Inspector/LogDetail.js +10 -7
  64. package/dist/esm/components/Inspector/MainScreen.js +4 -0
  65. package/dist/esm/components/Inspector/NetworkDetail.js +66 -25
  66. package/dist/esm/components/Inspector/PerformanceTab.d.ts +5 -0
  67. package/dist/esm/components/Inspector/PerformanceTab.js +591 -158
  68. package/dist/esm/components/Inspector/SettingsPanel.js +57 -22
  69. package/dist/esm/components/Inspector/TabBar.js +13 -1
  70. package/dist/esm/components/JsonViewer.js +25 -3
  71. package/dist/esm/components/LogCard.js +175 -42
  72. package/dist/esm/components/NetworkIcons.d.ts +112 -102
  73. package/dist/esm/components/Toast.d.ts +3 -0
  74. package/dist/esm/components/Toast.js +117 -0
  75. package/dist/esm/components/TouchableScale.d.ts +1 -0
  76. package/dist/esm/components/TouchableScale.js +3 -3
  77. package/dist/esm/components/TreeNode.js +1 -1
  78. package/dist/esm/constants/index.js +6 -6
  79. package/dist/esm/constants/version.d.ts +1 -1
  80. package/dist/esm/constants/version.js +1 -1
  81. package/dist/esm/customHooks/analyticsLogger.d.ts +1 -11
  82. package/dist/esm/customHooks/analyticsLogger.js +6 -0
  83. package/dist/esm/customHooks/bundleAnalyzer.js +121 -124
  84. package/dist/esm/customHooks/networkLogger.d.ts +1 -0
  85. package/dist/esm/customHooks/networkLogger.js +16 -0
  86. package/dist/esm/customHooks/performanceTracker.d.ts +74 -0
  87. package/dist/esm/customHooks/performanceTracker.js +531 -391
  88. package/dist/esm/customHooks/reduxLogger.d.ts +1 -0
  89. package/dist/esm/customHooks/reduxLogger.js +1 -0
  90. package/dist/esm/helpers/index.d.ts +4 -0
  91. package/dist/esm/helpers/index.js +87 -69
  92. package/dist/esm/helpers/toast.d.ts +4 -0
  93. package/dist/esm/helpers/toast.js +15 -0
  94. package/dist/esm/i18n/locales/en.json +229 -5
  95. package/dist/esm/index.d.ts +1 -1
  96. package/dist/esm/index.js +24 -3
  97. package/dist/esm/styles/index.d.ts +63 -15
  98. package/dist/esm/styles/index.js +79 -32
  99. package/dist/esm/types/interfaces.d.ts +3 -0
  100. package/package.json +4 -1
@@ -2,6 +2,7 @@ import React, { useEffect, useRef } from 'react';
2
2
  import { Animated, Pressable, View, Text } from 'react-native';
3
3
  // Stylesheet
4
4
  import { AppColors } from '../styles/AppColors';
5
+ import { AppFonts } from '../styles/AppFonts';
5
6
  // Helpers
6
7
  import { formatDateTime } from '../helpers';
7
8
  // Assets
@@ -35,10 +36,61 @@ const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, i
35
36
  <View style={[styles.domainIconWrap, { backgroundColor: `${color}18` }]}>
36
37
  <ScreenIcon color={color} size={14}/>
37
38
  </View>
38
- <View style={{ flex: 1, justifyContent: 'center' }}>
39
- <Text style={styles.domainTitleText} numberOfLines={1}>
40
- {pageName}
41
- </Text>
39
+ <View style={{ flex: 1, justifyContent: 'center', minWidth: 0 }}>
40
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
41
+ <Text style={[styles.domainTitleText, { flexShrink: 1 }]} numberOfLines={1}>
42
+ {pageName}
43
+ </Text>
44
+ {total > 0 && (<View style={{
45
+ flexDirection: 'row',
46
+ alignItems: 'center',
47
+ gap: 4,
48
+ backgroundColor: stats.failed > 0
49
+ ? '#FEE2E2'
50
+ : stats.loading > 0
51
+ ? '#FEF3C7'
52
+ : '#D1FAE5',
53
+ paddingHorizontal: 5,
54
+ paddingVertical: 1.5,
55
+ borderRadius: 4,
56
+ }}>
57
+ <View style={{
58
+ width: 24,
59
+ height: 3.5,
60
+ borderRadius: 2,
61
+ backgroundColor: '#E5E7EB',
62
+ flexDirection: 'row',
63
+ overflow: 'hidden',
64
+ }}>
65
+ {pctSuccess > 0 && (<View style={{
66
+ width: `${pctSuccess}%`,
67
+ height: '100%',
68
+ backgroundColor: '#10B981',
69
+ }}/>)}
70
+ {pctFailed > 0 && (<View style={{
71
+ width: `${pctFailed}%`,
72
+ height: '100%',
73
+ backgroundColor: '#EF4444',
74
+ }}/>)}
75
+ {pctLoading > 0 && (<View style={{
76
+ width: `${pctLoading}%`,
77
+ height: '100%',
78
+ backgroundColor: '#F59E0B',
79
+ }}/>)}
80
+ </View>
81
+ <Text style={{
82
+ fontFamily: AppFonts.interBold,
83
+ fontSize: 8.5,
84
+ color: stats.failed > 0
85
+ ? '#991B1B'
86
+ : stats.loading > 0
87
+ ? '#92400E'
88
+ : '#065F46',
89
+ }}>
90
+ {pctSuccess}%
91
+ </Text>
92
+ </View>)}
93
+ </View>
42
94
  <Text style={styles.domainSummaryText} numberOfLines={1}>
43
95
  {formatDateTime(timestamp)}
44
96
  </Text>
@@ -94,30 +146,6 @@ const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, i
94
146
  })}
95
147
  </View>
96
148
  </View>
97
-
98
- {total > 0 && (<View style={styles.domainProgressTrack}>
99
- {pctSuccess > 0 && (<View style={[
100
- styles.domainProgressSegment,
101
- {
102
- width: `${pctSuccess}%`,
103
- backgroundColor: AppColors.greenColor,
104
- },
105
- ]}/>)}
106
- {pctFailed > 0 && (<View style={[
107
- styles.domainProgressSegment,
108
- {
109
- width: `${pctFailed}%`,
110
- backgroundColor: AppColors.errorColor,
111
- },
112
- ]}/>)}
113
- {pctLoading > 0 && (<View style={[
114
- styles.domainProgressSegment,
115
- {
116
- width: `${pctLoading}%`,
117
- backgroundColor: AppColors.darkOrange,
118
- },
119
- ]}/>)}
120
- </View>)}
121
149
  </Pressable>);
122
150
  };
123
151
  export default DomainHeader;
@@ -6,6 +6,6 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
6
6
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
7
7
  private handleReset;
8
8
  private handleCopyTrace;
9
- render(): React.ReactNode;
9
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>> | React.JSX.Element;
10
10
  }
11
11
  export default ErrorBoundary;