react-native-inapp-inspector 2.3.18 → 2.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +47 -0
- package/dist/commonjs/capture.d.ts +2 -0
- package/dist/commonjs/capture.js +3 -0
- package/dist/commonjs/components/EmptyState.d.ts +1 -0
- package/dist/commonjs/components/EmptyState.js +2 -2
- package/dist/commonjs/components/Inspector/FabLauncher.js +494 -39
- package/dist/commonjs/components/Inspector/InspectorHeader.js +45 -26
- package/dist/commonjs/components/Inspector/MainScreen.js +4 -3
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +418 -13
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +376 -88
- package/dist/commonjs/components/Inspector/NetworkDetail.js +49 -63
- package/dist/commonjs/components/Inspector/SettingsPanel.js +499 -119
- package/dist/commonjs/components/Inspector/TabBar.js +166 -4
- package/dist/commonjs/components/JsonViewer.js +4 -3
- package/dist/commonjs/components/NetworkIcons.d.ts +4 -0
- package/dist/commonjs/components/NetworkIcons.js +26 -1
- package/dist/commonjs/components/SegmentedTabs.js +1 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/i18n/locales/en.json +20 -2
- package/dist/commonjs/index.js +45 -30
- package/dist/commonjs/native/NativeInspector.d.ts +3 -0
- package/dist/commonjs/native/NativeInspector.js +14 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +1 -0
- package/dist/commonjs/styles/AppColors.js +78 -78
- package/dist/commonjs/types/enums.d.ts +2 -0
- package/dist/commonjs/types/enums.js +2 -0
- package/dist/commonjs/types/interfaces.d.ts +5 -0
- package/dist/esm/capture.d.ts +2 -0
- package/dist/esm/capture.js +4 -1
- package/dist/esm/components/EmptyState.d.ts +1 -0
- package/dist/esm/components/EmptyState.js +2 -2
- package/dist/esm/components/Inspector/FabLauncher.js +462 -40
- package/dist/esm/components/Inspector/InspectorHeader.js +46 -27
- package/dist/esm/components/Inspector/MainScreen.js +4 -3
- package/dist/esm/components/Inspector/MediaGalleryTab.js +419 -14
- package/dist/esm/components/Inspector/MediaPreviewModal.js +379 -91
- package/dist/esm/components/Inspector/NetworkDetail.js +49 -63
- package/dist/esm/components/Inspector/SettingsPanel.js +500 -120
- package/dist/esm/components/Inspector/TabBar.js +135 -6
- package/dist/esm/components/JsonViewer.js +4 -3
- package/dist/esm/components/NetworkIcons.d.ts +4 -0
- package/dist/esm/components/NetworkIcons.js +21 -0
- package/dist/esm/components/SegmentedTabs.js +1 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/i18n/locales/en.json +20 -2
- package/dist/esm/index.js +44 -29
- package/dist/esm/native/NativeInspector.d.ts +3 -0
- package/dist/esm/native/NativeInspector.js +12 -0
- package/dist/esm/native/NativeNetworkInspector.d.ts +1 -0
- package/dist/esm/styles/AppColors.js +78 -78
- package/dist/esm/types/enums.d.ts +2 -0
- package/dist/esm/types/enums.js +2 -0
- package/dist/esm/types/interfaces.d.ts +5 -0
- package/ios/NetworkInspectorModule.mm +241 -136
- package/package.json +1 -1
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/capture.ts +8 -0
- package/src/components/EmptyState.tsx +3 -1
- package/src/components/Inspector/FabLauncher.tsx +562 -52
- package/src/components/Inspector/InspectorHeader.tsx +60 -22
- package/src/components/Inspector/MainScreen.tsx +3 -2
- package/src/components/Inspector/MediaGalleryTab.tsx +502 -28
- package/src/components/Inspector/MediaPreviewModal.tsx +465 -117
- package/src/components/Inspector/NetworkDetail.tsx +80 -97
- package/src/components/Inspector/SettingsPanel.tsx +708 -152
- package/src/components/Inspector/TabBar.tsx +174 -6
- package/src/components/JsonViewer.tsx +4 -2
- package/src/components/NetworkIcons.tsx +56 -0
- package/src/components/SegmentedTabs.tsx +1 -0
- package/src/constants/version.ts +1 -1
- package/src/i18n/locales/en.json +20 -4
- package/src/index.tsx +46 -31
- package/src/native/NativeInspector.ts +17 -0
- package/src/native/NativeNetworkInspector.ts +1 -0
- package/src/styles/AppColors.ts +80 -80
- package/src/types/enums.ts +2 -0
- package/src/types/interfaces.ts +5 -0
|
@@ -15,11 +15,11 @@ import { ScreenCapture } from '../../capture';
|
|
|
15
15
|
import { showToast } from '../../helpers/toast';
|
|
16
16
|
import { UpdateAvailableModal } from './UpdateAvailableModal';
|
|
17
17
|
import { MediaPreviewModal } from './MediaPreviewModal';
|
|
18
|
-
import { WhiteBackNavigation, TrashIcon, SettingsIcon, CloseWhite, ClockIcon, SizeIcon, AppleIcon, AndroidIcon, NpmIcon, ResetIcon, BoltIcon, InfoCircleIcon, CameraIcon, VideoCameraIcon, } from '../NetworkIcons';
|
|
18
|
+
import { WhiteBackNavigation, TrashIcon, SettingsIcon, CloseWhite, ChevronDownIcon, ClockIcon, SizeIcon, AppleIcon, AndroidIcon, NpmIcon, ResetIcon, BoltIcon, InfoCircleIcon, CameraIcon, VideoCameraIcon, } from '../NetworkIcons';
|
|
19
19
|
import { useTranslation } from '../../i18n';
|
|
20
20
|
const InspectorHeader = React.memo(() => {
|
|
21
21
|
const { t } = useTranslation();
|
|
22
|
-
const { modalHeightPercent, appIcon, selected, setSelected, selectedEvent, setSelectedEvent, selectedLog, setSelectedLog, selectedReduxSlice, setSelectedReduxSlice, selectedReduxAction, setSelectedReduxAction, reduxState, reduxLastActionMap, showHeaderInfo, setShowHeaderInfo, updateAvailable, latestNpmVersion, clearAnim, activePulseAnim, unreadPulseAnim, runClearAllWithAnimation, settingsPage, setSettingsPage, setSettingsActiveSubTab, isFeedbackOpen, setIsFeedbackOpen, resetToDefaults, closeModal, detailTitle, activeTab, environment, visible, selectedCrash, setSelectedCrash, } = useInspector();
|
|
22
|
+
const { modalHeightPercent, appIcon, selected, setSelected, selectedEvent, setSelectedEvent, selectedLog, setSelectedLog, selectedReduxSlice, setSelectedReduxSlice, selectedReduxAction, setSelectedReduxAction, reduxState, reduxLastActionMap, showHeaderInfo, setShowHeaderInfo, updateAvailable, latestNpmVersion, clearAnim, activePulseAnim, unreadPulseAnim, runClearAllWithAnimation, settingsPage, setSettingsPage, setSettingsActiveSubTab, isFeedbackOpen, setIsFeedbackOpen, resetToDefaults, closeModal, minimizeInspector, detailTitle, activeTab, environment, visible, selectedCrash, setSelectedCrash, refreshMediaCount, } = useInspector();
|
|
23
23
|
const { width: windowWidth } = useWindowDimensions();
|
|
24
24
|
const isNarrow = windowWidth < 360;
|
|
25
25
|
const isCompact = windowWidth < 400;
|
|
@@ -81,6 +81,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
81
81
|
height: result.height,
|
|
82
82
|
};
|
|
83
83
|
setPreviewMediaItem(newItem);
|
|
84
|
+
refreshMediaCount?.().catch(() => { });
|
|
84
85
|
showToast(t('header.screenshotCaptured'));
|
|
85
86
|
}
|
|
86
87
|
else {
|
|
@@ -90,7 +91,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
90
91
|
catch {
|
|
91
92
|
showToast(t('header.screenshotError'));
|
|
92
93
|
}
|
|
93
|
-
}, [t]);
|
|
94
|
+
}, [refreshMediaCount, t]);
|
|
94
95
|
const handleToggleVideoRecording = React.useCallback(async () => {
|
|
95
96
|
try {
|
|
96
97
|
if (isRecording) {
|
|
@@ -114,6 +115,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
114
115
|
hasAudio: result.hasAudio,
|
|
115
116
|
};
|
|
116
117
|
setPreviewMediaItem(newItem);
|
|
118
|
+
refreshMediaCount?.().catch(() => { });
|
|
117
119
|
showToast(t('header.recordingSaved', {
|
|
118
120
|
duration: (result.durationMs / 1000).toFixed(1),
|
|
119
121
|
}));
|
|
@@ -232,7 +234,9 @@ const InspectorHeader = React.memo(() => {
|
|
|
232
234
|
<View style={[
|
|
233
235
|
styles.header,
|
|
234
236
|
{
|
|
235
|
-
|
|
237
|
+
width: '100%',
|
|
238
|
+
justifyContent: 'space-between',
|
|
239
|
+
paddingHorizontal: isNarrow ? 10 : 14,
|
|
236
240
|
paddingVertical: isNarrow ? 6 : 8,
|
|
237
241
|
minHeight: isNarrow ? 48 : 52,
|
|
238
242
|
},
|
|
@@ -241,9 +245,9 @@ const InspectorHeader = React.memo(() => {
|
|
|
241
245
|
flexDirection: 'row',
|
|
242
246
|
alignItems: 'center',
|
|
243
247
|
gap: isNarrow ? 6 : 8,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
minWidth:
|
|
248
|
+
flex: isDetailView ? undefined : 1,
|
|
249
|
+
flexShrink: isDetailView ? 0 : 1,
|
|
250
|
+
minWidth: 0,
|
|
247
251
|
}}>
|
|
248
252
|
{isAnySelected && (<TouchableScale onPress={() => {
|
|
249
253
|
if (isFeedbackOpen) {
|
|
@@ -988,7 +992,20 @@ const InspectorHeader = React.memo(() => {
|
|
|
988
992
|
<SettingsIcon color={AppColors.white} size={isNarrow ? 12 : 14}/>
|
|
989
993
|
</TouchableScale>)}
|
|
990
994
|
|
|
991
|
-
|
|
995
|
+
|
|
996
|
+
<TouchableOpacity onPress={minimizeInspector || closeModal} hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }} activeOpacity={0.6} accessibilityRole="button" accessibilityLabel={t('common.minimize', 'Minimize')} style={[
|
|
997
|
+
styles.closeButtonSquare,
|
|
998
|
+
{
|
|
999
|
+
width: buttonSize,
|
|
1000
|
+
height: buttonSize,
|
|
1001
|
+
borderRadius: isNarrow ? 6 : 7,
|
|
1002
|
+
},
|
|
1003
|
+
]}>
|
|
1004
|
+
<ChevronDownIcon size={isNarrow ? 14 : 16} color={AppColors.white}/>
|
|
1005
|
+
</TouchableOpacity>
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
<TouchableOpacity onPress={closeModal} hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }} activeOpacity={0.6} accessibilityRole="button" accessibilityLabel={t('common.close', 'Close')} style={[
|
|
992
1009
|
styles.closeButtonSquare,
|
|
993
1010
|
{
|
|
994
1011
|
width: buttonSize,
|
|
@@ -1070,7 +1087,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
1070
1087
|
|
|
1071
1088
|
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
1072
1089
|
|
|
1073
|
-
<TouchableScale onPress={() => {
|
|
1090
|
+
<TouchableScale accessible={true} accessibilityRole="button" accessibilityLabel={t('common.clearAll')} onPress={() => {
|
|
1074
1091
|
Alert.alert(t('header.clearEverythingTitle'), t('header.clearEverythingMessage'), [
|
|
1075
1092
|
{ text: t('common.cancel'), style: 'cancel' },
|
|
1076
1093
|
{
|
|
@@ -1079,16 +1096,16 @@ const InspectorHeader = React.memo(() => {
|
|
|
1079
1096
|
style: 'destructive',
|
|
1080
1097
|
},
|
|
1081
1098
|
]);
|
|
1082
|
-
}} style={{
|
|
1099
|
+
}} hitSlop={10} style={{
|
|
1083
1100
|
flexDirection: 'row',
|
|
1084
1101
|
alignItems: 'center',
|
|
1085
|
-
gap: 4,
|
|
1086
|
-
backgroundColor: `${AppColors.white}
|
|
1087
|
-
paddingHorizontal: isNarrow ?
|
|
1102
|
+
gap: 4.5,
|
|
1103
|
+
backgroundColor: `${AppColors.white}24`,
|
|
1104
|
+
paddingHorizontal: isNarrow ? 8 : 10,
|
|
1088
1105
|
paddingVertical: isNarrow ? 4 : 5,
|
|
1089
1106
|
borderRadius: 6,
|
|
1090
1107
|
borderWidth: 1,
|
|
1091
|
-
borderColor: `${AppColors.white}
|
|
1108
|
+
borderColor: `${AppColors.white}33`,
|
|
1092
1109
|
}}>
|
|
1093
1110
|
<Animated.View style={{
|
|
1094
1111
|
transform: [
|
|
@@ -1106,37 +1123,37 @@ const InspectorHeader = React.memo(() => {
|
|
|
1106
1123
|
},
|
|
1107
1124
|
],
|
|
1108
1125
|
}}>
|
|
1109
|
-
<TrashIcon color={AppColors.white} size={isNarrow ?
|
|
1126
|
+
<TrashIcon color={AppColors.white} size={isNarrow ? 12 : 13}/>
|
|
1110
1127
|
</Animated.View>
|
|
1111
1128
|
<Text style={{
|
|
1112
|
-
fontFamily: AppFonts.
|
|
1129
|
+
fontFamily: AppFonts.interSemiBold,
|
|
1113
1130
|
fontSize: isNarrow ? 10 : 11,
|
|
1114
|
-
color:
|
|
1131
|
+
color: AppColors.white,
|
|
1115
1132
|
}}>
|
|
1116
|
-
{t('
|
|
1133
|
+
{t('common.clearAll')}
|
|
1117
1134
|
</Text>
|
|
1118
1135
|
</TouchableScale>
|
|
1119
1136
|
|
|
1120
1137
|
|
|
1121
|
-
<TouchableScale onPress={() => {
|
|
1138
|
+
<TouchableScale accessible={true} accessibilityRole="button" accessibilityLabel={t('header.about')} onPress={() => {
|
|
1122
1139
|
setSettingsActiveSubTab('about');
|
|
1123
1140
|
setSettingsPage('main');
|
|
1124
|
-
}} style={{
|
|
1141
|
+
}} hitSlop={10} style={{
|
|
1125
1142
|
flexDirection: 'row',
|
|
1126
1143
|
alignItems: 'center',
|
|
1127
|
-
gap: 4,
|
|
1128
|
-
backgroundColor: `${AppColors.white}
|
|
1129
|
-
paddingHorizontal: isNarrow ?
|
|
1144
|
+
gap: 4.5,
|
|
1145
|
+
backgroundColor: `${AppColors.white}24`,
|
|
1146
|
+
paddingHorizontal: isNarrow ? 8 : 10,
|
|
1130
1147
|
paddingVertical: isNarrow ? 4 : 5,
|
|
1131
1148
|
borderRadius: 6,
|
|
1132
1149
|
borderWidth: 1,
|
|
1133
|
-
borderColor: `${AppColors.white}
|
|
1150
|
+
borderColor: `${AppColors.white}33`,
|
|
1134
1151
|
}}>
|
|
1135
|
-
<InfoCircleIcon color={AppColors.white} size={isNarrow ?
|
|
1152
|
+
<InfoCircleIcon color={AppColors.white} size={isNarrow ? 12 : 13}/>
|
|
1136
1153
|
<Text style={{
|
|
1137
|
-
fontFamily: AppFonts.
|
|
1154
|
+
fontFamily: AppFonts.interSemiBold,
|
|
1138
1155
|
fontSize: isNarrow ? 10 : 11,
|
|
1139
|
-
color:
|
|
1156
|
+
color: AppColors.white,
|
|
1140
1157
|
}}>
|
|
1141
1158
|
{t('header.about')}
|
|
1142
1159
|
</Text>
|
|
@@ -1152,6 +1169,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
1152
1169
|
|
|
1153
1170
|
<MediaPreviewModal item={previewMediaItem} visible={!!previewMediaItem} onClose={() => setPreviewMediaItem(null)} onDelete={async (item) => {
|
|
1154
1171
|
await ScreenCapture.deleteMedia(item.uri);
|
|
1172
|
+
refreshMediaCount?.().catch(() => { });
|
|
1155
1173
|
setPreviewMediaItem(null);
|
|
1156
1174
|
}} onConvertToGif={async (item) => {
|
|
1157
1175
|
const gif = await ScreenCapture.convertToGif(item.uri, {
|
|
@@ -1159,6 +1177,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
1159
1177
|
width: 480,
|
|
1160
1178
|
});
|
|
1161
1179
|
if (gif) {
|
|
1180
|
+
refreshMediaCount?.().catch(() => { });
|
|
1162
1181
|
setPreviewMediaItem({
|
|
1163
1182
|
id: `anim_${gif.timestamp}.gif`,
|
|
1164
1183
|
type: 'gif',
|
|
@@ -20,6 +20,7 @@ import CrashDetail from './CrashDetail';
|
|
|
20
20
|
import DeviceInfoTab from './DeviceInfoTab';
|
|
21
21
|
import StorageTab from './StorageTab';
|
|
22
22
|
import DebuggingTab from './DebuggingTab';
|
|
23
|
+
import { MediaGalleryTab } from './MediaGalleryTab';
|
|
23
24
|
import SettingsPanel from './SettingsPanel';
|
|
24
25
|
import NpmUpdateToast from './NpmUpdateToast';
|
|
25
26
|
import NpmStarPrompt from './NpmStarPrompt';
|
|
@@ -31,7 +32,7 @@ import { AppColors } from '../../styles/AppColors';
|
|
|
31
32
|
import NavigationTracker from './NavigationTracker';
|
|
32
33
|
import { isLocalDebugEnvironment } from '../../helpers';
|
|
33
34
|
const MainScreen = () => {
|
|
34
|
-
const { visible, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, isFeedbackOpen, setIsFeedbackOpen, activeTab, isReady, enabled, useNativeFab, hasNavigationContext, setNavState, } = useInspector();
|
|
35
|
+
const { visible, isMinimized, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, isFeedbackOpen, setIsFeedbackOpen, activeTab, isReady, enabled, useNativeFab, hasNavigationContext, setNavState, } = useInspector();
|
|
35
36
|
const isDetailActive = (activeTab === 'apis' && selected != null) ||
|
|
36
37
|
(activeTab === 'analytics' && selectedEvent != null) ||
|
|
37
38
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
@@ -64,8 +65,7 @@ const MainScreen = () => {
|
|
|
64
65
|
return (<>
|
|
65
66
|
{(Platform.OS === 'ios' || Platform.OS === 'android') &&
|
|
66
67
|
enabled &&
|
|
67
|
-
!visible &&
|
|
68
|
-
!useNativeFab && <FabLauncher />}
|
|
68
|
+
!visible && <FabLauncher />}
|
|
69
69
|
<Modal visible={visible} animationType={modalAnimationType} transparent statusBarTranslucent={true} onRequestClose={closeModal}>
|
|
70
70
|
<ErrorBoundary onClose={closeModal}>
|
|
71
71
|
<View style={styles.modalBackdrop}>
|
|
@@ -98,6 +98,7 @@ const MainScreen = () => {
|
|
|
98
98
|
{activeTab === 'crash' && <CrashTab />}
|
|
99
99
|
{activeTab === 'device' && <DeviceInfoTab />}
|
|
100
100
|
{activeTab === 'storage' && <StorageTab />}
|
|
101
|
+
{activeTab === 'media' && <MediaGalleryTab />}
|
|
101
102
|
{Platform.OS === 'android' &&
|
|
102
103
|
isLocalDebugEnvironment() &&
|
|
103
104
|
activeTab === 'debugging' && <DebuggingTab />}
|