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
|
@@ -57,7 +57,7 @@ const NetworkIcons_1 = require("../NetworkIcons");
|
|
|
57
57
|
const i18n_1 = require("../../i18n");
|
|
58
58
|
const InspectorHeader = react_1.default.memo(() => {
|
|
59
59
|
const { t } = (0, i18n_1.useTranslation)();
|
|
60
|
-
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, } = (0, InspectorContext_1.useInspector)();
|
|
60
|
+
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, } = (0, InspectorContext_1.useInspector)();
|
|
61
61
|
const { width: windowWidth } = (0, react_native_1.useWindowDimensions)();
|
|
62
62
|
const isNarrow = windowWidth < 360;
|
|
63
63
|
const isCompact = windowWidth < 400;
|
|
@@ -119,6 +119,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
119
119
|
height: result.height,
|
|
120
120
|
};
|
|
121
121
|
setPreviewMediaItem(newItem);
|
|
122
|
+
refreshMediaCount?.().catch(() => { });
|
|
122
123
|
(0, toast_1.showToast)(t('header.screenshotCaptured'));
|
|
123
124
|
}
|
|
124
125
|
else {
|
|
@@ -128,7 +129,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
128
129
|
catch {
|
|
129
130
|
(0, toast_1.showToast)(t('header.screenshotError'));
|
|
130
131
|
}
|
|
131
|
-
}, [t]);
|
|
132
|
+
}, [refreshMediaCount, t]);
|
|
132
133
|
const handleToggleVideoRecording = react_1.default.useCallback(async () => {
|
|
133
134
|
try {
|
|
134
135
|
if (isRecording) {
|
|
@@ -152,6 +153,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
152
153
|
hasAudio: result.hasAudio,
|
|
153
154
|
};
|
|
154
155
|
setPreviewMediaItem(newItem);
|
|
156
|
+
refreshMediaCount?.().catch(() => { });
|
|
155
157
|
(0, toast_1.showToast)(t('header.recordingSaved', {
|
|
156
158
|
duration: (result.durationMs / 1000).toFixed(1),
|
|
157
159
|
}));
|
|
@@ -270,7 +272,9 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
270
272
|
<react_native_1.View style={[
|
|
271
273
|
styles_1.default.header,
|
|
272
274
|
{
|
|
273
|
-
|
|
275
|
+
width: '100%',
|
|
276
|
+
justifyContent: 'space-between',
|
|
277
|
+
paddingHorizontal: isNarrow ? 10 : 14,
|
|
274
278
|
paddingVertical: isNarrow ? 6 : 8,
|
|
275
279
|
minHeight: isNarrow ? 48 : 52,
|
|
276
280
|
},
|
|
@@ -279,9 +283,9 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
279
283
|
flexDirection: 'row',
|
|
280
284
|
alignItems: 'center',
|
|
281
285
|
gap: isNarrow ? 6 : 8,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
minWidth:
|
|
286
|
+
flex: isDetailView ? undefined : 1,
|
|
287
|
+
flexShrink: isDetailView ? 0 : 1,
|
|
288
|
+
minWidth: 0,
|
|
285
289
|
}}>
|
|
286
290
|
{isAnySelected && (<TouchableScale_1.default onPress={() => {
|
|
287
291
|
if (isFeedbackOpen) {
|
|
@@ -1026,7 +1030,20 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
1026
1030
|
<NetworkIcons_1.SettingsIcon color={AppColors_1.AppColors.white} size={isNarrow ? 12 : 14}/>
|
|
1027
1031
|
</TouchableScale_1.default>)}
|
|
1028
1032
|
|
|
1029
|
-
|
|
1033
|
+
|
|
1034
|
+
<react_native_1.TouchableOpacity onPress={minimizeInspector || closeModal} hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }} activeOpacity={0.6} accessibilityRole="button" accessibilityLabel={t('common.minimize', 'Minimize')} style={[
|
|
1035
|
+
styles_1.default.closeButtonSquare,
|
|
1036
|
+
{
|
|
1037
|
+
width: buttonSize,
|
|
1038
|
+
height: buttonSize,
|
|
1039
|
+
borderRadius: isNarrow ? 6 : 7,
|
|
1040
|
+
},
|
|
1041
|
+
]}>
|
|
1042
|
+
<NetworkIcons_1.ChevronDownIcon size={isNarrow ? 14 : 16} color={AppColors_1.AppColors.white}/>
|
|
1043
|
+
</react_native_1.TouchableOpacity>
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
<react_native_1.TouchableOpacity onPress={closeModal} hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }} activeOpacity={0.6} accessibilityRole="button" accessibilityLabel={t('common.close', 'Close')} style={[
|
|
1030
1047
|
styles_1.default.closeButtonSquare,
|
|
1031
1048
|
{
|
|
1032
1049
|
width: buttonSize,
|
|
@@ -1108,7 +1125,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
1108
1125
|
|
|
1109
1126
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
1110
1127
|
|
|
1111
|
-
<TouchableScale_1.default onPress={() => {
|
|
1128
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel={t('common.clearAll')} onPress={() => {
|
|
1112
1129
|
react_native_1.Alert.alert(t('header.clearEverythingTitle'), t('header.clearEverythingMessage'), [
|
|
1113
1130
|
{ text: t('common.cancel'), style: 'cancel' },
|
|
1114
1131
|
{
|
|
@@ -1117,16 +1134,16 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
1117
1134
|
style: 'destructive',
|
|
1118
1135
|
},
|
|
1119
1136
|
]);
|
|
1120
|
-
}} style={{
|
|
1137
|
+
}} hitSlop={10} style={{
|
|
1121
1138
|
flexDirection: 'row',
|
|
1122
1139
|
alignItems: 'center',
|
|
1123
|
-
gap: 4,
|
|
1124
|
-
backgroundColor: `${AppColors_1.AppColors.white}
|
|
1125
|
-
paddingHorizontal: isNarrow ?
|
|
1140
|
+
gap: 4.5,
|
|
1141
|
+
backgroundColor: `${AppColors_1.AppColors.white}24`,
|
|
1142
|
+
paddingHorizontal: isNarrow ? 8 : 10,
|
|
1126
1143
|
paddingVertical: isNarrow ? 4 : 5,
|
|
1127
1144
|
borderRadius: 6,
|
|
1128
1145
|
borderWidth: 1,
|
|
1129
|
-
borderColor: `${AppColors_1.AppColors.white}
|
|
1146
|
+
borderColor: `${AppColors_1.AppColors.white}33`,
|
|
1130
1147
|
}}>
|
|
1131
1148
|
<react_native_1.Animated.View style={{
|
|
1132
1149
|
transform: [
|
|
@@ -1144,37 +1161,37 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
1144
1161
|
},
|
|
1145
1162
|
],
|
|
1146
1163
|
}}>
|
|
1147
|
-
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.white} size={isNarrow ?
|
|
1164
|
+
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.white} size={isNarrow ? 12 : 13}/>
|
|
1148
1165
|
</react_native_1.Animated.View>
|
|
1149
1166
|
<react_native_1.Text style={{
|
|
1150
|
-
fontFamily: AppFonts_1.AppFonts.
|
|
1167
|
+
fontFamily: AppFonts_1.AppFonts.interSemiBold,
|
|
1151
1168
|
fontSize: isNarrow ? 10 : 11,
|
|
1152
|
-
color:
|
|
1169
|
+
color: AppColors_1.AppColors.white,
|
|
1153
1170
|
}}>
|
|
1154
|
-
{t('
|
|
1171
|
+
{t('common.clearAll')}
|
|
1155
1172
|
</react_native_1.Text>
|
|
1156
1173
|
</TouchableScale_1.default>
|
|
1157
1174
|
|
|
1158
1175
|
|
|
1159
|
-
<TouchableScale_1.default onPress={() => {
|
|
1176
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel={t('header.about')} onPress={() => {
|
|
1160
1177
|
setSettingsActiveSubTab('about');
|
|
1161
1178
|
setSettingsPage('main');
|
|
1162
|
-
}} style={{
|
|
1179
|
+
}} hitSlop={10} style={{
|
|
1163
1180
|
flexDirection: 'row',
|
|
1164
1181
|
alignItems: 'center',
|
|
1165
|
-
gap: 4,
|
|
1166
|
-
backgroundColor: `${AppColors_1.AppColors.white}
|
|
1167
|
-
paddingHorizontal: isNarrow ?
|
|
1182
|
+
gap: 4.5,
|
|
1183
|
+
backgroundColor: `${AppColors_1.AppColors.white}24`,
|
|
1184
|
+
paddingHorizontal: isNarrow ? 8 : 10,
|
|
1168
1185
|
paddingVertical: isNarrow ? 4 : 5,
|
|
1169
1186
|
borderRadius: 6,
|
|
1170
1187
|
borderWidth: 1,
|
|
1171
|
-
borderColor: `${AppColors_1.AppColors.white}
|
|
1188
|
+
borderColor: `${AppColors_1.AppColors.white}33`,
|
|
1172
1189
|
}}>
|
|
1173
|
-
<NetworkIcons_1.InfoCircleIcon color={AppColors_1.AppColors.white} size={isNarrow ?
|
|
1190
|
+
<NetworkIcons_1.InfoCircleIcon color={AppColors_1.AppColors.white} size={isNarrow ? 12 : 13}/>
|
|
1174
1191
|
<react_native_1.Text style={{
|
|
1175
|
-
fontFamily: AppFonts_1.AppFonts.
|
|
1192
|
+
fontFamily: AppFonts_1.AppFonts.interSemiBold,
|
|
1176
1193
|
fontSize: isNarrow ? 10 : 11,
|
|
1177
|
-
color:
|
|
1194
|
+
color: AppColors_1.AppColors.white,
|
|
1178
1195
|
}}>
|
|
1179
1196
|
{t('header.about')}
|
|
1180
1197
|
</react_native_1.Text>
|
|
@@ -1190,6 +1207,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
1190
1207
|
|
|
1191
1208
|
<MediaPreviewModal_1.MediaPreviewModal item={previewMediaItem} visible={!!previewMediaItem} onClose={() => setPreviewMediaItem(null)} onDelete={async (item) => {
|
|
1192
1209
|
await capture_1.ScreenCapture.deleteMedia(item.uri);
|
|
1210
|
+
refreshMediaCount?.().catch(() => { });
|
|
1193
1211
|
setPreviewMediaItem(null);
|
|
1194
1212
|
}} onConvertToGif={async (item) => {
|
|
1195
1213
|
const gif = await capture_1.ScreenCapture.convertToGif(item.uri, {
|
|
@@ -1197,6 +1215,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
1197
1215
|
width: 480,
|
|
1198
1216
|
});
|
|
1199
1217
|
if (gif) {
|
|
1218
|
+
refreshMediaCount?.().catch(() => { });
|
|
1200
1219
|
setPreviewMediaItem({
|
|
1201
1220
|
id: `anim_${gif.timestamp}.gif`,
|
|
1202
1221
|
type: 'gif',
|
|
@@ -58,6 +58,7 @@ const CrashDetail_1 = __importDefault(require("./CrashDetail"));
|
|
|
58
58
|
const DeviceInfoTab_1 = __importDefault(require("./DeviceInfoTab"));
|
|
59
59
|
const StorageTab_1 = __importDefault(require("./StorageTab"));
|
|
60
60
|
const DebuggingTab_1 = __importDefault(require("./DebuggingTab"));
|
|
61
|
+
const MediaGalleryTab_1 = require("./MediaGalleryTab");
|
|
61
62
|
const SettingsPanel_1 = __importDefault(require("./SettingsPanel"));
|
|
62
63
|
const NpmUpdateToast_1 = __importDefault(require("./NpmUpdateToast"));
|
|
63
64
|
const NpmStarPrompt_1 = __importDefault(require("./NpmStarPrompt"));
|
|
@@ -69,7 +70,7 @@ const AppColors_1 = require("../../styles/AppColors");
|
|
|
69
70
|
const NavigationTracker_1 = __importDefault(require("./NavigationTracker"));
|
|
70
71
|
const helpers_1 = require("../../helpers");
|
|
71
72
|
const MainScreen = () => {
|
|
72
|
-
const { visible, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, isFeedbackOpen, setIsFeedbackOpen, activeTab, isReady, enabled, useNativeFab, hasNavigationContext, setNavState, } = (0, InspectorContext_1.useInspector)();
|
|
73
|
+
const { visible, isMinimized, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, isFeedbackOpen, setIsFeedbackOpen, activeTab, isReady, enabled, useNativeFab, hasNavigationContext, setNavState, } = (0, InspectorContext_1.useInspector)();
|
|
73
74
|
const isDetailActive = (activeTab === 'apis' && selected != null) ||
|
|
74
75
|
(activeTab === 'analytics' && selectedEvent != null) ||
|
|
75
76
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
@@ -102,8 +103,7 @@ const MainScreen = () => {
|
|
|
102
103
|
return (<>
|
|
103
104
|
{(react_native_1.Platform.OS === 'ios' || react_native_1.Platform.OS === 'android') &&
|
|
104
105
|
enabled &&
|
|
105
|
-
!visible &&
|
|
106
|
-
!useNativeFab && <FabLauncher_1.default />}
|
|
106
|
+
!visible && <FabLauncher_1.default />}
|
|
107
107
|
<react_native_1.Modal visible={visible} animationType={modalAnimationType} transparent statusBarTranslucent={true} onRequestClose={closeModal}>
|
|
108
108
|
<ErrorBoundary_1.default onClose={closeModal}>
|
|
109
109
|
<react_native_1.View style={styles_1.default.modalBackdrop}>
|
|
@@ -136,6 +136,7 @@ const MainScreen = () => {
|
|
|
136
136
|
{activeTab === 'crash' && <CrashTab_1.default />}
|
|
137
137
|
{activeTab === 'device' && <DeviceInfoTab_1.default />}
|
|
138
138
|
{activeTab === 'storage' && <StorageTab_1.default />}
|
|
139
|
+
{activeTab === 'media' && <MediaGalleryTab_1.MediaGalleryTab />}
|
|
139
140
|
{react_native_1.Platform.OS === 'android' &&
|
|
140
141
|
(0, helpers_1.isLocalDebugEnvironment)() &&
|
|
141
142
|
activeTab === 'debugging' && <DebuggingTab_1.default />}
|