react-native-inapp-inspector 2.3.4 → 2.3.6
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.
- package/dist/commonjs/analytics.d.ts +0 -4
- package/dist/commonjs/analytics.js +0 -4
- package/dist/commonjs/bundle.d.ts +0 -4
- package/dist/commonjs/bundle.js +0 -4
- package/dist/commonjs/components/AnalyticsDetail.js +18 -27
- package/dist/commonjs/components/AnalyticsEventCard.js +9 -12
- package/dist/commonjs/components/AnalyticsGraph.js +10 -15
- package/dist/commonjs/components/AppHeaderLogo.js +0 -3
- package/dist/commonjs/components/BrandCircleIcon.js +15 -15
- package/dist/commonjs/components/BrandSquareIcon.js +20 -20
- package/dist/commonjs/components/CodeSnippet.js +6 -19
- package/dist/commonjs/components/ConsoleLogCard.js +0 -1
- package/dist/commonjs/components/CopyButton.js +0 -4
- package/dist/commonjs/components/DiffViewer.js +0 -2
- package/dist/commonjs/components/DomainHeader.js +0 -4
- package/dist/commonjs/components/EmptyState.js +0 -3
- package/dist/commonjs/components/ErrorBoundary.js +5 -10
- package/dist/commonjs/components/HeadersSection.js +0 -5
- package/dist/commonjs/components/HighlightText.js +1 -4
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +11 -26
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +34 -40
- package/dist/commonjs/components/Inspector/BundleTab.js +56 -84
- package/dist/commonjs/components/Inspector/ConsoleTab.js +7 -7
- package/dist/commonjs/components/Inspector/CrashDetail.js +18 -20
- package/dist/commonjs/components/Inspector/CrashFilterModal.js +0 -1
- package/dist/commonjs/components/Inspector/CrashTab.js +11 -20
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +12 -24
- package/dist/commonjs/components/Inspector/FabLauncher.js +1 -1
- package/dist/commonjs/components/Inspector/InspectorContext.js +0 -2
- package/dist/commonjs/components/Inspector/InspectorHeader.js +7 -8
- package/dist/commonjs/components/Inspector/LogDetail.js +27 -29
- package/dist/commonjs/components/Inspector/MainScreen.js +168 -9
- package/dist/commonjs/components/Inspector/NetworkDetail.js +10 -11
- package/dist/commonjs/components/Inspector/NetworkTab.js +14 -14
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +6 -9
- package/dist/commonjs/components/Inspector/PerformanceTab.js +30 -43
- package/dist/commonjs/components/Inspector/ReduxDetail.js +18 -34
- package/dist/commonjs/components/Inspector/ReduxTab.js +11 -20
- package/dist/commonjs/components/Inspector/SettingsPanel.js +32 -36
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +6 -6
- package/dist/commonjs/components/Inspector/StorageTab.js +14 -26
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +5 -6
- package/dist/commonjs/components/JsonViewer.js +3 -10
- package/dist/commonjs/components/LogCard.js +7 -7
- package/dist/commonjs/components/MetaAccordion.js +1 -7
- package/dist/commonjs/components/NetworkIcons.js +12 -16
- package/dist/commonjs/components/SectionHeader.js +0 -4
- package/dist/commonjs/components/SkeletonPlaceholder.js +6 -6
- package/dist/commonjs/components/Slider.js +6 -6
- package/dist/commonjs/components/SourcePageCard.js +0 -4
- package/dist/commonjs/components/TreeNode.js +0 -4
- package/dist/commonjs/console.d.ts +0 -4
- package/dist/commonjs/console.js +0 -4
- package/dist/commonjs/constants/index.js +6 -9
- package/dist/commonjs/constants/telemetryConfig.d.ts +7 -0
- package/dist/commonjs/constants/telemetryConfig.js +10 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -3
- package/dist/commonjs/crash.d.ts +0 -4
- package/dist/commonjs/crash.js +0 -4
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +0 -7
- package/dist/commonjs/customHooks/analyticsLogger.js +3 -59
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +0 -9
- package/dist/commonjs/customHooks/bundleAnalyzer.js +3 -86
- package/dist/commonjs/customHooks/consoleLogger.js +0 -16
- package/dist/commonjs/customHooks/crashHandler.d.ts +0 -28
- package/dist/commonjs/customHooks/crashHandler.js +0 -55
- package/dist/commonjs/customHooks/logFilters.d.ts +0 -4
- package/dist/commonjs/customHooks/logFilters.js +0 -11
- package/dist/commonjs/customHooks/networkLogger.js +2 -13
- package/dist/commonjs/customHooks/performanceTracker.d.ts +0 -27
- package/dist/commonjs/customHooks/performanceTracker.js +0 -31
- package/dist/commonjs/customHooks/reduxLogger.d.ts +0 -12
- package/dist/commonjs/customHooks/reduxLogger.js +0 -51
- package/dist/commonjs/customHooks/storageInspector.d.ts +0 -40
- package/dist/commonjs/customHooks/storageInspector.js +1 -56
- package/dist/commonjs/decorators/index.d.ts +0 -37
- package/dist/commonjs/decorators/index.js +0 -42
- package/dist/commonjs/helpers/gaAnalyticsRegistry.d.ts +0 -10
- package/dist/commonjs/helpers/gaAnalyticsRegistry.js +0 -26
- package/dist/commonjs/helpers/index.d.ts +0 -7
- package/dist/commonjs/helpers/index.js +1 -42
- package/dist/commonjs/helpers/memoryManager.d.ts +0 -11
- package/dist/commonjs/helpers/memoryManager.js +0 -13
- package/dist/commonjs/helpers/searchQueryParser.d.ts +0 -4
- package/dist/commonjs/helpers/searchQueryParser.js +0 -18
- package/dist/commonjs/helpers/settingsStore.js +0 -8
- package/dist/commonjs/helpers/telemetry.d.ts +2 -0
- package/dist/commonjs/helpers/telemetry.js +302 -0
- package/dist/commonjs/i18n/index.d.ts +0 -9
- package/dist/commonjs/i18n/index.js +0 -15
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/commonjs/index.js +18 -102
- package/dist/commonjs/native/NativeInspector.d.ts +0 -54
- package/dist/commonjs/native/NativeInspector.js +0 -56
- package/dist/commonjs/network.d.ts +0 -4
- package/dist/commonjs/network.js +0 -4
- package/dist/commonjs/performance.d.ts +0 -4
- package/dist/commonjs/performance.js +0 -4
- package/dist/commonjs/redux.d.ts +0 -4
- package/dist/commonjs/redux.js +0 -4
- package/dist/commonjs/storage.d.ts +0 -4
- package/dist/commonjs/storage.js +0 -4
- package/dist/commonjs/styles/AppColors.d.ts +0 -3
- package/dist/commonjs/styles/AppColors.js +15 -30
- package/dist/commonjs/styles/AppFonts.d.ts +0 -4
- package/dist/commonjs/styles/AppFonts.js +0 -4
- package/dist/commonjs/styles/common.js +0 -11
- package/dist/commonjs/styles/index.js +0 -8
- package/dist/commonjs/types/enums.js +0 -3
- package/dist/commonjs/types/interfaces.d.ts +3 -3
- package/dist/esm/analytics.d.ts +0 -4
- package/dist/esm/analytics.js +0 -4
- package/dist/esm/bundle.d.ts +0 -4
- package/dist/esm/bundle.js +0 -4
- package/dist/esm/components/AnalyticsDetail.js +18 -27
- package/dist/esm/components/AnalyticsEventCard.js +9 -12
- package/dist/esm/components/AnalyticsGraph.js +10 -15
- package/dist/esm/components/AppHeaderLogo.js +0 -3
- package/dist/esm/components/BrandCircleIcon.js +15 -15
- package/dist/esm/components/BrandSquareIcon.js +20 -20
- package/dist/esm/components/CodeSnippet.js +6 -19
- package/dist/esm/components/ConsoleLogCard.js +0 -1
- package/dist/esm/components/CopyButton.js +0 -4
- package/dist/esm/components/DiffViewer.js +0 -2
- package/dist/esm/components/DomainHeader.js +0 -4
- package/dist/esm/components/EmptyState.js +0 -3
- package/dist/esm/components/ErrorBoundary.js +5 -10
- package/dist/esm/components/HeadersSection.js +0 -5
- package/dist/esm/components/HighlightText.js +1 -4
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +11 -26
- package/dist/esm/components/Inspector/AnalyticsTab.js +34 -40
- package/dist/esm/components/Inspector/BundleTab.js +56 -84
- package/dist/esm/components/Inspector/ConsoleTab.js +7 -7
- package/dist/esm/components/Inspector/CrashDetail.js +18 -20
- package/dist/esm/components/Inspector/CrashFilterModal.js +0 -1
- package/dist/esm/components/Inspector/CrashTab.js +11 -20
- package/dist/esm/components/Inspector/DeviceInfoTab.js +12 -24
- package/dist/esm/components/Inspector/FabLauncher.js +1 -1
- package/dist/esm/components/Inspector/InspectorContext.js +0 -2
- package/dist/esm/components/Inspector/InspectorHeader.js +7 -8
- package/dist/esm/components/Inspector/LogDetail.js +27 -29
- package/dist/esm/components/Inspector/MainScreen.js +168 -9
- package/dist/esm/components/Inspector/NetworkDetail.js +10 -11
- package/dist/esm/components/Inspector/NetworkTab.js +14 -14
- package/dist/esm/components/Inspector/NpmUpdateToast.js +6 -9
- package/dist/esm/components/Inspector/PerformanceTab.js +30 -43
- package/dist/esm/components/Inspector/ReduxDetail.js +18 -34
- package/dist/esm/components/Inspector/ReduxTab.js +11 -20
- package/dist/esm/components/Inspector/SettingsPanel.js +32 -36
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +6 -6
- package/dist/esm/components/Inspector/StorageTab.js +14 -26
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +5 -6
- package/dist/esm/components/JsonViewer.js +3 -10
- package/dist/esm/components/LogCard.js +7 -7
- package/dist/esm/components/MetaAccordion.js +1 -7
- package/dist/esm/components/NetworkIcons.js +12 -16
- package/dist/esm/components/SectionHeader.js +0 -4
- package/dist/esm/components/SkeletonPlaceholder.js +6 -6
- package/dist/esm/components/Slider.js +6 -6
- package/dist/esm/components/SourcePageCard.js +0 -4
- package/dist/esm/components/TreeNode.js +0 -4
- package/dist/esm/console.d.ts +0 -4
- package/dist/esm/console.js +0 -4
- package/dist/esm/constants/index.js +6 -9
- package/dist/esm/constants/telemetryConfig.d.ts +7 -0
- package/dist/esm/constants/telemetryConfig.js +7 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -3
- package/dist/esm/crash.d.ts +0 -4
- package/dist/esm/crash.js +0 -4
- package/dist/esm/customHooks/analyticsLogger.d.ts +0 -7
- package/dist/esm/customHooks/analyticsLogger.js +3 -59
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +0 -9
- package/dist/esm/customHooks/bundleAnalyzer.js +3 -86
- package/dist/esm/customHooks/consoleLogger.js +0 -16
- package/dist/esm/customHooks/crashHandler.d.ts +0 -28
- package/dist/esm/customHooks/crashHandler.js +0 -55
- package/dist/esm/customHooks/logFilters.d.ts +0 -4
- package/dist/esm/customHooks/logFilters.js +0 -11
- package/dist/esm/customHooks/networkLogger.js +2 -13
- package/dist/esm/customHooks/performanceTracker.d.ts +0 -27
- package/dist/esm/customHooks/performanceTracker.js +0 -31
- package/dist/esm/customHooks/reduxLogger.d.ts +0 -12
- package/dist/esm/customHooks/reduxLogger.js +0 -51
- package/dist/esm/customHooks/storageInspector.d.ts +0 -40
- package/dist/esm/customHooks/storageInspector.js +1 -56
- package/dist/esm/decorators/index.d.ts +0 -37
- package/dist/esm/decorators/index.js +0 -42
- package/dist/esm/helpers/gaAnalyticsRegistry.d.ts +0 -10
- package/dist/esm/helpers/gaAnalyticsRegistry.js +0 -26
- package/dist/esm/helpers/index.d.ts +0 -7
- package/dist/esm/helpers/index.js +1 -42
- package/dist/esm/helpers/memoryManager.d.ts +0 -11
- package/dist/esm/helpers/memoryManager.js +0 -13
- package/dist/esm/helpers/searchQueryParser.d.ts +0 -4
- package/dist/esm/helpers/searchQueryParser.js +0 -18
- package/dist/esm/helpers/settingsStore.js +0 -8
- package/dist/esm/helpers/telemetry.d.ts +2 -0
- package/dist/esm/helpers/telemetry.js +298 -0
- package/dist/esm/i18n/index.d.ts +0 -9
- package/dist/esm/i18n/index.js +0 -15
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +15 -98
- package/dist/esm/native/NativeInspector.d.ts +0 -54
- package/dist/esm/native/NativeInspector.js +0 -56
- package/dist/esm/network.d.ts +0 -4
- package/dist/esm/network.js +0 -4
- package/dist/esm/performance.d.ts +0 -4
- package/dist/esm/performance.js +0 -4
- package/dist/esm/redux.d.ts +0 -4
- package/dist/esm/redux.js +0 -4
- package/dist/esm/storage.d.ts +0 -4
- package/dist/esm/storage.js +0 -4
- package/dist/esm/styles/AppColors.d.ts +0 -3
- package/dist/esm/styles/AppColors.js +15 -30
- package/dist/esm/styles/AppFonts.d.ts +0 -4
- package/dist/esm/styles/AppFonts.js +0 -4
- package/dist/esm/styles/common.js +0 -11
- package/dist/esm/styles/index.js +0 -8
- package/dist/esm/types/enums.js +0 -3
- package/dist/esm/types/interfaces.d.ts +3 -3
- package/package.json +2 -2
- package/src/components/Inspector/MainScreen.tsx +188 -2
- package/src/constants/telemetryConfig.ts +16 -0
- package/src/constants/version.ts +1 -1
- package/src/helpers/telemetry.ts +341 -0
- package/src/index.tsx +15 -2
- package/src/types/interfaces.ts +3 -0
|
@@ -28,7 +28,6 @@ const StorageEntryCard = React.memo(function StorageEntryCard({ entry, isExpande
|
|
|
28
28
|
? `${entry.byteSize} B`
|
|
29
29
|
: `${(entry.byteSize / 1024).toFixed(1)} KB`;
|
|
30
30
|
}, [entry.byteSize]);
|
|
31
|
-
// Lazy compute displayed value to avoid layout thrashing on large JSON strings
|
|
32
31
|
const displayValue = useMemo(() => {
|
|
33
32
|
if (!isExpanded) {
|
|
34
33
|
if (entry.value.length > 250) {
|
|
@@ -48,7 +47,7 @@ const StorageEntryCard = React.memo(function StorageEntryCard({ entry, isExpande
|
|
|
48
47
|
return entry.value;
|
|
49
48
|
}, [isExpanded, entry.value, entry.type, entry.parsedValue]);
|
|
50
49
|
return (<View style={styles.entryCard}>
|
|
51
|
-
|
|
50
|
+
|
|
52
51
|
<View style={styles.entryHeader}>
|
|
53
52
|
<View style={{ flex: 1, marginRight: 8 }}>
|
|
54
53
|
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, flexWrap: 'wrap' }}>
|
|
@@ -67,7 +66,7 @@ const StorageEntryCard = React.memo(function StorageEntryCard({ entry, isExpande
|
|
|
67
66
|
</View>
|
|
68
67
|
</View>
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
|
|
71
70
|
<View style={styles.entryActions}>
|
|
72
71
|
<TouchableScale hitSlop={6} onPress={() => onCopy(entry)} style={styles.entryActionBtn}>
|
|
73
72
|
<CopyIcon size={12} color={AppColors.grayText}/>
|
|
@@ -83,7 +82,7 @@ const StorageEntryCard = React.memo(function StorageEntryCard({ entry, isExpande
|
|
|
83
82
|
</View>
|
|
84
83
|
</View>
|
|
85
84
|
|
|
86
|
-
|
|
85
|
+
|
|
87
86
|
<TouchableScale onPress={() => onToggleExpand(entry.key)} style={styles.valuePreviewBox}>
|
|
88
87
|
<Text style={styles.valuePreviewText} numberOfLines={isExpanded ? undefined : 3} selectable={isExpanded}>
|
|
89
88
|
{displayValue}
|
|
@@ -102,7 +101,6 @@ export const StorageTab = React.memo(() => {
|
|
|
102
101
|
const [isLoading, setIsLoading] = useState(true);
|
|
103
102
|
const [search, setSearch] = useState('');
|
|
104
103
|
const [expandedKeys, setExpandedKeys] = useState({});
|
|
105
|
-
// Modal State for Create / Edit
|
|
106
104
|
const [modalVisible, setModalVisible] = useState(false);
|
|
107
105
|
const [modalMode, setModalMode] = useState('create');
|
|
108
106
|
const [editKeyName, setEditKeyName] = useState('');
|
|
@@ -110,7 +108,6 @@ export const StorageTab = React.memo(() => {
|
|
|
110
108
|
const [editType, setEditType] = useState('string');
|
|
111
109
|
const [jsonError, setJsonError] = useState(null);
|
|
112
110
|
const mmkvInstanceIds = useMemo(() => getRegisteredMMKVInstanceIds(), []);
|
|
113
|
-
// Fetch entries
|
|
114
111
|
const loadEntries = useCallback(async () => {
|
|
115
112
|
setIsLoading(true);
|
|
116
113
|
try {
|
|
@@ -129,11 +126,9 @@ export const StorageTab = React.memo(() => {
|
|
|
129
126
|
const unsubscribe = subscribeToStorageChanges(loadEntries);
|
|
130
127
|
return unsubscribe;
|
|
131
128
|
}, [loadEntries]);
|
|
132
|
-
// Toggle JSON accordion
|
|
133
129
|
const toggleExpand = (key) => {
|
|
134
130
|
setExpandedKeys(prev => ({ ...prev, [key]: !prev[key] }));
|
|
135
131
|
};
|
|
136
|
-
// Open Create Modal
|
|
137
132
|
const handleOpenCreate = () => {
|
|
138
133
|
setModalMode('create');
|
|
139
134
|
setEditKeyName('');
|
|
@@ -142,7 +137,6 @@ export const StorageTab = React.memo(() => {
|
|
|
142
137
|
setJsonError(null);
|
|
143
138
|
setModalVisible(true);
|
|
144
139
|
};
|
|
145
|
-
// Open Edit Modal
|
|
146
140
|
const handleOpenEdit = (entry) => {
|
|
147
141
|
setModalMode('edit');
|
|
148
142
|
setEditKeyName(entry.key);
|
|
@@ -151,7 +145,6 @@ export const StorageTab = React.memo(() => {
|
|
|
151
145
|
setJsonError(null);
|
|
152
146
|
setModalVisible(true);
|
|
153
147
|
};
|
|
154
|
-
// Delete single key
|
|
155
148
|
const handleDeleteKey = (key) => {
|
|
156
149
|
Alert.alert('Delete Storage Key', `Are you sure you want to permanently delete "${key}" from ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'}?`, [
|
|
157
150
|
{ text: 'Cancel', style: 'cancel' },
|
|
@@ -171,7 +164,6 @@ export const StorageTab = React.memo(() => {
|
|
|
171
164
|
},
|
|
172
165
|
]);
|
|
173
166
|
};
|
|
174
|
-
// Clear all keys
|
|
175
167
|
const handleClearAll = () => {
|
|
176
168
|
Alert.alert('Wipe All Storage Keys', `Are you sure you want to clear all ${entries.length} keys in ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'}? This cannot be undone.`, [
|
|
177
169
|
{ text: 'Cancel', style: 'cancel' },
|
|
@@ -188,7 +180,6 @@ export const StorageTab = React.memo(() => {
|
|
|
188
180
|
},
|
|
189
181
|
]);
|
|
190
182
|
};
|
|
191
|
-
// Save Modal (Create / Update)
|
|
192
183
|
const handleSaveModal = async () => {
|
|
193
184
|
if (!editKeyName.trim()) {
|
|
194
185
|
showToast('Key name cannot be empty');
|
|
@@ -197,7 +188,6 @@ export const StorageTab = React.memo(() => {
|
|
|
197
188
|
let finalVal = editValue;
|
|
198
189
|
if (editType === 'json') {
|
|
199
190
|
try {
|
|
200
|
-
// Validate JSON
|
|
201
191
|
const parsed = JSON.parse(editValue);
|
|
202
192
|
finalVal = JSON.stringify(parsed);
|
|
203
193
|
}
|
|
@@ -222,7 +212,6 @@ export const StorageTab = React.memo(() => {
|
|
|
222
212
|
showToast('Error saving storage key');
|
|
223
213
|
}
|
|
224
214
|
};
|
|
225
|
-
// Format / Beautify JSON in modal
|
|
226
215
|
const handleBeautifyJson = () => {
|
|
227
216
|
try {
|
|
228
217
|
const parsed = JSON.parse(editValue);
|
|
@@ -235,7 +224,6 @@ export const StorageTab = React.memo(() => {
|
|
|
235
224
|
setJsonError('Cannot format: invalid JSON syntax');
|
|
236
225
|
}
|
|
237
226
|
};
|
|
238
|
-
// Filter entries
|
|
239
227
|
const filteredEntries = useMemo(() => {
|
|
240
228
|
if (!search.trim())
|
|
241
229
|
return entries;
|
|
@@ -261,7 +249,7 @@ export const StorageTab = React.memo(() => {
|
|
|
261
249
|
? isAsyncStorageConnected()
|
|
262
250
|
: isMMKVConnected();
|
|
263
251
|
return (<View style={styles.container}>
|
|
264
|
-
|
|
252
|
+
|
|
265
253
|
<View style={styles.driverTabsWrapper}>
|
|
266
254
|
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.driverTabsContainer}>
|
|
267
255
|
<TouchableScale onPress={() => setActiveDriver('asyncStorage')} style={[
|
|
@@ -300,7 +288,7 @@ export const StorageTab = React.memo(() => {
|
|
|
300
288
|
</View>)}
|
|
301
289
|
</TouchableScale>
|
|
302
290
|
|
|
303
|
-
|
|
291
|
+
|
|
304
292
|
{activeDriver === 'mmkv' && mmkvInstanceIds.length > 1 && (<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4, marginLeft: 6 }}>
|
|
305
293
|
{mmkvInstanceIds.map(id => (<TouchableScale key={id} onPress={() => setActiveMMKVId(id)} style={[
|
|
306
294
|
styles.instancePill,
|
|
@@ -317,7 +305,7 @@ export const StorageTab = React.memo(() => {
|
|
|
317
305
|
</ScrollView>
|
|
318
306
|
</View>
|
|
319
307
|
|
|
320
|
-
|
|
308
|
+
|
|
321
309
|
<View style={styles.actionBar}>
|
|
322
310
|
<View style={styles.searchBar}>
|
|
323
311
|
<SearchIcon size={14} color={AppColors.grayTextWeak}/>
|
|
@@ -343,7 +331,7 @@ export const StorageTab = React.memo(() => {
|
|
|
343
331
|
</View>)}
|
|
344
332
|
</View>
|
|
345
333
|
|
|
346
|
-
|
|
334
|
+
|
|
347
335
|
<TouchableScale onPress={handleOpenCreate} style={styles.addKeyBtn} hitSlop={6}>
|
|
348
336
|
<PlusIcon size={13} color={AppColors.white}/>
|
|
349
337
|
<Text style={styles.addKeyBtnText}>Add</Text>
|
|
@@ -358,7 +346,7 @@ export const StorageTab = React.memo(() => {
|
|
|
358
346
|
</TouchableScale>)}
|
|
359
347
|
</View>
|
|
360
348
|
|
|
361
|
-
|
|
349
|
+
|
|
362
350
|
<View style={styles.statsStrip}>
|
|
363
351
|
<Text style={styles.statsText}>
|
|
364
352
|
{filteredEntries.length} of {entries.length} Keys • {formattedTotalSize}
|
|
@@ -368,7 +356,7 @@ export const StorageTab = React.memo(() => {
|
|
|
368
356
|
</Text>
|
|
369
357
|
</View>
|
|
370
358
|
|
|
371
|
-
|
|
359
|
+
|
|
372
360
|
{isLoading ? (<View style={styles.loadingContainer}>
|
|
373
361
|
<ActivityIndicator size="small" color={AppColors.purple}/>
|
|
374
362
|
<Text style={styles.loadingText}>Loading storage entries...</Text>
|
|
@@ -386,7 +374,7 @@ export const StorageTab = React.memo(() => {
|
|
|
386
374
|
</Text>
|
|
387
375
|
</View>} ListFooterComponent={<View style={{ height: 60 }}/>}/>)}
|
|
388
376
|
|
|
389
|
-
|
|
377
|
+
|
|
390
378
|
<Modal visible={modalVisible} transparent animationType="fade" onRequestClose={() => setModalVisible(false)}>
|
|
391
379
|
<View style={styles.modalOverlay}>
|
|
392
380
|
<View style={styles.modalCard}>
|
|
@@ -399,7 +387,7 @@ export const StorageTab = React.memo(() => {
|
|
|
399
387
|
</TouchableScale>
|
|
400
388
|
</View>
|
|
401
389
|
|
|
402
|
-
|
|
390
|
+
|
|
403
391
|
<View style={styles.inputGroup}>
|
|
404
392
|
<Text style={styles.inputLabel}>KEY NAME</Text>
|
|
405
393
|
<TextInput value={editKeyName} onChangeText={setEditKeyName} placeholder="e.g. user_session, auth_token" placeholderTextColor={AppColors.grayTextWeak} editable={modalMode === 'create'} style={[
|
|
@@ -408,7 +396,7 @@ export const StorageTab = React.memo(() => {
|
|
|
408
396
|
]} autoCapitalize="none"/>
|
|
409
397
|
</View>
|
|
410
398
|
|
|
411
|
-
|
|
399
|
+
|
|
412
400
|
<View style={styles.inputGroup}>
|
|
413
401
|
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', marginBottom: 4 }}>
|
|
414
402
|
<Text style={styles.inputLabel}>VALUE TYPE</Text>
|
|
@@ -437,7 +425,7 @@ export const StorageTab = React.memo(() => {
|
|
|
437
425
|
</View>
|
|
438
426
|
</View>
|
|
439
427
|
|
|
440
|
-
|
|
428
|
+
|
|
441
429
|
<View style={styles.inputGroup}>
|
|
442
430
|
<Text style={styles.inputLabel}>VALUE CONTENT</Text>
|
|
443
431
|
<TextInput value={editValue} onChangeText={v => {
|
|
@@ -454,7 +442,7 @@ export const StorageTab = React.memo(() => {
|
|
|
454
442
|
{jsonError && (<Text style={styles.errorText}>⚠️ {jsonError}</Text>)}
|
|
455
443
|
</View>
|
|
456
444
|
|
|
457
|
-
|
|
445
|
+
|
|
458
446
|
<View style={styles.modalActions}>
|
|
459
447
|
<TouchableScale onPress={() => setModalVisible(false)} style={styles.cancelBtn}>
|
|
460
448
|
<Text style={styles.cancelBtnText}>Cancel</Text>
|
|
@@ -6,7 +6,6 @@ import { NpmIcon } from '../NetworkIcons';
|
|
|
6
6
|
import { LIB_VERSION } from '../../constants';
|
|
7
7
|
import { copyToClipboard } from '../../helpers';
|
|
8
8
|
import { showToast } from '../../helpers/toast';
|
|
9
|
-
// ─── Crisp SVG Icons ─────────────────────────────────────────────────────────
|
|
10
9
|
const CopySvg = ({ size = 14, color = '#64748B' }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
11
10
|
<Path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
12
11
|
<Path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
@@ -90,12 +89,12 @@ export const UpdateAvailableModal = ({ visible, latestVersion, onClose, }) => {
|
|
|
90
89
|
transform: [{ scale: scaleAnim }],
|
|
91
90
|
},
|
|
92
91
|
]}>
|
|
93
|
-
|
|
92
|
+
|
|
94
93
|
<TouchableOpacity style={styles.topCloseButton} onPress={handleClose} hitSlop={10} activeOpacity={0.7}>
|
|
95
94
|
<CloseSvg size={13} color="#64748B"/>
|
|
96
95
|
</TouchableOpacity>
|
|
97
96
|
|
|
98
|
-
|
|
97
|
+
|
|
99
98
|
<View style={styles.headerSection}>
|
|
100
99
|
<View style={styles.iconHaloRing}>
|
|
101
100
|
<BrandSquareIcon size={52}/>
|
|
@@ -110,7 +109,7 @@ export const UpdateAvailableModal = ({ visible, latestVersion, onClose, }) => {
|
|
|
110
109
|
</Text>
|
|
111
110
|
</View>
|
|
112
111
|
|
|
113
|
-
|
|
112
|
+
|
|
114
113
|
<View style={styles.versionComparisonCard}>
|
|
115
114
|
<View style={styles.versionColumn}>
|
|
116
115
|
<Text style={styles.versionLabel}>INSTALLED</Text>
|
|
@@ -132,7 +131,7 @@ export const UpdateAvailableModal = ({ visible, latestVersion, onClose, }) => {
|
|
|
132
131
|
</View>
|
|
133
132
|
</View>
|
|
134
133
|
|
|
135
|
-
|
|
134
|
+
|
|
136
135
|
<View style={styles.codeSnippetBox}>
|
|
137
136
|
<View style={styles.codeSnippetHeader}>
|
|
138
137
|
<Text style={styles.codeSnippetLabel}>UPGRADE COMMAND</Text>
|
|
@@ -152,7 +151,7 @@ export const UpdateAvailableModal = ({ visible, latestVersion, onClose, }) => {
|
|
|
152
151
|
</TouchableOpacity>
|
|
153
152
|
</View>
|
|
154
153
|
|
|
155
|
-
|
|
154
|
+
|
|
156
155
|
<View style={styles.buttonRow}>
|
|
157
156
|
<TouchableOpacity style={styles.secondaryButton} onPress={handleClose} activeOpacity={0.7}>
|
|
158
157
|
<Text style={styles.secondaryButtonText}>Later</Text>
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { ScrollView, View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
3
|
import { useTranslation } from '../i18n';
|
|
4
|
-
// Components
|
|
5
4
|
import TreeNode from './TreeNode';
|
|
6
5
|
import SegmentedTabs from './SegmentedTabs';
|
|
7
6
|
import HighlightText from './HighlightText';
|
|
8
7
|
import CopyButton from './CopyButton';
|
|
9
8
|
import { PrettyIcon, RawIcon, TableIcon } from './NetworkIcons';
|
|
10
|
-
// Styles
|
|
11
9
|
import { AppColors } from '../styles/AppColors';
|
|
12
10
|
import { AppFonts } from '../styles/AppFonts';
|
|
13
11
|
import styles from '../styles';
|
|
14
|
-
// ── Table Row Component with 3-Line Clamp & Show More/Less ───────────────────
|
|
15
12
|
const JsonTableRow = React.memo(({ itemKey, val, search, }) => {
|
|
16
13
|
const [expanded, setExpanded] = useState(false);
|
|
17
14
|
const isObject = val !== null && typeof val === 'object';
|
|
@@ -55,7 +52,6 @@ const JsonTableRow = React.memo(({ itemKey, val, search, }) => {
|
|
|
55
52
|
</View>
|
|
56
53
|
</View>);
|
|
57
54
|
});
|
|
58
|
-
// ── JsonViewer Component ─────────────────────────────────────────────────────
|
|
59
55
|
const JsonViewer = React.memo(({ data, search, forceOpen, defaultExpandDepth = 1, wrap, fullHeight = false, maxHeight, mode: externalMode, onModeChange, hideTabs = false, }) => {
|
|
60
56
|
const { t } = useTranslation();
|
|
61
57
|
const [internalMode, setInternalMode] = useState('raw');
|
|
@@ -103,12 +99,10 @@ const JsonViewer = React.memo(({ data, search, forceOpen, defaultExpandDepth = 1
|
|
|
103
99
|
localStyles.rawScroll,
|
|
104
100
|
!fullHeight && maxHeight != null && { maxHeight },
|
|
105
101
|
];
|
|
106
|
-
// Determine type and size details
|
|
107
102
|
const isObject = typeof data === 'object' && data !== null;
|
|
108
103
|
const isEmpty = data === null ||
|
|
109
104
|
data === undefined ||
|
|
110
105
|
(isObject && Object.keys(data).length === 0);
|
|
111
|
-
// Render Table view (Key-Value flat table for root keys)
|
|
112
106
|
const renderTableMode = () => {
|
|
113
107
|
if (!isObject) {
|
|
114
108
|
return (<View style={localStyles.tableRow}>
|
|
@@ -130,10 +124,9 @@ const JsonViewer = React.memo(({ data, search, forceOpen, defaultExpandDepth = 1
|
|
|
130
124
|
{keys.map((key) => (<JsonTableRow key={key} itemKey={key} val={data[key]} search={search}/>))}
|
|
131
125
|
</View>);
|
|
132
126
|
};
|
|
133
|
-
// Tree View Content
|
|
134
127
|
const tree = (<TreeNode data={data} search={search} forceOpen={forceOpen} defaultExpandDepth={defaultExpandDepth}/>);
|
|
135
128
|
return (<View style={[localStyles.container, fullHeight && { flex: 1 }]}>
|
|
136
|
-
|
|
129
|
+
|
|
137
130
|
{!hideTabs && (<View style={localStyles.toolbar}>
|
|
138
131
|
<SegmentedTabs tabs={[
|
|
139
132
|
{
|
|
@@ -155,7 +148,7 @@ const JsonViewer = React.memo(({ data, search, forceOpen, defaultExpandDepth = 1
|
|
|
155
148
|
<CopyButton value={data} label="JSON"/>
|
|
156
149
|
</View>)}
|
|
157
150
|
|
|
158
|
-
|
|
151
|
+
|
|
159
152
|
<View style={contentWrapperStyle}>
|
|
160
153
|
{mode === 'pretty' && (isEmpty ? (<View style={localStyles.emptyTable}>
|
|
161
154
|
<Text style={localStyles.emptyTableText}>
|
|
@@ -238,7 +231,7 @@ const localStyles = StyleSheet.create({
|
|
|
238
231
|
},
|
|
239
232
|
rawScroll: {
|
|
240
233
|
flex: 1,
|
|
241
|
-
backgroundColor: AppColors.paperBg,
|
|
234
|
+
backgroundColor: AppColors.paperBg,
|
|
242
235
|
},
|
|
243
236
|
rawContainer: {
|
|
244
237
|
padding: 12,
|
|
@@ -85,7 +85,7 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
85
85
|
},
|
|
86
86
|
]}>
|
|
87
87
|
<View style={styles.cardBody}>
|
|
88
|
-
|
|
88
|
+
|
|
89
89
|
<View style={styles.cardHeaderRow}>
|
|
90
90
|
<View style={styles.cardHeaderLeft}>
|
|
91
91
|
<Pressable onPress={() => onToggleSelect(item.id)} hitSlop={12} style={[
|
|
@@ -145,7 +145,7 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
145
145
|
</Text>
|
|
146
146
|
</View>)}
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
|
|
149
149
|
<View style={[
|
|
150
150
|
styles.chip,
|
|
151
151
|
{
|
|
@@ -174,7 +174,7 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
174
174
|
</Text>
|
|
175
175
|
</View>
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
|
|
178
178
|
{(item.url.toLowerCase().includes('graphql') ||
|
|
179
179
|
item.client === 'apollo' ||
|
|
180
180
|
item.client === 'graphql') && (<View style={[
|
|
@@ -199,7 +199,7 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
199
199
|
</Text>
|
|
200
200
|
</View>)}
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
|
|
203
203
|
{item.duration != null && !isFailed && (<View style={[
|
|
204
204
|
styles.chip,
|
|
205
205
|
{
|
|
@@ -261,7 +261,7 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
261
261
|
</View>
|
|
262
262
|
</View>
|
|
263
263
|
|
|
264
|
-
|
|
264
|
+
|
|
265
265
|
<View style={styles.cardSlugBox}>
|
|
266
266
|
<Pressable onPress={handleOpenUrl} style={styles.slugLeft} hitSlop={6}>
|
|
267
267
|
<View style={{
|
|
@@ -308,7 +308,7 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
308
308
|
</View>
|
|
309
309
|
</View>
|
|
310
310
|
|
|
311
|
-
|
|
311
|
+
|
|
312
312
|
<View style={styles.cardFooterRow}>
|
|
313
313
|
<View style={styles.cardDateRow}>
|
|
314
314
|
<CalendarIcon color={AppColors.grayTextWeak} size={10}/>
|
|
@@ -347,7 +347,7 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
347
347
|
</View>
|
|
348
348
|
</View>
|
|
349
349
|
|
|
350
|
-
|
|
350
|
+
|
|
351
351
|
{typeof item.duration === 'number' && item.duration > 0 && !isFailed && (<View style={{ marginTop: 6, gap: 2 }}>
|
|
352
352
|
<View style={{
|
|
353
353
|
height: 2.5,
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { useTranslation } from '../i18n';
|
|
3
3
|
import { View, Pressable, Text, Animated } from 'react-native';
|
|
4
|
-
// Constants
|
|
5
4
|
import { DURATION_FAST_MS, DURATION_SLOW_MS } from '../constants';
|
|
6
|
-
// Custom Hooks
|
|
7
5
|
import useAccordion from '../customHooks/useAccordion';
|
|
8
|
-
// Helpers
|
|
9
6
|
import { getDurationColor, handleOpenExternalLink } from '../helpers';
|
|
10
|
-
// Assets
|
|
11
7
|
import { ChevronIcon, CalendarIcon, StatusIcon, ClockIcon, SizeIcon, TerminalIcon, GlobeIcon, } from './NetworkIcons';
|
|
12
|
-
// Components
|
|
13
8
|
import TouchableScale from './TouchableScale';
|
|
14
9
|
import CopyButton from './CopyButton';
|
|
15
|
-
// Stylesheet
|
|
16
10
|
import { AppColors } from '../styles/AppColors';
|
|
17
11
|
import { AppFonts } from '../styles/AppFonts';
|
|
18
12
|
import styles from '../styles';
|
|
@@ -183,7 +177,7 @@ const MetaAccordion = ({ status, statusColor, duration, size, triggeredAt, metho
|
|
|
183
177
|
</View>
|
|
184
178
|
</View>
|
|
185
179
|
|
|
186
|
-
|
|
180
|
+
|
|
187
181
|
{duration != null && !isFailed && (<View style={{ paddingVertical: 8, gap: 6 }}>
|
|
188
182
|
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
189
183
|
<Text style={{ fontFamily: AppFonts.interBold, fontSize: 11, color: AppColors.primaryBlack }}>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Svg, { Circle, Ellipse, Line, Path, Rect } from 'react-native-svg';
|
|
3
|
-
// Stylesheet
|
|
4
3
|
import { AppColors } from '../styles/AppColors';
|
|
5
4
|
export const EmptyRadarIcon = ({ color = AppColors.purple, size = 32 }) => {
|
|
6
5
|
return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
@@ -205,19 +204,19 @@ export const InsightsIcon = ({ color = AppColors.grayTextWeak, size = 14, }) =>
|
|
|
205
204
|
};
|
|
206
205
|
export const DebugIcon = ({ color = AppColors.white, size = 18 }) => {
|
|
207
206
|
return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
|
|
208
|
+
|
|
210
209
|
<Path d="M6 18l8-8" stroke={color} strokeWidth="2.5" strokeLinecap="round"/>
|
|
211
|
-
|
|
210
|
+
|
|
212
211
|
<Path d="M13.5 10.5l2-2 1.5 1.5-2 2-1.5-1.5z" fill={color}/>
|
|
213
212
|
<Path d="M15.5 8.5L19 5c.5-.5 1.2-.5 1.7 0s.5 1.2 0 1.7L17.2 10.2" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
214
213
|
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
|
|
215
|
+
|
|
217
216
|
<Path d="M15 15l4 4" stroke={color} strokeWidth="3.5" strokeLinecap="round"/>
|
|
218
|
-
|
|
217
|
+
|
|
219
218
|
<Path d="M15 15L8.5 8.5" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
220
|
-
|
|
219
|
+
|
|
221
220
|
<Path d="M9 9L5 5M4.5 6.5l2-2" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
222
221
|
</Svg>);
|
|
223
222
|
};
|
|
@@ -267,20 +266,18 @@ export const FolderIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => {
|
|
|
267
266
|
<Path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
268
267
|
</Svg>);
|
|
269
268
|
};
|
|
270
|
-
// #3 — Broom/sweep "wipe" icon used by the header Clear-Everything button.
|
|
271
269
|
export const WipeIcon = ({ color = AppColors.white, size = 16 }) => {
|
|
272
270
|
return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
273
|
-
|
|
271
|
+
|
|
274
272
|
<Path d="M19.5 3.5L12.7 10.3" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
275
|
-
|
|
273
|
+
|
|
276
274
|
<Path d="M13.5 9.5l1.5 1.5c.8.8.8 2 0 2.8L10 19l-5-5 5.2-5.5c.8-.8 2-.8 2.8 0z" stroke={color} strokeWidth="2" strokeLinejoin="round"/>
|
|
277
|
-
|
|
275
|
+
|
|
278
276
|
<Path d="M7.5 16.5L5.5 18.5M10 19l-1.5 1.5" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
279
|
-
|
|
277
|
+
|
|
280
278
|
<Path d="M3 11.5h.01M5.5 8.5h.01" stroke={color} strokeWidth="2.4" strokeLinecap="round"/>
|
|
281
279
|
</Svg>);
|
|
282
280
|
};
|
|
283
|
-
// #7 — Icons for the inner filter chips / sub tabs.
|
|
284
281
|
export const LayersIcon = ({ color = AppColors.grayTextWeak, size = 12, }) => {
|
|
285
282
|
return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
286
283
|
<Path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
@@ -416,7 +413,6 @@ export const PerformanceIcon = ({ color = AppColors.purple, size = 14, }) => {
|
|
|
416
413
|
<Circle cx="12" cy="12" r="1.5" fill={color}/>
|
|
417
414
|
</Svg>);
|
|
418
415
|
};
|
|
419
|
-
// ─── App-wide Vector Icons (emoji-free, render on every device) ─────────────
|
|
420
416
|
export const BoltIcon = ({ color = AppColors.amber500, size = 14 }) => {
|
|
421
417
|
return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
422
418
|
<Path d="M13 2 4.5 13.5 H10.5 L9 22 19.5 9.5 H13.5 Z" stroke={color} strokeWidth="1.8" strokeLinejoin="round"/>
|
|
@@ -570,7 +566,7 @@ export const UserCheckIcon = ({ color = AppColors.grayTextWeak, size = 14, }) =>
|
|
|
570
566
|
};
|
|
571
567
|
export const CrashIcon = ({ color = AppColors.errorColor, size = 14, }) => {
|
|
572
568
|
return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
573
|
-
|
|
569
|
+
|
|
574
570
|
<Path d="M12 2v3M4.93 4.93l2.12 2.12M19.07 4.93l-2.12 2.12M9 10h6M8 14h8M9 18h6" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
575
571
|
<Path d="M12 8a6 6 0 0 1 6 6v3a6 6 0 0 1-12 0v-3a6 6 0 0 1 6-6z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
576
572
|
<Path d="M3 13h3M18 13h3M4 19l2.5-1.5M20 19l-2.5-1.5M4 9l2.5 1.5M20 9l-2.5 1.5" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React, { useRef, useEffect } from 'react';
|
|
2
2
|
import { Animated, View, Pressable, Text } from 'react-native';
|
|
3
|
-
// Stylesheet
|
|
4
3
|
import { AppColors } from '../styles/AppColors';
|
|
5
|
-
// Components
|
|
6
4
|
import CopyButton from './CopyButton';
|
|
7
5
|
import TouchableScale from './TouchableScale';
|
|
8
|
-
// Assets
|
|
9
6
|
import { RequestIcon, ResponseIcon, HeadersIcon, DiffIcon, ChevronIcon, SearchIcon, } from './NetworkIcons';
|
|
10
|
-
// Stylesheet
|
|
11
7
|
import styles from '../styles';
|
|
12
8
|
const SectionHeader = ({ title, value, expanded, onToggleExpand, showDiff, isDiffing, onToggleDiff, showSearch, isSearching, onToggleSearch, }) => {
|
|
13
9
|
const isOpen = expanded === undefined ? false : !!expanded;
|
|
@@ -20,7 +20,7 @@ export const SkeletonPlaceholder = React.memo(function SkeletonPlaceholder({ car
|
|
|
20
20
|
return () => animation.stop();
|
|
21
21
|
}, [shimmerAnim]);
|
|
22
22
|
return (<View style={skeletonStyles.container}>
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
<View style={skeletonStyles.toolbarSkeleton}>
|
|
25
25
|
<Animated.View style={[
|
|
26
26
|
skeletonStyles.searchBarSkeleton,
|
|
@@ -32,7 +32,7 @@ export const SkeletonPlaceholder = React.memo(function SkeletonPlaceholder({ car
|
|
|
32
32
|
</View>
|
|
33
33
|
</View>
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
<View style={skeletonStyles.chipStripSkeleton}>
|
|
37
37
|
<Animated.View style={[skeletonStyles.chipSkeleton, { width: 48, opacity: shimmerAnim }]}/>
|
|
38
38
|
<Animated.View style={[skeletonStyles.chipSkeleton, { width: 68, opacity: shimmerAnim }]}/>
|
|
@@ -40,9 +40,9 @@ export const SkeletonPlaceholder = React.memo(function SkeletonPlaceholder({ car
|
|
|
40
40
|
<Animated.View style={[skeletonStyles.chipSkeleton, { width: 58, opacity: shimmerAnim }]}/>
|
|
41
41
|
</View>
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
{Array.from({ length: cardCount }).map((_, i) => (<Animated.View key={`skeleton_card_${i}`} style={[skeletonStyles.cardSkeleton, { opacity: shimmerAnim }]}>
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
<View style={skeletonStyles.cardTopRow}>
|
|
47
47
|
<View style={skeletonStyles.badgeGroup}>
|
|
48
48
|
<View style={skeletonStyles.statusBadgeSkeleton}/>
|
|
@@ -51,11 +51,11 @@ export const SkeletonPlaceholder = React.memo(function SkeletonPlaceholder({ car
|
|
|
51
51
|
<View style={skeletonStyles.timeSkeleton}/>
|
|
52
52
|
</View>
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
|
|
55
55
|
<View style={skeletonStyles.urlLineLong}/>
|
|
56
56
|
<View style={skeletonStyles.urlLineShort}/>
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
<View style={skeletonStyles.cardBottomRow}>
|
|
60
60
|
<View style={skeletonStyles.metaPillSkeleton}/>
|
|
61
61
|
<View style={skeletonStyles.metaPillSkeleton}/>
|
|
@@ -56,7 +56,7 @@ export const Slider = React.memo(({ value, onValueChange, min = 50, max = 90, st
|
|
|
56
56
|
};
|
|
57
57
|
const thumbPosition = percentage * (trackWidth || 0);
|
|
58
58
|
return (<View style={styles.container}>
|
|
59
|
-
|
|
59
|
+
|
|
60
60
|
<View style={styles.valueRow}>
|
|
61
61
|
<Text style={styles.rangeText}>{min}%</Text>
|
|
62
62
|
<View style={[
|
|
@@ -68,18 +68,18 @@ export const Slider = React.memo(({ value, onValueChange, min = 50, max = 90, st
|
|
|
68
68
|
<Text style={styles.rangeText}>{max}%</Text>
|
|
69
69
|
</View>
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
<View ref={trackContainerRef} onLayout={handleLayout} {...panResponder.panHandlers} style={styles.touchArea}>
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
<View style={styles.rail}>
|
|
75
|
-
|
|
75
|
+
|
|
76
76
|
<View style={[
|
|
77
77
|
styles.fillBar,
|
|
78
78
|
{ width: `${Math.round(percentage * 100)}%` },
|
|
79
79
|
]}/>
|
|
80
80
|
</View>
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
<View style={[
|
|
84
84
|
styles.thumb,
|
|
85
85
|
{
|
|
@@ -91,7 +91,7 @@ export const Slider = React.memo(({ value, onValueChange, min = 50, max = 90, st
|
|
|
91
91
|
</View>
|
|
92
92
|
</View>
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
|
|
95
95
|
{quickPresets && quickPresets.length > 0 && (<View style={styles.presetRow}>
|
|
96
96
|
{quickPresets.map(preset => {
|
|
97
97
|
const isSelected = Math.round(clampedValue) === preset;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, Pressable, Text, Animated } from 'react-native';
|
|
3
3
|
import Svg, { Rect, Path } from 'react-native-svg';
|
|
4
|
-
// Components
|
|
5
4
|
import CopyButton from './CopyButton';
|
|
6
|
-
// Custom Hooks
|
|
7
5
|
import useAccordion from '../customHooks/useAccordion';
|
|
8
|
-
// Assets
|
|
9
6
|
import { ChevronIcon } from './NetworkIcons';
|
|
10
|
-
// Stylesheet
|
|
11
7
|
import { AppColors } from '../styles/AppColors';
|
|
12
8
|
import styles from '../styles';
|
|
13
9
|
const SourcePageCard = ({ routeInfo }) => {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect } from 'react';
|
|
2
2
|
import { Text, View, Image, Animated, Pressable } from 'react-native';
|
|
3
|
-
// Helpers
|
|
4
3
|
import { escapeRegex } from '../helpers';
|
|
5
|
-
// Assets
|
|
6
4
|
import { ChevronIcon, DocIcon } from './NetworkIcons';
|
|
7
|
-
// Stylesheet
|
|
8
5
|
import { AppColors } from '../styles/AppColors';
|
|
9
6
|
import styles from '../styles';
|
|
10
7
|
const TreeNode = React.memo(function TreeNode({ data, name, level = 0, search, forceOpen, defaultExpandDepth = 1, }) {
|
|
@@ -22,7 +19,6 @@ const TreeNode = React.memo(function TreeNode({ data, name, level = 0, search, f
|
|
|
22
19
|
}, [forceOpen]);
|
|
23
20
|
const isObject = typeof data === 'object' && data !== null;
|
|
24
21
|
const isArray = Array.isArray(data);
|
|
25
|
-
// Declare all hooks at the top unconditionally (prevents "Rendered fewer hooks than expected" error)
|
|
26
22
|
const treeChevronAnim = useRef(new Animated.Value(open ? 1 : 0)).current;
|
|
27
23
|
useEffect(() => {
|
|
28
24
|
Animated.timing(treeChevronAnim, {
|
package/dist/esm/console.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sub-module entry point: react-native-inapp-inspector/console
|
|
3
|
-
* Clean tree-shaking & isolated console logger.
|
|
4
|
-
*/
|
|
5
1
|
export { setupConsoleLogger, clearConsoleLogs, subscribeConsoleLogs, getConsoleLogs, setConsoleModuleEnabled, getConsoleModuleEnabled, setMaxConsoleLogsLimit, getMaxConsoleLogsLimit, pruneConsoleLogs, } from './customHooks/consoleLogger';
|
|
6
2
|
export type { ConsoleLog, } from './types';
|
|
7
3
|
export { ConsoleLogType, LogFilter, } from './types';
|
package/dist/esm/console.js
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sub-module entry point: react-native-inapp-inspector/console
|
|
3
|
-
* Clean tree-shaking & isolated console logger.
|
|
4
|
-
*/
|
|
5
1
|
export { setupConsoleLogger, clearConsoleLogs, subscribeConsoleLogs, getConsoleLogs, setConsoleModuleEnabled, getConsoleModuleEnabled, setMaxConsoleLogsLimit, getMaxConsoleLogsLimit, pruneConsoleLogs, } from './customHooks/consoleLogger';
|
|
6
2
|
export { ConsoleLogType, LogFilter, } from './types';
|