react-native-inapp-inspector 2.3.18 → 2.3.19

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 (79) hide show
  1. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +47 -0
  2. package/dist/commonjs/capture.d.ts +2 -0
  3. package/dist/commonjs/capture.js +3 -0
  4. package/dist/commonjs/components/EmptyState.d.ts +1 -0
  5. package/dist/commonjs/components/EmptyState.js +2 -2
  6. package/dist/commonjs/components/Inspector/FabLauncher.js +494 -39
  7. package/dist/commonjs/components/Inspector/InspectorHeader.js +45 -26
  8. package/dist/commonjs/components/Inspector/MainScreen.js +4 -3
  9. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +418 -13
  10. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +376 -88
  11. package/dist/commonjs/components/Inspector/NetworkDetail.js +49 -63
  12. package/dist/commonjs/components/Inspector/SettingsPanel.js +499 -119
  13. package/dist/commonjs/components/Inspector/TabBar.js +166 -4
  14. package/dist/commonjs/components/JsonViewer.js +4 -3
  15. package/dist/commonjs/components/NetworkIcons.d.ts +4 -0
  16. package/dist/commonjs/components/NetworkIcons.js +26 -1
  17. package/dist/commonjs/components/SegmentedTabs.js +1 -0
  18. package/dist/commonjs/constants/version.d.ts +1 -1
  19. package/dist/commonjs/constants/version.js +1 -1
  20. package/dist/commonjs/i18n/locales/en.json +20 -2
  21. package/dist/commonjs/index.js +45 -30
  22. package/dist/commonjs/native/NativeInspector.d.ts +3 -0
  23. package/dist/commonjs/native/NativeInspector.js +14 -1
  24. package/dist/commonjs/native/NativeNetworkInspector.d.ts +1 -0
  25. package/dist/commonjs/styles/AppColors.js +78 -78
  26. package/dist/commonjs/types/enums.d.ts +2 -0
  27. package/dist/commonjs/types/enums.js +2 -0
  28. package/dist/commonjs/types/interfaces.d.ts +5 -0
  29. package/dist/esm/capture.d.ts +2 -0
  30. package/dist/esm/capture.js +4 -1
  31. package/dist/esm/components/EmptyState.d.ts +1 -0
  32. package/dist/esm/components/EmptyState.js +2 -2
  33. package/dist/esm/components/Inspector/FabLauncher.js +462 -40
  34. package/dist/esm/components/Inspector/InspectorHeader.js +46 -27
  35. package/dist/esm/components/Inspector/MainScreen.js +4 -3
  36. package/dist/esm/components/Inspector/MediaGalleryTab.js +419 -14
  37. package/dist/esm/components/Inspector/MediaPreviewModal.js +379 -91
  38. package/dist/esm/components/Inspector/NetworkDetail.js +49 -63
  39. package/dist/esm/components/Inspector/SettingsPanel.js +500 -120
  40. package/dist/esm/components/Inspector/TabBar.js +135 -6
  41. package/dist/esm/components/JsonViewer.js +4 -3
  42. package/dist/esm/components/NetworkIcons.d.ts +4 -0
  43. package/dist/esm/components/NetworkIcons.js +21 -0
  44. package/dist/esm/components/SegmentedTabs.js +1 -0
  45. package/dist/esm/constants/version.d.ts +1 -1
  46. package/dist/esm/constants/version.js +1 -1
  47. package/dist/esm/i18n/locales/en.json +20 -2
  48. package/dist/esm/index.js +44 -29
  49. package/dist/esm/native/NativeInspector.d.ts +3 -0
  50. package/dist/esm/native/NativeInspector.js +12 -0
  51. package/dist/esm/native/NativeNetworkInspector.d.ts +1 -0
  52. package/dist/esm/styles/AppColors.js +78 -78
  53. package/dist/esm/types/enums.d.ts +2 -0
  54. package/dist/esm/types/enums.js +2 -0
  55. package/dist/esm/types/interfaces.d.ts +5 -0
  56. package/ios/NetworkInspectorModule.mm +241 -136
  57. package/package.json +1 -1
  58. package/react-native-inapp-inspector.podspec +1 -1
  59. package/src/capture.ts +8 -0
  60. package/src/components/EmptyState.tsx +3 -1
  61. package/src/components/Inspector/FabLauncher.tsx +562 -52
  62. package/src/components/Inspector/InspectorHeader.tsx +60 -22
  63. package/src/components/Inspector/MainScreen.tsx +3 -2
  64. package/src/components/Inspector/MediaGalleryTab.tsx +502 -28
  65. package/src/components/Inspector/MediaPreviewModal.tsx +465 -117
  66. package/src/components/Inspector/NetworkDetail.tsx +80 -97
  67. package/src/components/Inspector/SettingsPanel.tsx +708 -152
  68. package/src/components/Inspector/TabBar.tsx +174 -6
  69. package/src/components/JsonViewer.tsx +4 -2
  70. package/src/components/NetworkIcons.tsx +56 -0
  71. package/src/components/SegmentedTabs.tsx +1 -0
  72. package/src/constants/version.ts +1 -1
  73. package/src/i18n/locales/en.json +20 -4
  74. package/src/index.tsx +46 -31
  75. package/src/native/NativeInspector.ts +17 -0
  76. package/src/native/NativeNetworkInspector.ts +1 -0
  77. package/src/styles/AppColors.ts +80 -80
  78. package/src/types/enums.ts +2 -0
  79. package/src/types/interfaces.ts +5 -0
@@ -3,45 +3,45 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setAppColors = exports.updateAppColorsTheme = exports.AppColors = exports.getThemeColors = void 0;
4
4
  const LightColors = {
5
5
  primaryLight: '#FFFFFF',
6
- purple: '#5C2D91',
7
- purpleShade50: '#F8F4FC',
8
- offerPurple: '#9B2677',
9
- grayBorderSecondary: '#E2DFEB',
10
- grayBackground: '#F8F7FB',
11
- grayText: '#625D73',
12
- grayTextWeak: '#8F8A9E',
6
+ purple: '#4F46E5',
7
+ purpleShade50: '#EEF2FF',
8
+ offerPurple: '#7C3AED',
9
+ grayBorderSecondary: '#E2E8F0',
10
+ grayBackground: '#F8FAFC',
11
+ grayText: '#475569',
12
+ grayTextWeak: '#64748B',
13
13
  greenColor: '#10B981',
14
- graySurface: '#E2DFEB',
14
+ graySurface: '#F1F5F9',
15
15
  skyBlue: '#2563EB',
16
- primaryBlack: '#211B30',
17
- grayTextStrong: '#211B30',
18
- dividerColor: '#EBE7F2',
19
- warningIconGold: '#C5A059',
20
- shadowColorString: '#211B30',
16
+ primaryBlack: '#0F172A',
17
+ grayTextStrong: '#0F172A',
18
+ dividerColor: '#E2E8F0',
19
+ warningIconGold: '#D97706',
20
+ shadowColorString: '#0F172A',
21
21
  errorColor: '#E11D48',
22
- lightOrange: '#E5C158',
23
- darkOrange: '#B89758',
22
+ lightOrange: '#F59E0B',
23
+ darkOrange: '#D97706',
24
24
  successGreen: '#10B981',
25
- purpleShade700: '#481E78',
25
+ purpleShade700: '#3730A3',
26
26
  greenStatus: '#D1FAE5',
27
27
  greenBaggageText: '#059669',
28
- paleYellow: '#F7E9C4',
28
+ paleYellow: '#FEF3C7',
29
29
  white: '#FFFFFF',
30
30
  black: '#000000',
31
- brandPurple: '#4B1B7D',
31
+ brandPurple: '#4F46E5',
32
32
  liveGreen: '#10B981',
33
33
  firebaseOrange: '#D97706',
34
34
  greenA400: '#00E676',
35
- slate900: '#171226',
36
- slate700: '#332C4A',
37
- slate600: '#4D446B',
38
- slate500: '#6E648D',
39
- slate400: '#948BAF',
40
- slate200: '#E4DFEE',
41
- slate100: '#F3F0F8',
42
- slate50: '#F9F7FC',
43
- gray700: '#373147',
44
- gray300: '#D5D0E0',
35
+ slate900: '#0F172A',
36
+ slate700: '#334155',
37
+ slate600: '#475569',
38
+ slate500: '#64748B',
39
+ slate400: '#94A3B8',
40
+ slate200: '#E2E8F0',
41
+ slate100: '#F1F5F9',
42
+ slate50: '#F8FAFC',
43
+ gray700: '#334155',
44
+ gray300: '#CBD5E1',
45
45
  highlightYellow: '#FDE047',
46
46
  yellowHighlight: '#FFE44D',
47
47
  teal600: '#0D9488',
@@ -54,28 +54,28 @@ const LightColors = {
54
54
  indigo600: '#4F46E5',
55
55
  violet600: '#7C3AED',
56
56
  violet500: '#8B5CF6',
57
- purpleText: '#5C2D91',
58
- pink600: '#9B2677',
57
+ purpleText: '#4F46E5',
58
+ pink600: '#DB2777',
59
59
  rose600: '#E11D48',
60
60
  orange600: '#EA580C',
61
- amber500: '#C5A059',
62
- amber600: '#B89758',
63
- amber700: '#A17D3B',
64
- amber800: '#785A1D',
61
+ amber500: '#F59E0B',
62
+ amber600: '#D97706',
63
+ amber700: '#B45309',
64
+ amber800: '#92400E',
65
65
  green500: '#22C55E',
66
66
  green600: '#16A34A',
67
67
  green700: '#15803D',
68
68
  green800: '#166534',
69
69
  emerald500: '#10B981',
70
70
  emerald600: '#059669',
71
- grey600: '#616161',
71
+ grey600: '#64748B',
72
72
  redErrorText: '#991B1B',
73
73
  materialGreen: '#2E7D32',
74
74
  googleBlue: '#4285F4',
75
75
  googleGreen: '#34A853',
76
76
  googleOrange: '#F57C00',
77
77
  googleRed: '#E53935',
78
- googlePurple: '#5C2D91',
78
+ googlePurple: '#4F46E5',
79
79
  googleTeal: '#00897B',
80
80
  npmRed: '#CB3837',
81
81
  npmRedTint: '#CB383714',
@@ -108,11 +108,11 @@ const LightColors = {
108
108
  cyan500: '#06B6D4',
109
109
  indigo400: '#818CF8',
110
110
  indigo600Alt: '#4F46E5',
111
- purple800: '#6B21A8',
112
- purple900: '#581C87',
113
- purple50: '#FAF5FF',
114
- purple100: '#F3E8FF',
115
- purple200: '#E9D5FF',
111
+ purple800: '#4338CA',
112
+ purple900: '#312E81',
113
+ purple50: '#EEF2FF',
114
+ purple100: '#E0E7FF',
115
+ purple200: '#C7D2FE',
116
116
  rose700: '#BE123C',
117
117
  red600: '#DC2626',
118
118
  red50: '#FFFBFB',
@@ -129,17 +129,17 @@ const LightColors = {
129
129
  sky100: '#E0F2FE',
130
130
  teal100: '#CCFBF1',
131
131
  teal700: '#0F766E',
132
- purple700: '#6D28D9',
132
+ purple700: '#4338CA',
133
133
  indigo50: '#EEF2FF',
134
- gray100: '#F3F4F6',
135
- gray200: '#E5E7EB',
136
- gray500: '#6B7280',
137
- gray600: '#4B5563',
134
+ gray100: '#F1F5F9',
135
+ gray200: '#E2E8F0',
136
+ gray500: '#64748B',
137
+ gray600: '#475569',
138
138
  errorCardBg: '#FFF1F3',
139
139
  warnCardBg: '#FDFBF4',
140
140
  blueTintBg: '#EFF6FF',
141
- purpleTintBg: '#F6F0FA',
142
- purpleTint2: '#EFE7F7',
141
+ purpleTintBg: '#EEF2FF',
142
+ purpleTint2: '#E0E7FF',
143
143
  roseBg: '#FDF2F8',
144
144
  roseBorder: '#FBCFE8',
145
145
  errorBorder: '#FECDD3',
@@ -151,12 +151,12 @@ const LightColors = {
151
151
  blueBorder: '#BFDBFE',
152
152
  greenBg: '#F0FDF4',
153
153
  greenBorder: '#BBF7D0',
154
- purpleBg: '#F6F0FA',
155
- purpleBorder: '#E4D5F2',
156
- greyBg: '#F5F4F8',
157
- greyBorder: '#E3DFEC',
158
- paperBg: '#FBF9FC',
159
- contentBg: '#F8F7FB',
154
+ purpleBg: '#EEF2FF',
155
+ purpleBorder: '#C7D2FE',
156
+ greyBg: '#F8FAFC',
157
+ greyBorder: '#E2E8F0',
158
+ paperBg: '#F8FAFC',
159
+ contentBg: '#F8FAFC',
160
160
  toastBg: '#0F172AEE',
161
161
  toastBorder: '#33415588',
162
162
  mintGreenBg: '#ECFDF5',
@@ -190,46 +190,46 @@ const LightColors = {
190
190
  whiteAlpha33: 'rgba(255, 255, 255, 0.33)',
191
191
  whiteAlpha60: 'rgba(255, 255, 255, 0.6)',
192
192
  domainColors: [
193
- '#5C2D91',
194
- '#9B2677',
195
- '#C5A059',
196
- '#4B1B7D',
197
- '#0D9488',
193
+ '#4F46E5',
194
+ '#7C3AED',
198
195
  '#2563EB',
199
- '#B89758',
196
+ '#0D9488',
197
+ '#EA580C',
200
198
  '#059669',
201
- '#3B1359',
202
- '#D1208A',
199
+ '#6366F1',
200
+ '#8B5CF6',
201
+ '#3B82F6',
202
+ '#D97706',
203
203
  ],
204
204
  };
205
205
  const DarkColors = {
206
- primaryLight: '#1C1628',
207
- purple: '#B68FE8',
208
- purpleShade50: '#2A1C3E',
209
- offerPurple: '#F472B6',
210
- grayBorderSecondary: '#362C4E',
211
- grayBackground: '#130F1F',
212
- grayText: '#A197B8',
213
- grayTextWeak: '#756C8C',
206
+ primaryLight: '#1E1B4B',
207
+ purple: '#818CF8',
208
+ purpleShade50: '#1E1B4B',
209
+ offerPurple: '#A78BFA',
210
+ grayBorderSecondary: '#312E81',
211
+ grayBackground: '#0F172A',
212
+ grayText: '#94A3B8',
213
+ grayTextWeak: '#64748B',
214
214
  greenColor: '#34D399',
215
- graySurface: '#362C4E',
215
+ graySurface: '#1E293B',
216
216
  skyBlue: '#60A5FA',
217
- primaryBlack: '#F7F5FC',
218
- grayTextStrong: '#F7F5FC',
219
- dividerColor: '#2B2240',
220
- warningIconGold: '#E5C158',
217
+ primaryBlack: '#F8FAFC',
218
+ grayTextStrong: '#F8FAFC',
219
+ dividerColor: '#1E293B',
220
+ warningIconGold: '#FBBF24',
221
221
  shadowColorString: '#000000',
222
222
  errorColor: '#F87171',
223
223
  lightOrange: '#FDE68A',
224
- darkOrange: '#D4AF37',
224
+ darkOrange: '#F59E0B',
225
225
  successGreen: '#34D399',
226
- purpleShade700: '#8E4DBE',
226
+ purpleShade700: '#4338CA',
227
227
  greenStatus: '#064E3B',
228
228
  greenBaggageText: '#34D399',
229
229
  paleYellow: '#78350F',
230
230
  white: '#FFFFFF',
231
231
  black: '#000000',
232
- brandPurple: '#7B3DB8',
232
+ brandPurple: '#6366F1',
233
233
  liveGreen: '#34D399',
234
234
  firebaseOrange: '#F59E0B',
235
235
  greenA400: '#00E676',
@@ -9,6 +9,7 @@ export declare const ActiveTab: {
9
9
  readonly Device: "device";
10
10
  readonly Storage: "storage";
11
11
  readonly Debugging: "debugging";
12
+ readonly Media: "media";
12
13
  };
13
14
  export type ActiveTab = (typeof ActiveTab)[keyof typeof ActiveTab];
14
15
  export declare const Method: {
@@ -61,6 +62,7 @@ export declare const SettingsPage: {
61
62
  readonly Device: "device";
62
63
  readonly Storage: "storage";
63
64
  readonly Debugging: "debugging";
65
+ readonly Media: "media";
64
66
  };
65
67
  export type SettingsPage = (typeof SettingsPage)[keyof typeof SettingsPage] | null;
66
68
  export declare const SettingsSubTab: {
@@ -12,6 +12,7 @@ exports.ActiveTab = {
12
12
  Device: 'device',
13
13
  Storage: 'storage',
14
14
  Debugging: 'debugging',
15
+ Media: 'media',
15
16
  };
16
17
  exports.Method = {
17
18
  All: 'ALL',
@@ -58,6 +59,7 @@ exports.SettingsPage = {
58
59
  Device: 'device',
59
60
  Storage: 'storage',
60
61
  Debugging: 'debugging',
62
+ Media: 'media',
61
63
  };
62
64
  exports.SettingsSubTab = {
63
65
  Module: 'module',
@@ -181,6 +181,9 @@ export interface InspectorContextValue {
181
181
  visible: boolean;
182
182
  setVisible: React.Dispatch<React.SetStateAction<boolean>>;
183
183
  closeModal: () => void;
184
+ isMinimized: boolean;
185
+ setIsMinimized: React.Dispatch<React.SetStateAction<boolean>>;
186
+ minimizeInspector: () => void;
184
187
  isReady: boolean;
185
188
  enabled: boolean;
186
189
  isEnabled: boolean;
@@ -198,6 +201,8 @@ export interface InspectorContextValue {
198
201
  toggleTabVisibility: (key: ActiveTab) => void;
199
202
  lastReadApisCount: number;
200
203
  lastReadLogsCount: number;
204
+ mediaCount: number;
205
+ refreshMediaCount: () => Promise<number>;
201
206
  selected: NetworkLog | null;
202
207
  setSelected: React.Dispatch<React.SetStateAction<NetworkLog | null>>;
203
208
  selectedEvent: AnalyticsEvent | null;
@@ -8,6 +8,7 @@ export declare const ScreenCapture: {
8
8
  startRecording: (options?: RecordingOptions) => Promise<boolean>;
9
9
  stopRecording: () => Promise<RecordingResult | null>;
10
10
  isRecording: () => Promise<boolean>;
11
+ playVideo: (videoUri: string) => Promise<boolean>;
11
12
  convertToGif: (videoUri: string, options?: GifConversionOptions) => Promise<RecordingResult | null>;
12
13
  getMediaList: () => Promise<CapturedMediaItem[]>;
13
14
  deleteMedia: (uri: string) => Promise<boolean>;
@@ -18,6 +19,7 @@ export declare const ScreenRecorder: {
18
19
  startRecording: (options?: RecordingOptions) => Promise<boolean>;
19
20
  stopRecording: () => Promise<RecordingResult | null>;
20
21
  isRecording: () => Promise<boolean>;
22
+ playVideo: (videoUri: string) => Promise<boolean>;
21
23
  convertToGif: (videoUri: string, options?: GifConversionOptions) => Promise<RecordingResult | null>;
22
24
  getMediaList: () => Promise<CapturedMediaItem[]>;
23
25
  deleteMedia: (uri: string) => Promise<boolean>;
@@ -1,4 +1,4 @@
1
- import { takeNativeScreenshot, startNativeVideoRecording, stopNativeVideoRecording, isNativeRecordingActive, convertNativeVideoToGif, fetchCapturedMediaList, deleteCapturedMediaFile, clearAllCapturedMediaFiles, } from './native/NativeInspector';
1
+ import { takeNativeScreenshot, startNativeVideoRecording, stopNativeVideoRecording, isNativeRecordingActive, playNativeVideo, convertNativeVideoToGif, fetchCapturedMediaList, deleteCapturedMediaFile, clearAllCapturedMediaFiles, } from './native/NativeInspector';
2
2
  export const ScreenCapture = {
3
3
  takeScreenshot: async (options) => {
4
4
  return takeNativeScreenshot(options);
@@ -12,6 +12,9 @@ export const ScreenCapture = {
12
12
  isRecording: async () => {
13
13
  return isNativeRecordingActive();
14
14
  },
15
+ playVideo: async (videoUri) => {
16
+ return playNativeVideo(videoUri);
17
+ },
15
18
  convertToGif: async (videoUri, options) => {
16
19
  return convertNativeVideoToGif(videoUri, options);
17
20
  },
@@ -5,6 +5,7 @@ interface EmptyStateProps {
5
5
  customTitle?: string;
6
6
  customSub?: string;
7
7
  onClearSearch?: () => void;
8
+ showReload?: boolean;
8
9
  }
9
10
  declare const EmptyState: React.NamedExoticComponent<EmptyStateProps>;
10
11
  export default EmptyState;
@@ -5,7 +5,7 @@ import AnimatedEntrance from './AnimatedEntrance';
5
5
  import { EmptyRadarIcon } from './NetworkIcons';
6
6
  import { AppColors } from '../styles/AppColors';
7
7
  import styles from '../styles';
8
- const EmptyState = React.memo(function EmptyState({ isSearch, searchQuery, customTitle, customSub, onClearSearch, }) {
8
+ const EmptyState = React.memo(function EmptyState({ isSearch, searchQuery, customTitle, customSub, onClearSearch, showReload = true, }) {
9
9
  const iconPulse = useRef(new Animated.Value(1)).current;
10
10
  useEffect(() => {
11
11
  const loop = Animated.loop(Animated.sequence([
@@ -48,7 +48,7 @@ const EmptyState = React.memo(function EmptyState({ isSearch, searchQuery, custo
48
48
  {isSearch && onClearSearch && (<TouchableScale style={styles.reloadBtn} onPress={onClearSearch}>
49
49
  <Text style={styles.reloadBtnText}>Clear Search & Filters</Text>
50
50
  </TouchableScale>)}
51
- {!isSearch && (<TouchableScale style={styles.reloadBtn} onPress={handleReload}>
51
+ {!isSearch && showReload && (<TouchableScale style={styles.reloadBtn} onPress={handleReload}>
52
52
  <Text style={styles.reloadBtnText}>Reload App</Text>
53
53
  </TouchableScale>)}
54
54
  </AnimatedEntrance>);