react-native-inapp-inspector 2.3.14 → 2.3.15
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/AnimatedEntrance.js +3 -3
- package/dist/commonjs/components/ConsoleLogCard.js +174 -100
- package/dist/commonjs/components/Inspector/ConsoleTab.js +25 -16
- package/dist/commonjs/components/Inspector/CrashTab.js +19 -5
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +198 -98
- package/dist/commonjs/components/Inspector/InspectorHeader.js +2 -2
- package/dist/commonjs/components/Inspector/MainScreen.js +56 -56
- package/dist/commonjs/components/Inspector/NetworkTab.js +1 -335
- package/dist/commonjs/components/Inspector/PerformanceTab.js +32 -6
- package/dist/commonjs/components/Inspector/ReduxTab.js +3 -1
- package/dist/commonjs/components/Inspector/StorageTab.js +23 -5
- package/dist/commonjs/components/JsonViewer.js +14 -2
- package/dist/commonjs/components/LogCard.js +428 -227
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.js +1 -1
- package/dist/commonjs/customHooks/consoleLogger.js +34 -2
- package/dist/commonjs/customHooks/crashHandler.js +1 -1
- package/dist/commonjs/customHooks/networkLogger.js +184 -26
- package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
- package/dist/commonjs/helpers/searchQueryParser.js +37 -291
- package/dist/commonjs/index.js +141 -27
- package/dist/esm/components/AnimatedEntrance.js +3 -3
- package/dist/esm/components/ConsoleLogCard.js +141 -100
- package/dist/esm/components/Inspector/ConsoleTab.js +25 -16
- package/dist/esm/components/Inspector/CrashTab.js +19 -5
- package/dist/esm/components/Inspector/DeviceInfoTab.js +198 -98
- package/dist/esm/components/Inspector/InspectorHeader.js +3 -3
- package/dist/esm/components/Inspector/MainScreen.js +56 -56
- package/dist/esm/components/Inspector/NetworkTab.js +2 -336
- package/dist/esm/components/Inspector/PerformanceTab.js +32 -6
- package/dist/esm/components/Inspector/ReduxTab.js +3 -1
- package/dist/esm/components/Inspector/StorageTab.js +23 -5
- package/dist/esm/components/JsonViewer.js +14 -2
- package/dist/esm/components/LogCard.js +422 -221
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.js +1 -1
- package/dist/esm/customHooks/consoleLogger.js +34 -2
- package/dist/esm/customHooks/crashHandler.js +1 -1
- package/dist/esm/customHooks/networkLogger.js +184 -26
- package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
- package/dist/esm/helpers/searchQueryParser.js +37 -291
- package/dist/esm/index.js +141 -27
- package/package.json +1 -1
- package/src/components/AnimatedEntrance.tsx +3 -3
- package/src/components/ConsoleLogCard.tsx +154 -103
- package/src/components/Inspector/ConsoleTab.tsx +27 -18
- package/src/components/Inspector/CrashTab.tsx +19 -5
- package/src/components/Inspector/DeviceInfoTab.tsx +224 -102
- package/src/components/Inspector/InspectorHeader.tsx +5 -3
- package/src/components/Inspector/MainScreen.tsx +2 -3
- package/src/components/Inspector/NetworkTab.tsx +1 -402
- package/src/components/Inspector/PerformanceTab.tsx +36 -7
- package/src/components/Inspector/ReduxTab.tsx +9 -1
- package/src/components/Inspector/StorageTab.tsx +27 -7
- package/src/components/JsonViewer.tsx +15 -2
- package/src/components/LogCard.tsx +528 -339
- package/src/constants/version.ts +1 -1
- package/src/customHooks/analyticsLogger.ts +1 -1
- package/src/customHooks/consoleLogger.ts +36 -3
- package/src/customHooks/crashHandler.ts +1 -1
- package/src/customHooks/networkLogger.ts +214 -26
- package/src/helpers/searchQueryParser.ts +40 -285
- package/src/index.tsx +332 -211
|
@@ -448,21 +448,141 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
448
448
|
showToast('Copied Markdown Report to Clipboard!');
|
|
449
449
|
};
|
|
450
450
|
|
|
451
|
-
// Filter items matching search
|
|
452
|
-
const isMatch = (
|
|
451
|
+
// Filter items matching search (checking label, value, and optional subtext)
|
|
452
|
+
const isMatch = useCallback(
|
|
453
|
+
(label: string, value?: any, subtext?: any) => {
|
|
454
|
+
if (!search.trim()) return true;
|
|
455
|
+
const query = search.toLowerCase().trim();
|
|
456
|
+
const strVal =
|
|
457
|
+
value != null
|
|
458
|
+
? typeof value === 'object'
|
|
459
|
+
? JSON.stringify(value)
|
|
460
|
+
: String(value)
|
|
461
|
+
: '';
|
|
462
|
+
const strSub = subtext != null ? String(subtext) : '';
|
|
463
|
+
return (
|
|
464
|
+
label.toLowerCase().includes(query) ||
|
|
465
|
+
strVal.toLowerCase().includes(query) ||
|
|
466
|
+
strSub.toLowerCase().includes(query)
|
|
467
|
+
);
|
|
468
|
+
},
|
|
469
|
+
[search],
|
|
470
|
+
);
|
|
471
|
+
|
|
472
|
+
const hasHeroMatch = useMemo(() => {
|
|
453
473
|
if (!search.trim()) return true;
|
|
454
|
-
return
|
|
455
|
-
|
|
474
|
+
return (
|
|
475
|
+
isMatch('Model', deviceMetrics?.deviceModel || (Platform.constants as any)?.Model) ||
|
|
476
|
+
isMatch('OS', Platform.OS) ||
|
|
477
|
+
isMatch('IP Address', ipAddress) ||
|
|
478
|
+
isMatch('RAM', `${usedRamMb}/${totalRamMb}`) ||
|
|
479
|
+
isMatch('Uptime', deviceUptime)
|
|
480
|
+
);
|
|
481
|
+
}, [search, isMatch, deviceMetrics, ipAddress, usedRamMb, totalRamMb, deviceUptime]);
|
|
482
|
+
|
|
483
|
+
const hasOverviewMatch = useMemo(() => {
|
|
484
|
+
if (!search.trim()) return true;
|
|
485
|
+
return (
|
|
486
|
+
isMatch('Device Model', fullDeviceData.hardware.model) ||
|
|
487
|
+
isMatch('Manufacturer', fullDeviceData.hardware.brand) ||
|
|
488
|
+
isMatch('Operating System', fullDeviceData.hardware.osVersion) ||
|
|
489
|
+
isMatch('IP Address', ipAddress) ||
|
|
490
|
+
isMatch('RAM Memory', `${usedRamMb} MB / ${totalRamMb} MB (${ramUsagePct}%)`, `Free Memory: ${freeRamMb} MB`) ||
|
|
491
|
+
isMatch('Storage Capacity', `${freeStorageGb} GB Free / ${totalStorageGb} GB Total`) ||
|
|
492
|
+
isMatch('App Version', `v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`) ||
|
|
493
|
+
isMatch('JavaScript Engine', isHermes ? 'Hermes Bytecode Engine' : 'JavaScriptCore (JSC)') ||
|
|
494
|
+
isMatch('UDID Identifier', pseudoUDID)
|
|
495
|
+
);
|
|
496
|
+
}, [search, isMatch, fullDeviceData, ipAddress, usedRamMb, totalRamMb, ramUsagePct, freeRamMb, freeStorageGb, totalStorageGb, isHermes, pseudoUDID]);
|
|
497
|
+
|
|
498
|
+
const hasHardwareMatch = useMemo(() => {
|
|
499
|
+
if (!search.trim()) return true;
|
|
500
|
+
return (
|
|
501
|
+
isMatch('CPU Architecture', fullDeviceData.hardware.cpuAbi) ||
|
|
502
|
+
isMatch('Total RAM', `${totalRamMb} MB`) ||
|
|
503
|
+
isMatch('Free RAM', `${freeRamMb} MB`) ||
|
|
504
|
+
isMatch('Storage Capacity', `${totalStorageGb} GB`) ||
|
|
505
|
+
isMatch('Available Storage', `${freeStorageGb} GB`) ||
|
|
506
|
+
isMatch('Battery', `${deviceMetrics?.batteryPercent ?? 100}%`) ||
|
|
507
|
+
isMatch('API Level', `API ${deviceMetrics?.apiLevel || Platform.Version}`) ||
|
|
508
|
+
isMatch('Thermal State', 'Nominal (Cool)')
|
|
509
|
+
);
|
|
510
|
+
}, [search, isMatch, fullDeviceData, totalRamMb, freeRamMb, totalStorageGb, freeStorageGb, deviceMetrics]);
|
|
511
|
+
|
|
512
|
+
const hasNetworkMatch = useMemo(() => {
|
|
513
|
+
if (!search.trim()) return true;
|
|
514
|
+
return (
|
|
515
|
+
isMatch('IP Address', ipAddress) ||
|
|
516
|
+
isMatch('Internet Reachability', 'Connected') ||
|
|
517
|
+
isMatch('Connection Type', 'Wi-Fi / Local Area Network') ||
|
|
518
|
+
isMatch('Metro Dev Server', NativeModules?.PlatformConstants?.serverHost || NativeModules?.AndroidConstants?.serverHost || 'localhost:8081') ||
|
|
519
|
+
isMatch('WebSocket Protocol', 'Active & Enabled') ||
|
|
520
|
+
isMatch('Network Inspector Interceptor', 'Intercepting XHR & Fetch')
|
|
521
|
+
);
|
|
522
|
+
}, [search, isMatch, ipAddress]);
|
|
523
|
+
|
|
524
|
+
const hasDisplayMatch = useMemo(() => {
|
|
525
|
+
if (!search.trim()) return true;
|
|
526
|
+
return (
|
|
527
|
+
isMatch('Window Resolution', `${windowDims.width.toFixed(0)} × ${windowDims.height.toFixed(0)} pt`) ||
|
|
528
|
+
isMatch('Screen Physical Size', `${(screenDims.width * pixelRatio).toFixed(0)} × ${(screenDims.height * pixelRatio).toFixed(0)} px`) ||
|
|
529
|
+
isMatch('Pixel Density', `@${pixelRatio}x (${Math.round(pixelRatio * 160)} dpi)`) ||
|
|
530
|
+
isMatch('Font Scale', `${fontScale}x`) ||
|
|
531
|
+
isMatch('Form Factor', isTablet ? 'Tablet' : 'Smartphone') ||
|
|
532
|
+
isMatch('Orientation', isLandscape ? 'Landscape' : 'Portrait') ||
|
|
533
|
+
isMatch('Status Bar Height', `${statusBarHeight} pt`)
|
|
534
|
+
);
|
|
535
|
+
}, [search, isMatch, windowDims, screenDims, pixelRatio, fontScale, isTablet, isLandscape, statusBarHeight]);
|
|
536
|
+
|
|
537
|
+
const hasRuntimeMatch = useMemo(() => {
|
|
538
|
+
if (!search.trim()) return true;
|
|
539
|
+
return (
|
|
540
|
+
isMatch('App Name', fullDeviceData.runtime.appName) ||
|
|
541
|
+
isMatch('Bundle ID', fullDeviceData.identifiers.bundleId) ||
|
|
542
|
+
isMatch('App Version', `v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`) ||
|
|
543
|
+
isMatch('React Native', `v${reactNativeVersion}`) ||
|
|
544
|
+
isMatch('In-App Inspector Version', `v${LIB_VERSION}`) ||
|
|
545
|
+
isMatch('Hermes Engine', isHermes ? 'Enabled (AOT Bytecode)' : 'Disabled (JSC)') ||
|
|
546
|
+
isMatch('New Architecture', isTurboModule ? 'Enabled' : 'Legacy Bridge') ||
|
|
547
|
+
isMatch('Build Type', __DEV__ ? 'Debug (__DEV__ = true)' : 'Release / Production') ||
|
|
548
|
+
isMatch('Timezone', fullDeviceData.runtime.timezone) ||
|
|
549
|
+
isMatch('Locale', fullDeviceData.runtime.locale) ||
|
|
550
|
+
isMatch('Session Uptime', deviceUptime)
|
|
551
|
+
);
|
|
552
|
+
}, [search, isMatch, fullDeviceData, reactNativeVersion, isHermes, isTurboModule, deviceUptime]);
|
|
553
|
+
|
|
554
|
+
const hasSecurityMatch = useMemo(() => {
|
|
555
|
+
if (!search.trim()) return true;
|
|
556
|
+
return (
|
|
557
|
+
isMatch('Pseudo-UDID', pseudoUDID) ||
|
|
558
|
+
isMatch('Bundle ID', fullDeviceData.identifiers.bundleId) ||
|
|
559
|
+
isMatch('Root / Jailbreak', 'Clean (Standard Sandbox)') ||
|
|
560
|
+
isMatch('Simulator / Emulator', (Platform.constants as any)?.Model?.includes?.('sdk') || (Platform.constants as any)?.Model?.includes?.('Emulator') || (Platform.constants as any)?.Model?.includes?.('Simulator') ? 'Virtual Simulator' : 'Physical Device') ||
|
|
561
|
+
isMatch('Sandbox Integrity', 'Enforced by OS Kernel')
|
|
562
|
+
);
|
|
563
|
+
}, [search, isMatch, pseudoUDID, fullDeviceData]);
|
|
456
564
|
|
|
457
565
|
const hasAnyMatch = useMemo(() => {
|
|
458
566
|
if (!search.trim()) return true;
|
|
459
|
-
const query = search.toLowerCase().trim();
|
|
460
567
|
return (
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
568
|
+
hasHeroMatch ||
|
|
569
|
+
hasOverviewMatch ||
|
|
570
|
+
hasHardwareMatch ||
|
|
571
|
+
hasNetworkMatch ||
|
|
572
|
+
hasDisplayMatch ||
|
|
573
|
+
hasRuntimeMatch ||
|
|
574
|
+
hasSecurityMatch
|
|
464
575
|
);
|
|
465
|
-
}, [
|
|
576
|
+
}, [
|
|
577
|
+
search,
|
|
578
|
+
hasHeroMatch,
|
|
579
|
+
hasOverviewMatch,
|
|
580
|
+
hasHardwareMatch,
|
|
581
|
+
hasNetworkMatch,
|
|
582
|
+
hasDisplayMatch,
|
|
583
|
+
hasRuntimeMatch,
|
|
584
|
+
hasSecurityMatch,
|
|
585
|
+
]);
|
|
466
586
|
|
|
467
587
|
return (
|
|
468
588
|
<View style={styles.container}>
|
|
@@ -536,102 +656,104 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
536
656
|
contentContainerStyle={styles.scrollContent}
|
|
537
657
|
showsVerticalScrollIndicator={false}>
|
|
538
658
|
{/* Hero Card */}
|
|
539
|
-
|
|
540
|
-
<View style={styles.
|
|
541
|
-
<View style={styles.
|
|
542
|
-
{
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
<
|
|
550
|
-
{
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
<View style={styles.
|
|
558
|
-
|
|
659
|
+
{(!search.trim() || hasHeroMatch) && (
|
|
660
|
+
<View style={styles.heroCard}>
|
|
661
|
+
<View style={styles.heroHeader}>
|
|
662
|
+
<View style={styles.heroIconWrap}>
|
|
663
|
+
{Platform.OS === 'ios' ? (
|
|
664
|
+
<AppleIcon size={20} color={AppColors.white} />
|
|
665
|
+
) : (
|
|
666
|
+
<AndroidIcon size={20} color={AppColors.white} />
|
|
667
|
+
)}
|
|
668
|
+
</View>
|
|
669
|
+
<View style={{flex: 1, minWidth: 0}}>
|
|
670
|
+
<Text style={styles.heroTitle} numberOfLines={1} ellipsizeMode="tail">
|
|
671
|
+
{deviceMetrics?.deviceModel || (Platform.constants as any)?.Model || (Platform.OS === 'ios' ? 'Apple iPhone' : 'Android Device')}
|
|
672
|
+
</Text>
|
|
673
|
+
<Text style={styles.heroSubtitle} numberOfLines={1} ellipsizeMode="tail">
|
|
674
|
+
{Platform.OS === 'ios' ? `iOS ${Platform.Version}` : `Android ${Platform.Version} (API ${deviceMetrics?.apiLevel || Platform.Version})`}
|
|
675
|
+
</Text>
|
|
676
|
+
</View>
|
|
677
|
+
<View style={styles.heroBadge}>
|
|
678
|
+
<View style={styles.pulseDot} />
|
|
679
|
+
<Text style={styles.heroBadgeText}>LIVE</Text>
|
|
680
|
+
</View>
|
|
559
681
|
</View>
|
|
560
|
-
</View>
|
|
561
682
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
683
|
+
{/* Quick Metrics Strip */}
|
|
684
|
+
<View style={styles.heroMetricsStrip}>
|
|
685
|
+
<View style={styles.heroMetricItem}>
|
|
686
|
+
<Text style={styles.heroMetricLabel} numberOfLines={1} ellipsizeMode="tail">IP ADDRESS</Text>
|
|
687
|
+
<Text style={styles.heroMetricValue} numberOfLines={1} ellipsizeMode="tail">
|
|
688
|
+
{ipAddress}
|
|
689
|
+
</Text>
|
|
690
|
+
</View>
|
|
691
|
+
<View style={styles.heroMetricDivider} />
|
|
692
|
+
<View style={styles.heroMetricItem}>
|
|
693
|
+
<Text style={styles.heroMetricLabel} numberOfLines={1} ellipsizeMode="tail">RAM (USED/TOTAL)</Text>
|
|
694
|
+
<Text style={styles.heroMetricValue} numberOfLines={1} ellipsizeMode="tail">
|
|
695
|
+
{usedRamMb}/{totalRamMb} MB
|
|
696
|
+
</Text>
|
|
697
|
+
</View>
|
|
698
|
+
<View style={styles.heroMetricDivider} />
|
|
699
|
+
<View style={styles.heroMetricItem}>
|
|
700
|
+
<Text style={styles.heroMetricLabel} numberOfLines={1} ellipsizeMode="tail">UPTIME</Text>
|
|
701
|
+
<Text style={styles.heroMetricValue} numberOfLines={1} ellipsizeMode="tail">{deviceUptime}</Text>
|
|
702
|
+
</View>
|
|
581
703
|
</View>
|
|
582
704
|
</View>
|
|
583
|
-
|
|
705
|
+
)}
|
|
584
706
|
|
|
585
707
|
{/* ── SUB-TAB 1: OVERVIEW ── */}
|
|
586
|
-
{(activeSubTab === 'overview' || search.length > 0) && (
|
|
708
|
+
{(activeSubTab === 'overview' || search.length > 0) && hasOverviewMatch && (
|
|
587
709
|
<View style={styles.sectionCard}>
|
|
588
710
|
<Text style={styles.sectionTitle}>DEVICE OVERVIEW</Text>
|
|
589
|
-
{isMatch('Device Model') && (
|
|
711
|
+
{isMatch('Device Model', fullDeviceData.hardware.model) && (
|
|
590
712
|
<InfoRow
|
|
591
713
|
label="Device Model"
|
|
592
714
|
value={fullDeviceData.hardware.model}
|
|
593
715
|
/>
|
|
594
716
|
)}
|
|
595
|
-
{isMatch('Manufacturer') && (
|
|
717
|
+
{isMatch('Manufacturer', fullDeviceData.hardware.brand) && (
|
|
596
718
|
<InfoRow
|
|
597
719
|
label="Manufacturer / Brand"
|
|
598
720
|
value={fullDeviceData.hardware.brand}
|
|
599
721
|
/>
|
|
600
722
|
)}
|
|
601
|
-
{isMatch('Operating System') && (
|
|
723
|
+
{isMatch('Operating System', fullDeviceData.hardware.osVersion) && (
|
|
602
724
|
<InfoRow
|
|
603
725
|
label="Operating System"
|
|
604
726
|
value={fullDeviceData.hardware.osVersion}
|
|
605
727
|
badge={{text: Platform.OS.toUpperCase(), color: AppColors.blue500, bg: `${AppColors.blue500}18`}}
|
|
606
728
|
/>
|
|
607
729
|
)}
|
|
608
|
-
{isMatch('IP Address') && (
|
|
730
|
+
{isMatch('IP Address', ipAddress) && (
|
|
609
731
|
<InfoRow
|
|
610
732
|
label="Local IP Address"
|
|
611
733
|
value={ipAddress}
|
|
612
734
|
badge={{text: 'ONLINE', color: AppColors.emerald500, bg: `${AppColors.emerald500}18`}}
|
|
613
735
|
/>
|
|
614
736
|
)}
|
|
615
|
-
{isMatch('RAM Memory') && (
|
|
737
|
+
{isMatch('RAM Memory', `${usedRamMb} MB / ${totalRamMb} MB (${ramUsagePct}%)`, `Free Memory: ${freeRamMb} MB`) && (
|
|
616
738
|
<InfoRow
|
|
617
739
|
label="RAM Memory"
|
|
618
740
|
value={`${usedRamMb} MB / ${totalRamMb} MB (${ramUsagePct}%)`}
|
|
619
741
|
subtext={`Free Memory: ${freeRamMb} MB`}
|
|
620
742
|
/>
|
|
621
743
|
)}
|
|
622
|
-
{isMatch('Storage Capacity') && (
|
|
744
|
+
{isMatch('Storage Capacity', `${freeStorageGb} GB Free / ${totalStorageGb} GB Total`) && (
|
|
623
745
|
<InfoRow
|
|
624
746
|
label="Internal Storage"
|
|
625
747
|
value={`${freeStorageGb} GB Free / ${totalStorageGb} GB Total`}
|
|
626
748
|
/>
|
|
627
749
|
)}
|
|
628
|
-
{isMatch('App Version') && (
|
|
750
|
+
{isMatch('App Version', `v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`) && (
|
|
629
751
|
<InfoRow
|
|
630
752
|
label="Host App Version"
|
|
631
753
|
value={`v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`}
|
|
632
754
|
/>
|
|
633
755
|
)}
|
|
634
|
-
{isMatch('JavaScript Engine') && (
|
|
756
|
+
{isMatch('JavaScript Engine', isHermes ? 'Hermes Bytecode Engine' : 'JavaScriptCore (JSC)') && (
|
|
635
757
|
<InfoRow
|
|
636
758
|
label="JS Runtime Engine"
|
|
637
759
|
value={isHermes ? 'Hermes Bytecode Engine' : 'JavaScriptCore (JSC)'}
|
|
@@ -642,7 +764,7 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
642
764
|
}
|
|
643
765
|
/>
|
|
644
766
|
)}
|
|
645
|
-
{isMatch('UDID Identifier') && (
|
|
767
|
+
{isMatch('UDID Identifier', pseudoUDID) && (
|
|
646
768
|
<InfoRow
|
|
647
769
|
label="Pseudo-UDID"
|
|
648
770
|
value={pseudoUDID}
|
|
@@ -653,23 +775,23 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
653
775
|
)}
|
|
654
776
|
|
|
655
777
|
{/* ── SUB-TAB 2: HARDWARE & SYSTEM ── */}
|
|
656
|
-
{(activeSubTab === 'hardware' || search.length > 0) && (
|
|
778
|
+
{(activeSubTab === 'hardware' || search.length > 0) && hasHardwareMatch && (
|
|
657
779
|
<View style={styles.sectionCard}>
|
|
658
780
|
<Text style={styles.sectionTitle}>HARDWARE & SYSTEM SPECIFICATIONS</Text>
|
|
659
|
-
{isMatch('CPU Architecture') && (
|
|
781
|
+
{isMatch('CPU Architecture', fullDeviceData.hardware.cpuAbi) && (
|
|
660
782
|
<InfoRow
|
|
661
783
|
label="CPU Architecture / ABI"
|
|
662
784
|
value={fullDeviceData.hardware.cpuAbi}
|
|
663
785
|
badge={{text: '64-BIT', color: AppColors.purple, bg: `${AppColors.purple}18`}}
|
|
664
786
|
/>
|
|
665
787
|
)}
|
|
666
|
-
{isMatch('Total RAM') && (
|
|
788
|
+
{isMatch('Total RAM', `${totalRamMb} MB`) && (
|
|
667
789
|
<InfoRow
|
|
668
790
|
label="Total Physical RAM"
|
|
669
791
|
value={`${totalRamMb} MB`}
|
|
670
792
|
/>
|
|
671
793
|
)}
|
|
672
|
-
{isMatch('Free RAM') && (
|
|
794
|
+
{isMatch('Free RAM', `${freeRamMb} MB`) && (
|
|
673
795
|
<InfoRow
|
|
674
796
|
label="Available Free RAM"
|
|
675
797
|
value={`${freeRamMb} MB`}
|
|
@@ -680,19 +802,19 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
680
802
|
}}
|
|
681
803
|
/>
|
|
682
804
|
)}
|
|
683
|
-
{isMatch('Storage Capacity') && (
|
|
805
|
+
{isMatch('Storage Capacity', `${totalStorageGb} GB`) && (
|
|
684
806
|
<InfoRow
|
|
685
807
|
label="Disk Storage Total"
|
|
686
808
|
value={`${totalStorageGb} GB`}
|
|
687
809
|
/>
|
|
688
810
|
)}
|
|
689
|
-
{isMatch('Available Storage') && (
|
|
811
|
+
{isMatch('Available Storage', `${freeStorageGb} GB`) && (
|
|
690
812
|
<InfoRow
|
|
691
813
|
label="Disk Storage Available"
|
|
692
814
|
value={`${freeStorageGb} GB`}
|
|
693
815
|
/>
|
|
694
816
|
)}
|
|
695
|
-
{isMatch('Battery') && (
|
|
817
|
+
{isMatch('Battery', `${deviceMetrics?.batteryPercent ?? 100}%`) && (
|
|
696
818
|
<InfoRow
|
|
697
819
|
label="Battery Level"
|
|
698
820
|
value={`${deviceMetrics?.batteryPercent ?? 100}%`}
|
|
@@ -703,13 +825,13 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
703
825
|
}}
|
|
704
826
|
/>
|
|
705
827
|
)}
|
|
706
|
-
{isMatch('API Level') && Platform.OS === 'android' && (
|
|
828
|
+
{isMatch('API Level', `API ${deviceMetrics?.apiLevel || Platform.Version}`) && Platform.OS === 'android' && (
|
|
707
829
|
<InfoRow
|
|
708
830
|
label="Android API SDK Level"
|
|
709
831
|
value={`API ${deviceMetrics?.apiLevel || Platform.Version}`}
|
|
710
832
|
/>
|
|
711
833
|
)}
|
|
712
|
-
{isMatch('Thermal State') && (
|
|
834
|
+
{isMatch('Thermal State', 'Nominal (Cool)') && (
|
|
713
835
|
<InfoRow
|
|
714
836
|
label="Thermal State"
|
|
715
837
|
value="Nominal (Cool)"
|
|
@@ -721,30 +843,30 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
721
843
|
)}
|
|
722
844
|
|
|
723
845
|
{/* ── SUB-TAB 3: NETWORK & CONNECTIVITY ── */}
|
|
724
|
-
{(activeSubTab === 'network' || search.length > 0) && (
|
|
846
|
+
{(activeSubTab === 'network' || search.length > 0) && hasNetworkMatch && (
|
|
725
847
|
<View style={styles.sectionCard}>
|
|
726
848
|
<Text style={styles.sectionTitle}>NETWORK & CONNECTIVITY</Text>
|
|
727
|
-
{isMatch('IP Address') && (
|
|
849
|
+
{isMatch('IP Address', ipAddress) && (
|
|
728
850
|
<InfoRow
|
|
729
851
|
label="Local Device IP"
|
|
730
852
|
value={ipAddress}
|
|
731
853
|
badge={{text: 'IPV4', color: AppColors.blue500, bg: `${AppColors.blue500}18`}}
|
|
732
854
|
/>
|
|
733
855
|
)}
|
|
734
|
-
{isMatch('Internet Reachability') && (
|
|
856
|
+
{isMatch('Internet Reachability', 'Connected') && (
|
|
735
857
|
<InfoRow
|
|
736
858
|
label="Internet Reachability"
|
|
737
859
|
value="Connected"
|
|
738
860
|
badge={{text: 'ONLINE', color: AppColors.emerald500, bg: `${AppColors.emerald500}18`}}
|
|
739
861
|
/>
|
|
740
862
|
)}
|
|
741
|
-
{isMatch('Connection Type') && (
|
|
863
|
+
{isMatch('Connection Type', 'Wi-Fi / Local Area Network') && (
|
|
742
864
|
<InfoRow
|
|
743
865
|
label="Active Connection Type"
|
|
744
866
|
value="Wi-Fi / Local Area Network"
|
|
745
867
|
/>
|
|
746
868
|
)}
|
|
747
|
-
{isMatch('Metro Dev Server') && (
|
|
869
|
+
{isMatch('Metro Dev Server', NativeModules?.PlatformConstants?.serverHost || NativeModules?.AndroidConstants?.serverHost || 'localhost:8081') && (
|
|
748
870
|
<InfoRow
|
|
749
871
|
label="Metro Packager Host"
|
|
750
872
|
value={
|
|
@@ -754,13 +876,13 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
754
876
|
}
|
|
755
877
|
/>
|
|
756
878
|
)}
|
|
757
|
-
{isMatch('WebSocket Protocol') && (
|
|
879
|
+
{isMatch('WebSocket Protocol', 'Active & Enabled') && (
|
|
758
880
|
<InfoRow
|
|
759
881
|
label="WebSocket (WSS) Support"
|
|
760
882
|
value="Active & Enabled"
|
|
761
883
|
/>
|
|
762
884
|
)}
|
|
763
|
-
{isMatch('Network Inspector Interceptor') && (
|
|
885
|
+
{isMatch('Network Inspector Interceptor', 'Intercepting XHR & Fetch') && (
|
|
764
886
|
<InfoRow
|
|
765
887
|
label="Network Interceptor Status"
|
|
766
888
|
value="Intercepting XHR & Fetch"
|
|
@@ -772,35 +894,35 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
772
894
|
)}
|
|
773
895
|
|
|
774
896
|
{/* ── SUB-TAB 4: DISPLAY & SCREEN GEOMETRY ── */}
|
|
775
|
-
{(activeSubTab === 'display' || search.length > 0) && (
|
|
897
|
+
{(activeSubTab === 'display' || search.length > 0) && hasDisplayMatch && (
|
|
776
898
|
<View style={styles.sectionCard}>
|
|
777
899
|
<Text style={styles.sectionTitle}>DISPLAY & SCREEN GEOMETRY</Text>
|
|
778
|
-
{isMatch('Window Resolution') && (
|
|
900
|
+
{isMatch('Window Resolution', `${windowDims.width.toFixed(0)} × ${windowDims.height.toFixed(0)} pt`) && (
|
|
779
901
|
<InfoRow
|
|
780
902
|
label="Window Logical Size"
|
|
781
903
|
value={`${windowDims.width.toFixed(0)} × ${windowDims.height.toFixed(0)} pt`}
|
|
782
904
|
/>
|
|
783
905
|
)}
|
|
784
|
-
{isMatch('Screen Physical Size') && (
|
|
906
|
+
{isMatch('Screen Physical Size', `${(screenDims.width * pixelRatio).toFixed(0)} × ${(screenDims.height * pixelRatio).toFixed(0)} px`) && (
|
|
785
907
|
<InfoRow
|
|
786
908
|
label="Physical Screen Size"
|
|
787
909
|
value={`${(screenDims.width * pixelRatio).toFixed(0)} × ${(screenDims.height * pixelRatio).toFixed(0)} px`}
|
|
788
910
|
/>
|
|
789
911
|
)}
|
|
790
|
-
{isMatch('Pixel Density') && (
|
|
912
|
+
{isMatch('Pixel Density', `@${pixelRatio}x (${Math.round(pixelRatio * 160)} dpi)`) && (
|
|
791
913
|
<InfoRow
|
|
792
914
|
label="Pixel Ratio (DPI Scale)"
|
|
793
915
|
value={`@${pixelRatio}x (${Math.round(pixelRatio * 160)} dpi)`}
|
|
794
916
|
badge={{text: `@${pixelRatio}x`, color: AppColors.purple, bg: `${AppColors.purple}18`}}
|
|
795
917
|
/>
|
|
796
918
|
)}
|
|
797
|
-
{isMatch('Font Scale') && (
|
|
919
|
+
{isMatch('Font Scale', `${fontScale}x`) && (
|
|
798
920
|
<InfoRow
|
|
799
921
|
label="User Font Scale"
|
|
800
922
|
value={`${fontScale}x (${fontScale === 1 ? 'Default' : fontScale > 1 ? 'Enlarged' : 'Compact'})`}
|
|
801
923
|
/>
|
|
802
924
|
)}
|
|
803
|
-
{isMatch('Form Factor') && (
|
|
925
|
+
{isMatch('Form Factor', isTablet ? 'Tablet' : 'Smartphone') && (
|
|
804
926
|
<InfoRow
|
|
805
927
|
label="Device Form Factor"
|
|
806
928
|
value={isTablet ? 'Tablet' : 'Smartphone'}
|
|
@@ -811,13 +933,13 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
811
933
|
}}
|
|
812
934
|
/>
|
|
813
935
|
)}
|
|
814
|
-
{isMatch('Orientation') && (
|
|
936
|
+
{isMatch('Orientation', isLandscape ? 'Landscape' : 'Portrait') && (
|
|
815
937
|
<InfoRow
|
|
816
938
|
label="Screen Orientation"
|
|
817
939
|
value={isLandscape ? 'Landscape' : 'Portrait'}
|
|
818
940
|
/>
|
|
819
941
|
)}
|
|
820
|
-
{isMatch('Status Bar Height') && (
|
|
942
|
+
{isMatch('Status Bar Height', `${statusBarHeight} pt`) && (
|
|
821
943
|
<InfoRow
|
|
822
944
|
label="Status Bar Inset"
|
|
823
945
|
value={`${statusBarHeight} pt`}
|
|
@@ -828,42 +950,42 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
828
950
|
)}
|
|
829
951
|
|
|
830
952
|
{/* ── SUB-TAB 5: RUNTIME & APPLICATION ── */}
|
|
831
|
-
{(activeSubTab === 'runtime' || search.length > 0) && (
|
|
953
|
+
{(activeSubTab === 'runtime' || search.length > 0) && hasRuntimeMatch && (
|
|
832
954
|
<View style={styles.sectionCard}>
|
|
833
955
|
<Text style={styles.sectionTitle}>RUNTIME & APPLICATION</Text>
|
|
834
|
-
{isMatch('App Name') && (
|
|
956
|
+
{isMatch('App Name', fullDeviceData.runtime.appName) && (
|
|
835
957
|
<InfoRow
|
|
836
958
|
label="Application Name"
|
|
837
959
|
value={fullDeviceData.runtime.appName}
|
|
838
960
|
/>
|
|
839
961
|
)}
|
|
840
|
-
{isMatch('Bundle ID') && (
|
|
962
|
+
{isMatch('Bundle ID', fullDeviceData.identifiers.bundleId) && (
|
|
841
963
|
<InfoRow
|
|
842
964
|
label="Bundle Identifier / Package"
|
|
843
965
|
value={fullDeviceData.identifiers.bundleId}
|
|
844
966
|
/>
|
|
845
967
|
)}
|
|
846
|
-
{isMatch('App Version') && (
|
|
968
|
+
{isMatch('App Version', `v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`) && (
|
|
847
969
|
<InfoRow
|
|
848
970
|
label="Application Version"
|
|
849
971
|
value={`v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`}
|
|
850
972
|
/>
|
|
851
973
|
)}
|
|
852
|
-
{isMatch('React Native') && (
|
|
974
|
+
{isMatch('React Native', `v${reactNativeVersion}`) && (
|
|
853
975
|
<InfoRow
|
|
854
976
|
label="React Native Framework"
|
|
855
977
|
value={`v${reactNativeVersion}`}
|
|
856
978
|
badge={{text: 'RN', color: AppColors.sky500, bg: `${AppColors.sky500}18`}}
|
|
857
979
|
/>
|
|
858
980
|
)}
|
|
859
|
-
{isMatch('In-App Inspector Version') && (
|
|
981
|
+
{isMatch('In-App Inspector Version', `v${LIB_VERSION}`) && (
|
|
860
982
|
<InfoRow
|
|
861
983
|
label="In-App Inspector Library"
|
|
862
984
|
value={`v${LIB_VERSION}`}
|
|
863
985
|
badge={{text: 'LATEST', color: AppColors.purple, bg: `${AppColors.purple}18`}}
|
|
864
986
|
/>
|
|
865
987
|
)}
|
|
866
|
-
{isMatch('Hermes Engine') && (
|
|
988
|
+
{isMatch('Hermes Engine', isHermes ? 'Enabled (AOT Bytecode)' : 'Disabled (JSC)') && (
|
|
867
989
|
<InfoRow
|
|
868
990
|
label="Hermes JavaScript Engine"
|
|
869
991
|
value={isHermes ? 'Enabled (AOT Bytecode)' : 'Disabled (JSC)'}
|
|
@@ -874,7 +996,7 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
874
996
|
}}
|
|
875
997
|
/>
|
|
876
998
|
)}
|
|
877
|
-
{isMatch('New Architecture') && (
|
|
999
|
+
{isMatch('New Architecture', isTurboModule ? 'Enabled' : 'Legacy Bridge') && (
|
|
878
1000
|
<InfoRow
|
|
879
1001
|
label="Bridgeless TurboModules (New Arch)"
|
|
880
1002
|
value={isTurboModule ? 'Enabled' : 'Legacy Bridge'}
|
|
@@ -885,7 +1007,7 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
885
1007
|
}}
|
|
886
1008
|
/>
|
|
887
1009
|
)}
|
|
888
|
-
{isMatch('Build Type') && (
|
|
1010
|
+
{isMatch('Build Type', __DEV__ ? 'Debug (__DEV__ = true)' : 'Release / Production') && (
|
|
889
1011
|
<InfoRow
|
|
890
1012
|
label="Build Configuration"
|
|
891
1013
|
value={__DEV__ ? 'Debug (__DEV__ = true)' : 'Release / Production'}
|
|
@@ -896,19 +1018,19 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
896
1018
|
}}
|
|
897
1019
|
/>
|
|
898
1020
|
)}
|
|
899
|
-
{isMatch('Timezone') && (
|
|
1021
|
+
{isMatch('Timezone', fullDeviceData.runtime.timezone) && (
|
|
900
1022
|
<InfoRow
|
|
901
1023
|
label="System Timezone"
|
|
902
1024
|
value={fullDeviceData.runtime.timezone}
|
|
903
1025
|
/>
|
|
904
1026
|
)}
|
|
905
|
-
{isMatch('Locale') && (
|
|
1027
|
+
{isMatch('Locale', fullDeviceData.runtime.locale) && (
|
|
906
1028
|
<InfoRow
|
|
907
1029
|
label="System Language & Locale"
|
|
908
1030
|
value={fullDeviceData.runtime.locale}
|
|
909
1031
|
/>
|
|
910
1032
|
)}
|
|
911
|
-
{isMatch('Session Uptime') && (
|
|
1033
|
+
{isMatch('Session Uptime', deviceUptime) && (
|
|
912
1034
|
<InfoRow
|
|
913
1035
|
label="Inspector Session Uptime"
|
|
914
1036
|
value={deviceUptime}
|
|
@@ -919,10 +1041,10 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
919
1041
|
)}
|
|
920
1042
|
|
|
921
1043
|
{/* ── SUB-TAB 6: SECURITY & IDENTIFIERS ── */}
|
|
922
|
-
{(activeSubTab === 'security' || search.length > 0) && (
|
|
1044
|
+
{(activeSubTab === 'security' || search.length > 0) && hasSecurityMatch && (
|
|
923
1045
|
<View style={styles.sectionCard}>
|
|
924
1046
|
<Text style={styles.sectionTitle}>DEVICE IDENTIFIERS & SECURITY</Text>
|
|
925
|
-
{isMatch('Pseudo-UDID') && (
|
|
1047
|
+
{isMatch('Pseudo-UDID', pseudoUDID) && (
|
|
926
1048
|
<InfoRow
|
|
927
1049
|
label="Deterministic Pseudo-UDID"
|
|
928
1050
|
value={pseudoUDID}
|
|
@@ -930,20 +1052,20 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
930
1052
|
badge={{text: 'PERSISTENT', color: AppColors.purple, bg: `${AppColors.purple}18`}}
|
|
931
1053
|
/>
|
|
932
1054
|
)}
|
|
933
|
-
{isMatch('Bundle ID') && (
|
|
1055
|
+
{isMatch('Bundle ID', fullDeviceData.identifiers.bundleId) && (
|
|
934
1056
|
<InfoRow
|
|
935
1057
|
label="Application Bundle ID"
|
|
936
1058
|
value={fullDeviceData.identifiers.bundleId}
|
|
937
1059
|
/>
|
|
938
1060
|
)}
|
|
939
|
-
{isMatch('Root / Jailbreak') && (
|
|
1061
|
+
{isMatch('Root / Jailbreak', 'Clean (Standard Sandbox)') && (
|
|
940
1062
|
<InfoRow
|
|
941
1063
|
label="Root / Jailbreak Heuristic"
|
|
942
1064
|
value="Clean (Standard Sandbox)"
|
|
943
1065
|
badge={{text: 'SECURE', color: AppColors.emerald500, bg: `${AppColors.emerald500}18`}}
|
|
944
1066
|
/>
|
|
945
1067
|
)}
|
|
946
|
-
{isMatch('Simulator / Emulator') && (
|
|
1068
|
+
{isMatch('Simulator / Emulator', (Platform.constants as any)?.Model?.includes?.('sdk') || (Platform.constants as any)?.Model?.includes?.('Emulator') || (Platform.constants as any)?.Model?.includes?.('Simulator') ? 'Virtual Simulator' : 'Physical Device') && (
|
|
947
1069
|
<InfoRow
|
|
948
1070
|
label="Emulator / Physical Device"
|
|
949
1071
|
value={
|
|
@@ -955,7 +1077,7 @@ export const DeviceInfoTab = React.memo(() => {
|
|
|
955
1077
|
}
|
|
956
1078
|
/>
|
|
957
1079
|
)}
|
|
958
|
-
{isMatch('Sandbox Integrity') && (
|
|
1080
|
+
{isMatch('Sandbox Integrity', 'Enforced by OS Kernel') && (
|
|
959
1081
|
<InfoRow
|
|
960
1082
|
label="App Sandbox File Isolation"
|
|
961
1083
|
value="Enforced by OS Kernel"
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Pressable,
|
|
8
8
|
ScrollView,
|
|
9
9
|
Text,
|
|
10
|
+
TouchableOpacity,
|
|
10
11
|
useWindowDimensions,
|
|
11
12
|
View,
|
|
12
13
|
} from 'react-native';
|
|
@@ -1010,9 +1011,10 @@ const InspectorHeader = React.memo(() => {
|
|
|
1010
1011
|
</TouchableScale>
|
|
1011
1012
|
)}
|
|
1012
1013
|
|
|
1013
|
-
<
|
|
1014
|
+
<TouchableOpacity
|
|
1014
1015
|
onPress={closeModal}
|
|
1015
|
-
hitSlop={
|
|
1016
|
+
hitSlop={{top: 12, bottom: 12, left: 12, right: 12}}
|
|
1017
|
+
activeOpacity={0.6}
|
|
1016
1018
|
style={[
|
|
1017
1019
|
styles.closeButtonSquare,
|
|
1018
1020
|
{
|
|
@@ -1022,7 +1024,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
1022
1024
|
},
|
|
1023
1025
|
]}>
|
|
1024
1026
|
<CloseWhite size={isNarrow ? 12 : 14} />
|
|
1025
|
-
</
|
|
1027
|
+
</TouchableOpacity>
|
|
1026
1028
|
</View>
|
|
1027
1029
|
</View>
|
|
1028
1030
|
</View>
|