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
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
TrashIcon,
|
|
42
42
|
SettingsIcon,
|
|
43
43
|
CloseWhite,
|
|
44
|
+
ChevronDownIcon,
|
|
44
45
|
ClockIcon,
|
|
45
46
|
SizeIcon,
|
|
46
47
|
AppleIcon,
|
|
@@ -86,12 +87,14 @@ const InspectorHeader = React.memo(() => {
|
|
|
86
87
|
setIsFeedbackOpen,
|
|
87
88
|
resetToDefaults,
|
|
88
89
|
closeModal,
|
|
90
|
+
minimizeInspector,
|
|
89
91
|
detailTitle,
|
|
90
92
|
activeTab,
|
|
91
93
|
environment,
|
|
92
94
|
visible,
|
|
93
95
|
selectedCrash,
|
|
94
96
|
setSelectedCrash,
|
|
97
|
+
refreshMediaCount,
|
|
95
98
|
} = useInspector();
|
|
96
99
|
|
|
97
100
|
const {width: windowWidth} = useWindowDimensions();
|
|
@@ -162,6 +165,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
162
165
|
height: result.height,
|
|
163
166
|
};
|
|
164
167
|
setPreviewMediaItem(newItem);
|
|
168
|
+
refreshMediaCount?.().catch(() => {});
|
|
165
169
|
showToast(t('header.screenshotCaptured'));
|
|
166
170
|
} else {
|
|
167
171
|
showToast(t('header.screenshotFailed'));
|
|
@@ -169,7 +173,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
169
173
|
} catch {
|
|
170
174
|
showToast(t('header.screenshotError'));
|
|
171
175
|
}
|
|
172
|
-
}, [t]);
|
|
176
|
+
}, [refreshMediaCount, t]);
|
|
173
177
|
|
|
174
178
|
const handleToggleVideoRecording = React.useCallback(async () => {
|
|
175
179
|
try {
|
|
@@ -195,6 +199,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
195
199
|
hasAudio: result.hasAudio,
|
|
196
200
|
};
|
|
197
201
|
setPreviewMediaItem(newItem);
|
|
202
|
+
refreshMediaCount?.().catch(() => {});
|
|
198
203
|
showToast(
|
|
199
204
|
t('header.recordingSaved', {
|
|
200
205
|
duration: (result.durationMs / 1000).toFixed(1),
|
|
@@ -334,7 +339,9 @@ const InspectorHeader = React.memo(() => {
|
|
|
334
339
|
style={[
|
|
335
340
|
styles.header,
|
|
336
341
|
{
|
|
337
|
-
|
|
342
|
+
width: '100%',
|
|
343
|
+
justifyContent: 'space-between',
|
|
344
|
+
paddingHorizontal: isNarrow ? 10 : 14,
|
|
338
345
|
paddingVertical: isNarrow ? 6 : 8,
|
|
339
346
|
minHeight: isNarrow ? 48 : 52,
|
|
340
347
|
},
|
|
@@ -344,9 +351,9 @@ const InspectorHeader = React.memo(() => {
|
|
|
344
351
|
flexDirection: 'row',
|
|
345
352
|
alignItems: 'center',
|
|
346
353
|
gap: isNarrow ? 6 : 8,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
minWidth:
|
|
354
|
+
flex: isDetailView ? undefined : 1,
|
|
355
|
+
flexShrink: isDetailView ? 0 : 1,
|
|
356
|
+
minWidth: 0,
|
|
350
357
|
}}>
|
|
351
358
|
{isAnySelected && (
|
|
352
359
|
<TouchableScale
|
|
@@ -1301,10 +1308,31 @@ const InspectorHeader = React.memo(() => {
|
|
|
1301
1308
|
</TouchableScale>
|
|
1302
1309
|
)}
|
|
1303
1310
|
|
|
1311
|
+
{/* Minimize button */}
|
|
1312
|
+
<TouchableOpacity
|
|
1313
|
+
onPress={minimizeInspector || closeModal}
|
|
1314
|
+
hitSlop={{top: 12, bottom: 12, left: 12, right: 12}}
|
|
1315
|
+
activeOpacity={0.6}
|
|
1316
|
+
accessibilityRole="button"
|
|
1317
|
+
accessibilityLabel={t('common.minimize', 'Minimize')}
|
|
1318
|
+
style={[
|
|
1319
|
+
styles.closeButtonSquare,
|
|
1320
|
+
{
|
|
1321
|
+
width: buttonSize,
|
|
1322
|
+
height: buttonSize,
|
|
1323
|
+
borderRadius: isNarrow ? 6 : 7,
|
|
1324
|
+
},
|
|
1325
|
+
]}>
|
|
1326
|
+
<ChevronDownIcon size={isNarrow ? 14 : 16} color={AppColors.white} />
|
|
1327
|
+
</TouchableOpacity>
|
|
1328
|
+
|
|
1329
|
+
{/* Close button */}
|
|
1304
1330
|
<TouchableOpacity
|
|
1305
1331
|
onPress={closeModal}
|
|
1306
1332
|
hitSlop={{top: 12, bottom: 12, left: 12, right: 12}}
|
|
1307
1333
|
activeOpacity={0.6}
|
|
1334
|
+
accessibilityRole="button"
|
|
1335
|
+
accessibilityLabel={t('common.close', 'Close')}
|
|
1308
1336
|
style={[
|
|
1309
1337
|
styles.closeButtonSquare,
|
|
1310
1338
|
{
|
|
@@ -1408,8 +1436,11 @@ const InspectorHeader = React.memo(() => {
|
|
|
1408
1436
|
|
|
1409
1437
|
<View
|
|
1410
1438
|
style={{flexDirection: 'row', alignItems: 'center', gap: 6}}>
|
|
1411
|
-
{/* Clear
|
|
1439
|
+
{/* Clear / Trash Button with label */}
|
|
1412
1440
|
<TouchableScale
|
|
1441
|
+
accessible={true}
|
|
1442
|
+
accessibilityRole="button"
|
|
1443
|
+
accessibilityLabel={t('common.clearAll')}
|
|
1413
1444
|
onPress={() => {
|
|
1414
1445
|
Alert.alert(
|
|
1415
1446
|
t('header.clearEverythingTitle'),
|
|
@@ -1424,16 +1455,17 @@ const InspectorHeader = React.memo(() => {
|
|
|
1424
1455
|
],
|
|
1425
1456
|
);
|
|
1426
1457
|
}}
|
|
1458
|
+
hitSlop={10}
|
|
1427
1459
|
style={{
|
|
1428
1460
|
flexDirection: 'row',
|
|
1429
1461
|
alignItems: 'center',
|
|
1430
|
-
gap: 4,
|
|
1431
|
-
backgroundColor: `${AppColors.white}
|
|
1432
|
-
paddingHorizontal: isNarrow ?
|
|
1462
|
+
gap: 4.5,
|
|
1463
|
+
backgroundColor: `${AppColors.white}24`,
|
|
1464
|
+
paddingHorizontal: isNarrow ? 8 : 10,
|
|
1433
1465
|
paddingVertical: isNarrow ? 4 : 5,
|
|
1434
1466
|
borderRadius: 6,
|
|
1435
1467
|
borderWidth: 1,
|
|
1436
|
-
borderColor: `${AppColors.white}
|
|
1468
|
+
borderColor: `${AppColors.white}33`,
|
|
1437
1469
|
}}>
|
|
1438
1470
|
<Animated.View
|
|
1439
1471
|
style={{
|
|
@@ -1454,45 +1486,49 @@ const InspectorHeader = React.memo(() => {
|
|
|
1454
1486
|
}}>
|
|
1455
1487
|
<TrashIcon
|
|
1456
1488
|
color={AppColors.white}
|
|
1457
|
-
size={isNarrow ?
|
|
1489
|
+
size={isNarrow ? 12 : 13}
|
|
1458
1490
|
/>
|
|
1459
1491
|
</Animated.View>
|
|
1460
1492
|
<Text
|
|
1461
1493
|
style={{
|
|
1462
|
-
fontFamily: AppFonts.
|
|
1494
|
+
fontFamily: AppFonts.interSemiBold,
|
|
1463
1495
|
fontSize: isNarrow ? 10 : 11,
|
|
1464
|
-
color:
|
|
1496
|
+
color: AppColors.white,
|
|
1465
1497
|
}}>
|
|
1466
|
-
{t('
|
|
1498
|
+
{t('common.clearAll')}
|
|
1467
1499
|
</Text>
|
|
1468
1500
|
</TouchableScale>
|
|
1469
1501
|
|
|
1470
|
-
{/* About
|
|
1502
|
+
{/* About Button with label */}
|
|
1471
1503
|
<TouchableScale
|
|
1504
|
+
accessible={true}
|
|
1505
|
+
accessibilityRole="button"
|
|
1506
|
+
accessibilityLabel={t('header.about')}
|
|
1472
1507
|
onPress={() => {
|
|
1473
1508
|
setSettingsActiveSubTab('about');
|
|
1474
1509
|
setSettingsPage('main');
|
|
1475
1510
|
}}
|
|
1511
|
+
hitSlop={10}
|
|
1476
1512
|
style={{
|
|
1477
1513
|
flexDirection: 'row',
|
|
1478
1514
|
alignItems: 'center',
|
|
1479
|
-
gap: 4,
|
|
1480
|
-
backgroundColor: `${AppColors.white}
|
|
1481
|
-
paddingHorizontal: isNarrow ?
|
|
1515
|
+
gap: 4.5,
|
|
1516
|
+
backgroundColor: `${AppColors.white}24`,
|
|
1517
|
+
paddingHorizontal: isNarrow ? 8 : 10,
|
|
1482
1518
|
paddingVertical: isNarrow ? 4 : 5,
|
|
1483
1519
|
borderRadius: 6,
|
|
1484
1520
|
borderWidth: 1,
|
|
1485
|
-
borderColor: `${AppColors.white}
|
|
1521
|
+
borderColor: `${AppColors.white}33`,
|
|
1486
1522
|
}}>
|
|
1487
1523
|
<InfoCircleIcon
|
|
1488
1524
|
color={AppColors.white}
|
|
1489
|
-
size={isNarrow ?
|
|
1525
|
+
size={isNarrow ? 12 : 13}
|
|
1490
1526
|
/>
|
|
1491
1527
|
<Text
|
|
1492
1528
|
style={{
|
|
1493
|
-
fontFamily: AppFonts.
|
|
1529
|
+
fontFamily: AppFonts.interSemiBold,
|
|
1494
1530
|
fontSize: isNarrow ? 10 : 11,
|
|
1495
|
-
color:
|
|
1531
|
+
color: AppColors.white,
|
|
1496
1532
|
}}>
|
|
1497
1533
|
{t('header.about')}
|
|
1498
1534
|
</Text>
|
|
@@ -1517,6 +1553,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
1517
1553
|
onClose={() => setPreviewMediaItem(null)}
|
|
1518
1554
|
onDelete={async item => {
|
|
1519
1555
|
await ScreenCapture.deleteMedia(item.uri);
|
|
1556
|
+
refreshMediaCount?.().catch(() => {});
|
|
1520
1557
|
setPreviewMediaItem(null);
|
|
1521
1558
|
}}
|
|
1522
1559
|
onConvertToGif={async item => {
|
|
@@ -1525,6 +1562,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
1525
1562
|
width: 480,
|
|
1526
1563
|
});
|
|
1527
1564
|
if (gif) {
|
|
1565
|
+
refreshMediaCount?.().catch(() => {});
|
|
1528
1566
|
setPreviewMediaItem({
|
|
1529
1567
|
id: `anim_${gif.timestamp}.gif`,
|
|
1530
1568
|
type: 'gif',
|
|
@@ -48,6 +48,7 @@ import {isLocalDebugEnvironment} from '../../helpers';
|
|
|
48
48
|
const MainScreen = () => {
|
|
49
49
|
const {
|
|
50
50
|
visible,
|
|
51
|
+
isMinimized,
|
|
51
52
|
modalAnimationType,
|
|
52
53
|
closeModal,
|
|
53
54
|
modalHeightPercent,
|
|
@@ -107,8 +108,7 @@ const MainScreen = () => {
|
|
|
107
108
|
<>
|
|
108
109
|
{(Platform.OS === 'ios' || Platform.OS === 'android') &&
|
|
109
110
|
enabled &&
|
|
110
|
-
!visible &&
|
|
111
|
-
!useNativeFab && <FabLauncher />}
|
|
111
|
+
!visible && <FabLauncher />}
|
|
112
112
|
<Modal
|
|
113
113
|
visible={visible}
|
|
114
114
|
animationType={modalAnimationType}
|
|
@@ -159,6 +159,7 @@ const MainScreen = () => {
|
|
|
159
159
|
{activeTab === 'crash' && <CrashTab />}
|
|
160
160
|
{activeTab === 'device' && <DeviceInfoTab />}
|
|
161
161
|
{activeTab === 'storage' && <StorageTab />}
|
|
162
|
+
{activeTab === 'media' && <MediaGalleryTab />}
|
|
162
163
|
{Platform.OS === 'android' &&
|
|
163
164
|
isLocalDebugEnvironment() &&
|
|
164
165
|
activeTab === 'debugging' && <DebuggingTab />}
|