react-native-inapp-inspector 2.0.5 → 2.0.7

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 +11 -0
  2. package/dist/commonjs/components/Inspector/AuditTab.d.ts +3 -0
  3. package/dist/commonjs/components/Inspector/AuditTab.js +741 -0
  4. package/dist/commonjs/components/Inspector/DeviceTab.d.ts +3 -0
  5. package/dist/commonjs/components/Inspector/DeviceTab.js +717 -0
  6. package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.d.ts +7 -0
  7. package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.js +600 -0
  8. package/dist/commonjs/components/Inspector/InspectorHeader.js +28 -25
  9. package/dist/commonjs/components/Inspector/MainScreen.js +19 -2
  10. package/dist/commonjs/components/Inspector/NetworkDetail.js +15 -0
  11. package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +7 -0
  12. package/dist/commonjs/components/Inspector/PerformanceHud.js +210 -0
  13. package/dist/commonjs/components/Inspector/PerformanceTab.js +30 -18
  14. package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +9 -0
  15. package/dist/commonjs/components/Inspector/RequestReplayModal.js +792 -0
  16. package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +8 -0
  17. package/dist/commonjs/components/Inspector/RequestReplayView.js +871 -0
  18. package/dist/commonjs/components/Inspector/SettingsPanel.js +448 -49
  19. package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
  20. package/dist/commonjs/components/Inspector/StorageTab.js +610 -0
  21. package/dist/commonjs/components/Inspector/TabBar.js +23 -2
  22. package/dist/commonjs/components/NetworkIcons.d.ts +12 -0
  23. package/dist/commonjs/components/NetworkIcons.js +72 -3
  24. package/dist/commonjs/constants/version.d.ts +1 -1
  25. package/dist/commonjs/constants/version.js +1 -1
  26. package/dist/commonjs/customHooks/storageInspector.d.ts +13 -0
  27. package/dist/commonjs/customHooks/storageInspector.js +179 -0
  28. package/dist/commonjs/helpers/deviceInfo.d.ts +4 -0
  29. package/dist/commonjs/helpers/deviceInfo.js +94 -0
  30. package/dist/commonjs/helpers/index.d.ts +2 -0
  31. package/dist/commonjs/helpers/index.js +12 -1
  32. package/dist/commonjs/helpers/packageAuditor.d.ts +5 -0
  33. package/dist/commonjs/helpers/packageAuditor.js +182 -0
  34. package/dist/commonjs/helpers/settingsStore.d.ts +1 -1
  35. package/dist/commonjs/helpers/settingsStore.js +4 -2
  36. package/dist/commonjs/i18n/locales/en.json +3 -2
  37. package/dist/commonjs/index.d.ts +1 -0
  38. package/dist/commonjs/index.js +127 -9
  39. package/dist/commonjs/native/NativeInspector.d.ts +1 -0
  40. package/dist/commonjs/types/enums.d.ts +7 -0
  41. package/dist/commonjs/types/enums.js +7 -0
  42. package/dist/commonjs/types/interfaces.d.ts +77 -0
  43. package/dist/esm/components/Inspector/AuditTab.d.ts +3 -0
  44. package/dist/esm/components/Inspector/AuditTab.js +702 -0
  45. package/dist/esm/components/Inspector/DeviceTab.d.ts +3 -0
  46. package/dist/esm/components/Inspector/DeviceTab.js +678 -0
  47. package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.d.ts +7 -0
  48. package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.js +560 -0
  49. package/dist/esm/components/Inspector/InspectorHeader.js +28 -25
  50. package/dist/esm/components/Inspector/MainScreen.js +19 -2
  51. package/dist/esm/components/Inspector/NetworkDetail.js +16 -1
  52. package/dist/esm/components/Inspector/PerformanceHud.d.ts +7 -0
  53. package/dist/esm/components/Inspector/PerformanceHud.js +170 -0
  54. package/dist/esm/components/Inspector/PerformanceTab.js +31 -19
  55. package/dist/esm/components/Inspector/RequestReplayModal.d.ts +9 -0
  56. package/dist/esm/components/Inspector/RequestReplayModal.js +752 -0
  57. package/dist/esm/components/Inspector/RequestReplayView.d.ts +8 -0
  58. package/dist/esm/components/Inspector/RequestReplayView.js +831 -0
  59. package/dist/esm/components/Inspector/SettingsPanel.js +449 -50
  60. package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
  61. package/dist/esm/components/Inspector/StorageTab.js +571 -0
  62. package/dist/esm/components/Inspector/TabBar.js +24 -3
  63. package/dist/esm/components/NetworkIcons.d.ts +12 -0
  64. package/dist/esm/components/NetworkIcons.js +57 -0
  65. package/dist/esm/constants/version.d.ts +1 -1
  66. package/dist/esm/constants/version.js +1 -1
  67. package/dist/esm/customHooks/storageInspector.d.ts +13 -0
  68. package/dist/esm/customHooks/storageInspector.js +170 -0
  69. package/dist/esm/helpers/deviceInfo.d.ts +4 -0
  70. package/dist/esm/helpers/deviceInfo.js +89 -0
  71. package/dist/esm/helpers/index.d.ts +2 -0
  72. package/dist/esm/helpers/index.js +10 -0
  73. package/dist/esm/helpers/packageAuditor.d.ts +5 -0
  74. package/dist/esm/helpers/packageAuditor.js +173 -0
  75. package/dist/esm/helpers/settingsStore.d.ts +1 -1
  76. package/dist/esm/helpers/settingsStore.js +4 -2
  77. package/dist/esm/i18n/locales/en.json +3 -2
  78. package/dist/esm/index.d.ts +1 -0
  79. package/dist/esm/index.js +123 -8
  80. package/dist/esm/native/NativeInspector.d.ts +1 -0
  81. package/dist/esm/types/enums.d.ts +7 -0
  82. package/dist/esm/types/enums.js +7 -0
  83. package/dist/esm/types/interfaces.d.ts +77 -0
  84. package/ios/NetworkInspectorModule.mm +12 -5
  85. package/package.json +4 -1
@@ -0,0 +1,571 @@
1
+ import React, { useMemo, useState } from 'react';
2
+ import { Alert, FlatList, Modal, Pressable, StyleSheet, Text, TextInput, View, } from 'react-native';
3
+ import { useInspector } from './InspectorContext';
4
+ import TouchableScale from '../TouchableScale';
5
+ import { AppColors } from '../../styles/AppColors';
6
+ import { AppFonts } from '../../styles/AppFonts';
7
+ import { formatBytes, copyToClipboard } from '../../helpers';
8
+ import { showToast } from '../../helpers/toast';
9
+ import { DatabaseIcon, SearchIcon, ClearIcon, TrashIcon, EditIcon, PlusIcon, CopyIcon, ResetIcon, KeyIcon, } from '../NetworkIcons';
10
+ export const StorageTab = React.memo(() => {
11
+ const { storageEntries, refreshStorageEntries, updateStorageEntry, deleteStorageEntry, clearAllStorageEntries, } = useInspector();
12
+ const [search, setSearch] = useState('');
13
+ const [editingItem, setEditingItem] = useState(null);
14
+ const [editValue, setEditValue] = useState('');
15
+ const [isAddingNew, setIsAddingNew] = useState(false);
16
+ const [newKey, setNewKey] = useState('');
17
+ const [newValue, setNewValue] = useState('');
18
+ const [expandedKeys, setExpandedKeys] = useState(new Set());
19
+ const filteredEntries = useMemo(() => {
20
+ if (!search || search.trim().length === 0)
21
+ return storageEntries;
22
+ const term = search.toLowerCase().trim();
23
+ return storageEntries.filter(item => item.key.toLowerCase().includes(term) ||
24
+ item.value.toLowerCase().includes(term));
25
+ }, [storageEntries, search]);
26
+ const totalBytes = useMemo(() => storageEntries.reduce((acc, cur) => acc + (cur.sizeBytes || 0), 0), [storageEntries]);
27
+ const toggleExpand = (key) => {
28
+ setExpandedKeys(prev => {
29
+ const next = new Set(prev);
30
+ if (next.has(key)) {
31
+ next.delete(key);
32
+ }
33
+ else {
34
+ next.add(key);
35
+ }
36
+ return next;
37
+ });
38
+ };
39
+ const handleStartEdit = (item) => {
40
+ setEditingItem(item);
41
+ setEditValue(item.value);
42
+ };
43
+ const handleSaveEdit = async () => {
44
+ if (!editingItem)
45
+ return;
46
+ try {
47
+ await updateStorageEntry(editingItem.key, editValue);
48
+ showToast(`Updated "${editingItem.key}"`);
49
+ setEditingItem(null);
50
+ }
51
+ catch {
52
+ Alert.alert('Error', 'Failed to save value to storage.');
53
+ }
54
+ };
55
+ const handleCreateNew = async () => {
56
+ if (!newKey.trim()) {
57
+ Alert.alert('Invalid Key', 'Please enter a non-empty storage key.');
58
+ return;
59
+ }
60
+ try {
61
+ await updateStorageEntry(newKey.trim(), newValue);
62
+ showToast(`Saved key "${newKey.trim()}"`);
63
+ setIsAddingNew(false);
64
+ setNewKey('');
65
+ setNewValue('');
66
+ }
67
+ catch {
68
+ Alert.alert('Error', 'Failed to create storage item.');
69
+ }
70
+ };
71
+ const handleDelete = (key) => {
72
+ Alert.alert('Delete Storage Key', `Are you sure you want to delete "${key}"?`, [
73
+ { text: 'Cancel', style: 'cancel' },
74
+ {
75
+ text: 'Delete',
76
+ style: 'destructive',
77
+ onPress: async () => {
78
+ await deleteStorageEntry(key);
79
+ showToast(`Deleted "${key}"`);
80
+ },
81
+ },
82
+ ]);
83
+ };
84
+ const handleClearAll = () => {
85
+ Alert.alert('Clear All Storage', 'This will erase all saved keys and values in local storage. Are you sure?', [
86
+ { text: 'Cancel', style: 'cancel' },
87
+ {
88
+ text: 'Clear All',
89
+ style: 'destructive',
90
+ onPress: async () => {
91
+ await clearAllStorageEntries();
92
+ showToast('All storage cleared');
93
+ },
94
+ },
95
+ ]);
96
+ };
97
+ return (<View style={styles.container}>
98
+ {/* Top Metrics & Actions Header */}
99
+ <View style={styles.metricsBar}>
100
+ <View style={styles.metricsLeft}>
101
+ <View style={styles.metricItem}>
102
+ <DatabaseIcon size={13} color={AppColors.purple}/>
103
+ <Text style={styles.metricBold}>{storageEntries.length}</Text>
104
+ <Text style={styles.metricLabel}>Keys</Text>
105
+ </View>
106
+ <View style={styles.metricDivider}/>
107
+ <View style={styles.metricItem}>
108
+ <Text style={styles.metricBold}>{formatBytes(totalBytes)}</Text>
109
+ <Text style={styles.metricLabel}>Stored</Text>
110
+ </View>
111
+ </View>
112
+
113
+ <View style={styles.actionsRight}>
114
+ <TouchableScale onPress={refreshStorageEntries} hitSlop={8} style={styles.actionBtn}>
115
+ <ResetIcon size={14} color={AppColors.purple}/>
116
+ </TouchableScale>
117
+ <TouchableScale onPress={() => setIsAddingNew(true)} hitSlop={8} style={[styles.actionBtn, { backgroundColor: AppColors.purple }]}>
118
+ <PlusIcon size={14} color={AppColors.white}/>
119
+ </TouchableScale>
120
+ <TouchableScale onPress={handleClearAll} hitSlop={8} style={[styles.actionBtn, { borderColor: `${AppColors.errorColor}40` }]}>
121
+ <TrashIcon size={14} color={AppColors.errorColor}/>
122
+ </TouchableScale>
123
+ </View>
124
+ </View>
125
+
126
+ {/* Search Input */}
127
+ <View style={styles.searchRow}>
128
+ <View style={styles.searchBox}>
129
+ <SearchIcon size={14} color={AppColors.grayTextWeak}/>
130
+ <TextInput style={styles.searchInput} placeholder="Search storage key or value..." placeholderTextColor={AppColors.grayTextWeak} value={search} onChangeText={setSearch} autoCapitalize="none" autoCorrect={false}/>
131
+ {search.length > 0 && (<Pressable onPress={() => setSearch('')} hitSlop={8}>
132
+ <ClearIcon size={14} color={AppColors.grayTextWeak}/>
133
+ </Pressable>)}
134
+ </View>
135
+ </View>
136
+
137
+ {/* Storage Entries List */}
138
+ <FlatList data={filteredEntries} keyExtractor={item => item.key} contentContainerStyle={styles.listContent} ListEmptyComponent={<View style={styles.emptyState}>
139
+ <DatabaseIcon size={36} color={AppColors.grayTextWeak}/>
140
+ <Text style={styles.emptyTitle}>No Storage Entries</Text>
141
+ <Text style={styles.emptySub}>
142
+ {search
143
+ ? `No keys matched "${search}"`
144
+ : 'No AsyncStorage or local key-value pairs stored yet.'}
145
+ </Text>
146
+ </View>} renderItem={({ item }) => {
147
+ const isExpanded = expandedKeys.has(item.key);
148
+ return (<View style={styles.card}>
149
+ {/* Card Header */}
150
+ <View style={styles.cardHeader}>
151
+ <View style={styles.keyRow}>
152
+ <KeyIcon size={13} color={AppColors.purple}/>
153
+ <Text style={styles.keyText} numberOfLines={1}>
154
+ {item.key}
155
+ </Text>
156
+ </View>
157
+
158
+ <View style={styles.badgeRow}>
159
+ <View style={[
160
+ styles.typeBadge,
161
+ {
162
+ backgroundColor: item.isJson
163
+ ? `${AppColors.purple}18`
164
+ : `${AppColors.emerald500}18`,
165
+ borderColor: item.isJson
166
+ ? `${AppColors.purple}40`
167
+ : `${AppColors.emerald500}40`,
168
+ },
169
+ ]}>
170
+ <Text style={[
171
+ styles.typeBadgeText,
172
+ {
173
+ color: item.isJson
174
+ ? AppColors.purple
175
+ : AppColors.emerald600,
176
+ },
177
+ ]}>
178
+ {item.isJson ? 'JSON' : 'STRING'}
179
+ </Text>
180
+ </View>
181
+ <Text style={styles.sizeText}>
182
+ {formatBytes(item.sizeBytes)}
183
+ </Text>
184
+ </View>
185
+ </View>
186
+
187
+ {/* Value Box */}
188
+ <Pressable onPress={() => toggleExpand(item.key)} style={styles.valueContainer}>
189
+ <Text style={styles.valueText} numberOfLines={isExpanded ? undefined : 3}>
190
+ {item.value}
191
+ </Text>
192
+ </Pressable>
193
+
194
+ {/* Card Actions */}
195
+ <View style={styles.cardFooter}>
196
+ <Text style={styles.footerHint}>
197
+ {isExpanded ? 'Tap to collapse' : 'Tap to expand full value'}
198
+ </Text>
199
+ <View style={styles.cardActions}>
200
+ <TouchableScale onPress={() => {
201
+ copyToClipboard(item.value, 'Storage Value');
202
+ showToast('Copied value!');
203
+ }} hitSlop={6} style={styles.cardActionBtn}>
204
+ <CopyIcon size={12} color={AppColors.grayText}/>
205
+ <Text style={styles.cardActionText}>Copy</Text>
206
+ </TouchableScale>
207
+
208
+ <TouchableScale onPress={() => handleStartEdit(item)} hitSlop={6} style={styles.cardActionBtn}>
209
+ <EditIcon size={12} color={AppColors.purple}/>
210
+ <Text style={[
211
+ styles.cardActionText,
212
+ { color: AppColors.purple },
213
+ ]}>
214
+ Edit
215
+ </Text>
216
+ </TouchableScale>
217
+
218
+ <TouchableScale onPress={() => handleDelete(item.key)} hitSlop={6} style={styles.cardActionBtn}>
219
+ <TrashIcon size={12} color={AppColors.errorColor}/>
220
+ <Text style={[
221
+ styles.cardActionText,
222
+ { color: AppColors.errorColor },
223
+ ]}>
224
+ Delete
225
+ </Text>
226
+ </TouchableScale>
227
+ </View>
228
+ </View>
229
+ </View>);
230
+ }}/>
231
+
232
+ {/* Edit Storage Key Modal */}
233
+ <Modal visible={editingItem !== null} transparent animationType="fade">
234
+ <View style={styles.modalBackdrop}>
235
+ <View style={styles.modalCard}>
236
+ <View style={styles.modalHeader}>
237
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
238
+ <EditIcon size={16} color={AppColors.purple}/>
239
+ <Text style={styles.modalTitle}>Edit Storage Value</Text>
240
+ </View>
241
+ <Pressable onPress={() => setEditingItem(null)} hitSlop={10} style={styles.modalCloseBtn}>
242
+ <ClearIcon size={14} color={AppColors.grayText}/>
243
+ </Pressable>
244
+ </View>
245
+
246
+ <Text style={styles.modalKeyLabel} numberOfLines={1}>
247
+ Key: <Text style={{ color: AppColors.purple }}>{editingItem?.key}</Text>
248
+ </Text>
249
+
250
+ <TextInput style={styles.modalInput} multiline value={editValue} onChangeText={setEditValue} placeholder="Enter new string or JSON value..." placeholderTextColor={AppColors.grayTextWeak} autoCapitalize="none" autoCorrect={false}/>
251
+
252
+ <View style={styles.modalActions}>
253
+ <TouchableScale onPress={() => setEditingItem(null)} style={styles.modalCancelBtn}>
254
+ <Text style={styles.modalCancelText}>Cancel</Text>
255
+ </TouchableScale>
256
+ <TouchableScale onPress={handleSaveEdit} style={styles.modalSaveBtn}>
257
+ <Text style={styles.modalSaveText}>Save Changes</Text>
258
+ </TouchableScale>
259
+ </View>
260
+ </View>
261
+ </View>
262
+ </Modal>
263
+
264
+ {/* Add New Key Modal */}
265
+ <Modal visible={isAddingNew} transparent animationType="fade">
266
+ <View style={styles.modalBackdrop}>
267
+ <View style={styles.modalCard}>
268
+ <View style={styles.modalHeader}>
269
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
270
+ <PlusIcon size={16} color={AppColors.purple}/>
271
+ <Text style={styles.modalTitle}>Add New Storage Key</Text>
272
+ </View>
273
+ <Pressable onPress={() => setIsAddingNew(false)} hitSlop={10} style={styles.modalCloseBtn}>
274
+ <ClearIcon size={14} color={AppColors.grayText}/>
275
+ </Pressable>
276
+ </View>
277
+
278
+ <TextInput style={styles.modalSingleInput} value={newKey} onChangeText={setNewKey} placeholder="@storage_key_name" placeholderTextColor={AppColors.grayTextWeak} autoCapitalize="none" autoCorrect={false}/>
279
+
280
+ <TextInput style={[styles.modalInput, { height: 110 }]} multiline value={newValue} onChangeText={setNewValue} placeholder="Value (string, number, or JSON)..." placeholderTextColor={AppColors.grayTextWeak} autoCapitalize="none" autoCorrect={false}/>
281
+
282
+ <View style={styles.modalActions}>
283
+ <TouchableScale onPress={() => setIsAddingNew(false)} style={styles.modalCancelBtn}>
284
+ <Text style={styles.modalCancelText}>Cancel</Text>
285
+ </TouchableScale>
286
+ <TouchableScale onPress={handleCreateNew} style={styles.modalSaveBtn}>
287
+ <Text style={styles.modalSaveText}>Save Key</Text>
288
+ </TouchableScale>
289
+ </View>
290
+ </View>
291
+ </View>
292
+ </Modal>
293
+ </View>);
294
+ });
295
+ const styles = StyleSheet.create({
296
+ container: {
297
+ flex: 1,
298
+ backgroundColor: AppColors.grayBackground,
299
+ },
300
+ metricsBar: {
301
+ flexDirection: 'row',
302
+ alignItems: 'center',
303
+ justifyContent: 'space-between',
304
+ paddingHorizontal: 14,
305
+ paddingVertical: 10,
306
+ backgroundColor: AppColors.primaryLight,
307
+ borderBottomWidth: 1,
308
+ borderColor: AppColors.grayBorderSecondary,
309
+ },
310
+ metricsLeft: {
311
+ flexDirection: 'row',
312
+ alignItems: 'center',
313
+ gap: 12,
314
+ },
315
+ metricItem: {
316
+ flexDirection: 'row',
317
+ alignItems: 'center',
318
+ gap: 5,
319
+ },
320
+ metricBold: {
321
+ fontFamily: AppFonts.interBold,
322
+ fontSize: 12.5,
323
+ color: AppColors.primaryBlack,
324
+ },
325
+ metricLabel: {
326
+ fontFamily: AppFonts.interRegular,
327
+ fontSize: 11,
328
+ color: AppColors.grayTextWeak,
329
+ },
330
+ metricDivider: {
331
+ width: 1,
332
+ height: 14,
333
+ backgroundColor: AppColors.grayBorderSecondary,
334
+ },
335
+ actionsRight: {
336
+ flexDirection: 'row',
337
+ alignItems: 'center',
338
+ gap: 8,
339
+ },
340
+ actionBtn: {
341
+ width: 30,
342
+ height: 30,
343
+ borderRadius: 7,
344
+ backgroundColor: `${AppColors.purple}14`,
345
+ borderWidth: 1,
346
+ borderColor: `${AppColors.purple}30`,
347
+ alignItems: 'center',
348
+ justifyContent: 'center',
349
+ },
350
+ searchRow: {
351
+ paddingHorizontal: 12,
352
+ paddingVertical: 8,
353
+ },
354
+ searchBox: {
355
+ flexDirection: 'row',
356
+ alignItems: 'center',
357
+ backgroundColor: AppColors.primaryLight,
358
+ borderRadius: 8,
359
+ borderWidth: 1,
360
+ borderColor: AppColors.grayBorderSecondary,
361
+ paddingHorizontal: 10,
362
+ height: 36,
363
+ gap: 8,
364
+ },
365
+ searchInput: {
366
+ flex: 1,
367
+ fontFamily: AppFonts.interRegular,
368
+ fontSize: 12,
369
+ color: AppColors.primaryBlack,
370
+ padding: 0,
371
+ },
372
+ listContent: {
373
+ paddingHorizontal: 12,
374
+ paddingBottom: 40,
375
+ gap: 8,
376
+ },
377
+ card: {
378
+ backgroundColor: AppColors.primaryLight,
379
+ borderRadius: 10,
380
+ borderWidth: 1,
381
+ borderColor: AppColors.grayBorderSecondary,
382
+ padding: 12,
383
+ gap: 8,
384
+ },
385
+ cardHeader: {
386
+ flexDirection: 'row',
387
+ alignItems: 'center',
388
+ justifyContent: 'space-between',
389
+ },
390
+ keyRow: {
391
+ flexDirection: 'row',
392
+ alignItems: 'center',
393
+ gap: 6,
394
+ flex: 1,
395
+ marginRight: 8,
396
+ },
397
+ keyText: {
398
+ fontFamily: AppFonts.interBold,
399
+ fontSize: 12.5,
400
+ color: AppColors.primaryBlack,
401
+ },
402
+ badgeRow: {
403
+ flexDirection: 'row',
404
+ alignItems: 'center',
405
+ gap: 6,
406
+ },
407
+ typeBadge: {
408
+ paddingHorizontal: 6,
409
+ paddingVertical: 2,
410
+ borderRadius: 4,
411
+ borderWidth: 1,
412
+ },
413
+ typeBadgeText: {
414
+ fontFamily: AppFonts.interBold,
415
+ fontSize: 9.5,
416
+ letterSpacing: 0.5,
417
+ },
418
+ sizeText: {
419
+ fontFamily: AppFonts.interRegular,
420
+ fontSize: 10.5,
421
+ color: AppColors.grayTextWeak,
422
+ },
423
+ valueContainer: {
424
+ backgroundColor: `${AppColors.grayBackground}`,
425
+ borderRadius: 6,
426
+ padding: 8,
427
+ borderWidth: 1,
428
+ borderColor: `${AppColors.grayBorderSecondary}80`,
429
+ },
430
+ valueText: {
431
+ fontFamily: AppFonts.interRegular,
432
+ fontSize: 11,
433
+ color: AppColors.grayText,
434
+ lineHeight: 16,
435
+ },
436
+ cardFooter: {
437
+ flexDirection: 'row',
438
+ alignItems: 'center',
439
+ justifyContent: 'space-between',
440
+ marginTop: 2,
441
+ },
442
+ footerHint: {
443
+ fontFamily: AppFonts.interRegular,
444
+ fontSize: 10,
445
+ color: AppColors.grayTextWeak,
446
+ },
447
+ cardActions: {
448
+ flexDirection: 'row',
449
+ alignItems: 'center',
450
+ gap: 12,
451
+ },
452
+ cardActionBtn: {
453
+ flexDirection: 'row',
454
+ alignItems: 'center',
455
+ gap: 4,
456
+ },
457
+ cardActionText: {
458
+ fontFamily: AppFonts.interBold,
459
+ fontSize: 10.5,
460
+ color: AppColors.grayText,
461
+ },
462
+ emptyState: {
463
+ alignItems: 'center',
464
+ justifyContent: 'center',
465
+ paddingVertical: 60,
466
+ gap: 8,
467
+ },
468
+ emptyTitle: {
469
+ fontFamily: AppFonts.interBold,
470
+ fontSize: 14,
471
+ color: AppColors.primaryBlack,
472
+ },
473
+ emptySub: {
474
+ fontFamily: AppFonts.interRegular,
475
+ fontSize: 11.5,
476
+ color: AppColors.grayTextWeak,
477
+ textAlign: 'center',
478
+ maxWidth: 260,
479
+ },
480
+ modalBackdrop: {
481
+ flex: 1,
482
+ backgroundColor: 'rgba(0,0,0,0.5)',
483
+ justifyContent: 'center',
484
+ alignItems: 'center',
485
+ paddingHorizontal: 20,
486
+ },
487
+ modalCard: {
488
+ width: '100%',
489
+ backgroundColor: AppColors.primaryLight,
490
+ borderRadius: 14,
491
+ padding: 16,
492
+ gap: 12,
493
+ borderWidth: 1,
494
+ borderColor: AppColors.grayBorderSecondary,
495
+ shadowColor: '#000',
496
+ shadowOpacity: 0.2,
497
+ shadowRadius: 10,
498
+ elevation: 8,
499
+ },
500
+ modalHeader: {
501
+ flexDirection: 'row',
502
+ alignItems: 'center',
503
+ justifyContent: 'space-between',
504
+ },
505
+ modalTitle: {
506
+ fontFamily: AppFonts.interBold,
507
+ fontSize: 14,
508
+ color: AppColors.primaryBlack,
509
+ },
510
+ modalCloseBtn: {
511
+ padding: 4,
512
+ },
513
+ modalKeyLabel: {
514
+ fontFamily: AppFonts.interMedium,
515
+ fontSize: 12,
516
+ color: AppColors.grayText,
517
+ },
518
+ modalSingleInput: {
519
+ fontFamily: AppFonts.interBold,
520
+ fontSize: 12.5,
521
+ color: AppColors.primaryBlack,
522
+ backgroundColor: AppColors.grayBackground,
523
+ borderRadius: 8,
524
+ borderWidth: 1,
525
+ borderColor: AppColors.grayBorderSecondary,
526
+ paddingHorizontal: 10,
527
+ height: 38,
528
+ },
529
+ modalInput: {
530
+ fontFamily: AppFonts.interRegular,
531
+ fontSize: 12,
532
+ color: AppColors.primaryBlack,
533
+ backgroundColor: AppColors.grayBackground,
534
+ borderRadius: 8,
535
+ borderWidth: 1,
536
+ borderColor: AppColors.grayBorderSecondary,
537
+ padding: 10,
538
+ height: 140,
539
+ textAlignVertical: 'top',
540
+ },
541
+ modalActions: {
542
+ flexDirection: 'row',
543
+ alignItems: 'center',
544
+ justifyContent: 'flex-end',
545
+ gap: 10,
546
+ marginTop: 4,
547
+ },
548
+ modalCancelBtn: {
549
+ paddingHorizontal: 14,
550
+ paddingVertical: 8,
551
+ borderRadius: 8,
552
+ backgroundColor: `${AppColors.grayBorderSecondary}40`,
553
+ },
554
+ modalCancelText: {
555
+ fontFamily: AppFonts.interBold,
556
+ fontSize: 12,
557
+ color: AppColors.grayText,
558
+ },
559
+ modalSaveBtn: {
560
+ paddingHorizontal: 14,
561
+ paddingVertical: 8,
562
+ borderRadius: 8,
563
+ backgroundColor: AppColors.purple,
564
+ },
565
+ modalSaveText: {
566
+ fontFamily: AppFonts.interBold,
567
+ fontSize: 12,
568
+ color: AppColors.white,
569
+ },
570
+ });
571
+ export default StorageTab;
@@ -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, } from '../NetworkIcons';
7
+ import { SignalIcon, TerminalIcon, AnalyticsIcon, PackageIcon, ReduxIcon, PerformanceIcon, CrashIcon, DatabaseIcon, DevicePhoneIcon, ShieldCheckIcon, } 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, lastReadApisCount, lastReadLogsCount, lastReadCrashesCount, unreadPulseAnim, } = useInspector();
11
+ const { activeTab, switchActiveTab, tabVisibility, logs, consoleLogs, analyticsEvents, crashRecords, storageEntries, auditReport, lastReadApisCount, lastReadLogsCount, lastReadCrashesCount, unreadPulseAnim, } = useInspector();
12
12
  const isReduxAvail = isReduxConnected();
13
13
  const isAnalyticsAvail = isAnalyticsConnected();
14
14
  return (<View style={styles.tabBarContainer}>
@@ -38,6 +38,24 @@ 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
+ },
41
59
  {
42
60
  key: 'bundle',
43
61
  label: 'Bundle',
@@ -58,7 +76,7 @@ const TabBar = React.memo(() => {
58
76
  },
59
77
  ]
60
78
  .filter(tab => {
61
- if (!tabVisibility?.[tab.key])
79
+ if (!tabVisibility?.[tab.key] && activeTab !== tab.key)
62
80
  return false;
63
81
  if (tab.key === 'redux' && !isReduxAvail)
64
82
  return false;
@@ -95,6 +113,9 @@ const TabBar = React.memo(() => {
95
113
  {tab.icon === 'logs' && (<TerminalIcon color={iconColor} size={14}/>)}
96
114
  {tab.icon === 'analytics' && (<AnalyticsIcon color={iconColor} size={14}/>)}
97
115
  {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}/>)}
98
119
  {tab.icon === 'bundle' && (<PackageIcon color={iconColor} size={14}/>)}
99
120
  {tab.icon === 'performance' && (<PerformanceIcon color={iconColor} size={14}/>)}
100
121
  {tab.icon === 'crash' && (<CrashIcon color={iconColor} size={14}/>)}
@@ -22,6 +22,7 @@ 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;
25
26
  export declare const CopyIcon: ({ color, size }: IconProps) => React.JSX.Element;
26
27
  export declare const FetchIcon: ({ color, size }: IconProps) => React.JSX.Element;
27
28
  export declare const TerminalIcon: ({ color, size, }: IconProps) => React.JSX.Element;
@@ -127,3 +128,14 @@ export declare const TagIcon: ({ color, size }: IconProps) => React.JSX.Element;
127
128
  export declare const NpmIcon: ({ color, size }: IconProps) => React.JSX.Element;
128
129
  export declare const ResetIcon: ({ color, size }: IconProps) => React.JSX.Element;
129
130
  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;