react-native-inapp-inspector 2.0.4 → 2.0.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/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build/reports/problems/problems-report.html +659 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +11 -0
- package/dist/commonjs/components/Inspector/AuditTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/AuditTab.js +741 -0
- package/dist/commonjs/components/Inspector/DeviceTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/DeviceTab.js +717 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +115 -75
- package/dist/commonjs/components/Inspector/MainScreen.js +16 -2
- package/dist/commonjs/components/Inspector/NetworkDetail.js +15 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +317 -12
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +88 -39
- package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +7 -0
- package/dist/commonjs/components/Inspector/PerformanceHud.js +210 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +30 -18
- package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +9 -0
- package/dist/commonjs/components/Inspector/RequestReplayModal.js +792 -0
- package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +8 -0
- package/dist/commonjs/components/Inspector/RequestReplayView.js +871 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +847 -370
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +610 -0
- package/dist/commonjs/components/Inspector/TabBar.js +23 -2
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.d.ts +8 -0
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +469 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +12 -0
- package/dist/commonjs/components/NetworkIcons.js +72 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/storageInspector.d.ts +13 -0
- package/dist/commonjs/customHooks/storageInspector.js +179 -0
- package/dist/commonjs/helpers/deviceInfo.d.ts +4 -0
- package/dist/commonjs/helpers/deviceInfo.js +94 -0
- package/dist/commonjs/helpers/index.d.ts +2 -0
- package/dist/commonjs/helpers/index.js +12 -1
- package/dist/commonjs/helpers/packageAuditor.d.ts +5 -0
- package/dist/commonjs/helpers/packageAuditor.js +182 -0
- package/dist/commonjs/helpers/searchQueryParser.d.ts +8 -3
- package/dist/commonjs/helpers/searchQueryParser.js +85 -31
- package/dist/commonjs/helpers/telemetry.js +4 -4
- package/dist/commonjs/i18n/locales/en.json +3 -2
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +171 -16
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/types/enums.d.ts +7 -0
- package/dist/commonjs/types/enums.js +7 -0
- package/dist/commonjs/types/interfaces.d.ts +82 -0
- package/dist/esm/components/Inspector/AuditTab.d.ts +3 -0
- package/dist/esm/components/Inspector/AuditTab.js +702 -0
- package/dist/esm/components/Inspector/DeviceTab.d.ts +3 -0
- package/dist/esm/components/Inspector/DeviceTab.js +678 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +115 -75
- package/dist/esm/components/Inspector/MainScreen.js +16 -2
- package/dist/esm/components/Inspector/NetworkDetail.js +16 -1
- package/dist/esm/components/Inspector/NetworkTab.js +317 -12
- package/dist/esm/components/Inspector/NpmUpdateToast.js +88 -39
- package/dist/esm/components/Inspector/PerformanceHud.d.ts +7 -0
- package/dist/esm/components/Inspector/PerformanceHud.js +170 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +31 -19
- package/dist/esm/components/Inspector/RequestReplayModal.d.ts +9 -0
- package/dist/esm/components/Inspector/RequestReplayModal.js +752 -0
- package/dist/esm/components/Inspector/RequestReplayView.d.ts +8 -0
- package/dist/esm/components/Inspector/RequestReplayView.js +831 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +848 -371
- package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/esm/components/Inspector/StorageTab.js +571 -0
- package/dist/esm/components/Inspector/TabBar.js +24 -3
- package/dist/esm/components/Inspector/UpdateAvailableModal.d.ts +8 -0
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +432 -0
- package/dist/esm/components/NetworkIcons.d.ts +12 -0
- package/dist/esm/components/NetworkIcons.js +57 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/storageInspector.d.ts +13 -0
- package/dist/esm/customHooks/storageInspector.js +170 -0
- package/dist/esm/helpers/deviceInfo.d.ts +4 -0
- package/dist/esm/helpers/deviceInfo.js +89 -0
- package/dist/esm/helpers/index.d.ts +2 -0
- package/dist/esm/helpers/index.js +10 -0
- package/dist/esm/helpers/packageAuditor.d.ts +5 -0
- package/dist/esm/helpers/packageAuditor.js +173 -0
- package/dist/esm/helpers/searchQueryParser.d.ts +8 -3
- package/dist/esm/helpers/searchQueryParser.js +85 -31
- package/dist/esm/helpers/telemetry.js +4 -4
- package/dist/esm/i18n/locales/en.json +3 -2
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +167 -15
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/types/enums.d.ts +7 -0
- package/dist/esm/types/enums.js +7 -0
- package/dist/esm/types/interfaces.d.ts +82 -0
- package/ios/NetworkInspectorModule.mm +12 -5
- package/package.json +4 -1
|
@@ -127,11 +127,105 @@ const FilterChip = react_1.default.memo(({ label, color, Icon, badge, active, on
|
|
|
127
127
|
</TouchableScale_1.default>);
|
|
128
128
|
});
|
|
129
129
|
const NetworkTab = react_1.default.memo(() => {
|
|
130
|
-
const { groupedData, search, setSearch, handleDelete, selectedLogs, sortOrder, setSortOrder, statusFilters, setStatusFilters, methodFilters, setMethodFilters, availableMethods, filteredLogs, logs, toggleSectionFilter, toggleSectionCollapse, minStart, totalRange, newLogIds, toggleSelect, setSelected, isNetworkPaused, setIsNetworkPaused, } = (0, InspectorContext_1.useInspector)();
|
|
130
|
+
const { groupedData, search, setSearch, searchScope, setSearchScope, isRegexSearch, setIsRegexSearch, isCaseSensitive, setIsCaseSensitive, quickFilter, setQuickFilter, handleDelete, selectedLogs, sortOrder, setSortOrder, statusFilters, setStatusFilters, methodFilters, setMethodFilters, availableMethods, filteredLogs, logs, toggleSectionFilter, toggleSectionCollapse, minStart, totalRange, newLogIds, toggleSelect, setSelected, isNetworkPaused, setIsNetworkPaused, } = (0, InspectorContext_1.useInspector)();
|
|
131
131
|
const { t } = (0, i18n_1.useTranslation)();
|
|
132
132
|
const filtersAccordion = (0, useAccordion_1.default)(false, 300, 260);
|
|
133
133
|
const apisListRef = (0, react_1.useRef)(null);
|
|
134
134
|
const [isSearchFocused, setIsSearchFocused] = react_1.default.useState(false);
|
|
135
|
+
const quickCounts = (0, react_1.useMemo)(() => {
|
|
136
|
+
let errorCount = 0;
|
|
137
|
+
let successCount = 0;
|
|
138
|
+
let slowCount = 0;
|
|
139
|
+
let postCount = 0;
|
|
140
|
+
let getCount = 0;
|
|
141
|
+
let gqlCount = 0;
|
|
142
|
+
logs.forEach(l => {
|
|
143
|
+
const s = typeof l.status === 'number'
|
|
144
|
+
? l.status
|
|
145
|
+
: parseInt(String(l.status), 10);
|
|
146
|
+
if (l.status === 0 || l.status == null || (!isNaN(s) && s >= 400)) {
|
|
147
|
+
errorCount++;
|
|
148
|
+
}
|
|
149
|
+
else if (!isNaN(s) && s >= 200 && s < 400) {
|
|
150
|
+
successCount++;
|
|
151
|
+
}
|
|
152
|
+
if ((l.duration || 0) >= 500) {
|
|
153
|
+
slowCount++;
|
|
154
|
+
}
|
|
155
|
+
const m = (l.method || '').toUpperCase();
|
|
156
|
+
if (m === 'POST')
|
|
157
|
+
postCount++;
|
|
158
|
+
if (m === 'GET')
|
|
159
|
+
getCount++;
|
|
160
|
+
const u = (l.url || '').toLowerCase();
|
|
161
|
+
const c = (l.client || '').toLowerCase();
|
|
162
|
+
if (u.includes('graphql') ||
|
|
163
|
+
c.includes('graphql') ||
|
|
164
|
+
c.includes('apollo')) {
|
|
165
|
+
gqlCount++;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
return {
|
|
169
|
+
all: logs.length,
|
|
170
|
+
errors: errorCount,
|
|
171
|
+
success: successCount,
|
|
172
|
+
slow: slowCount,
|
|
173
|
+
post: postCount,
|
|
174
|
+
get: getCount,
|
|
175
|
+
graphql: gqlCount,
|
|
176
|
+
};
|
|
177
|
+
}, [logs]);
|
|
178
|
+
const QUICK_CHIPS = (0, react_1.useMemo)(() => [
|
|
179
|
+
{
|
|
180
|
+
id: 'all',
|
|
181
|
+
label: 'All',
|
|
182
|
+
count: quickCounts.all,
|
|
183
|
+
color: AppColors_1.AppColors.purple,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: 'errors',
|
|
187
|
+
label: 'Errors',
|
|
188
|
+
count: quickCounts.errors,
|
|
189
|
+
color: AppColors_1.AppColors.errorColor,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: 'success',
|
|
193
|
+
label: '2xx OK',
|
|
194
|
+
count: quickCounts.success,
|
|
195
|
+
color: AppColors_1.AppColors.greenColor,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: 'slow',
|
|
199
|
+
label: 'Slow >500ms',
|
|
200
|
+
count: quickCounts.slow,
|
|
201
|
+
color: AppColors_1.AppColors.warningIconGold,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
id: 'POST',
|
|
205
|
+
label: 'POST',
|
|
206
|
+
count: quickCounts.post,
|
|
207
|
+
color: constants_1.METHOD_COLORS.POST || '#3B82F6',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
id: 'GET',
|
|
211
|
+
label: 'GET',
|
|
212
|
+
count: quickCounts.get,
|
|
213
|
+
color: constants_1.METHOD_COLORS.GET || '#10B981',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
id: 'graphql',
|
|
217
|
+
label: 'GraphQL',
|
|
218
|
+
count: quickCounts.graphql,
|
|
219
|
+
color: '#E10098',
|
|
220
|
+
},
|
|
221
|
+
], [quickCounts]);
|
|
222
|
+
const SEARCH_SCOPES = [
|
|
223
|
+
{ id: 'all', label: 'All' },
|
|
224
|
+
{ id: 'url', label: 'URL / Path' },
|
|
225
|
+
{ id: 'reqBody', label: 'Payload' },
|
|
226
|
+
{ id: 'resBody', label: 'Response' },
|
|
227
|
+
{ id: 'headers', label: 'Headers' },
|
|
228
|
+
];
|
|
135
229
|
const QUICK_API_QUERY_TAGS = (0, react_1.useMemo)(() => [
|
|
136
230
|
{ label: '⚠️ Failed', query: 'is:error' },
|
|
137
231
|
{ label: '🐢 Slow >1s', query: 'slow:>1s' },
|
|
@@ -277,6 +371,7 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
277
371
|
</react_native_1.View>
|
|
278
372
|
</react_native_1.View>)}
|
|
279
373
|
|
|
374
|
+
{/* Toolbar Row with Search & Actions */}
|
|
280
375
|
<react_native_1.View style={styles_1.default.toolbarRow}>
|
|
281
376
|
<react_native_1.View style={[
|
|
282
377
|
styles_1.default.searchContainer,
|
|
@@ -285,8 +380,65 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
285
380
|
borderWidth: 1.5,
|
|
286
381
|
},
|
|
287
382
|
]}>
|
|
288
|
-
<NetworkIcons_1.SearchIcon color={isSearchFocused
|
|
383
|
+
<NetworkIcons_1.SearchIcon color={isSearchFocused
|
|
384
|
+
? AppColors_1.AppColors.purple
|
|
385
|
+
: AppColors_1.AppColors.grayTextWeak} size={15}/>
|
|
289
386
|
<react_native_1.TextInput placeholder="Search url, body, is:error, slow:>1s..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={search} onChangeText={setSearch} onFocus={() => setIsSearchFocused(true)} onBlur={() => setIsSearchFocused(false)} style={styles_1.default.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
387
|
+
|
|
388
|
+
{/* Match Case (Aa) & Regex (.*) Quick Toggles */}
|
|
389
|
+
<react_native_1.View style={{
|
|
390
|
+
flexDirection: 'row',
|
|
391
|
+
alignItems: 'center',
|
|
392
|
+
gap: 3,
|
|
393
|
+
marginRight: 2,
|
|
394
|
+
}}>
|
|
395
|
+
<react_native_1.Pressable hitSlop={8} onPress={() => setIsCaseSensitive(prev => !prev)} style={{
|
|
396
|
+
paddingHorizontal: 4.5,
|
|
397
|
+
paddingVertical: 2,
|
|
398
|
+
borderRadius: 4,
|
|
399
|
+
backgroundColor: isCaseSensitive
|
|
400
|
+
? AppColors_1.AppColors.purple
|
|
401
|
+
: 'transparent',
|
|
402
|
+
borderWidth: 1,
|
|
403
|
+
borderColor: isCaseSensitive
|
|
404
|
+
? AppColors_1.AppColors.purple
|
|
405
|
+
: `${AppColors_1.AppColors.grayBorderSecondary}`,
|
|
406
|
+
}}>
|
|
407
|
+
<react_native_1.Text style={{
|
|
408
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
409
|
+
fontSize: 9.5,
|
|
410
|
+
color: isCaseSensitive
|
|
411
|
+
? AppColors_1.AppColors.white
|
|
412
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
413
|
+
}}>
|
|
414
|
+
Aa
|
|
415
|
+
</react_native_1.Text>
|
|
416
|
+
</react_native_1.Pressable>
|
|
417
|
+
|
|
418
|
+
<react_native_1.Pressable hitSlop={8} onPress={() => setIsRegexSearch(prev => !prev)} style={{
|
|
419
|
+
paddingHorizontal: 4.5,
|
|
420
|
+
paddingVertical: 2,
|
|
421
|
+
borderRadius: 4,
|
|
422
|
+
backgroundColor: isRegexSearch
|
|
423
|
+
? AppColors_1.AppColors.purple
|
|
424
|
+
: 'transparent',
|
|
425
|
+
borderWidth: 1,
|
|
426
|
+
borderColor: isRegexSearch
|
|
427
|
+
? AppColors_1.AppColors.purple
|
|
428
|
+
: `${AppColors_1.AppColors.grayBorderSecondary}`,
|
|
429
|
+
}}>
|
|
430
|
+
<react_native_1.Text style={{
|
|
431
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
432
|
+
fontSize: 9.5,
|
|
433
|
+
color: isRegexSearch
|
|
434
|
+
? AppColors_1.AppColors.white
|
|
435
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
436
|
+
}}>
|
|
437
|
+
.*
|
|
438
|
+
</react_native_1.Text>
|
|
439
|
+
</react_native_1.Pressable>
|
|
440
|
+
</react_native_1.View>
|
|
441
|
+
|
|
290
442
|
{search.length > 0 && (<react_native_1.View style={{
|
|
291
443
|
flexDirection: 'row',
|
|
292
444
|
alignItems: 'center',
|
|
@@ -295,19 +447,19 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
295
447
|
<react_native_1.View style={{
|
|
296
448
|
backgroundColor: `${AppColors_1.AppColors.purple}20`,
|
|
297
449
|
borderRadius: 10,
|
|
298
|
-
paddingHorizontal:
|
|
299
|
-
paddingVertical:
|
|
450
|
+
paddingHorizontal: 5,
|
|
451
|
+
paddingVertical: 1.5,
|
|
300
452
|
}}>
|
|
301
453
|
<react_native_1.Text style={{
|
|
302
454
|
color: AppColors_1.AppColors.purple,
|
|
303
|
-
fontSize:
|
|
455
|
+
fontSize: 9.5,
|
|
304
456
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
305
457
|
}}>
|
|
306
458
|
{filteredLogs.length}
|
|
307
459
|
</react_native_1.Text>
|
|
308
460
|
</react_native_1.View>
|
|
309
461
|
<react_native_1.Pressable onPress={() => setSearch('')} hitSlop={10} style={styles_1.default.clearBtn}>
|
|
310
|
-
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={
|
|
462
|
+
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
311
463
|
</react_native_1.Pressable>
|
|
312
464
|
</react_native_1.View>)}
|
|
313
465
|
</react_native_1.View>
|
|
@@ -356,12 +508,124 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
356
508
|
</react_native_1.View>
|
|
357
509
|
</react_native_1.View>
|
|
358
510
|
|
|
511
|
+
{/* Quick Filter Horizontal Chips Bar with Live Counts */}
|
|
512
|
+
<react_native_1.View style={{ marginBottom: 8 }}>
|
|
513
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
514
|
+
paddingHorizontal: 12,
|
|
515
|
+
flexDirection: 'row',
|
|
516
|
+
alignItems: 'center',
|
|
517
|
+
gap: 6,
|
|
518
|
+
}}>
|
|
519
|
+
{QUICK_CHIPS.map(chip => {
|
|
520
|
+
const isActive = quickFilter === chip.id;
|
|
521
|
+
const chipColor = chip.color || AppColors_1.AppColors.purple;
|
|
522
|
+
return (<TouchableScale_1.default key={chip.id} onPress={() => {
|
|
523
|
+
setQuickFilter(isActive ? 'all' : chip.id);
|
|
524
|
+
}}>
|
|
525
|
+
<react_native_1.View style={{
|
|
526
|
+
flexDirection: 'row',
|
|
527
|
+
alignItems: 'center',
|
|
528
|
+
paddingHorizontal: 9,
|
|
529
|
+
paddingVertical: 4.5,
|
|
530
|
+
borderRadius: 8,
|
|
531
|
+
backgroundColor: isActive
|
|
532
|
+
? chipColor
|
|
533
|
+
: `${chipColor}12`,
|
|
534
|
+
borderWidth: 1,
|
|
535
|
+
borderColor: isActive
|
|
536
|
+
? chipColor
|
|
537
|
+
: `${chipColor}30`,
|
|
538
|
+
gap: 5,
|
|
539
|
+
}}>
|
|
540
|
+
<react_native_1.Text style={{
|
|
541
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
542
|
+
fontSize: 10.5,
|
|
543
|
+
color: isActive
|
|
544
|
+
? AppColors_1.AppColors.white
|
|
545
|
+
: AppColors_1.AppColors.primaryBlack,
|
|
546
|
+
}}>
|
|
547
|
+
{chip.label}
|
|
548
|
+
</react_native_1.Text>
|
|
549
|
+
<react_native_1.View style={{
|
|
550
|
+
backgroundColor: isActive
|
|
551
|
+
? 'rgba(255,255,255,0.25)'
|
|
552
|
+
: `${chipColor}20`,
|
|
553
|
+
paddingHorizontal: 5,
|
|
554
|
+
paddingVertical: 1,
|
|
555
|
+
borderRadius: 8,
|
|
556
|
+
}}>
|
|
557
|
+
<react_native_1.Text style={{
|
|
558
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
559
|
+
fontSize: 9,
|
|
560
|
+
color: isActive ? AppColors_1.AppColors.white : chipColor,
|
|
561
|
+
}}>
|
|
562
|
+
{chip.count}
|
|
563
|
+
</react_native_1.Text>
|
|
564
|
+
</react_native_1.View>
|
|
565
|
+
</react_native_1.View>
|
|
566
|
+
</TouchableScale_1.default>);
|
|
567
|
+
})}
|
|
568
|
+
</react_native_1.ScrollView>
|
|
569
|
+
</react_native_1.View>
|
|
570
|
+
|
|
571
|
+
{/* Search Scope Selector Bar (Visible on search or focus) */}
|
|
572
|
+
{(isSearchFocused || search.length > 0) && (<react_native_1.View style={{
|
|
573
|
+
flexDirection: 'row',
|
|
574
|
+
alignItems: 'center',
|
|
575
|
+
paddingHorizontal: 12,
|
|
576
|
+
marginBottom: 6,
|
|
577
|
+
gap: 6,
|
|
578
|
+
}}>
|
|
579
|
+
<react_native_1.Text style={{
|
|
580
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
581
|
+
fontSize: 9.5,
|
|
582
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
583
|
+
textTransform: 'uppercase',
|
|
584
|
+
letterSpacing: 0.5,
|
|
585
|
+
}}>
|
|
586
|
+
Scope:
|
|
587
|
+
</react_native_1.Text>
|
|
588
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
589
|
+
flexDirection: 'row',
|
|
590
|
+
alignItems: 'center',
|
|
591
|
+
gap: 5,
|
|
592
|
+
}}>
|
|
593
|
+
{SEARCH_SCOPES.map(s => {
|
|
594
|
+
const isSelected = searchScope === s.id;
|
|
595
|
+
return (<TouchableScale_1.default key={s.id} onPress={() => setSearchScope(s.id)}>
|
|
596
|
+
<react_native_1.View style={{
|
|
597
|
+
paddingHorizontal: 7,
|
|
598
|
+
paddingVertical: 2.5,
|
|
599
|
+
borderRadius: 5,
|
|
600
|
+
backgroundColor: isSelected
|
|
601
|
+
? AppColors_1.AppColors.purple
|
|
602
|
+
: `${AppColors_1.AppColors.grayBorderSecondary}40`,
|
|
603
|
+
borderWidth: 1,
|
|
604
|
+
borderColor: isSelected
|
|
605
|
+
? AppColors_1.AppColors.purple
|
|
606
|
+
: AppColors_1.AppColors.grayBorderSecondary,
|
|
607
|
+
}}>
|
|
608
|
+
<react_native_1.Text style={{
|
|
609
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
610
|
+
fontSize: 9.5,
|
|
611
|
+
color: isSelected
|
|
612
|
+
? AppColors_1.AppColors.white
|
|
613
|
+
: AppColors_1.AppColors.grayText,
|
|
614
|
+
}}>
|
|
615
|
+
{s.label}
|
|
616
|
+
</react_native_1.Text>
|
|
617
|
+
</react_native_1.View>
|
|
618
|
+
</TouchableScale_1.default>);
|
|
619
|
+
})}
|
|
620
|
+
</react_native_1.ScrollView>
|
|
621
|
+
</react_native_1.View>)}
|
|
622
|
+
|
|
359
623
|
{/* Advanced Search Quick Query Suggestions Bar */}
|
|
360
|
-
{(isSearchFocused || search.length > 0) && (<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={{ marginBottom:
|
|
624
|
+
{(isSearchFocused || search.length > 0) && (<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={{ marginBottom: 8, maxHeight: 28 }} contentContainerStyle={{
|
|
361
625
|
paddingHorizontal: 12,
|
|
362
626
|
flexDirection: 'row',
|
|
363
627
|
alignItems: 'center',
|
|
364
|
-
gap:
|
|
628
|
+
gap: 5,
|
|
365
629
|
}}>
|
|
366
630
|
{QUICK_API_QUERY_TAGS.map(item => {
|
|
367
631
|
const isSelected = search.includes(item.query);
|
|
@@ -374,9 +638,9 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
374
638
|
}
|
|
375
639
|
}}>
|
|
376
640
|
<react_native_1.View style={{
|
|
377
|
-
paddingHorizontal:
|
|
378
|
-
paddingVertical:
|
|
379
|
-
borderRadius:
|
|
641
|
+
paddingHorizontal: 7,
|
|
642
|
+
paddingVertical: 2.5,
|
|
643
|
+
borderRadius: 5,
|
|
380
644
|
backgroundColor: isSelected
|
|
381
645
|
? AppColors_1.AppColors.purple
|
|
382
646
|
: `${AppColors_1.AppColors.purple}14`,
|
|
@@ -387,7 +651,7 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
387
651
|
}}>
|
|
388
652
|
<react_native_1.Text style={{
|
|
389
653
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
390
|
-
fontSize:
|
|
654
|
+
fontSize: 9.5,
|
|
391
655
|
color: isSelected
|
|
392
656
|
? AppColors_1.AppColors.white
|
|
393
657
|
: AppColors_1.AppColors.purple,
|
|
@@ -399,6 +663,47 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
399
663
|
})}
|
|
400
664
|
</react_native_1.ScrollView>)}
|
|
401
665
|
|
|
666
|
+
{/* Active Filter Helper Status Bar */}
|
|
667
|
+
{(quickFilter !== 'all' ||
|
|
668
|
+
search.trim().length > 0 ||
|
|
669
|
+
statusFilters.size > 0 ||
|
|
670
|
+
methodFilters.size > 0 ||
|
|
671
|
+
filteredLogs.length !== logs.length) && (<react_native_1.View style={{
|
|
672
|
+
flexDirection: 'row',
|
|
673
|
+
alignItems: 'center',
|
|
674
|
+
justifyContent: 'space-between',
|
|
675
|
+
marginHorizontal: 12,
|
|
676
|
+
marginBottom: 8,
|
|
677
|
+
paddingHorizontal: 10,
|
|
678
|
+
paddingVertical: 5.5,
|
|
679
|
+
backgroundColor: `${AppColors_1.AppColors.purple}10`,
|
|
680
|
+
borderRadius: 8,
|
|
681
|
+
borderWidth: 1,
|
|
682
|
+
borderColor: `${AppColors_1.AppColors.purple}25`,
|
|
683
|
+
}}>
|
|
684
|
+
<react_native_1.Text style={{
|
|
685
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
686
|
+
fontSize: 10.5,
|
|
687
|
+
color: AppColors_1.AppColors.purple,
|
|
688
|
+
}}>
|
|
689
|
+
Showing {filteredLogs.length} of {logs.length} requests
|
|
690
|
+
</react_native_1.Text>
|
|
691
|
+
<TouchableScale_1.default onPress={() => {
|
|
692
|
+
setSearch('');
|
|
693
|
+
setQuickFilter('all');
|
|
694
|
+
setStatusFilters(new Set());
|
|
695
|
+
setMethodFilters(new Set());
|
|
696
|
+
}}>
|
|
697
|
+
<react_native_1.Text style={{
|
|
698
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
699
|
+
fontSize: 10.5,
|
|
700
|
+
color: AppColors_1.AppColors.errorColor,
|
|
701
|
+
}}>
|
|
702
|
+
Clear All Filters
|
|
703
|
+
</react_native_1.Text>
|
|
704
|
+
</TouchableScale_1.default>
|
|
705
|
+
</react_native_1.View>)}
|
|
706
|
+
|
|
402
707
|
<react_native_1.Animated.View style={[
|
|
403
708
|
filtersAccordion.bodyStyle,
|
|
404
709
|
{ overflow: 'hidden' },
|
|
@@ -40,20 +40,30 @@ const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
|
40
40
|
const InspectorContext_1 = require("./InspectorContext");
|
|
41
41
|
const constants_1 = require("../../constants");
|
|
42
42
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
43
|
+
const helpers_1 = require("../../helpers");
|
|
44
|
+
const toast_1 = require("../../helpers/toast");
|
|
43
45
|
const CloseSvg = ({ size = 13, color = '#94A3B8' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
44
46
|
<react_native_svg_1.Path d="M18 6L6 18M6 6l12 12" stroke={color} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"/>
|
|
45
47
|
</react_native_svg_1.default>);
|
|
46
|
-
const
|
|
48
|
+
const CopySvg = ({ size = 11, color = '#94A3B8' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
49
|
+
<react_native_svg_1.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"/>
|
|
50
|
+
<react_native_svg_1.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"/>
|
|
51
|
+
</react_native_svg_1.default>);
|
|
52
|
+
const CheckSvg = ({ size = 11, color = '#10B981' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
53
|
+
<react_native_svg_1.Path d="M20 6L9 17l-5-5" stroke={color} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"/>
|
|
54
|
+
</react_native_svg_1.default>);
|
|
55
|
+
const ExternalLinkSvg = ({ size = 11, color = '#FFFFFF' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
47
56
|
<react_native_svg_1.Path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
48
57
|
<react_native_svg_1.Path d="M15 3h6v6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
49
58
|
<react_native_svg_1.Path d="M10 14L21 3" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
50
59
|
</react_native_svg_1.default>);
|
|
51
|
-
const TOAST_TIMEOUT_MS =
|
|
60
|
+
const TOAST_TIMEOUT_MS = 7000;
|
|
52
61
|
const NpmUpdateToast = () => {
|
|
53
62
|
const { updateAvailable, latestNpmVersion, showUpdateToast } = (0, InspectorContext_1.useInspector)();
|
|
54
63
|
const [dismissed, setDismissed] = (0, react_1.useState)(false);
|
|
55
64
|
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
56
|
-
const
|
|
65
|
+
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
66
|
+
const translateYAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(60)).current;
|
|
57
67
|
const opacityAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
|
|
58
68
|
const progressAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
59
69
|
const timerRef = (0, react_1.useRef)(null);
|
|
@@ -96,12 +106,12 @@ const NpmUpdateToast = () => {
|
|
|
96
106
|
react_native_1.Animated.parallel([
|
|
97
107
|
react_native_1.Animated.timing(opacityAnim, {
|
|
98
108
|
toValue: 0,
|
|
99
|
-
duration:
|
|
109
|
+
duration: 180,
|
|
100
110
|
useNativeDriver: true,
|
|
101
111
|
}),
|
|
102
112
|
react_native_1.Animated.timing(translateYAnim, {
|
|
103
|
-
toValue:
|
|
104
|
-
duration:
|
|
113
|
+
toValue: 60,
|
|
114
|
+
duration: 180,
|
|
105
115
|
useNativeDriver: true,
|
|
106
116
|
}),
|
|
107
117
|
]).start(() => {
|
|
@@ -109,6 +119,14 @@ const NpmUpdateToast = () => {
|
|
|
109
119
|
setDismissed(true);
|
|
110
120
|
});
|
|
111
121
|
};
|
|
122
|
+
const handleCopyCommand = () => {
|
|
123
|
+
(0, helpers_1.copyToClipboard)('npm install react-native-inapp-inspector@latest', 'Install Command');
|
|
124
|
+
setCopied(true);
|
|
125
|
+
(0, toast_1.showToast)('Copied npm install command!');
|
|
126
|
+
setTimeout(() => {
|
|
127
|
+
setCopied(false);
|
|
128
|
+
}, 2000);
|
|
129
|
+
};
|
|
112
130
|
const handleOpenNpm = () => {
|
|
113
131
|
react_native_1.Linking.openURL('https://www.npmjs.com/package/react-native-inapp-inspector').catch(() => { });
|
|
114
132
|
handleDismiss();
|
|
@@ -129,7 +147,7 @@ const NpmUpdateToast = () => {
|
|
|
129
147
|
<react_native_1.View style={styles.contentRow}>
|
|
130
148
|
{/* Left NPM Badge Icon */}
|
|
131
149
|
<react_native_1.View style={styles.npmIconContainer}>
|
|
132
|
-
<NetworkIcons_1.NpmIcon size={
|
|
150
|
+
<NetworkIcons_1.NpmIcon size={15} color="#CB3837"/>
|
|
133
151
|
</react_native_1.View>
|
|
134
152
|
|
|
135
153
|
{/* Text Details */}
|
|
@@ -145,6 +163,14 @@ const NpmUpdateToast = () => {
|
|
|
145
163
|
</react_native_1.Text>
|
|
146
164
|
</react_native_1.View>
|
|
147
165
|
|
|
166
|
+
{/* Copy command quick button */}
|
|
167
|
+
<react_native_1.TouchableOpacity style={styles.copyButton} onPress={handleCopyCommand} hitSlop={6} activeOpacity={0.75}>
|
|
168
|
+
{copied ? <CheckSvg size={11} color="#10B981"/> : <CopySvg size={11} color="#94A3B8"/>}
|
|
169
|
+
<react_native_1.Text style={[styles.copyButtonText, copied && { color: '#10B981' }]}>
|
|
170
|
+
{copied ? 'Copied' : 'Copy'}
|
|
171
|
+
</react_native_1.Text>
|
|
172
|
+
</react_native_1.TouchableOpacity>
|
|
173
|
+
|
|
148
174
|
{/* Action Button: View */}
|
|
149
175
|
<react_native_1.TouchableOpacity style={styles.actionButton} onPress={handleOpenNpm} activeOpacity={0.8}>
|
|
150
176
|
<react_native_1.Text style={styles.actionButtonText}>View</react_native_1.Text>
|
|
@@ -177,37 +203,42 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
177
203
|
container: {
|
|
178
204
|
position: 'absolute',
|
|
179
205
|
bottom: 24,
|
|
180
|
-
left:
|
|
181
|
-
right:
|
|
206
|
+
left: 14,
|
|
207
|
+
right: 14,
|
|
182
208
|
backgroundColor: '#0F172A',
|
|
183
209
|
borderRadius: 16,
|
|
184
210
|
borderWidth: 1,
|
|
185
211
|
borderColor: '#334155',
|
|
186
212
|
shadowColor: '#000000',
|
|
187
|
-
shadowOffset: { width: 0, height:
|
|
188
|
-
shadowOpacity: 0.
|
|
189
|
-
shadowRadius:
|
|
190
|
-
elevation:
|
|
213
|
+
shadowOffset: { width: 0, height: 12 },
|
|
214
|
+
shadowOpacity: 0.4,
|
|
215
|
+
shadowRadius: 24,
|
|
216
|
+
elevation: 24,
|
|
191
217
|
overflow: 'hidden',
|
|
192
218
|
zIndex: 99999,
|
|
193
219
|
},
|
|
194
220
|
contentRow: {
|
|
195
221
|
flexDirection: 'row',
|
|
196
222
|
alignItems: 'center',
|
|
197
|
-
paddingVertical:
|
|
198
|
-
paddingHorizontal:
|
|
199
|
-
gap:
|
|
223
|
+
paddingVertical: 11,
|
|
224
|
+
paddingHorizontal: 12,
|
|
225
|
+
gap: 8,
|
|
200
226
|
},
|
|
201
227
|
npmIconContainer: {
|
|
202
228
|
width: 32,
|
|
203
229
|
height: 32,
|
|
204
|
-
borderRadius:
|
|
230
|
+
borderRadius: 9,
|
|
205
231
|
backgroundColor: '#FFFFFF',
|
|
206
232
|
justifyContent: 'center',
|
|
207
233
|
alignItems: 'center',
|
|
208
234
|
borderWidth: 1,
|
|
209
|
-
borderColor: '#
|
|
235
|
+
borderColor: '#E2E8F0',
|
|
210
236
|
flexShrink: 0,
|
|
237
|
+
shadowColor: '#000000',
|
|
238
|
+
shadowOffset: { width: 0, height: 1 },
|
|
239
|
+
shadowOpacity: 0.15,
|
|
240
|
+
shadowRadius: 2,
|
|
241
|
+
elevation: 2,
|
|
211
242
|
},
|
|
212
243
|
textContainer: {
|
|
213
244
|
flex: 1,
|
|
@@ -216,73 +247,91 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
216
247
|
titleRow: {
|
|
217
248
|
flexDirection: 'row',
|
|
218
249
|
alignItems: 'center',
|
|
219
|
-
gap:
|
|
250
|
+
gap: 5,
|
|
220
251
|
},
|
|
221
252
|
titleText: {
|
|
222
|
-
fontSize:
|
|
253
|
+
fontSize: 12.5,
|
|
223
254
|
fontWeight: '700',
|
|
224
255
|
color: '#F8FAFC',
|
|
225
256
|
letterSpacing: -0.2,
|
|
226
257
|
...fontStack,
|
|
227
258
|
},
|
|
228
259
|
versionPill: {
|
|
229
|
-
backgroundColor: '#
|
|
230
|
-
paddingHorizontal:
|
|
260
|
+
backgroundColor: '#7C3AED33',
|
|
261
|
+
paddingHorizontal: 5.5,
|
|
231
262
|
paddingVertical: 1.5,
|
|
232
|
-
borderRadius:
|
|
263
|
+
borderRadius: 5,
|
|
233
264
|
borderWidth: 1,
|
|
234
|
-
borderColor: '#
|
|
265
|
+
borderColor: '#8B5CF680',
|
|
235
266
|
},
|
|
236
267
|
versionPillText: {
|
|
237
|
-
fontSize: 10
|
|
268
|
+
fontSize: 10,
|
|
238
269
|
fontWeight: '700',
|
|
239
|
-
color: '#
|
|
270
|
+
color: '#C4B5FD',
|
|
240
271
|
...fontStack,
|
|
241
272
|
},
|
|
242
273
|
subtitleText: {
|
|
243
|
-
fontSize:
|
|
274
|
+
fontSize: 10.5,
|
|
275
|
+
color: '#94A3B8',
|
|
276
|
+
marginTop: 1,
|
|
277
|
+
...fontStack,
|
|
278
|
+
},
|
|
279
|
+
copyButton: {
|
|
280
|
+
flexDirection: 'row',
|
|
281
|
+
alignItems: 'center',
|
|
282
|
+
gap: 3.5,
|
|
283
|
+
backgroundColor: '#1E293B',
|
|
284
|
+
paddingVertical: 5.5,
|
|
285
|
+
paddingHorizontal: 8,
|
|
286
|
+
borderRadius: 7,
|
|
287
|
+
borderWidth: 1,
|
|
288
|
+
borderColor: '#334155',
|
|
289
|
+
flexShrink: 0,
|
|
290
|
+
},
|
|
291
|
+
copyButtonText: {
|
|
292
|
+
fontSize: 10.5,
|
|
293
|
+
fontWeight: '600',
|
|
244
294
|
color: '#94A3B8',
|
|
245
|
-
marginTop: 1.5,
|
|
246
295
|
...fontStack,
|
|
247
296
|
},
|
|
248
297
|
actionButton: {
|
|
249
298
|
flexDirection: 'row',
|
|
250
299
|
alignItems: 'center',
|
|
251
|
-
gap:
|
|
300
|
+
gap: 3.5,
|
|
252
301
|
backgroundColor: '#7C3AED',
|
|
253
|
-
paddingVertical:
|
|
254
|
-
paddingHorizontal:
|
|
255
|
-
borderRadius:
|
|
302
|
+
paddingVertical: 5.5,
|
|
303
|
+
paddingHorizontal: 9,
|
|
304
|
+
borderRadius: 7,
|
|
256
305
|
flexShrink: 0,
|
|
257
306
|
shadowColor: '#7C3AED',
|
|
258
307
|
shadowOffset: { width: 0, height: 2 },
|
|
259
|
-
shadowOpacity: 0.
|
|
308
|
+
shadowOpacity: 0.35,
|
|
260
309
|
shadowRadius: 4,
|
|
261
310
|
elevation: 3,
|
|
262
311
|
},
|
|
263
312
|
actionButtonText: {
|
|
264
|
-
fontSize: 11
|
|
313
|
+
fontSize: 11,
|
|
265
314
|
fontWeight: '700',
|
|
266
315
|
color: '#FFFFFF',
|
|
267
316
|
...fontStack,
|
|
268
317
|
},
|
|
269
318
|
closeButton: {
|
|
270
|
-
width:
|
|
271
|
-
height:
|
|
272
|
-
borderRadius:
|
|
319
|
+
width: 22,
|
|
320
|
+
height: 22,
|
|
321
|
+
borderRadius: 11,
|
|
273
322
|
backgroundColor: '#1E293B',
|
|
274
323
|
justifyContent: 'center',
|
|
275
324
|
alignItems: 'center',
|
|
276
325
|
flexShrink: 0,
|
|
277
326
|
},
|
|
278
327
|
progressBarTrack: {
|
|
279
|
-
height:
|
|
328
|
+
height: 2.5,
|
|
280
329
|
width: '100%',
|
|
281
330
|
backgroundColor: '#1E293B',
|
|
282
331
|
},
|
|
283
332
|
progressBarFill: {
|
|
284
333
|
height: '100%',
|
|
285
|
-
backgroundColor: '#
|
|
334
|
+
backgroundColor: '#8B5CF6',
|
|
286
335
|
},
|
|
287
336
|
});
|
|
288
337
|
exports.default = exports.NpmUpdateToast;
|