react-native-inapp-inspector 2.0.7 → 2.2.0

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 (85) hide show
  1. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +0 -11
  2. package/dist/commonjs/components/Inspector/InspectorHeader.js +25 -28
  3. package/dist/commonjs/components/Inspector/MainScreen.js +2 -19
  4. package/dist/commonjs/components/Inspector/NetworkDetail.js +0 -15
  5. package/dist/commonjs/components/Inspector/PerformanceTab.js +18 -30
  6. package/dist/commonjs/components/Inspector/SettingsPanel.js +49 -448
  7. package/dist/commonjs/components/Inspector/TabBar.js +2 -23
  8. package/dist/commonjs/components/NetworkIcons.d.ts +0 -12
  9. package/dist/commonjs/components/NetworkIcons.js +3 -72
  10. package/dist/commonjs/constants/version.d.ts +1 -1
  11. package/dist/commonjs/constants/version.js +1 -1
  12. package/dist/commonjs/helpers/index.d.ts +0 -2
  13. package/dist/commonjs/helpers/index.js +1 -12
  14. package/dist/commonjs/helpers/settingsStore.d.ts +1 -1
  15. package/dist/commonjs/helpers/settingsStore.js +2 -4
  16. package/dist/commonjs/i18n/locales/en.json +2 -3
  17. package/dist/commonjs/index.d.ts +0 -1
  18. package/dist/commonjs/index.js +9 -127
  19. package/dist/commonjs/native/NativeInspector.d.ts +0 -1
  20. package/dist/commonjs/types/enums.d.ts +0 -7
  21. package/dist/commonjs/types/enums.js +0 -7
  22. package/dist/commonjs/types/interfaces.d.ts +0 -77
  23. package/dist/esm/components/Inspector/InspectorHeader.js +25 -28
  24. package/dist/esm/components/Inspector/MainScreen.js +2 -19
  25. package/dist/esm/components/Inspector/NetworkDetail.js +1 -16
  26. package/dist/esm/components/Inspector/PerformanceTab.js +19 -31
  27. package/dist/esm/components/Inspector/SettingsPanel.js +50 -449
  28. package/dist/esm/components/Inspector/TabBar.js +3 -24
  29. package/dist/esm/components/NetworkIcons.d.ts +0 -12
  30. package/dist/esm/components/NetworkIcons.js +0 -57
  31. package/dist/esm/constants/version.d.ts +1 -1
  32. package/dist/esm/constants/version.js +1 -1
  33. package/dist/esm/helpers/index.d.ts +0 -2
  34. package/dist/esm/helpers/index.js +0 -10
  35. package/dist/esm/helpers/settingsStore.d.ts +1 -1
  36. package/dist/esm/helpers/settingsStore.js +2 -4
  37. package/dist/esm/i18n/locales/en.json +2 -3
  38. package/dist/esm/index.d.ts +0 -1
  39. package/dist/esm/index.js +8 -123
  40. package/dist/esm/native/NativeInspector.d.ts +0 -1
  41. package/dist/esm/types/enums.d.ts +0 -7
  42. package/dist/esm/types/enums.js +0 -7
  43. package/dist/esm/types/interfaces.d.ts +0 -77
  44. package/ios/NetworkInspectorModule.mm +5 -12
  45. package/package.json +1 -4
  46. package/dist/commonjs/components/Inspector/AuditTab.d.ts +0 -3
  47. package/dist/commonjs/components/Inspector/AuditTab.js +0 -741
  48. package/dist/commonjs/components/Inspector/DeviceTab.d.ts +0 -3
  49. package/dist/commonjs/components/Inspector/DeviceTab.js +0 -717
  50. package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.d.ts +0 -7
  51. package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.js +0 -600
  52. package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +0 -7
  53. package/dist/commonjs/components/Inspector/PerformanceHud.js +0 -210
  54. package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +0 -9
  55. package/dist/commonjs/components/Inspector/RequestReplayModal.js +0 -792
  56. package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +0 -8
  57. package/dist/commonjs/components/Inspector/RequestReplayView.js +0 -871
  58. package/dist/commonjs/components/Inspector/StorageTab.d.ts +0 -3
  59. package/dist/commonjs/components/Inspector/StorageTab.js +0 -610
  60. package/dist/commonjs/customHooks/storageInspector.d.ts +0 -13
  61. package/dist/commonjs/customHooks/storageInspector.js +0 -179
  62. package/dist/commonjs/helpers/deviceInfo.d.ts +0 -4
  63. package/dist/commonjs/helpers/deviceInfo.js +0 -94
  64. package/dist/commonjs/helpers/packageAuditor.d.ts +0 -5
  65. package/dist/commonjs/helpers/packageAuditor.js +0 -182
  66. package/dist/esm/components/Inspector/AuditTab.d.ts +0 -3
  67. package/dist/esm/components/Inspector/AuditTab.js +0 -702
  68. package/dist/esm/components/Inspector/DeviceTab.d.ts +0 -3
  69. package/dist/esm/components/Inspector/DeviceTab.js +0 -678
  70. package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.d.ts +0 -7
  71. package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.js +0 -560
  72. package/dist/esm/components/Inspector/PerformanceHud.d.ts +0 -7
  73. package/dist/esm/components/Inspector/PerformanceHud.js +0 -170
  74. package/dist/esm/components/Inspector/RequestReplayModal.d.ts +0 -9
  75. package/dist/esm/components/Inspector/RequestReplayModal.js +0 -752
  76. package/dist/esm/components/Inspector/RequestReplayView.d.ts +0 -8
  77. package/dist/esm/components/Inspector/RequestReplayView.js +0 -831
  78. package/dist/esm/components/Inspector/StorageTab.d.ts +0 -3
  79. package/dist/esm/components/Inspector/StorageTab.js +0 -571
  80. package/dist/esm/customHooks/storageInspector.d.ts +0 -13
  81. package/dist/esm/customHooks/storageInspector.js +0 -170
  82. package/dist/esm/helpers/deviceInfo.d.ts +0 -4
  83. package/dist/esm/helpers/deviceInfo.js +0 -89
  84. package/dist/esm/helpers/packageAuditor.d.ts +0 -5
  85. package/dist/esm/helpers/packageAuditor.js +0 -173
@@ -4,11 +4,11 @@ import { useInspector } from './InspectorContext';
4
4
  import styles from '../../styles';
5
5
  import { AppColors } from '../../styles/AppColors';
6
6
  import TouchableScale from '../TouchableScale';
7
- import { SignalIcon, TerminalIcon, AnalyticsIcon, PackageIcon, ReduxIcon, PerformanceIcon, CrashIcon, DatabaseIcon, DevicePhoneIcon, ShieldCheckIcon, } from '../NetworkIcons';
7
+ import { SignalIcon, TerminalIcon, AnalyticsIcon, PackageIcon, ReduxIcon, PerformanceIcon, CrashIcon, } from '../NetworkIcons';
8
8
  import { isReduxConnected } from '../../customHooks/reduxLogger';
9
9
  import { isAnalyticsConnected } from '../../customHooks/analyticsLogger';
10
10
  const TabBar = React.memo(() => {
11
- const { activeTab, switchActiveTab, tabVisibility, logs, consoleLogs, analyticsEvents, crashRecords, storageEntries, auditReport, lastReadApisCount, lastReadLogsCount, lastReadCrashesCount, unreadPulseAnim, } = useInspector();
11
+ const { activeTab, switchActiveTab, tabVisibility, logs, consoleLogs, analyticsEvents, crashRecords, lastReadApisCount, lastReadLogsCount, lastReadCrashesCount, unreadPulseAnim, } = useInspector();
12
12
  const isReduxAvail = isReduxConnected();
13
13
  const isAnalyticsAvail = isAnalyticsConnected();
14
14
  return (<View style={styles.tabBarContainer}>
@@ -38,24 +38,6 @@ const TabBar = React.memo(() => {
38
38
  count: 0,
39
39
  icon: 'redux',
40
40
  },
41
- {
42
- key: 'storage',
43
- label: 'Storage',
44
- count: storageEntries.length,
45
- icon: 'storage',
46
- },
47
- {
48
- key: 'device',
49
- label: 'Device',
50
- count: 0,
51
- icon: 'device',
52
- },
53
- {
54
- key: 'audit',
55
- label: 'Audit',
56
- count: auditReport?.totalIssues || 0,
57
- icon: 'audit',
58
- },
59
41
  {
60
42
  key: 'bundle',
61
43
  label: 'Bundle',
@@ -76,7 +58,7 @@ const TabBar = React.memo(() => {
76
58
  },
77
59
  ]
78
60
  .filter(tab => {
79
- if (!tabVisibility?.[tab.key] && activeTab !== tab.key)
61
+ if (!tabVisibility?.[tab.key])
80
62
  return false;
81
63
  if (tab.key === 'redux' && !isReduxAvail)
82
64
  return false;
@@ -113,9 +95,6 @@ const TabBar = React.memo(() => {
113
95
  {tab.icon === 'logs' && (<TerminalIcon color={iconColor} size={14}/>)}
114
96
  {tab.icon === 'analytics' && (<AnalyticsIcon color={iconColor} size={14}/>)}
115
97
  {tab.icon === 'redux' && (<ReduxIcon color={iconColor} size={14}/>)}
116
- {tab.icon === 'storage' && (<DatabaseIcon color={iconColor} size={14}/>)}
117
- {tab.icon === 'device' && (<DevicePhoneIcon color={iconColor} size={14}/>)}
118
- {tab.icon === 'audit' && (<ShieldCheckIcon color={iconColor} size={14}/>)}
119
98
  {tab.icon === 'bundle' && (<PackageIcon color={iconColor} size={14}/>)}
120
99
  {tab.icon === 'performance' && (<PerformanceIcon color={iconColor} size={14}/>)}
121
100
  {tab.icon === 'crash' && (<CrashIcon color={iconColor} size={14}/>)}
@@ -22,7 +22,6 @@ export declare const SizeIcon: ({ color }: IconProps) => React.JSX.Element;
22
22
  export declare const RequestIcon: ({ color }: IconProps) => React.JSX.Element;
23
23
  export declare const ResponseIcon: ({ color }: IconProps) => React.JSX.Element;
24
24
  export declare const HeadersIcon: ({ color }: IconProps) => React.JSX.Element;
25
- export declare const ReplayIcon: ({ color, size, }: IconProps) => React.JSX.Element;
26
25
  export declare const CopyIcon: ({ color, size }: IconProps) => React.JSX.Element;
27
26
  export declare const FetchIcon: ({ color, size }: IconProps) => React.JSX.Element;
28
27
  export declare const TerminalIcon: ({ color, size, }: IconProps) => React.JSX.Element;
@@ -128,14 +127,3 @@ export declare const TagIcon: ({ color, size }: IconProps) => React.JSX.Element;
128
127
  export declare const NpmIcon: ({ color, size }: IconProps) => React.JSX.Element;
129
128
  export declare const ResetIcon: ({ color, size }: IconProps) => React.JSX.Element;
130
129
  export declare const ChevronDownIcon: ({ color, size }: IconProps) => React.JSX.Element;
131
- export declare const DatabaseIcon: ({ color, size }: IconProps) => React.JSX.Element;
132
- export declare const DevicePhoneIcon: ({ color, size }: IconProps) => React.JSX.Element;
133
- export declare const FlagIcon: ({ color, size }: IconProps) => React.JSX.Element;
134
- export declare const EditIcon: ({ color, size }: IconProps) => React.JSX.Element;
135
- export declare const PlusIcon: ({ color, size }: IconProps) => React.JSX.Element;
136
- export declare const CodeIcon: ({ color, size }: IconProps) => React.JSX.Element;
137
- export declare const CpuIcon: ({ color, size }: IconProps) => React.JSX.Element;
138
- export declare const FingerprintIcon: ({ color, size }: IconProps) => React.JSX.Element;
139
- export declare const MonitorIcon: ({ color, size }: IconProps) => React.JSX.Element;
140
- export declare const ShieldCheckIcon: ({ color, size }: IconProps) => React.JSX.Element;
141
- export declare const SparklesIcon: ({ color, size }: IconProps) => React.JSX.Element;
@@ -79,13 +79,6 @@ export const HeadersIcon = ({ color = AppColors.skyBlue }) => {
79
79
  <Path d="M4 6h16M4 12h16M4 18h10" stroke={color} strokeWidth="2" strokeLinecap="round"/>
80
80
  </Svg>);
81
81
  };
82
- export const ReplayIcon = ({ color = AppColors.purple, size = 14, }) => {
83
- return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
84
- <Path d="M21 2v6h-6" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
85
- <Path d="M21 8A10 10 0 1 0 21.8 14" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
86
- <Path d="M10 8.5l5.5 3.5-5.5 3.5v-7z" fill={color}/>
87
- </Svg>);
88
- };
89
82
  export const CopyIcon = ({ color = AppColors.grayTextWeak, size = 14 }) => {
90
83
  return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
91
84
  <Path d="M9 9V5a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-4" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
@@ -718,53 +711,3 @@ export const ResetIcon = ({ color = AppColors.white, size = 16 }) => (<Svg width
718
711
  export const ChevronDownIcon = ({ color = AppColors.grayTextWeak, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
719
712
  <Path d="M6 9l6 6 6-6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
720
713
  </Svg>);
721
- export const DatabaseIcon = ({ color = AppColors.purple, size = 16 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
722
- <Ellipse cx="12" cy="5" rx="9" ry="3" stroke={color} strokeWidth="1.8"/>
723
- <Path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
724
- <Path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
725
- </Svg>);
726
- export const DevicePhoneIcon = ({ color = AppColors.purple, size = 16 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
727
- <Rect x="5" y="2" width="14" height="20" rx="3" stroke={color} strokeWidth="1.8"/>
728
- <Line x1="12" y1="18" x2="12.01" y2="18" stroke={color} strokeWidth="2.5" strokeLinecap="round"/>
729
- <Line x1="9" y1="5" x2="15" y2="5" stroke={color} strokeWidth="1.5" strokeLinecap="round"/>
730
- </Svg>);
731
- export const FlagIcon = ({ color = AppColors.purple, size = 16 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
732
- <Path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1zM4 22v-7" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
733
- </Svg>);
734
- export const EditIcon = ({ color = AppColors.grayText, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
735
- <Path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
736
- </Svg>);
737
- export const PlusIcon = ({ color = AppColors.white, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
738
- <Line x1="12" y1="5" x2="12" y2="19" stroke={color} strokeWidth="2" strokeLinecap="round"/>
739
- <Line x1="5" y1="12" x2="19" y2="12" stroke={color} strokeWidth="2" strokeLinecap="round"/>
740
- </Svg>);
741
- export const CodeIcon = ({ color = AppColors.grayText, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
742
- <Path d="M16 18l6-6-6-6M8 6l-6 6 6 6" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
743
- </Svg>);
744
- export const CpuIcon = ({ color = AppColors.grayText, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
745
- <Rect x="4" y="4" width="16" height="16" rx="2" stroke={color} strokeWidth="1.8"/>
746
- <Rect x="9" y="9" width="6" height="6" stroke={color} strokeWidth="1.8"/>
747
- <Line x1="9" y1="1" x2="9" y2="4" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
748
- <Line x1="15" y1="1" x2="15" y2="4" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
749
- <Line x1="9" y1="20" x2="9" y2="23" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
750
- <Line x1="15" y1="20" x2="15" y2="23" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
751
- <Line x1="20" y1="9" x2="23" y2="9" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
752
- <Line x1="20" y1="15" x2="23" y2="15" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
753
- <Line x1="1" y1="9" x2="4" y2="9" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
754
- <Line x1="1" y1="15" x2="4" y2="15" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
755
- </Svg>);
756
- export const FingerprintIcon = ({ color = AppColors.grayText, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
757
- <Path d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 2.21-.895 4.21-2.343 5.657M12 7c-2.761 0-5 2.239-5 5 0 1.38.56 2.63 1.464 3.536M12 11c-.552 0-1 .448-1 1 0 2.5 1.5 4.5 4 5" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
758
- </Svg>);
759
- export const MonitorIcon = ({ color = AppColors.grayText, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
760
- <Rect x="2" y="3" width="20" height="14" rx="2" stroke={color} strokeWidth="1.8"/>
761
- <Line x1="8" y1="21" x2="16" y2="21" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
762
- <Line x1="12" y1="17" x2="12" y2="21" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
763
- </Svg>);
764
- export const ShieldCheckIcon = ({ color = AppColors.greenColor, size = 16 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
765
- <Path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
766
- <Path d="M9 12l2 2 4-4" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
767
- </Svg>);
768
- export const SparklesIcon = ({ color = AppColors.purple, size = 16 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
769
- <Path d="M12 3l1.912 5.885L20 10.8l-4.756 3.63L16.824 20 12 16.3 7.176 20l1.58-5.57L4 10.8l6.088-1.915L12 3z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
770
- </Svg>);
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "2.0.7";
1
+ export declare const LIB_VERSION = "2.2.0";
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED FILE — do not edit by hand.
2
2
  // Regenerated from package.json on every build by scripts/gen-version.js.
3
- export const LIB_VERSION = '2.0.7';
3
+ export const LIB_VERSION = '2.2.0';
@@ -31,8 +31,6 @@ export declare const formatTimeShort: (ts: number) => string;
31
31
  export declare const formatTime: (ts: number) => string;
32
32
  /** Formats a relative gap like "+2s" / "+1m 5s" / "+350ms". */
33
33
  export declare const formatGap: (ms: number) => string;
34
- /** Formats byte size into human readable B / KB / MB. */
35
- export declare const formatBytes: (bytes: number) => string;
36
34
  /** Finds the first JSON object/array embedded anywhere in a log message. */
37
35
  export declare const getJsonContent: (message: string) => JsonContent | null;
38
36
  /** Pretty-prints JSON data showing 3-4 lines with trailing "..." */
@@ -393,16 +393,6 @@ export const formatGap = (ms) => {
393
393
  const rem = s % 60;
394
394
  return rem > 0 ? `+${m}m ${rem}s` : `+${m}m`;
395
395
  };
396
- /** Formats byte size into human readable B / KB / MB. */
397
- export const formatBytes = (bytes) => {
398
- if (bytes === 0)
399
- return '0 B';
400
- if (bytes < 1024)
401
- return `${bytes} B`;
402
- if (bytes < 1024 * 1024)
403
- return `${(bytes / 1024).toFixed(1)} KB`;
404
- return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
405
- };
406
396
  /** Finds the first JSON object/array embedded anywhere in a log message. */
407
397
  export const getJsonContent = (message) => {
408
398
  if (!message)
@@ -2,7 +2,7 @@ import { InspectorStorage, PersistedSettings } from '../types';
2
2
  export { InspectorStorage, PersistedSettings };
3
3
  export declare function setCustomStorage(storage: InspectorStorage | null): void;
4
4
  export declare function loadSettings(): Promise<PersistedSettings>;
5
- export declare function saveSettings(settings: PersistedSettings): Promise<void>;
5
+ export declare function saveSettings(settings: PersistedSettings): void;
6
6
  export declare function clearPersistedSettings(): Promise<void>;
7
7
  export declare const isPersistentStorageAvailable: () => boolean;
8
8
  export declare function getCustomStorage(): InspectorStorage | null;
@@ -48,11 +48,9 @@ export async function loadSettings() {
48
48
  return {};
49
49
  }
50
50
  }
51
- export async function saveSettings(settings) {
51
+ export function saveSettings(settings) {
52
52
  try {
53
- const existing = await loadSettings();
54
- const merged = { ...existing, ...settings };
55
- const raw = JSON.stringify(merged);
53
+ const raw = JSON.stringify(settings);
56
54
  if (customStorage) {
57
55
  customStorage.setItem(SETTINGS_KEY, raw);
58
56
  return;
@@ -50,9 +50,8 @@
50
50
  "activeBadge": "ACTIVE",
51
51
  "dormantBadge": "DORMANT",
52
52
  "protectedBadge": "PROTECTED",
53
- "modulesAndTools": "Modules & Tabs",
54
- "ramLimits": "RAM & Limits",
55
- "uiPreferences": "UI & Appearance",
53
+ "modulesAndTools": "Modules & Tools",
54
+ "uiPreferences": "UI Preferences",
56
55
  "zeroOverheadTitle": "Zero Background Overhead",
57
56
  "zeroOverheadDesc": "Check the modules you wish to activate. Disabled modules consume 0% CPU & memory until saved.",
58
57
  "unsavedPending": "● Unsaved selections pending",
@@ -14,6 +14,5 @@ export { usePerformanceTracker, useComponentProfiler, useNavigationProfiler, tra
14
14
  export { InspectLog, InspectTrackTime, InspectCatch, type InspectLogOptions, } from './decorators';
15
15
  export { getNativeDeviceMetrics, enableNativeCrashProtection, subscribeNativeCrashes, showNativeFloatingButton, hideNativeFloatingButton, setNativeFloatingButtonBadge, subscribeNativeFloatingButtonPress, subscribeNativeDeviceShake, startNativeFpsMonitoring, stopNativeFpsMonitoring, getNativeFpsMetrics, getNativeStorageItem, setNativeStorageItem, isNativeModuleAvailable, type NativeDeviceMetrics, type NativeCrashEvent, type FloatingButtonOptions, type NativeFpsMetrics, } from './native/NativeInspector';
16
16
  export { sendSessionTelemetryPing, trackTelemetryEvent, trackInspectorOpen, trackTabSwitch, trackLogExport, GA4_MEASUREMENT_ID, GA4_API_SECRET, } from './helpers';
17
- export { runLivePackageAudit, logCodeQualityIssue, clearCustomAuditIssues, } from './helpers/packageAuditor';
18
17
  export { BrandSquareIcon, BrandCircleIcon, } from './components/NetworkIcons';
19
18
  export { ActiveTab, Method, StatusFilter, SortOrder, LocalFilter, ModalAnimationType, SettingsPage, SettingsSubTab, LogFilter, ConsoleLogType, AnalyticsEventSource, GAEventCategory, StackFrameType, DiffResultType, BundleSubTab, PerformanceSubTab, CrashType, CrashExportFormat, CrashDetailSubTab, CrashFilterType, BreadcrumbType, } from './types';
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, PanResponder, Platform, UIManager, LogBox, InteractionManager, View, StyleSheet, } from 'react-native';
2
+ import { Alert, Animated, PanResponder, Platform, UIManager, LogBox, InteractionManager, } from 'react-native';
3
3
  import { NavigationContext } from '@react-navigation/native';
4
4
  // i18n
5
5
  import { I18nextProvider, i18n } from './i18n';
@@ -23,22 +23,14 @@ import { subscribeAnalyticsEvents, clearAnalyticsEvents, autoSetupAnalyticsLogge
23
23
  import { getReduxState, subscribeReduxState, setReduxAutoRefresh, getLastActionForReducer, clearActionHistory, isReduxConnected, setReduxModuleEnabled, } from './customHooks/reduxLogger';
24
24
  import { setPerformanceModuleEnabled } from './customHooks/performanceTracker';
25
25
  import { setBundleModuleEnabled } from './customHooks/bundleAnalyzer';
26
- import { fetchAllStorageEntries, setStorageItem, removeStorageItem, clearAllStorage, subscribeStorageChanges, } from './customHooks/storageInspector';
27
- import { getSystemDiagnostics } from './helpers/deviceInfo';
28
- import { runLivePackageAudit, subscribeAuditChanges, logCodeQualityIssue, } from './helpers/packageAuditor';
29
26
  import { showNativeFloatingButton, hideNativeFloatingButton, setNativeFloatingButtonBadge, subscribeNativeFloatingButtonPress, subscribeNativeDeviceShake, isNativeModuleAvailable, } from './native/NativeInspector';
30
27
  import { LIB_VERSION } from './constants';
31
28
  // Stylesheet
32
29
  import { toggleGlobalTheme } from './styles';
33
- const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigationRef, appIcon, environment, initialVisible, visible: controlledVisible, initialTab, enablePerformanceHud = false, }) => {
34
- // Zero-overhead production stub: if disabled, return null immediately
35
- if (!enabled || !isEnabled) {
36
- return null;
37
- }
30
+ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigationRef, appIcon, environment, initialVisible, visible: controlledVisible, }) => {
38
31
  // Set custom storage synchronously during render phase
39
32
  setCustomStorage(storage || null);
40
33
  const [isDark, setIsDark] = useState(false);
41
- const [isPerformanceHudEnabled, setIsPerformanceHudEnabled] = useState(enablePerformanceHud);
42
34
  const [reduxState, setReduxState] = useState(null);
43
35
  // Per-reducer last action is kept in component state so the
44
36
  // Redux tab re-renders live on every dispatch, independent of the state tree ref.
@@ -53,11 +45,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
53
45
  setVisible(controlledVisible);
54
46
  }
55
47
  }, [controlledVisible]);
56
- useEffect(() => {
57
- if (enablePerformanceHud !== undefined) {
58
- setIsPerformanceHudEnabled(enablePerformanceHud);
59
- }
60
- }, [enablePerformanceHud]);
61
48
  const [isReady, setIsReady] = useState(false);
62
49
  const [selected, setSelected] = useState(null);
63
50
  const [selectedLogs, setSelectedLogs] = useState(new Set());
@@ -89,8 +76,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
89
76
  const [sectionFilters, setSectionFilters] = useState({});
90
77
  const [collapsedSections, setCollapsedSections] = useState(new Set());
91
78
  const [showHeaderInfo, setShowHeaderInfo] = useState(true);
92
- const [isWalkthroughVisible, setIsWalkthroughVisible] = useState(true);
93
- const hasCompletedWalkthroughRef = useRef(null);
94
79
  const [sortOrder, setSortOrder] = useState('newest');
95
80
  // #7 — sort order for the Logs (console) tab
96
81
  const [logSortOrder, setLogSortOrder] = useState('newest');
@@ -99,7 +84,7 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
99
84
  const [showReqDiff, setShowReqDiff] = useState(false);
100
85
  const [showResDiff, setShowResDiff] = useState(false);
101
86
  // ─── Analytics state ───────────────────────────────────────────────────────
102
- const [activeTab, setActiveTab] = useState(initialTab || 'apis');
87
+ const [activeTab, setActiveTab] = useState('apis');
103
88
  const [analyticsEvents, setAnalyticsEvents] = useState([]);
104
89
  // ─── Logs state ────────────────────────────────────────────────────────────
105
90
  const [consoleLogs, setConsoleLogs] = useState([]);
@@ -155,47 +140,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
155
140
  setLastReadCrashesCount(crashRecords.length);
156
141
  }
157
142
  }, [activeTab, crashRecords.length]);
158
- // ─── Storage state ─────────────────────────────────────────────────────────
159
- const [storageEntries, setStorageEntries] = useState([]);
160
- const [selectedStorageKey, setSelectedStorageKey] = useState(null);
161
- const refreshStorageEntries = useCallback(async () => {
162
- try {
163
- const entries = await fetchAllStorageEntries();
164
- setStorageEntries(entries);
165
- }
166
- catch { }
167
- }, []);
168
- const updateStorageEntry = useCallback(async (key, value) => {
169
- await setStorageItem(key, value);
170
- await refreshStorageEntries();
171
- }, [refreshStorageEntries]);
172
- const deleteStorageEntry = useCallback(async (key) => {
173
- await removeStorageItem(key);
174
- await refreshStorageEntries();
175
- }, [refreshStorageEntries]);
176
- const clearAllStorageEntries = useCallback(async () => {
177
- await clearAllStorage();
178
- await refreshStorageEntries();
179
- }, [refreshStorageEntries]);
180
- useEffect(() => {
181
- refreshStorageEntries();
182
- const unsub = subscribeStorageChanges(refreshStorageEntries);
183
- return () => unsub();
184
- }, [refreshStorageEntries]);
185
- // ─── Device info state ──────────────────────────────────────────────────────
186
- const [deviceInfo] = useState(() => getSystemDiagnostics());
187
- // ─── Code Quality & Package Audit state ─────────────────────────────────────
188
- const [auditReport, setAuditReport] = useState(() => runLivePackageAudit());
189
- useEffect(() => {
190
- const unsub = subscribeAuditChanges(setAuditReport);
191
- return () => unsub();
192
- }, []);
193
- const refreshAuditReport = useCallback(() => {
194
- setAuditReport(runLivePackageAudit());
195
- }, []);
196
- const logCustomAuditIssue = useCallback((issue) => {
197
- logCodeQualityIssue(issue);
198
- }, []);
199
143
  const [maxConsoleLogs, setMaxConsoleLogs] = useState(100);
200
144
  const [showConsoleLevels, setShowConsoleLevels] = useState({
201
145
  info: true,
@@ -236,9 +180,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
236
180
  logs: true,
237
181
  analytics: false,
238
182
  redux: false,
239
- storage: false,
240
- device: false,
241
- audit: false,
242
183
  bundle: false,
243
184
  performance: false,
244
185
  crash: false,
@@ -293,9 +234,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
293
234
  logs: true,
294
235
  analytics: false,
295
236
  redux: false,
296
- storage: false,
297
- device: false,
298
- audit: false,
299
237
  bundle: false,
300
238
  performance: false,
301
239
  crash: false,
@@ -333,24 +271,14 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
333
271
  setModalHeightPercent(saved.modalHeightPercent);
334
272
  if (saved.modalAnimationType)
335
273
  setModalAnimationType(saved.modalAnimationType);
336
- if (saved.tabVisibility) {
337
- const savedVis = saved.tabVisibility;
274
+ if (saved.tabVisibility)
338
275
  setTabVisibility(prev => ({
339
276
  ...prev,
340
- ...savedVis,
341
- storage: savedVis.storage ?? false,
342
- device: savedVis.device ?? false,
343
- audit: savedVis.audit ?? false,
277
+ ...saved.tabVisibility,
344
278
  apis: true, // APIs is always required
345
279
  }));
346
- }
347
- if (initialTab) {
348
- setActiveTab(initialTab);
349
- }
350
- else if (saved.defaultTab) {
280
+ if (saved.defaultTab)
351
281
  setDefaultTab(saved.defaultTab);
352
- setActiveTab(saved.defaultTab);
353
- }
354
282
  if (saved.isAutoRamLimitEnabled != null)
355
283
  setIsAutoRamLimitEnabled(saved.isAutoRamLimitEnabled);
356
284
  if (saved.maxNetworkLogs != null)
@@ -371,10 +299,7 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
371
299
  setShowDuplicateLogs(saved.showDuplicateLogs);
372
300
  if (saved.showUpdateToast != null)
373
301
  setShowUpdateToast(saved.showUpdateToast);
374
- if (initialTab) {
375
- setActiveTab(initialTab);
376
- }
377
- else if (saved.defaultTab) {
302
+ if (saved.defaultTab) {
378
303
  const dt = saved.defaultTab;
379
304
  const vis = {
380
305
  ...{
@@ -382,9 +307,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
382
307
  logs: true,
383
308
  analytics: false,
384
309
  redux: false,
385
- storage: false,
386
- device: false,
387
- audit: false,
388
310
  bundle: false,
389
311
  performance: false,
390
312
  crash: false,
@@ -394,7 +316,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
394
316
  };
395
317
  setActiveTab(vis[dt] ? dt : 'apis');
396
318
  }
397
- hasCompletedWalkthroughRef.current = saved.hasCompletedWalkthrough === true;
398
319
  settingsHydratedRef.current = true;
399
320
  });
400
321
  return () => {
@@ -854,17 +775,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
854
775
  ? defaultTab
855
776
  : 'apis';
856
777
  setActiveTab(target);
857
- setSelected(null);
858
- setSelectedEvent(null);
859
- setSelectedLog(null);
860
- setSelectedReduxSlice(null);
861
- setSelectedReduxAction(null);
862
- setSelectedCrash(null);
863
- // Trigger first-time walkthrough strictly on first FAB launch if not yet completed
864
- if (hasCompletedWalkthroughRef.current === false) {
865
- setIsWalkthroughVisible(true);
866
- hasCompletedWalkthroughRef.current = true;
867
- }
868
778
  // Track inspector opened event in GA4
869
779
  trackInspectorOpen({ activeTab: target });
870
780
  // Instant synchronization of data collected while modal was closed
@@ -1710,12 +1620,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
1710
1620
  setModalAnimationType,
1711
1621
  hasNavigationContext,
1712
1622
  setNavState,
1713
- isWalkthroughVisible,
1714
- setIsWalkthroughVisible,
1715
- openWalkthrough: () => {
1716
- setSettingsPage(null);
1717
- setIsWalkthroughVisible(true);
1718
- },
1719
1623
  // ─── Tabs ───────────────────────────────────────────────────────────
1720
1624
  activeTab,
1721
1625
  switchActiveTab,
@@ -1850,20 +1754,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
1850
1754
  setCrashRecords([]);
1851
1755
  setSelectedCrash(null);
1852
1756
  },
1853
- // ─── Storage ─────────────────────────────────────────────────────────
1854
- storageEntries,
1855
- refreshStorageEntries,
1856
- updateStorageEntry,
1857
- deleteStorageEntry,
1858
- clearAllStorageEntries,
1859
- selectedStorageKey,
1860
- setSelectedStorageKey,
1861
- // ─── Device ──────────────────────────────────────────────────────────
1862
- deviceInfo,
1863
- // ─── Audit / Code Quality ─────────────────────────────────────────────
1864
- auditReport,
1865
- refreshAuditReport,
1866
- logCustomAuditIssue,
1867
1757
  // ─── Settings ───────────────────────────────────────────────────────
1868
1758
  settingsActiveSubTab,
1869
1759
  setSettingsActiveSubTab,
@@ -1888,17 +1778,13 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
1888
1778
  isAutoRamLimitEnabled,
1889
1779
  setIsAutoRamLimitEnabled,
1890
1780
  deviceFreeRamMb,
1891
- isPerformanceHudEnabled,
1892
- setIsPerformanceHudEnabled,
1893
1781
  reduxAutoRefresh,
1894
1782
  setReduxAutoRefreshState,
1895
1783
  reduxExpandDepth,
1896
1784
  setReduxExpandDepth,
1897
1785
  };
1898
1786
  return (<InspectorContext.Provider value={contextValue}>
1899
- <View style={StyleSheet.absoluteFill} pointerEvents="box-none">
1900
- <MainScreen />
1901
- </View>
1787
+ <MainScreen />
1902
1788
  </InspectorContext.Provider>);
1903
1789
  };
1904
1790
  const NetworkInspectorWrapper = (props) => {
@@ -1927,6 +1813,5 @@ export { usePerformanceTracker, useComponentProfiler, useNavigationProfiler, tra
1927
1813
  export { InspectLog, InspectTrackTime, InspectCatch, } from './decorators';
1928
1814
  export { getNativeDeviceMetrics, enableNativeCrashProtection, subscribeNativeCrashes, showNativeFloatingButton, hideNativeFloatingButton, setNativeFloatingButtonBadge, subscribeNativeFloatingButtonPress, subscribeNativeDeviceShake, startNativeFpsMonitoring, stopNativeFpsMonitoring, getNativeFpsMetrics, getNativeStorageItem, setNativeStorageItem, isNativeModuleAvailable, } from './native/NativeInspector';
1929
1815
  export { sendSessionTelemetryPing, trackTelemetryEvent, trackInspectorOpen, trackTabSwitch, trackLogExport, GA4_MEASUREMENT_ID, GA4_API_SECRET, } from './helpers';
1930
- export { runLivePackageAudit, logCodeQualityIssue, clearCustomAuditIssues, } from './helpers/packageAuditor';
1931
1816
  export { BrandSquareIcon, BrandCircleIcon, } from './components/NetworkIcons';
1932
1817
  export { ActiveTab, Method, StatusFilter, SortOrder, LocalFilter, ModalAnimationType, SettingsPage, SettingsSubTab, LogFilter, ConsoleLogType, AnalyticsEventSource, GAEventCategory, StackFrameType, DiffResultType, BundleSubTab, PerformanceSubTab, CrashType, CrashExportFormat, CrashDetailSubTab, CrashFilterType, BreadcrumbType, } from './types';
@@ -14,7 +14,6 @@ export interface NativeDeviceMetrics {
14
14
  isCharging?: boolean;
15
15
  deviceModel?: string;
16
16
  deviceBrand?: string;
17
- deviceId?: string;
18
17
  osVersion?: string;
19
18
  apiLevel?: number;
20
19
  cpuAbi?: string;
@@ -3,9 +3,6 @@ export declare const ActiveTab: {
3
3
  readonly Analytics: "analytics";
4
4
  readonly Logs: "logs";
5
5
  readonly Redux: "redux";
6
- readonly Storage: "storage";
7
- readonly Device: "device";
8
- readonly Audit: "audit";
9
6
  readonly Bundle: "bundle";
10
7
  readonly Performance: "performance";
11
8
  readonly Crash: "crash";
@@ -52,9 +49,6 @@ export declare const SettingsPage: {
52
49
  readonly Logs: "logs";
53
50
  readonly Analytics: "analytics";
54
51
  readonly Redux: "redux";
55
- readonly Storage: "storage";
56
- readonly Device: "device";
57
- readonly Audit: "audit";
58
52
  readonly Bundle: "bundle";
59
53
  readonly Performance: "performance";
60
54
  readonly Crash: "crash";
@@ -62,7 +56,6 @@ export declare const SettingsPage: {
62
56
  export type SettingsPage = (typeof SettingsPage)[keyof typeof SettingsPage] | null;
63
57
  export declare const SettingsSubTab: {
64
58
  readonly Module: "module";
65
- readonly Limits: "limits";
66
59
  readonly Ui: "ui";
67
60
  };
68
61
  export type SettingsSubTab = (typeof SettingsSubTab)[keyof typeof SettingsSubTab];
@@ -6,9 +6,6 @@ export const ActiveTab = {
6
6
  Analytics: 'analytics',
7
7
  Logs: 'logs',
8
8
  Redux: 'redux',
9
- Storage: 'storage',
10
- Device: 'device',
11
- Audit: 'audit',
12
9
  Bundle: 'bundle',
13
10
  Performance: 'performance',
14
11
  Crash: 'crash',
@@ -49,16 +46,12 @@ export const SettingsPage = {
49
46
  Logs: 'logs',
50
47
  Analytics: 'analytics',
51
48
  Redux: 'redux',
52
- Storage: 'storage',
53
- Device: 'device',
54
- Audit: 'audit',
55
49
  Bundle: 'bundle',
56
50
  Performance: 'performance',
57
51
  Crash: 'crash',
58
52
  };
59
53
  export const SettingsSubTab = {
60
54
  Module: 'module',
61
- Limits: 'limits',
62
55
  Ui: 'ui',
63
56
  };
64
57
  export const LogFilter = {