react-native-inapp-inspector 2.3.9 → 2.3.10
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/components/Inspector/NetworkDetail.js +2 -1
- package/dist/commonjs/components/Inspector/NetworkFilterModal.d.ts +19 -0
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +648 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +89 -147
- package/dist/commonjs/components/LogCard.js +5 -26
- package/dist/commonjs/components/NetworkIcons.d.ts +1 -0
- package/dist/commonjs/components/NetworkIcons.js +6 -1
- package/dist/commonjs/constants/index.js +3 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/styles/index.d.ts +11 -0
- package/dist/commonjs/styles/index.js +20 -5
- package/dist/commonjs/types/enums.d.ts +3 -0
- package/dist/commonjs/types/enums.js +3 -0
- package/dist/esm/components/Inspector/NetworkDetail.js +2 -1
- package/dist/esm/components/Inspector/NetworkFilterModal.d.ts +19 -0
- package/dist/esm/components/Inspector/NetworkFilterModal.js +607 -0
- package/dist/esm/components/Inspector/NetworkTab.js +91 -149
- package/dist/esm/components/LogCard.js +5 -26
- package/dist/esm/components/NetworkIcons.d.ts +1 -0
- package/dist/esm/components/NetworkIcons.js +4 -0
- package/dist/esm/constants/index.js +3 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/styles/index.d.ts +11 -0
- package/dist/esm/styles/index.js +20 -5
- package/dist/esm/types/enums.d.ts +3 -0
- package/dist/esm/types/enums.js +3 -0
- package/package.json +2 -2
- package/src/components/Inspector/NetworkDetail.tsx +2 -1
- package/src/components/Inspector/NetworkFilterModal.tsx +710 -0
- package/src/components/Inspector/NetworkTab.tsx +127 -204
- package/src/components/LogCard.tsx +5 -30
- package/src/components/NetworkIcons.tsx +27 -0
- package/src/constants/index.ts +3 -0
- package/src/constants/version.ts +1 -1
- package/src/styles/index.ts +20 -5
- package/src/types/enums.ts +3 -0
|
@@ -1,99 +1,53 @@
|
|
|
1
1
|
import React, { useCallback, useMemo, useRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FlatList, Pressable, ScrollView, Text, TextInput, View, } from 'react-native';
|
|
3
3
|
import { animateNextLayout, useInspector } from './InspectorContext';
|
|
4
|
-
import useAccordion from '../../customHooks/useAccordion';
|
|
5
4
|
import TouchableScale from '../TouchableScale';
|
|
6
5
|
import AnimatedEntrance from '../AnimatedEntrance';
|
|
7
6
|
import DomainHeader from '../DomainHeader';
|
|
8
7
|
import LogCard from '../LogCard';
|
|
9
8
|
import EmptyState from '../EmptyState';
|
|
10
9
|
import EndOfListFooter from '../EndOfListFooter';
|
|
10
|
+
import NetworkFilterModal from './NetworkFilterModal';
|
|
11
11
|
import styles from '../../styles';
|
|
12
12
|
import { AppColors } from '../../styles/AppColors';
|
|
13
13
|
import { AppFonts } from '../../styles/AppFonts';
|
|
14
|
-
import {
|
|
14
|
+
import { METHOD_COLORS } from '../../constants';
|
|
15
15
|
import { useTranslation } from '../../i18n';
|
|
16
16
|
import { SearchIcon, ClearIcon, TrashIcon, SortArrowIcon, FilterIcon, ChevronIcon, CircleCheckIcon, CircleXIcon, CircleAlertIcon, LayersIcon, HeaderPauseIcon, ClockIcon, GlobeIcon, RequestIcon, ResponseIcon, HeadersIcon, AtomIcon, BoltIcon, ShieldAlertIcon, } from '../NetworkIcons';
|
|
17
|
-
const STATUS_META = {
|
|
18
|
-
ALL: { color: AppColors.grayText, Icon: LayersIcon },
|
|
19
|
-
'2xx': { color: AppColors.greenColor, Icon: CircleCheckIcon },
|
|
20
|
-
'200': { color: AppColors.greenColor, Icon: CircleCheckIcon },
|
|
21
|
-
'3xx': { color: AppColors.warningIconGold, Icon: CircleAlertIcon },
|
|
22
|
-
'300': { color: AppColors.warningIconGold, Icon: CircleAlertIcon },
|
|
23
|
-
'4xx': { color: AppColors.darkOrange, Icon: CircleAlertIcon },
|
|
24
|
-
'400': { color: AppColors.darkOrange, Icon: CircleAlertIcon },
|
|
25
|
-
'404': { color: AppColors.darkOrange, Icon: CircleAlertIcon },
|
|
26
|
-
'5xx': { color: AppColors.errorColor, Icon: CircleXIcon },
|
|
27
|
-
'500': { color: AppColors.errorColor, Icon: CircleXIcon },
|
|
28
|
-
Failed: { color: AppColors.errorColor, Icon: CircleXIcon },
|
|
29
|
-
};
|
|
30
|
-
const getStatusMeta = (filter) => {
|
|
31
|
-
if (STATUS_META[filter])
|
|
32
|
-
return STATUS_META[filter];
|
|
33
|
-
const num = parseInt(filter, 10);
|
|
34
|
-
if (!isNaN(num)) {
|
|
35
|
-
if (num >= 200 && num < 300)
|
|
36
|
-
return { color: AppColors.greenColor, Icon: CircleCheckIcon };
|
|
37
|
-
if (num >= 300 && num < 400)
|
|
38
|
-
return { color: AppColors.warningIconGold, Icon: CircleAlertIcon };
|
|
39
|
-
if (num >= 400 && num < 500)
|
|
40
|
-
return { color: AppColors.darkOrange, Icon: CircleAlertIcon };
|
|
41
|
-
if (num >= 500)
|
|
42
|
-
return { color: AppColors.errorColor, Icon: CircleXIcon };
|
|
43
|
-
}
|
|
44
|
-
if (filter.startsWith('2'))
|
|
45
|
-
return { color: AppColors.greenColor, Icon: CircleCheckIcon };
|
|
46
|
-
if (filter.startsWith('3'))
|
|
47
|
-
return { color: AppColors.warningIconGold, Icon: CircleAlertIcon };
|
|
48
|
-
if (filter.startsWith('4'))
|
|
49
|
-
return { color: AppColors.darkOrange, Icon: CircleAlertIcon };
|
|
50
|
-
if (filter.startsWith('5'))
|
|
51
|
-
return { color: AppColors.errorColor, Icon: CircleXIcon };
|
|
52
|
-
return { color: AppColors.grayText, Icon: LayersIcon };
|
|
53
|
-
};
|
|
54
|
-
const FilterChip = React.memo(({ label, color, Icon, badge, active, onPress, }) => {
|
|
55
|
-
const iconColor = active ? color : AppColors.grayTextWeak;
|
|
56
|
-
return (<TouchableScale style={styles.statusFilterWrap} onPress={onPress} hitSlop={10}>
|
|
57
|
-
<View style={[
|
|
58
|
-
styles.statusFilterChip,
|
|
59
|
-
{
|
|
60
|
-
paddingHorizontal: 9,
|
|
61
|
-
paddingVertical: 5,
|
|
62
|
-
borderRadius: 7,
|
|
63
|
-
borderWidth: 1,
|
|
64
|
-
borderColor: active ? color : `${AppColors.grayBorderSecondary}`,
|
|
65
|
-
backgroundColor: active ? `${color}14` : AppColors.grayBackground,
|
|
66
|
-
},
|
|
67
|
-
active && {
|
|
68
|
-
shadowColor: color,
|
|
69
|
-
shadowOffset: { width: 0, height: 1 },
|
|
70
|
-
shadowOpacity: 0.2,
|
|
71
|
-
shadowRadius: 2,
|
|
72
|
-
elevation: 1.5,
|
|
73
|
-
},
|
|
74
|
-
]}>
|
|
75
|
-
{badge != null ? (<View style={[
|
|
76
|
-
styles.methodBadgeMini,
|
|
77
|
-
{ backgroundColor: badge },
|
|
78
|
-
]}/>) : (Icon && (<Icon color={iconColor} size={13}/>))}
|
|
79
|
-
<Text numberOfLines={1} style={[
|
|
80
|
-
styles.statusFilterText,
|
|
81
|
-
{
|
|
82
|
-
color: active ? color : AppColors.grayText,
|
|
83
|
-
fontFamily: active ? AppFonts.interBold : AppFonts.interMedium,
|
|
84
|
-
},
|
|
85
|
-
]}>
|
|
86
|
-
{label}
|
|
87
|
-
</Text>
|
|
88
|
-
</View>
|
|
89
|
-
</TouchableScale>);
|
|
90
|
-
});
|
|
91
17
|
const NetworkTab = React.memo(() => {
|
|
92
18
|
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, } = useInspector();
|
|
93
19
|
const { t } = useTranslation();
|
|
94
|
-
const filtersAccordion = useAccordion(false, 300, 260);
|
|
95
20
|
const apisListRef = useRef(null);
|
|
21
|
+
const [isFilterModalOpen, setIsFilterModalOpen] = React.useState(false);
|
|
96
22
|
const [isSearchFocused, setIsSearchFocused] = React.useState(false);
|
|
23
|
+
const modalFilterState = useMemo(() => ({
|
|
24
|
+
statusCodes: statusFilters.size > 0 ? new Set(statusFilters) : new Set(['all']),
|
|
25
|
+
methods: methodFilters.size > 0 ? new Set(methodFilters) : new Set(['all']),
|
|
26
|
+
latency: 'all',
|
|
27
|
+
protocol: 'all',
|
|
28
|
+
sortBy: sortOrder === 'newest' ? 'time_desc' : 'time_asc',
|
|
29
|
+
}), [statusFilters, methodFilters, sortOrder]);
|
|
30
|
+
const handleApplyNetworkFilters = useCallback((newFilters) => {
|
|
31
|
+
if (newFilters.statusCodes.has('all') ||
|
|
32
|
+
newFilters.statusCodes.size === 0) {
|
|
33
|
+
setStatusFilters(new Set());
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
setStatusFilters(new Set(newFilters.statusCodes));
|
|
37
|
+
}
|
|
38
|
+
if (newFilters.methods.has('all') || newFilters.methods.size === 0) {
|
|
39
|
+
setMethodFilters(new Set());
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
setMethodFilters(new Set([...newFilters.methods].map(m => m)));
|
|
43
|
+
}
|
|
44
|
+
if (newFilters.sortBy === 'time_asc') {
|
|
45
|
+
setSortOrder('oldest');
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
setSortOrder('newest');
|
|
49
|
+
}
|
|
50
|
+
}, [setStatusFilters, setMethodFilters, setSortOrder]);
|
|
97
51
|
const quickCounts = useMemo(() => {
|
|
98
52
|
let errorCount = 0;
|
|
99
53
|
let successCount = 0;
|
|
@@ -520,10 +474,12 @@ const NetworkTab = React.memo(() => {
|
|
|
520
474
|
|
|
521
475
|
<TouchableScale style={[
|
|
522
476
|
styles.toolbarBtn,
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
477
|
+
(statusFilters.size > 0 || methodFilters.size > 0) && {
|
|
478
|
+
borderColor: AppColors.purple,
|
|
479
|
+
backgroundColor: `${AppColors.purple}15`,
|
|
480
|
+
},
|
|
481
|
+
]} onPress={() => setIsFilterModalOpen(true)} hitSlop={6}>
|
|
482
|
+
<FilterIcon color={statusFilters.size > 0 || methodFilters.size > 0
|
|
527
483
|
? AppColors.purple
|
|
528
484
|
: AppColors.grayTextStrong} size={16}/>
|
|
529
485
|
{(statusFilters.size > 0 ||
|
|
@@ -685,6 +641,51 @@ const NetworkTab = React.memo(() => {
|
|
|
685
641
|
</View>
|
|
686
642
|
</TouchableScale>);
|
|
687
643
|
})}
|
|
644
|
+
|
|
645
|
+
<TouchableScale onPress={() => setIsFilterModalOpen(true)}>
|
|
646
|
+
<View style={{
|
|
647
|
+
flexDirection: 'row',
|
|
648
|
+
alignItems: 'center',
|
|
649
|
+
paddingHorizontal: 10,
|
|
650
|
+
paddingVertical: 4.5,
|
|
651
|
+
borderRadius: 8,
|
|
652
|
+
backgroundColor: statusFilters.size > 0 || methodFilters.size > 0
|
|
653
|
+
? `${AppColors.purple}20`
|
|
654
|
+
: AppColors.grayBackground,
|
|
655
|
+
borderWidth: 1,
|
|
656
|
+
borderColor: statusFilters.size > 0 || methodFilters.size > 0
|
|
657
|
+
? AppColors.purple
|
|
658
|
+
: AppColors.grayBorderSecondary,
|
|
659
|
+
gap: 5,
|
|
660
|
+
}}>
|
|
661
|
+
<FilterIcon size={11} color={statusFilters.size > 0 || methodFilters.size > 0
|
|
662
|
+
? AppColors.purple
|
|
663
|
+
: AppColors.grayText}/>
|
|
664
|
+
<Text style={{
|
|
665
|
+
fontFamily: AppFonts.interBold,
|
|
666
|
+
fontSize: 10.5,
|
|
667
|
+
color: statusFilters.size > 0 || methodFilters.size > 0
|
|
668
|
+
? AppColors.purple
|
|
669
|
+
: AppColors.grayText,
|
|
670
|
+
}}>
|
|
671
|
+
More Filters
|
|
672
|
+
</Text>
|
|
673
|
+
{(statusFilters.size > 0 || methodFilters.size > 0) && (<View style={{
|
|
674
|
+
backgroundColor: AppColors.purple,
|
|
675
|
+
paddingHorizontal: 4.5,
|
|
676
|
+
paddingVertical: 1,
|
|
677
|
+
borderRadius: 6,
|
|
678
|
+
}}>
|
|
679
|
+
<Text style={{
|
|
680
|
+
fontFamily: AppFonts.interBold,
|
|
681
|
+
fontSize: 8.5,
|
|
682
|
+
color: AppColors.white,
|
|
683
|
+
}}>
|
|
684
|
+
{statusFilters.size + methodFilters.size}
|
|
685
|
+
</Text>
|
|
686
|
+
</View>)}
|
|
687
|
+
</View>
|
|
688
|
+
</TouchableScale>
|
|
688
689
|
</ScrollView>
|
|
689
690
|
</View>
|
|
690
691
|
|
|
@@ -833,86 +834,24 @@ const NetworkTab = React.memo(() => {
|
|
|
833
834
|
</TouchableScale>
|
|
834
835
|
</View>)}
|
|
835
836
|
|
|
836
|
-
<Animated.View style={[
|
|
837
|
-
filtersAccordion.bodyStyle,
|
|
838
|
-
{ overflow: 'hidden' },
|
|
839
|
-
]}>
|
|
840
|
-
<View style={styles.filtersContainer}>
|
|
841
|
-
<Text style={styles.filtersHeading}>
|
|
842
|
-
STATUS
|
|
843
|
-
</Text>
|
|
844
|
-
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.statusRowContent}>
|
|
845
|
-
{STATUS_FILTERS.map(filter => {
|
|
846
|
-
const isAll = filter === 'ALL';
|
|
847
|
-
const active = isAll
|
|
848
|
-
? statusFilters.size === 0
|
|
849
|
-
: statusFilters.has(filter);
|
|
850
|
-
const meta = getStatusMeta(filter);
|
|
851
|
-
return (<FilterChip key={filter} label={filter} color={meta.color} Icon={meta.Icon} active={active} onPress={() => {
|
|
852
|
-
if (isAll) {
|
|
853
|
-
setStatusFilters(new Set());
|
|
854
|
-
}
|
|
855
|
-
else {
|
|
856
|
-
setStatusFilters(prev => {
|
|
857
|
-
const next = new Set(prev);
|
|
858
|
-
next.has(filter)
|
|
859
|
-
? next.delete(filter)
|
|
860
|
-
: next.add(filter);
|
|
861
|
-
return next;
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
}}/>);
|
|
865
|
-
})}
|
|
866
|
-
</ScrollView>
|
|
867
|
-
|
|
868
|
-
<Text style={[
|
|
869
|
-
styles.filtersHeading,
|
|
870
|
-
{ marginTop: 16 },
|
|
871
|
-
]}>
|
|
872
|
-
METHOD
|
|
873
|
-
</Text>
|
|
874
|
-
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.statusRowContent}>
|
|
875
|
-
{availableMethods.map(filter => {
|
|
876
|
-
const isAll = filter === 'ALL';
|
|
877
|
-
const active = isAll
|
|
878
|
-
? methodFilters.size === 0
|
|
879
|
-
: methodFilters.has(filter);
|
|
880
|
-
const methodColor = METHOD_COLORS[filter] ??
|
|
881
|
-
METHOD_COLORS.ALL;
|
|
882
|
-
return (<FilterChip key={filter} label={filter} color={methodColor} badge={methodColor} active={active} onPress={() => {
|
|
883
|
-
if (isAll) {
|
|
884
|
-
setMethodFilters(new Set());
|
|
885
|
-
}
|
|
886
|
-
else {
|
|
887
|
-
setMethodFilters(prev => {
|
|
888
|
-
const next = new Set(prev);
|
|
889
|
-
next.has(filter)
|
|
890
|
-
? next.delete(filter)
|
|
891
|
-
: next.add(filter);
|
|
892
|
-
return next;
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
}}/>);
|
|
896
|
-
})}
|
|
897
|
-
</ScrollView>
|
|
898
|
-
</View>
|
|
899
|
-
</Animated.View>
|
|
900
|
-
|
|
901
837
|
{(search ||
|
|
902
838
|
statusFilters.size > 0 ||
|
|
903
|
-
methodFilters.size > 0
|
|
839
|
+
methodFilters.size > 0 ||
|
|
840
|
+
quickFilter !== 'all') && (<Text style={styles.resultCount}>
|
|
904
841
|
{filteredLogs.length === logs.length
|
|
905
842
|
? `${logs.length} requests`
|
|
906
843
|
: `${filteredLogs.length} of ${logs.length} filtered requests`}
|
|
907
844
|
</Text>)}
|
|
908
845
|
</View>} ListEmptyComponent={<EmptyState isSearch={search.length > 0 ||
|
|
909
846
|
statusFilters.size > 0 ||
|
|
910
|
-
methodFilters.size > 0
|
|
847
|
+
methodFilters.size > 0 ||
|
|
848
|
+
quickFilter !== 'all'} searchQuery={search} customTitle={search.length > 0
|
|
911
849
|
? 'No matching API requests'
|
|
912
850
|
: 'No network activity'} onClearSearch={() => {
|
|
913
851
|
setSearch('');
|
|
914
852
|
setStatusFilters(new Set());
|
|
915
853
|
setMethodFilters(new Set());
|
|
854
|
+
setQuickFilter('all');
|
|
916
855
|
setSearchScope('all');
|
|
917
856
|
}}/>} ListFooterComponent={groupedData.length > 0 ? (<EndOfListFooter count={filteredLogs.length} label="requests"/>) : null} contentContainerStyle={[
|
|
918
857
|
styles.listContent,
|
|
@@ -940,6 +879,9 @@ const NetworkTab = React.memo(() => {
|
|
|
940
879
|
<ChevronIcon color={AppColors.white} size={18}/>
|
|
941
880
|
</View>
|
|
942
881
|
</TouchableScale>
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
<NetworkFilterModal visible={isFilterModalOpen} onClose={() => setIsFilterModalOpen(false)} filters={modalFilterState} onApply={handleApplyNetworkFilters} searchQuery={search}/>
|
|
943
885
|
</View>);
|
|
944
886
|
});
|
|
945
887
|
export default NetworkTab;
|
|
@@ -198,29 +198,6 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
198
198
|
GQL
|
|
199
199
|
</Text>
|
|
200
200
|
</View>)}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
{item.duration != null && !isFailed && (<View style={[
|
|
204
|
-
styles.chip,
|
|
205
|
-
{
|
|
206
|
-
backgroundColor: `${durationColor}12`,
|
|
207
|
-
borderColor: `${durationColor}2E`,
|
|
208
|
-
paddingHorizontal: 4.5,
|
|
209
|
-
paddingVertical: 1,
|
|
210
|
-
borderRadius: 4,
|
|
211
|
-
},
|
|
212
|
-
]}>
|
|
213
|
-
<Text style={[
|
|
214
|
-
styles.chipText,
|
|
215
|
-
{
|
|
216
|
-
fontFamily: AppFonts.interBold,
|
|
217
|
-
fontSize: 8.5,
|
|
218
|
-
color: durationColor,
|
|
219
|
-
},
|
|
220
|
-
]}>
|
|
221
|
-
{item.duration}ms
|
|
222
|
-
</Text>
|
|
223
|
-
</View>)}
|
|
224
201
|
</View>
|
|
225
202
|
|
|
226
203
|
<View style={[
|
|
@@ -239,6 +216,7 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
239
216
|
: isLoading
|
|
240
217
|
? `${AppColors.darkOrange}30`
|
|
241
218
|
: `${statusColor}30`,
|
|
219
|
+
flexShrink: 0,
|
|
242
220
|
},
|
|
243
221
|
]}>
|
|
244
222
|
{renderStatusIcon()}
|
|
@@ -272,6 +250,7 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
272
250
|
alignItems: 'center',
|
|
273
251
|
justifyContent: 'center',
|
|
274
252
|
marginRight: 4,
|
|
253
|
+
flexShrink: 0,
|
|
275
254
|
}}>
|
|
276
255
|
<GlobeIcon color={AppColors.skyBlue} size={11}/>
|
|
277
256
|
</View>
|
|
@@ -310,8 +289,8 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
310
289
|
|
|
311
290
|
|
|
312
291
|
<View style={styles.cardFooterRow}>
|
|
313
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6,
|
|
314
|
-
<View style={styles.cardDateRow}>
|
|
292
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, flex: 1, minWidth: 0, marginRight: 8 }}>
|
|
293
|
+
<View style={[styles.cardDateRow, { flexShrink: 0 }]}>
|
|
315
294
|
<CalendarIcon color={AppColors.grayTextWeak} size={10}/>
|
|
316
295
|
<Text style={styles.cardDateText}>{triggeredAt}</Text>
|
|
317
296
|
</View>
|
|
@@ -328,7 +307,7 @@ const LogCard = React.memo(function LogCard({ item, onPress, timelineMinStart, t
|
|
|
328
307
|
paddingVertical: 1,
|
|
329
308
|
borderRadius: 4,
|
|
330
309
|
flexShrink: 1,
|
|
331
|
-
|
|
310
|
+
minWidth: 0,
|
|
332
311
|
},
|
|
333
312
|
]}>
|
|
334
313
|
<PinIcon color={AppColors.skyBlue} size={8.5}/>
|
|
@@ -133,3 +133,4 @@ export declare const ShieldCheckIcon: ({ color, size, }: IconProps) => React.JSX
|
|
|
133
133
|
export declare const DatabaseIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
134
134
|
export declare const PencilIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
135
135
|
export declare const PlusIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
136
|
+
export declare const LockIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
@@ -730,3 +730,7 @@ export const PencilIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<
|
|
|
730
730
|
export const PlusIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
731
731
|
<Path d="M12 5v14M5 12h14" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
732
732
|
</Svg>);
|
|
733
|
+
export const LockIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
734
|
+
<Rect x="3" y="11" width="18" height="11" rx="2" ry="2" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
735
|
+
<Path d="M7 11V7a5 5 0 0 1 10 0v4" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
736
|
+
</Svg>);
|
|
@@ -18,6 +18,9 @@ export const METHOD_COLORS = {
|
|
|
18
18
|
PUT: '#D97706',
|
|
19
19
|
PATCH: '#7C3AED',
|
|
20
20
|
DELETE: '#DC2626',
|
|
21
|
+
QUERY: '#0284C7',
|
|
22
|
+
OPTIONS: '#475569',
|
|
23
|
+
HEAD: '#0891B2',
|
|
21
24
|
};
|
|
22
25
|
export const DOMAIN_COLORS = AppColors.domainColors;
|
|
23
26
|
export const DURATION_FAST_MS = 200;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.3.
|
|
1
|
+
export declare const LIB_VERSION = "2.3.10";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = '2.3.
|
|
1
|
+
export const LIB_VERSION = '2.3.10';
|
|
@@ -603,6 +603,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
603
603
|
alignItems: string;
|
|
604
604
|
justifyContent: string;
|
|
605
605
|
marginBottom: number;
|
|
606
|
+
minHeight: number;
|
|
606
607
|
};
|
|
607
608
|
cardHeaderLeft: {
|
|
608
609
|
flexDirection: string;
|
|
@@ -610,11 +611,13 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
610
611
|
flex: number;
|
|
611
612
|
marginRight: number;
|
|
612
613
|
gap: number;
|
|
614
|
+
minWidth: number;
|
|
613
615
|
};
|
|
614
616
|
cardHeaderRight: {
|
|
615
617
|
flexDirection: string;
|
|
616
618
|
alignItems: string;
|
|
617
619
|
gap: number;
|
|
620
|
+
flexShrink: number;
|
|
618
621
|
};
|
|
619
622
|
smallCheckbox: {
|
|
620
623
|
width: number;
|
|
@@ -701,6 +704,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
701
704
|
flexDirection: string;
|
|
702
705
|
alignItems: string;
|
|
703
706
|
flex: number;
|
|
707
|
+
minWidth: number;
|
|
704
708
|
gap: number;
|
|
705
709
|
};
|
|
706
710
|
slugTag: {
|
|
@@ -713,6 +717,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
713
717
|
paddingVertical: number;
|
|
714
718
|
borderRadius: number;
|
|
715
719
|
marginTop: number;
|
|
720
|
+
flexShrink: number;
|
|
716
721
|
};
|
|
717
722
|
slugText: {
|
|
718
723
|
fontFamily: string;
|
|
@@ -725,17 +730,20 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
725
730
|
flexDirection: string;
|
|
726
731
|
alignItems: string;
|
|
727
732
|
gap: number;
|
|
733
|
+
flexShrink: number;
|
|
728
734
|
};
|
|
729
735
|
cardFooterRow: {
|
|
730
736
|
flexDirection: string;
|
|
731
737
|
alignItems: string;
|
|
732
738
|
justifyContent: string;
|
|
733
739
|
marginTop: number;
|
|
740
|
+
minHeight: number;
|
|
734
741
|
};
|
|
735
742
|
cardDateRow: {
|
|
736
743
|
flexDirection: string;
|
|
737
744
|
alignItems: string;
|
|
738
745
|
gap: number;
|
|
746
|
+
flexShrink: number;
|
|
739
747
|
};
|
|
740
748
|
cardDateText: {
|
|
741
749
|
fontFamily: string;
|
|
@@ -747,6 +755,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
747
755
|
flexDirection: string;
|
|
748
756
|
alignItems: string;
|
|
749
757
|
gap: number;
|
|
758
|
+
flexShrink: number;
|
|
750
759
|
};
|
|
751
760
|
chip: {
|
|
752
761
|
flexDirection: string;
|
|
@@ -848,11 +857,13 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
848
857
|
alignItems: string;
|
|
849
858
|
justifyContent: string;
|
|
850
859
|
paddingBottom: number;
|
|
860
|
+
gap: number;
|
|
851
861
|
};
|
|
852
862
|
detailInfoRight: {
|
|
853
863
|
flexDirection: string;
|
|
854
864
|
alignItems: string;
|
|
855
865
|
gap: number;
|
|
866
|
+
flexShrink: number;
|
|
856
867
|
};
|
|
857
868
|
metaContainer: {
|
|
858
869
|
backgroundColor: string;
|
package/dist/esm/styles/index.js
CHANGED
|
@@ -558,18 +558,21 @@ export const getRawStyles = (colors) => ({
|
|
|
558
558
|
alignItems: 'center',
|
|
559
559
|
justifyContent: 'space-between',
|
|
560
560
|
marginBottom: 4,
|
|
561
|
+
minHeight: 22,
|
|
561
562
|
},
|
|
562
563
|
cardHeaderLeft: {
|
|
563
564
|
flexDirection: 'row',
|
|
564
565
|
alignItems: 'center',
|
|
565
566
|
flex: 1,
|
|
566
|
-
marginRight:
|
|
567
|
-
gap:
|
|
567
|
+
marginRight: 6,
|
|
568
|
+
gap: 5,
|
|
569
|
+
minWidth: 0,
|
|
568
570
|
},
|
|
569
571
|
cardHeaderRight: {
|
|
570
572
|
flexDirection: 'row',
|
|
571
573
|
alignItems: 'center',
|
|
572
574
|
gap: 5,
|
|
575
|
+
flexShrink: 0,
|
|
573
576
|
},
|
|
574
577
|
smallCheckbox: {
|
|
575
578
|
width: 15,
|
|
@@ -650,6 +653,7 @@ export const getRawStyles = (colors) => ({
|
|
|
650
653
|
flexDirection: 'row',
|
|
651
654
|
alignItems: 'flex-start',
|
|
652
655
|
flex: 1,
|
|
656
|
+
minWidth: 0,
|
|
653
657
|
gap: 6,
|
|
654
658
|
},
|
|
655
659
|
slugTag: {
|
|
@@ -662,6 +666,7 @@ export const getRawStyles = (colors) => ({
|
|
|
662
666
|
paddingVertical: 1.5,
|
|
663
667
|
borderRadius: 4,
|
|
664
668
|
marginTop: 1,
|
|
669
|
+
flexShrink: 0,
|
|
665
670
|
},
|
|
666
671
|
slugText: {
|
|
667
672
|
fontFamily: AppFonts.interMedium,
|
|
@@ -674,17 +679,20 @@ export const getRawStyles = (colors) => ({
|
|
|
674
679
|
flexDirection: 'row',
|
|
675
680
|
alignItems: 'center',
|
|
676
681
|
gap: 4,
|
|
682
|
+
flexShrink: 0,
|
|
677
683
|
},
|
|
678
684
|
cardFooterRow: {
|
|
679
685
|
flexDirection: 'row',
|
|
680
686
|
alignItems: 'center',
|
|
681
687
|
justifyContent: 'space-between',
|
|
682
|
-
marginTop:
|
|
688
|
+
marginTop: 4,
|
|
689
|
+
minHeight: 18,
|
|
683
690
|
},
|
|
684
691
|
cardDateRow: {
|
|
685
692
|
flexDirection: 'row',
|
|
686
693
|
alignItems: 'center',
|
|
687
694
|
gap: 3.5,
|
|
695
|
+
flexShrink: 0,
|
|
688
696
|
},
|
|
689
697
|
cardDateText: {
|
|
690
698
|
fontFamily: AppFonts.interRegular,
|
|
@@ -696,6 +704,7 @@ export const getRawStyles = (colors) => ({
|
|
|
696
704
|
flexDirection: 'row',
|
|
697
705
|
alignItems: 'center',
|
|
698
706
|
gap: 5,
|
|
707
|
+
flexShrink: 0,
|
|
699
708
|
},
|
|
700
709
|
chip: {
|
|
701
710
|
flexDirection: 'row',
|
|
@@ -787,9 +796,15 @@ export const getRawStyles = (colors) => ({
|
|
|
787
796
|
flexDirection: 'row',
|
|
788
797
|
alignItems: 'center',
|
|
789
798
|
justifyContent: 'space-between',
|
|
790
|
-
paddingBottom:
|
|
799
|
+
paddingBottom: 8,
|
|
800
|
+
gap: 8,
|
|
801
|
+
},
|
|
802
|
+
detailInfoRight: {
|
|
803
|
+
flexDirection: 'row',
|
|
804
|
+
alignItems: 'center',
|
|
805
|
+
gap: 5,
|
|
806
|
+
flexShrink: 0,
|
|
791
807
|
},
|
|
792
|
-
detailInfoRight: { flexDirection: 'row', alignItems: 'center', gap: 6 },
|
|
793
808
|
metaContainer: {
|
|
794
809
|
backgroundColor: colors.primaryLight,
|
|
795
810
|
borderWidth: 1,
|
|
@@ -17,6 +17,9 @@ export declare const Method: {
|
|
|
17
17
|
readonly Put: "PUT";
|
|
18
18
|
readonly Patch: "PATCH";
|
|
19
19
|
readonly Delete: "DELETE";
|
|
20
|
+
readonly Query: "QUERY";
|
|
21
|
+
readonly Options: "OPTIONS";
|
|
22
|
+
readonly Head: "HEAD";
|
|
20
23
|
};
|
|
21
24
|
export type Method = (typeof Method)[keyof typeof Method];
|
|
22
25
|
export declare const StatusFilter: {
|
package/dist/esm/types/enums.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-inapp-inspector",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.10",
|
|
4
4
|
"description": "The zero-config, all-in-one in-app debugger for React Native & Expo. Inspect Network (fetch/axios), Console logs, Stack Traces, Redux State, Firebase Analytics, and JS Bundle size directly on device.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"prepare": "npm run build",
|
|
106
106
|
"watch": "tsc -w",
|
|
107
107
|
"prepack": "npm run build",
|
|
108
|
-
"
|
|
108
|
+
"release": "node release.cjs",
|
|
109
109
|
"bundle-visualizer": "react-native-bundle-visualizer"
|
|
110
110
|
},
|
|
111
111
|
"keywords": [
|
|
@@ -98,7 +98,7 @@ const NetworkDetail = React.memo(() => {
|
|
|
98
98
|
return (
|
|
99
99
|
<View style={{flex: 1}}>
|
|
100
100
|
{/* Non-scrollable details header */}
|
|
101
|
-
<View style={{paddingHorizontal:
|
|
101
|
+
<View style={{paddingHorizontal: 8, paddingTop: 4}}>
|
|
102
102
|
<View style={styles.detailInfoBar}>
|
|
103
103
|
{(() => {
|
|
104
104
|
let schemeStr = '';
|
|
@@ -159,6 +159,7 @@ const NetworkDetail = React.memo(() => {
|
|
|
159
159
|
gap: 6,
|
|
160
160
|
flexWrap: 'wrap',
|
|
161
161
|
flex: 1,
|
|
162
|
+
minWidth: 0,
|
|
162
163
|
}}>
|
|
163
164
|
{/* Method Chip */}
|
|
164
165
|
<View
|