react-native-inapp-inspector 2.3.23 → 2.3.25
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/AnalyticsDetail.js +8 -8
- package/dist/commonjs/components/AnalyticsEventCard.js +11 -8
- package/dist/commonjs/components/AppHeaderLogo.js +1 -1
- package/dist/commonjs/components/BrandSquareIcon.js +12 -12
- package/dist/commonjs/components/ConsoleLogCard.d.ts +1 -0
- package/dist/commonjs/components/ConsoleLogCard.js +92 -80
- package/dist/commonjs/components/EndOfListFooter.d.ts +5 -1
- package/dist/commonjs/components/EndOfListFooter.js +27 -5
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +30 -298
- package/dist/commonjs/components/Inspector/ConsoleTab.js +38 -93
- package/dist/commonjs/components/Inspector/CrashDetail.js +12 -12
- package/dist/commonjs/components/Inspector/CrashTab.js +43 -33
- package/dist/commonjs/components/Inspector/DebuggingTab.js +9 -9
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +54 -52
- package/dist/commonjs/components/Inspector/InspectorHeader.js +1 -1
- package/dist/commonjs/components/Inspector/LogDetail.js +6 -6
- package/dist/commonjs/components/Inspector/MainScreen.js +23 -25
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +1 -1
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +3 -3
- package/dist/commonjs/components/Inspector/NetworkTab.js +31 -31
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +3 -3
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +21 -22
- package/dist/commonjs/components/Inspector/ReduxDetail.js +1 -1
- package/dist/commonjs/components/Inspector/ReduxTab.js +110 -97
- package/dist/commonjs/components/Inspector/SettingsPanel.js +48 -100
- package/dist/commonjs/components/Inspector/StorageTab.js +56 -52
- package/dist/commonjs/components/Inspector/TabBar.js +29 -26
- package/dist/commonjs/components/JsonViewer.js +169 -164
- package/dist/commonjs/components/LogCard.js +34 -38
- package/dist/commonjs/components/LogSyntaxHighlighter.js +3 -3
- package/dist/commonjs/components/SegmentedTabs.d.ts +4 -1
- package/dist/commonjs/components/SegmentedTabs.js +8 -8
- package/dist/commonjs/constants/index.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/networkLogger.js +1 -2
- package/dist/commonjs/helpers/index.d.ts +6 -0
- package/dist/commonjs/helpers/index.js +4 -4
- package/dist/commonjs/helpers/memoryManager.d.ts +0 -1
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/remoteConfig.js +1 -1
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/i18n/index.d.ts +35 -0
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -0
- package/dist/commonjs/i18n/locales/de.json +1 -0
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -0
- package/dist/commonjs/i18n/locales/fr.json +1 -0
- package/dist/commonjs/i18n/locales/hi.json +1 -0
- package/dist/commonjs/i18n/locales/ja.json +1 -0
- package/dist/commonjs/i18n/locales/ko.json +1 -0
- package/dist/commonjs/i18n/locales/pt.json +1 -0
- package/dist/commonjs/i18n/locales/ru.json +1 -0
- package/dist/commonjs/i18n/locales/zh.json +1 -0
- package/dist/commonjs/index.d.ts +2 -4
- package/dist/commonjs/index.js +2 -2
- package/dist/commonjs/styles/AppColors.d.ts +40 -0
- package/dist/commonjs/styles/AppColors.js +1 -1
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +0 -20
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/esm/components/AnalyticsDetail.js +75 -75
- package/dist/esm/components/AnalyticsEventCard.js +20 -17
- package/dist/esm/components/AppHeaderLogo.js +5 -5
- package/dist/esm/components/BrandSquareIcon.js +39 -39
- package/dist/esm/components/ConsoleLogCard.d.ts +1 -0
- package/dist/esm/components/ConsoleLogCard.js +98 -86
- package/dist/esm/components/EndOfListFooter.d.ts +5 -1
- package/dist/esm/components/EndOfListFooter.js +36 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +47 -315
- package/dist/esm/components/Inspector/ConsoleTab.js +61 -116
- package/dist/esm/components/Inspector/CrashDetail.js +49 -49
- package/dist/esm/components/Inspector/CrashTab.js +75 -65
- package/dist/esm/components/Inspector/DebuggingTab.js +31 -31
- package/dist/esm/components/Inspector/DeviceInfoTab.js +146 -144
- package/dist/esm/components/Inspector/InspectorHeader.js +5 -5
- package/dist/esm/components/Inspector/LogDetail.js +1 -1
- package/dist/esm/components/Inspector/MainScreen.js +51 -53
- package/dist/esm/components/Inspector/MediaGalleryTab.js +1 -1
- package/dist/esm/components/Inspector/MediaPreviewModal.js +31 -31
- package/dist/esm/components/Inspector/NetworkTab.js +63 -63
- package/dist/esm/components/Inspector/NpmStarPrompt.js +42 -42
- package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -46
- package/dist/esm/components/Inspector/ReduxDetail.js +1 -1
- package/dist/esm/components/Inspector/ReduxTab.js +163 -150
- package/dist/esm/components/Inspector/SettingsPanel.js +136 -188
- package/dist/esm/components/Inspector/StorageTab.js +88 -84
- package/dist/esm/components/Inspector/TabBar.js +37 -34
- package/dist/esm/components/JsonViewer.js +173 -168
- package/dist/esm/components/LogCard.js +38 -42
- package/dist/esm/components/LogSyntaxHighlighter.js +1 -1
- package/dist/esm/components/SegmentedTabs.d.ts +4 -1
- package/dist/esm/components/SegmentedTabs.js +8 -8
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/networkLogger.js +1 -2
- package/dist/esm/helpers/index.d.ts +6 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/helpers/memoryManager.d.ts +0 -1
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/remoteConfig.js +1 -1
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/i18n/index.d.ts +35 -0
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -0
- package/dist/esm/i18n/locales/de.json +1 -0
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -0
- package/dist/esm/i18n/locales/fr.json +1 -0
- package/dist/esm/i18n/locales/hi.json +1 -0
- package/dist/esm/i18n/locales/ja.json +1 -0
- package/dist/esm/i18n/locales/ko.json +1 -0
- package/dist/esm/i18n/locales/pt.json +1 -0
- package/dist/esm/i18n/locales/ru.json +1 -0
- package/dist/esm/i18n/locales/zh.json +1 -0
- package/dist/esm/index.d.ts +2 -4
- package/dist/esm/index.js +5 -5
- package/dist/esm/styles/AppColors.d.ts +40 -0
- package/dist/esm/styles/AppColors.js +1 -1
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +0 -20
- package/dist/esm/types/enums.js +1 -1
- package/package.json +1 -15
- package/dist/commonjs/bundle.d.ts +0 -2
- package/dist/commonjs/bundle.js +0 -1
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +0 -48
- package/dist/commonjs/components/Inspector/BundleTab.js +0 -1297
- package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +0 -27
- package/dist/commonjs/components/Inspector/PerformanceTab.js +0 -454
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +0 -115
- package/dist/commonjs/customHooks/bundleAnalyzer.js +0 -1
- package/dist/commonjs/customHooks/performanceTracker.d.ts +0 -144
- package/dist/commonjs/customHooks/performanceTracker.js +0 -63
- package/dist/commonjs/performance.d.ts +0 -2
- package/dist/commonjs/performance.js +0 -1
- package/dist/esm/bundle.d.ts +0 -2
- package/dist/esm/bundle.js +0 -1
- package/dist/esm/components/Inspector/BundleTab.d.ts +0 -48
- package/dist/esm/components/Inspector/BundleTab.js +0 -1297
- package/dist/esm/components/Inspector/PerformanceTab.d.ts +0 -27
- package/dist/esm/components/Inspector/PerformanceTab.js +0 -454
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +0 -115
- package/dist/esm/customHooks/bundleAnalyzer.js +0 -1
- package/dist/esm/customHooks/performanceTracker.d.ts +0 -144
- package/dist/esm/customHooks/performanceTracker.js +0 -63
- package/dist/esm/performance.d.ts +0 -2
- package/dist/esm/performance.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,o,
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,o,n,r){r===void 0&&(r=n);var l=Object.getOwnPropertyDescriptor(o,n);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[n]}}),Object.defineProperty(e,r,l)}):(function(e,o,n,r){r===void 0&&(r=n),e[r]=o[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,o){Object.defineProperty(e,"default",{enumerable:!0,value:o})}):function(e,o){e.default=o}),__importStar=this&&this.__importStar||(function(){var e=function(o){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(r[r.length]=l);return r},e(o)};return function(o){if(o&&o.__esModule)return o;var n={};if(o!=null)for(var r=e(o),l=0;l<r.length;l++)r[l]!=="default"&&__createBinding(n,o,r[l]);return __setModuleDefault(n,o),n}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DebuggingTab=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),QRCodeView_1=__importDefault(require("../QRCodeView")),TouchableScale_1=__importDefault(require("../TouchableScale")),toast_1=require("../../helpers/toast"),NativeInspector_1=require("../../native/NativeInspector"),NetworkIcons_1=require("../NetworkIcons"),react_native_svg_1=__importStar(require("react-native-svg")),TerminalConsoleIcon=({color:e=AppColors_1.AppColors.purple,size:o=13})=><react_native_svg_1.default width={o}height={o}viewBox="0 0 24 24"fill="none">
|
|
2
2
|
<react_native_svg_1.Path d="M4 17l6-6-6-6M12 19h8"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
3
|
-
</react_native_svg_1.default>,DebuggingTab=()=>{const e=(0,react_1.useMemo)(()=>{const a=react_native_1.NativeModules.SourceCode?.scriptURL||"";let s="localhost",t=8081;try{if(a.includes("://")){const d=a.split("://")[1].split("/")[0];if(d.includes(":")){const u=d.split(":");s=u[0];const y=parseInt(u[1],10);isNaN(y)||(t=y)}else s=d}}catch{}return{host:s,port:t,scriptURL:a}},[]),[o,
|
|
3
|
+
</react_native_svg_1.default>,DebuggingTab=()=>{const e=(0,react_1.useMemo)(()=>{const a=react_native_1.NativeModules.SourceCode?.scriptURL||"";let s="localhost",t=8081;try{if(a.includes("://")){const d=a.split("://")[1].split("/")[0];if(d.includes(":")){const u=d.split(":");s=u[0];const y=parseInt(u[1],10);isNaN(y)||(t=y)}else s=d}}catch{}return{host:s,port:t,scriptURL:a}},[]),[o,n]=(0,react_1.useState)(()=>e.host&&e.host!=="localhost"&&e.host!=="127.0.0.1"&&e.host!=="10.0.2.2"?e.host:"192.168.1.2"),[r,l]=(0,react_1.useState)(e.port||8083),[V,m]=(0,react_1.useState)("app-debug.apk"),[T,x]=(0,react_1.useState)(null),[g,v]=(0,react_1.useState)("assembleRelease"),[f,k]=(0,react_1.useState)(!0),[i,w]=(0,react_1.useState)({status:"idle",scheme:"assembleRelease",clean:!0,progress:0,currentTask:"",error:null,apkName:null,apkSize:null}),p=(0,react_1.useRef)(null),_=(0,react_1.useRef)(new react_native_1.Animated.Value(0)).current,[A,I]=(0,react_1.useState)(!0),S=(0,react_1.useRef)(null);(0,react_1.useEffect)(()=>{react_native_1.Animated.timing(_,{toValue:Math.max(0,Math.min(100,i.progress)),duration:350,useNativeDriver:!1}).start()},[i.progress,_]),(0,react_1.useEffect)(()=>{i.logs&&i.logs.length>0&&setTimeout(()=>{S.current?.scrollToEnd({animated:!0})},50)},[i.logs]);const C=(0,react_1.useCallback)(async()=>{const a=Array.from(new Set([e.host,"10.0.2.2","localhost","127.0.0.1"].filter(Boolean))),s=Array.from(new Set([e.port,8083,8081,8082].filter(Boolean)));for(const t of a)for(const h of s)try{const d=new AbortController,u=setTimeout(()=>d.abort(),1200),y=await fetch(`http://${t}:${h}/__inapp_inspector/apk-info`,{signal:d.signal});if(clearTimeout(u),y.ok){const c=await y.json();c.hostIp&&c.hostIp!=="127.0.0.1"&&c.hostIp!=="localhost"&&c.hostIp!=="10.0.2.2"&&n(c.hostIp),c.port&&l(c.port),c.apkName&&m(c.apkName),c.apkSize&&x((c.apkSize/(1024*1024)).toFixed(1));return}}catch{}},[e.host,e.port]);(0,react_1.useEffect)(()=>{C()},[C]),(0,react_1.useEffect)(()=>()=>{p.current&&clearInterval(p.current)},[]);const R=(0,react_1.useCallback)(()=>{p.current&&clearInterval(p.current);const a=e.host||"10.0.2.2";p.current=setInterval(async()=>{try{const s=await fetch(`http://${a}:${r}/__inapp_inspector/build-status`);if(s.ok){const t=await s.json();w(t),t.status==="completed"?(p.current&&clearInterval(p.current),(0,NativeInspector_1.triggerNativeHaptic)("success"),(0,toast_1.showToast)("\u2713 APK Build Generated Successfully!"),t.apkSize&&x((t.apkSize/(1024*1024)).toFixed(1)),t.apkName&&m(t.apkName),C()):t.status==="failed"&&(p.current&&clearInterval(p.current),(0,NativeInspector_1.triggerNativeHaptic)("error"),(0,toast_1.showToast)("\u2715 Build Failed: "+(t.error||"Gradle error")))}}catch{}},1e3)},[e.host,r,C]),F=async()=>{(0,NativeInspector_1.triggerNativeHaptic)("medium"),w({status:"running",scheme:g,clean:f,progress:5,currentTask:f?"Cleaning build cache...":"Initializing build...",error:null,apkName:null,apkSize:null});const a=Array.from(new Set([e.host,"10.0.2.2","localhost","127.0.0.1"].filter(Boolean))),s=Array.from(new Set([r,8083,8081,8082].filter(Boolean)));let t=!1;for(const h of a)for(const d of s)try{const u=new AbortController,y=setTimeout(()=>u.abort(),2e3),c=await fetch(`http://${h}:${d}/__inapp_inspector/build-apk?scheme=${g}&clean=${f}`,{signal:u.signal});if(clearTimeout(y),c.ok){t=!0,R();return}}catch{}t||w(h=>({...h,status:"failed",error:"Cannot reach build server. Ensure npm start or npm run serve-apk is running on host."}))},D=async()=>{(0,NativeInspector_1.triggerNativeHaptic)("warning"),p.current&&clearInterval(p.current);const a=Array.from(new Set([e.host,"10.0.2.2","localhost","127.0.0.1"].filter(Boolean))),s=Array.from(new Set([r,8083,8081,8082].filter(Boolean)));for(const t of a)for(const h of s)try{const d=new AbortController,u=setTimeout(()=>d.abort(),1500);await fetch(`http://${t}:${h}/__inapp_inspector/stop-build`,{signal:d.signal}),clearTimeout(u)}catch{}w(t=>({...t,status:"idle",currentTask:"Build cancelled by user",logs:[...t.logs||[],"\u{1F6D1} Build cancelled by user."]})),(0,toast_1.showToast)("Build cancelled")},B=`http://${o}:${r}/${V.replace(/^\/+/,"")}`,z=()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),react_native_1.Share.share({message:B,title:"Install Android APK"})},b=i.status==="running";return<react_native_1.ScrollView style={styles.scrollArea}contentContainerStyle={styles.scrollContent}showsVerticalScrollIndicator={!1}>
|
|
4
4
|
|
|
5
5
|
<react_native_1.View style={styles.heroCard}>
|
|
6
6
|
<react_native_1.View style={styles.heroHeader}>
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<react_native_1.View style={styles.sectionCard}>
|
|
56
56
|
<react_native_1.View style={styles.sectionHeaderRow}>
|
|
57
57
|
<react_native_1.Text style={styles.sectionTitle}>QR CODE & DIRECT DOWNLOAD</react_native_1.Text>
|
|
58
|
-
<react_native_1.TouchableOpacity activeOpacity={.7}onPress={
|
|
58
|
+
<react_native_1.TouchableOpacity activeOpacity={.7}onPress={C}style={styles.refreshBtn}>
|
|
59
59
|
<NetworkIcons_1.RepeatIcon size={12}color={AppColors_1.AppColors.purple}/>
|
|
60
60
|
<react_native_1.Text style={styles.refreshBtnText}>Refresh</react_native_1.Text>
|
|
61
61
|
</react_native_1.TouchableOpacity>
|
|
@@ -145,18 +145,18 @@
|
|
|
145
145
|
{(i.logs&&i.logs.length>0||b)&&<react_native_1.View style={styles.consoleContainer}>
|
|
146
146
|
<react_native_1.View style={styles.consoleHeaderRow}>
|
|
147
147
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
148
|
-
<TerminalConsoleIcon color=
|
|
148
|
+
<TerminalConsoleIcon color={AppColors_1.AppColors.sky400}size={12}/>
|
|
149
149
|
<react_native_1.Text style={styles.consoleHeaderTitle}>GRADLE VERBOSE OUTPUT</react_native_1.Text>
|
|
150
150
|
</react_native_1.View>
|
|
151
|
-
<react_native_1.TouchableOpacity activeOpacity={.7}onPress={()=>I(!
|
|
151
|
+
<react_native_1.TouchableOpacity activeOpacity={.7}onPress={()=>I(!A)}style={styles.consoleToggleBtn}>
|
|
152
152
|
<react_native_1.Text style={styles.consoleToggleText}>
|
|
153
|
-
{
|
|
153
|
+
{A?"Hide Console":"Show Console"}
|
|
154
154
|
</react_native_1.Text>
|
|
155
155
|
</react_native_1.TouchableOpacity>
|
|
156
156
|
</react_native_1.View>
|
|
157
157
|
|
|
158
|
-
{
|
|
159
|
-
{i.logs&&i.logs.length>0?i.logs.map((a,s)=>{let t=
|
|
158
|
+
{A&&<react_native_1.ScrollView ref={S}style={styles.consoleLogBox}contentContainerStyle={styles.consoleLogContent}nestedScrollEnabled showsVerticalScrollIndicator>
|
|
159
|
+
{i.logs&&i.logs.length>0?i.logs.map((a,s)=>{let t=AppColors_1.AppColors.slate400;return a.startsWith("> Task :")?t=AppColors_1.AppColors.sky400:a.includes("BUILD SUCCESSFUL")?t=AppColors_1.AppColors.buildSuccessGreen:a.includes("FAILURE")||a.includes("error:")?t=AppColors_1.AppColors.buildFailureRed:a.includes("UP-TO-DATE")&&(t=AppColors_1.AppColors.purple400),<react_native_1.Text key={s}style={[styles.consoleLogLine,{color:t}]}>
|
|
160
160
|
{a}
|
|
161
161
|
</react_native_1.Text>}):<react_native_1.Text style={styles.consoleLogPlaceholder}>
|
|
162
162
|
Waiting for Gradle daemon output...
|
|
@@ -194,4 +194,4 @@
|
|
|
194
194
|
Ensure both Android devices are connected to the same Wi-Fi network.
|
|
195
195
|
</react_native_1.Text>
|
|
196
196
|
</react_native_1.View>
|
|
197
|
-
</react_native_1.ScrollView>};exports.DebuggingTab=DebuggingTab;const styles=react_native_1.StyleSheet.create({scrollArea:{flex:1,backgroundColor:AppColors_1.AppColors.contentBg},scrollContent:{padding:12,gap:12,paddingBottom:100},heroCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:14,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:14,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.04,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:1,gap:12},heroHeader:{flexDirection:"row",alignItems:"center",gap:10},heroIconWrap:{width:38,height:38,borderRadius:10,backgroundColor:AppColors_1.AppColors.purple,alignItems:"center",justifyContent:"center",shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.25,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:2},heroTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:15,color:AppColors_1.AppColors.primaryBlack,letterSpacing:-.2},heroSubtitle:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11.5,color:AppColors_1.AppColors.grayText,marginTop:1},heroBadge:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:`${AppColors_1.AppColors.emerald500}18`,paddingHorizontal:7,paddingVertical:3,borderRadius:6},pulseDot:{width:6,height:6,borderRadius:3,backgroundColor:AppColors_1.AppColors.emerald500},heroBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.emerald500},heroMetricsStrip:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:10,paddingVertical:8,paddingHorizontal:10},heroMetricItem:{flex:1,alignItems:"center",paddingHorizontal:2,minWidth:0},heroMetricLabel:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.4},heroMetricValue:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.primaryBlack,marginTop:2},heroMetricDivider:{width:1,height:20,backgroundColor:AppColors_1.AppColors.dividerColor},sectionCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:14,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:14,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.03,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1,gap:12},sectionHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},sectionTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.8,textTransform:"uppercase"},refreshBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:7,paddingVertical:3,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.purple}12`},refreshBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.purple},qrCenteredWrapper:{alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.grayBackground,padding:12,borderRadius:12,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},qrInnerFrame:{backgroundColor:AppColors_1.AppColors.white,padding:6,borderRadius:8},urlBox:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:10,paddingLeft:10,paddingRight:6,paddingVertical:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,gap:8},urlText:{flex:1,fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11.5,color:AppColors_1.AppColors.skyBlue},actionsRow:{flexDirection:"row",gap:10},actionBtnSecondary:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:9,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,backgroundColor:AppColors_1.AppColors.grayBackground},actionBtnSecondaryText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.grayTextStrong},actionBtnPrimary:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:9,borderRadius:10,backgroundColor:AppColors_1.AppColors.purple,shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.25,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:2},actionBtnPrimaryText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.white},completedBadge:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${AppColors_1.AppColors.emerald500}18`,paddingHorizontal:6,paddingVertical:2,borderRadius:5},completedBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.emerald500},subTabStrip:{flexDirection:"row",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,padding:2,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},subTabItem:{flex:1,paddingVertical:7,borderRadius:6,alignItems:"center",justifyContent:"center"},subTabItemActive:{backgroundColor:AppColors_1.AppColors.purple,shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.2,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1},subTabText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.grayText},subTabTextActive:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.white},cleanRow:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:2},checkboxBox:{width:18,height:18,borderRadius:4,borderWidth:1.5,borderColor:AppColors_1.AppColors.grayBorderSecondary,backgroundColor:AppColors_1.AppColors.grayBackground,alignItems:"center",justifyContent:"center"},checkboxBoxActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},cleanLabel:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11.5,color:AppColors_1.AppColors.grayTextStrong},cleanCode:{fontFamily:AppFonts_1.AppFonts.interRegular,color:AppColors_1.AppColors.grayTextWeak,fontSize:10.5},progressContainer:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:10,padding:10,gap:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},progressTopRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},progressTaskGroup:{flexDirection:"row",alignItems:"center",gap:6,flex:1,paddingRight:8},progressTaskText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.primaryBlack,flex:1},progressPercentageText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,color:AppColors_1.AppColors.purple},progressBarTrack:{width:"100%",height:6,borderRadius:3,backgroundColor:AppColors_1.AppColors.grayBorderSecondary,overflow:"hidden"},progressBarFill:{height:"100%",backgroundColor:AppColors_1.AppColors.purple,borderRadius:3},errorContainer:{flexDirection:"row",alignItems:"center",gap:6,backgroundColor:`${AppColors_1.AppColors.errorColor}12`,padding:8,borderRadius:8,borderWidth:1,borderColor:`${AppColors_1.AppColors.errorColor}25`},errorText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.errorColor,flex:1},consoleContainer:{backgroundColor:
|
|
197
|
+
</react_native_1.ScrollView>};exports.DebuggingTab=DebuggingTab;const styles=react_native_1.StyleSheet.create({scrollArea:{flex:1,backgroundColor:AppColors_1.AppColors.contentBg},scrollContent:{padding:12,gap:12,paddingBottom:100},heroCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:14,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:14,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.04,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:1,gap:12},heroHeader:{flexDirection:"row",alignItems:"center",gap:10},heroIconWrap:{width:38,height:38,borderRadius:10,backgroundColor:AppColors_1.AppColors.purple,alignItems:"center",justifyContent:"center",shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.25,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:2},heroTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:15,color:AppColors_1.AppColors.primaryBlack,letterSpacing:-.2},heroSubtitle:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11.5,color:AppColors_1.AppColors.grayText,marginTop:1},heroBadge:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:`${AppColors_1.AppColors.emerald500}18`,paddingHorizontal:7,paddingVertical:3,borderRadius:6},pulseDot:{width:6,height:6,borderRadius:3,backgroundColor:AppColors_1.AppColors.emerald500},heroBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.emerald500},heroMetricsStrip:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:10,paddingVertical:8,paddingHorizontal:10},heroMetricItem:{flex:1,alignItems:"center",paddingHorizontal:2,minWidth:0},heroMetricLabel:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.4},heroMetricValue:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.primaryBlack,marginTop:2},heroMetricDivider:{width:1,height:20,backgroundColor:AppColors_1.AppColors.dividerColor},sectionCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:14,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:14,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.03,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1,gap:12},sectionHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},sectionTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.8,textTransform:"uppercase"},refreshBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:7,paddingVertical:3,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.purple}12`},refreshBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.purple},qrCenteredWrapper:{alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.grayBackground,padding:12,borderRadius:12,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},qrInnerFrame:{backgroundColor:AppColors_1.AppColors.white,padding:6,borderRadius:8},urlBox:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:10,paddingLeft:10,paddingRight:6,paddingVertical:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,gap:8},urlText:{flex:1,fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11.5,color:AppColors_1.AppColors.skyBlue},actionsRow:{flexDirection:"row",gap:10},actionBtnSecondary:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:9,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,backgroundColor:AppColors_1.AppColors.grayBackground},actionBtnSecondaryText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.grayTextStrong},actionBtnPrimary:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:9,borderRadius:10,backgroundColor:AppColors_1.AppColors.purple,shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.25,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:2},actionBtnPrimaryText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.white},completedBadge:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${AppColors_1.AppColors.emerald500}18`,paddingHorizontal:6,paddingVertical:2,borderRadius:5},completedBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.emerald500},subTabStrip:{flexDirection:"row",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,padding:2,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},subTabItem:{flex:1,paddingVertical:7,borderRadius:6,alignItems:"center",justifyContent:"center"},subTabItemActive:{backgroundColor:AppColors_1.AppColors.purple,shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.2,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1},subTabText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.grayText},subTabTextActive:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.white},cleanRow:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:2},checkboxBox:{width:18,height:18,borderRadius:4,borderWidth:1.5,borderColor:AppColors_1.AppColors.grayBorderSecondary,backgroundColor:AppColors_1.AppColors.grayBackground,alignItems:"center",justifyContent:"center"},checkboxBoxActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},cleanLabel:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11.5,color:AppColors_1.AppColors.grayTextStrong},cleanCode:{fontFamily:AppFonts_1.AppFonts.interRegular,color:AppColors_1.AppColors.grayTextWeak,fontSize:10.5},progressContainer:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:10,padding:10,gap:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},progressTopRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},progressTaskGroup:{flexDirection:"row",alignItems:"center",gap:6,flex:1,paddingRight:8},progressTaskText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.primaryBlack,flex:1},progressPercentageText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,color:AppColors_1.AppColors.purple},progressBarTrack:{width:"100%",height:6,borderRadius:3,backgroundColor:AppColors_1.AppColors.grayBorderSecondary,overflow:"hidden"},progressBarFill:{height:"100%",backgroundColor:AppColors_1.AppColors.purple,borderRadius:3},errorContainer:{flexDirection:"row",alignItems:"center",gap:6,backgroundColor:`${AppColors_1.AppColors.errorColor}12`,padding:8,borderRadius:8,borderWidth:1,borderColor:`${AppColors_1.AppColors.errorColor}25`},errorText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.errorColor,flex:1},consoleContainer:{backgroundColor:AppColors_1.AppColors.slate900,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.slate800,overflow:"hidden",marginTop:4},consoleHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:AppColors_1.AppColors.slate800,paddingHorizontal:10,paddingVertical:6},consoleHeaderTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.sky400,letterSpacing:.5},consoleToggleBtn:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,backgroundColor:"rgba(255,255,255,0.1)"},consoleToggleText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:9.5,color:AppColors_1.AppColors.slate400},consoleLogBox:{maxHeight:140,paddingHorizontal:10,paddingVertical:8},consoleLogContent:{gap:3},consoleLogLine:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,lineHeight:14},consoleLogPlaceholder:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.slate500,fontStyle:"italic"},generateBtn:{backgroundColor:AppColors_1.AppColors.purple,borderRadius:10,paddingVertical:10,alignItems:"center",justifyContent:"center",shadowColor:AppColors_1.AppColors.purple,shadowOpacity:.25,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:2},generateBtnDisabled:{opacity:.7},buildingActionsRow:{flexDirection:"row",alignItems:"center",gap:10},buildingStatusPill:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,backgroundColor:`${AppColors_1.AppColors.purple}14`,borderRadius:10,paddingVertical:10,borderWidth:1,borderColor:`${AppColors_1.AppColors.purple}30`},buildingStatusPillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.purple},stopBtn:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,backgroundColor:AppColors_1.AppColors.errorColor,borderRadius:10,paddingHorizontal:16,paddingVertical:10,shadowColor:AppColors_1.AppColors.errorColor,shadowOpacity:.25,shadowRadius:4,shadowOffset:{width:0,height:2},elevation:2},stopBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.white},ctaContentRow:{flexDirection:"row",alignItems:"center",gap:6},generateBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12.5,color:AppColors_1.AppColors.white},footerNoteRow:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:8},footerNoteText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.grayTextWeak,textAlign:"center",flex:1}});exports.default=exports.DebuggingTab;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(i,a,m,o){o===void 0&&(o=m);var s=Object.getOwnPropertyDescriptor(a,m);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[m]}}),Object.defineProperty(i,o,s)}):(function(i,a,m,o){o===void 0&&(o=m),i[o]=a[m]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}):function(i,a){i.default=a}),__importStar=this&&this.__importStar||(function(){var i=function(a){return i=Object.getOwnPropertyNames||function(m){var o=[];for(var s in m)Object.prototype.hasOwnProperty.call(m,s)&&(o[o.length]=s);return o},i(a)};return function(a){if(a&&a.__esModule)return a;var m={};if(a!=null)for(var o=i(a),s=0;s<o.length;s++)o[s]!=="default"&&__createBinding(m,a,o[s]);return __setModuleDefault(m,a),m}})(),__importDefault=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DeviceInfoTab=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),TouchableScale_1=__importDefault(require("../TouchableScale")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),i18n_1=require("../../i18n"),NetworkIcons_1=require("../NetworkIcons"),NativeInspector_1=require("../../native/NativeInspector"),helpers_1=require("../../helpers"),toast_1=require("../../helpers/toast"),constants_1=require("../../constants"),InfoRow=react_1.default.memo(({label:i,value:a,copyable:m=!0,badge:o,subtext:s,isLast:U=!1})=>{const P=a==null?"\u2014":typeof a=="boolean"?a?"Yes":"No":String(a);return<react_native_1.View style={[styles.infoRow,U&&{borderBottomWidth:0}]}>
|
|
2
2
|
<react_native_1.View style={{flex:1,paddingRight:8,minWidth:0}}>
|
|
3
3
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:6}}>
|
|
4
|
-
<react_native_1.Text style={styles.infoLabel}numberOfLines={2}>{
|
|
5
|
-
{
|
|
6
|
-
<react_native_1.Text style={[styles.infoBadgeText,{color:
|
|
7
|
-
{
|
|
4
|
+
<react_native_1.Text style={styles.infoLabel}numberOfLines={2}>{i}</react_native_1.Text>
|
|
5
|
+
{o&&<react_native_1.View style={[styles.infoBadge,{backgroundColor:o.bg,borderColor:`${o.color}33`}]}>
|
|
6
|
+
<react_native_1.Text style={[styles.infoBadgeText,{color:o.color}]}>
|
|
7
|
+
{o.text}
|
|
8
8
|
</react_native_1.Text>
|
|
9
9
|
</react_native_1.View>}
|
|
10
10
|
</react_native_1.View>
|
|
11
|
-
{
|
|
11
|
+
{s&&<react_native_1.Text style={styles.infoSubtext}numberOfLines={2}>{s}</react_native_1.Text>}
|
|
12
12
|
</react_native_1.View>
|
|
13
13
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0,maxWidth:"58%",justifyContent:"flex-end"}}>
|
|
14
14
|
<react_native_1.Text style={[styles.infoValue,typeof a=="boolean"&&{color:a?AppColors_1.AppColors.emerald500:AppColors_1.AppColors.errorColor}]}numberOfLines={3}selectable>
|
|
15
15
|
{P}
|
|
16
16
|
</react_native_1.Text>
|
|
17
|
-
{
|
|
17
|
+
{m&&a!==null&&a!==void 0&&<TouchableScale_1.default hitSlop={8}onPress={()=>{(0,helpers_1.copyToClipboard)(P,i),(0,toast_1.showToast)(`Copied ${i}`)}}style={styles.rowCopyBtn}>
|
|
18
18
|
<NetworkIcons_1.CopyIcon size={11}color={AppColors_1.AppColors.grayTextWeak}/>
|
|
19
19
|
</TouchableScale_1.default>}
|
|
20
20
|
</react_native_1.View>
|
|
21
|
-
</react_native_1.View>});exports.DeviceInfoTab=react_1.default.memo(()=>{const{t:
|
|
21
|
+
</react_native_1.View>});exports.DeviceInfoTab=react_1.default.memo(()=>{const{t:i}=(0,i18n_1.useTranslation)(),[a,m]=(0,react_1.useState)("overview"),[o,s]=(0,react_1.useState)(""),[U,P]=(0,react_1.useState)(!0),[l,J]=(0,react_1.useState)(null),[G,j]=(0,react_1.useState)(null),[f,R]=(0,react_1.useState)("Detecting..."),[S,E]=(0,react_1.useState)("0s"),q=react_1.default.useRef(Date.now()),k=(0,react_1.useCallback)(async()=>{try{const[r,c]=await Promise.all([(0,NativeInspector_1.getNativeDeviceMetrics)(),(0,NativeInspector_1.getNativeSystemMetrics)()]);J(r),j(c)}catch{}finally{P(!1)}},[]);(0,react_1.useEffect)(()=>{k();const r=setInterval(k,3e3);return()=>clearInterval(r)},[k]),(0,react_1.useEffect)(()=>{let r=!0;return(async()=>{try{const n=react_native_1.NativeModules?.PlatformConstants?.serverHost||react_native_1.NativeModules?.AndroidConstants?.serverHost||react_native_1.NativeModules?.DevSettings?.serverHost;if(n&&typeof n=="string"){const d=n.split(":")[0].replace(/https?:\/\//,"");if(d&&d!=="localhost"&&d!=="127.0.0.1"){r&&R(d);return}}}catch{}try{const n=new AbortController,d=setTimeout(()=>n.abort(),1200),M=await fetch("https://api.ipify.org?format=json",{signal:n.signal});if(clearTimeout(d),M.ok){const x=await M.json();if(x&&x.ip&&r){R(x.ip);return}}}catch{}r&&R(react_native_1.Platform.OS==="android"?"10.0.2.15 (Local)":"127.0.0.1 (Local)")})(),()=>{r=!1}},[]),(0,react_1.useEffect)(()=>{const r=()=>{const n=Math.floor((Date.now()-q.current)/1e3),d=Math.floor(n/3600),M=Math.floor(n%3600/60),x=n%60;d>0?E(`${d}h ${M}m ${x}s`):M>0?E(`${M}m ${x}s`):E(`${x}s`)},c=setInterval(r,1e3);return r(),()=>clearInterval(c)},[]);const b=react_native_1.Dimensions.get("window"),h=react_native_1.Dimensions.get("screen"),p=react_native_1.PixelRatio.get(),I=react_native_1.PixelRatio.getFontScale(),w=b.width>=600||b.height>=1e3,$=b.width>b.height,B=react_native_1.Platform.OS==="android"?react_native_1.StatusBar.currentHeight||24:b.height>=812?44:20,y=(0,react_1.useMemo)(()=>{const r=`${react_native_1.Platform.OS}-${react_native_1.Platform.Version}-${h.width}x${h.height}-${p}-${react_native_1.Platform.constants?.Brand||"generic"}`;let c=0;for(let d=0;d<r.length;d++)c=(c<<5)-c+r.charCodeAt(d),c|=0;const n=Math.abs(c).toString(16).padStart(8,"0");return`UDID-${react_native_1.Platform.OS.toUpperCase()}-${n.slice(0,4)}-${n.slice(4,8)}-${Date.now().toString(16).slice(-4)}`.toUpperCase()},[h.width,h.height,p]),g=!!global?.HermesInternal,_=!!globalThis?.__turboModuleProxy,V=(0,react_1.useMemo)(()=>{const r=react_native_1.Platform.constants?.reactNativeVersion;return r?`${r.major}.${r.minor}.${r.patch}${r.prerelease!=null?`-${r.prerelease}`:""}`:"0.74+"},[]),u=l?.totalRAM?Math.round(l.totalRAM/(1024*1024)):G?.totalPhysicalRamMb||4096,C=l?.freeRAM?Math.round(l.freeRAM/(1024*1024)):Math.max(0,u-(G?.residentRamMb||1200)),T=Math.max(0,u-C),D=u>0?Math.round(T/u*100):45,A=l?.totalStorage?(l.totalStorage/(1024*1024*1024)).toFixed(1):"128.0",v=l?.freeStorage?(l.freeStorage/(1024*1024*1024)).toFixed(1):"64.2",Y=(0,react_1.useMemo)(()=>[{key:"overview",label:i("device.subTabs.overview","Overview"),themeColor:AppColors_1.AppColors.sky600,icon:r=><NetworkIcons_1.LayersIcon size={12}color={r}/>},{key:"hardware",label:i("device.subTabs.hardware","Hardware"),themeColor:AppColors_1.AppColors.orange600,icon:r=><NetworkIcons_1.CpuIcon size={12}color={r}/>},{key:"network",label:i("device.subTabs.network","Network & IP"),themeColor:AppColors_1.AppColors.teal600,icon:r=><NetworkIcons_1.WifiIcon size={12}color={r}/>},{key:"display",label:i("device.subTabs.display","Display"),themeColor:AppColors_1.AppColors.pink600,icon:r=><NetworkIcons_1.ScreenIcon size={12}color={r}/>},{key:"runtime",label:i("device.subTabs.runtime","Runtime & App"),themeColor:AppColors_1.AppColors.amber600,icon:r=><NetworkIcons_1.BoltIcon size={12}color={r}/>},{key:"security",label:i("device.subTabs.security","Security & IDs"),themeColor:AppColors_1.AppColors.errorColor,icon:r=><NetworkIcons_1.KeyIcon size={12}color={r}/>}],[i]),t=(0,react_1.useMemo)(()=>({identifiers:{pseudoUDID:y,bundleId:l?.appBundleId||l?.appPackageName||"com.app.inspector"},hardware:{model:l?.deviceModel||react_native_1.Platform.constants?.Model||"Unknown Device",brand:l?.deviceBrand||react_native_1.Platform.constants?.Brand||(react_native_1.Platform.OS==="ios"?"Apple":"Android"),osVersion:`${react_native_1.Platform.OS} ${react_native_1.Platform.Version}`,apiLevel:l?.apiLevel||react_native_1.Platform.constants?.Version||null,cpuAbi:l?.cpuAbi||react_native_1.Platform.constants?.ServerHost||"arm64-v8a",totalRamMb:u,freeRamMb:C,usedRamMb:T,totalStorageGb:`${A} GB`,freeStorageGb:`${v} GB`,batteryPercent:l?.batteryPercent??100,isCharging:l?.isCharging??!1},network:{ipAddress:f,isWifi:!0,reachability:"Online"},display:{windowWidth:b.width,windowHeight:b.height,screenWidth:h.width,screenHeight:h.height,pixelRatio:p,fontScale:I,statusBarHeight:B,isTablet:w,orientation:$?"Landscape":"Portrait"},runtime:{appName:(0,helpers_1.getAppName)(),appVersion:l?.appVersion||"1.0.0",appBuild:l?.appBuild||"1",reactNativeVersion:V,inspectorVersion:constants_1.LIB_VERSION,isHermes:g,isTurboModule:_,isDev:__DEV__,jsEngine:g?"Hermes":"JSC",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,locale:Intl.DateTimeFormat().resolvedOptions().locale,sessionUptime:S}}),[y,l,u,C,T,A,v,f,b,h,p,I,B,w,$,V,g,_,S]),K=()=>{(0,helpers_1.copyToClipboard)(JSON.stringify(t,null,2),"Device Full Report"),(0,toast_1.showToast)(i("device.copiedJson","Copied Full Device JSON Report!"))},X=()=>{const r=`# Device Information Report
|
|
22
22
|
**Generated by React Native In-App Inspector v${constants_1.LIB_VERSION}**
|
|
23
23
|
|
|
24
24
|
## \u{1F4F1} Hardware & System
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
- **Brand / Manufacturer:** ${t.hardware.brand}
|
|
27
27
|
- **OS Version:** ${t.hardware.osVersion}
|
|
28
28
|
- **CPU Architecture:** ${t.hardware.cpuAbi}
|
|
29
|
-
- **Total RAM:** ${
|
|
29
|
+
- **Total RAM:** ${u} MB (Free: ${C} MB)
|
|
30
30
|
- **Total Storage:** ${A} GB (Free: ${v} GB)
|
|
31
31
|
- **Battery:** ${t.hardware.batteryPercent}% (${t.hardware.isCharging?"Charging":"Unplugged"})
|
|
32
32
|
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
- **Status:** Online
|
|
36
36
|
|
|
37
37
|
## \u{1F5A5} Display & Geometry
|
|
38
|
-
- **Resolution:** ${
|
|
39
|
-
- **Form Factor:** ${
|
|
38
|
+
- **Resolution:** ${h.width} \xD7 ${h.height} pt (@${p}x)
|
|
39
|
+
- **Form Factor:** ${w?"Tablet":"Phone"} (${$?"Landscape":"Portrait"})
|
|
40
40
|
- **Status Bar Height:** ${B} pt
|
|
41
41
|
|
|
42
42
|
## \u2699\uFE0F Runtime & App
|
|
43
43
|
- **App Name:** ${t.runtime.appName}
|
|
44
44
|
- **App Version:** ${t.runtime.appVersion} (${t.runtime.appBuild})
|
|
45
45
|
- **React Native:** v${V}
|
|
46
|
-
- **JS Engine:** ${g?"Hermes":"JSC"} (Bridgeless TurboModule: ${
|
|
46
|
+
- **JS Engine:** ${g?"Hermes":"JSC"} (Bridgeless TurboModule: ${_?"Yes":"No"})
|
|
47
47
|
- **Environment:** ${__DEV__?"Development (__DEV__)":"Production (Release)"}
|
|
48
48
|
- **Timezone:** ${t.runtime.timezone}
|
|
49
49
|
- **Session Uptime:** ${S}
|
|
@@ -51,25 +51,13 @@
|
|
|
51
51
|
## \u{1F511} Identifiers & Security
|
|
52
52
|
- **Pseudo-UDID:** \`${y}\`
|
|
53
53
|
- **Bundle ID:** \`${t.identifiers.bundleId}\`
|
|
54
|
-
`;(0,helpers_1.copyToClipboard)(
|
|
55
|
-
|
|
56
|
-
<react_native_1.View style={styles.subTabsWrapper}>
|
|
57
|
-
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={styles.subTabsContainer}>
|
|
58
|
-
{Y.map(o=>{const c=a===o.key,d=c?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText;return<TouchableScale_1.default key={o.key}onPress={()=>u(o.key)}style={[styles.subTabPill,c&&styles.subTabPillActive]}>
|
|
59
|
-
{o.icon(d)}
|
|
60
|
-
<react_native_1.Text style={[styles.subTabPillText,c&&styles.subTabPillTextActive]}>
|
|
61
|
-
{o.label}
|
|
62
|
-
</react_native_1.Text>
|
|
63
|
-
</TouchableScale_1.default>})}
|
|
64
|
-
</react_native_1.ScrollView>
|
|
65
|
-
</react_native_1.View>
|
|
66
|
-
|
|
54
|
+
`;(0,helpers_1.copyToClipboard)(r,"Device Markdown Report"),(0,toast_1.showToast)(i("device.copiedMarkdown","Copied Markdown Report to Clipboard!"))},e=(0,react_1.useCallback)((r,c,n)=>{if(!o.trim())return!0;const d=o.toLowerCase().trim(),M=c!=null?typeof c=="object"?JSON.stringify(c):String(c):"",x=n!=null?String(n):"";return r.toLowerCase().includes(d)||M.toLowerCase().includes(d)||x.toLowerCase().includes(d)},[o]),F=(0,react_1.useMemo)(()=>o.trim()?e("Model",l?.deviceModel||react_native_1.Platform.constants?.Model)||e("OS",react_native_1.Platform.OS)||e("IP Address",f)||e("RAM",`${T}/${u}`)||e("Uptime",S):!0,[o,e,l,f,T,u,S]),L=(0,react_1.useMemo)(()=>o.trim()?e("Device Model",t.hardware.model)||e("Manufacturer",t.hardware.brand)||e("Operating System",t.hardware.osVersion)||e("IP Address",f)||e("RAM Memory",`${T} MB / ${u} MB (${D}%)`,`Free Memory: ${C} MB`)||e("Storage Capacity",`${v} GB Free / ${A} GB Total`)||e("App Version",`v${t.runtime.appVersion} (${t.runtime.appBuild})`)||e("JavaScript Engine",g?"Hermes Bytecode Engine":"JavaScriptCore (JSC)")||e("UDID Identifier",y):!0,[o,e,t,f,T,u,D,C,v,A,g,y]),O=(0,react_1.useMemo)(()=>o.trim()?e("CPU Architecture",t.hardware.cpuAbi)||e("Total RAM",`${u} MB`)||e("Free RAM",`${C} MB`)||e("Storage Capacity",`${A} GB`)||e("Available Storage",`${v} GB`)||e("Battery",`${l?.batteryPercent??100}%`)||e("API Level",`API ${l?.apiLevel||react_native_1.Platform.Version}`)||e("Thermal State","Nominal (Cool)"):!0,[o,e,t,u,C,A,v,l]),N=(0,react_1.useMemo)(()=>o.trim()?e("IP Address",f)||e("Internet Reachability","Connected")||e("Connection Type","Wi-Fi / Local Area Network")||e("Metro Dev Server",react_native_1.NativeModules?.PlatformConstants?.serverHost||react_native_1.NativeModules?.AndroidConstants?.serverHost||"localhost:8081")||e("WebSocket Protocol","Active & Enabled")||e("Network Inspector Interceptor","Intercepting XHR & Fetch"):!0,[o,e,f]),z=(0,react_1.useMemo)(()=>o.trim()?e("Window Resolution",`${b.width.toFixed(0)} \xD7 ${b.height.toFixed(0)} pt`)||e("Screen Physical Size",`${(h.width*p).toFixed(0)} \xD7 ${(h.height*p).toFixed(0)} px`)||e("Pixel Density",`@${p}x (${Math.round(p*160)} dpi)`)||e("Font Scale",`${I}x`)||e("Form Factor",w?"Tablet":"Smartphone")||e("Orientation",$?"Landscape":"Portrait")||e("Status Bar Height",`${B} pt`):!0,[o,e,b,h,p,I,w,$,B]),H=(0,react_1.useMemo)(()=>o.trim()?e("App Name",t.runtime.appName)||e("Bundle ID",t.identifiers.bundleId)||e("App Version",`v${t.runtime.appVersion} (${t.runtime.appBuild})`)||e("React Native",`v${V}`)||e("In-App Inspector Version",`v${constants_1.LIB_VERSION}`)||e("Hermes Engine",g?"Enabled (AOT Bytecode)":"Disabled (JSC)")||e("New Architecture",_?"Enabled":"Legacy Bridge")||e("Build Type",__DEV__?"Debug (__DEV__ = true)":"Release / Production")||e("Timezone",t.runtime.timezone)||e("Locale",t.runtime.locale)||e("Session Uptime",S):!0,[o,e,t,V,g,_,S]),W=(0,react_1.useMemo)(()=>o.trim()?e("Pseudo-UDID",y)||e("Bundle ID",t.identifiers.bundleId)||e("Root / Jailbreak","Clean (Standard Sandbox)")||e("Simulator / Emulator",react_native_1.Platform.constants?.Model?.includes?.("sdk")||react_native_1.Platform.constants?.Model?.includes?.("Emulator")||react_native_1.Platform.constants?.Model?.includes?.("Simulator")?"Virtual Simulator":"Physical Device")||e("Sandbox Integrity","Enforced by OS Kernel"):!0,[o,e,y,t]),Z=(0,react_1.useMemo)(()=>o.trim()?F||L||O||N||z||H||W:!0,[o,F,L,O,N,z,H,W]);return<react_native_1.View style={styles.container}>
|
|
67
55
|
|
|
68
56
|
<react_native_1.View style={styles.actionBar}>
|
|
69
57
|
<react_native_1.View style={styles.searchBar}>
|
|
70
58
|
<NetworkIcons_1.SearchIcon size={14}color={AppColors_1.AppColors.grayTextWeak}/>
|
|
71
|
-
<react_native_1.TextInput value={
|
|
72
|
-
{
|
|
59
|
+
<react_native_1.TextInput value={o}onChangeText={s}placeholder={i("device.searchPlaceholder","Search specs, UDID, IP, screen...")}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}style={styles.searchInput}clearButtonMode="while-editing"/>
|
|
60
|
+
{o.length>0&&<TouchableScale_1.default onPress={()=>s("")}hitSlop={8}>
|
|
73
61
|
<NetworkIcons_1.ClearIcon size={13}color={AppColors_1.AppColors.grayTextWeak}/>
|
|
74
62
|
</TouchableScale_1.default>}
|
|
75
63
|
</react_native_1.View>
|
|
@@ -86,19 +74,33 @@
|
|
|
86
74
|
</react_native_1.View>
|
|
87
75
|
|
|
88
76
|
|
|
77
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
78
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
79
|
+
{Y.map(r=>{const c=a===r.key,n=r.themeColor||AppColors_1.AppColors.purple,d=c?AppColors_1.AppColors.white:n;return<TouchableScale_1.default key={r.key}onPress={()=>m(r.key)}>
|
|
80
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:c?n:`${n}12`,borderWidth:1,borderColor:c?n:`${n}30`,gap:5}}>
|
|
81
|
+
{r.icon(d)}
|
|
82
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:c?AppColors_1.AppColors.white:AppColors_1.AppColors.primaryBlack}}>
|
|
83
|
+
{r.label}
|
|
84
|
+
</react_native_1.Text>
|
|
85
|
+
</react_native_1.View>
|
|
86
|
+
</TouchableScale_1.default>})}
|
|
87
|
+
</react_native_1.ScrollView>
|
|
88
|
+
</react_native_1.View>
|
|
89
|
+
|
|
90
|
+
|
|
89
91
|
<react_native_1.ScrollView style={styles.scrollArea}contentContainerStyle={styles.scrollContent}showsVerticalScrollIndicator={!1}>
|
|
90
92
|
|
|
91
|
-
{(!
|
|
93
|
+
{(!o.trim()||F)&&<react_native_1.View style={styles.heroCard}>
|
|
92
94
|
<react_native_1.View style={styles.heroHeader}>
|
|
93
95
|
<react_native_1.View style={styles.heroIconWrap}>
|
|
94
96
|
{react_native_1.Platform.OS==="ios"?<NetworkIcons_1.AppleIcon size={20}color={AppColors_1.AppColors.white}/>:<NetworkIcons_1.AndroidIcon size={20}color={AppColors_1.AppColors.white}/>}
|
|
95
97
|
</react_native_1.View>
|
|
96
98
|
<react_native_1.View style={{flex:1,minWidth:0}}>
|
|
97
99
|
<react_native_1.Text style={styles.heroTitle}numberOfLines={1}ellipsizeMode="tail">
|
|
98
|
-
{
|
|
100
|
+
{l?.deviceModel||react_native_1.Platform.constants?.Model||(react_native_1.Platform.OS==="ios"?"Apple iPhone":"Android Device")}
|
|
99
101
|
</react_native_1.Text>
|
|
100
102
|
<react_native_1.Text style={styles.heroSubtitle}numberOfLines={1}ellipsizeMode="tail">
|
|
101
|
-
{react_native_1.Platform.OS==="ios"?`iOS ${react_native_1.Platform.Version}`:`Android ${react_native_1.Platform.Version} (API ${
|
|
103
|
+
{react_native_1.Platform.OS==="ios"?`iOS ${react_native_1.Platform.Version}`:`Android ${react_native_1.Platform.Version} (API ${l?.apiLevel||react_native_1.Platform.Version})`}
|
|
102
104
|
</react_native_1.Text>
|
|
103
105
|
</react_native_1.View>
|
|
104
106
|
<react_native_1.View style={styles.heroBadge}>
|
|
@@ -110,34 +112,34 @@
|
|
|
110
112
|
|
|
111
113
|
<react_native_1.View style={styles.heroMetricsStrip}>
|
|
112
114
|
<react_native_1.View style={styles.heroMetricItem}>
|
|
113
|
-
<react_native_1.Text style={styles.heroMetricLabel}numberOfLines={1}ellipsizeMode="tail">IP ADDRESS</react_native_1.Text>
|
|
115
|
+
<react_native_1.Text style={styles.heroMetricLabel}numberOfLines={1}ellipsizeMode="tail">{i("device.ipAddress","IP ADDRESS")}</react_native_1.Text>
|
|
114
116
|
<react_native_1.Text style={styles.heroMetricValue}numberOfLines={1}ellipsizeMode="tail">
|
|
115
117
|
{f}
|
|
116
118
|
</react_native_1.Text>
|
|
117
119
|
</react_native_1.View>
|
|
118
120
|
<react_native_1.View style={styles.heroMetricDivider}/>
|
|
119
121
|
<react_native_1.View style={styles.heroMetricItem}>
|
|
120
|
-
<react_native_1.Text style={styles.heroMetricLabel}numberOfLines={1}ellipsizeMode="tail">RAM (USED/TOTAL)</react_native_1.Text>
|
|
122
|
+
<react_native_1.Text style={styles.heroMetricLabel}numberOfLines={1}ellipsizeMode="tail">{i("device.ramUsedTotal","RAM (USED/TOTAL)")}</react_native_1.Text>
|
|
121
123
|
<react_native_1.Text style={styles.heroMetricValue}numberOfLines={1}ellipsizeMode="tail">
|
|
122
|
-
{T}/{
|
|
124
|
+
{T}/{u} MB
|
|
123
125
|
</react_native_1.Text>
|
|
124
126
|
</react_native_1.View>
|
|
125
127
|
<react_native_1.View style={styles.heroMetricDivider}/>
|
|
126
128
|
<react_native_1.View style={styles.heroMetricItem}>
|
|
127
|
-
<react_native_1.Text style={styles.heroMetricLabel}numberOfLines={1}ellipsizeMode="tail">UPTIME</react_native_1.Text>
|
|
129
|
+
<react_native_1.Text style={styles.heroMetricLabel}numberOfLines={1}ellipsizeMode="tail">{i("device.uptime","UPTIME")}</react_native_1.Text>
|
|
128
130
|
<react_native_1.Text style={styles.heroMetricValue}numberOfLines={1}ellipsizeMode="tail">{S}</react_native_1.Text>
|
|
129
131
|
</react_native_1.View>
|
|
130
132
|
</react_native_1.View>
|
|
131
133
|
</react_native_1.View>}
|
|
132
134
|
|
|
133
135
|
|
|
134
|
-
{(a==="overview"||
|
|
136
|
+
{(a==="overview"||o.length>0)&&L&&<react_native_1.View style={styles.sectionCard}>
|
|
135
137
|
<react_native_1.Text style={styles.sectionTitle}>DEVICE OVERVIEW</react_native_1.Text>
|
|
136
138
|
{e("Device Model",t.hardware.model)&&<InfoRow label="Device Model"value={t.hardware.model}/>}
|
|
137
139
|
{e("Manufacturer",t.hardware.brand)&&<InfoRow label="Manufacturer / Brand"value={t.hardware.brand}/>}
|
|
138
140
|
{e("Operating System",t.hardware.osVersion)&&<InfoRow label="Operating System"value={t.hardware.osVersion}badge={{text:react_native_1.Platform.OS.toUpperCase(),color:AppColors_1.AppColors.blue500,bg:`${AppColors_1.AppColors.blue500}18`}}/>}
|
|
139
141
|
{e("IP Address",f)&&<InfoRow label="Local IP Address"value={f}badge={{text:"ONLINE",color:AppColors_1.AppColors.emerald500,bg:`${AppColors_1.AppColors.emerald500}18`}}/>}
|
|
140
|
-
{e("RAM Memory",`${T} MB / ${
|
|
142
|
+
{e("RAM Memory",`${T} MB / ${u} MB (${D}%)`,`Free Memory: ${C} MB`)&&<InfoRow label="RAM Memory"value={`${T} MB / ${u} MB (${D}%)`}subtext={`Free Memory: ${C} MB`}/>}
|
|
141
143
|
{e("Storage Capacity",`${v} GB Free / ${A} GB Total`)&&<InfoRow label="Internal Storage"value={`${v} GB Free / ${A} GB Total`}/>}
|
|
142
144
|
{e("App Version",`v${t.runtime.appVersion} (${t.runtime.appBuild})`)&&<InfoRow label="Host App Version"value={`v${t.runtime.appVersion} (${t.runtime.appBuild})`}/>}
|
|
143
145
|
{e("JavaScript Engine",g?"Hermes Bytecode Engine":"JavaScriptCore (JSC)")&&<InfoRow label="JS Runtime Engine"value={g?"Hermes Bytecode Engine":"JavaScriptCore (JSC)"}badge={g?{text:"HERMES",color:AppColors_1.AppColors.purple,bg:`${AppColors_1.AppColors.purple}18`}:{text:"JSC",color:AppColors_1.AppColors.sky500,bg:`${AppColors_1.AppColors.sky500}18`}}/>}
|
|
@@ -145,20 +147,20 @@
|
|
|
145
147
|
</react_native_1.View>}
|
|
146
148
|
|
|
147
149
|
|
|
148
|
-
{(a==="hardware"||
|
|
150
|
+
{(a==="hardware"||o.length>0)&&O&&<react_native_1.View style={styles.sectionCard}>
|
|
149
151
|
<react_native_1.Text style={styles.sectionTitle}>HARDWARE & SYSTEM SPECIFICATIONS</react_native_1.Text>
|
|
150
152
|
{e("CPU Architecture",t.hardware.cpuAbi)&&<InfoRow label="CPU Architecture / ABI"value={t.hardware.cpuAbi}badge={{text:"64-BIT",color:AppColors_1.AppColors.purple,bg:`${AppColors_1.AppColors.purple}18`}}/>}
|
|
151
|
-
{e("Total RAM",`${
|
|
153
|
+
{e("Total RAM",`${u} MB`)&&<InfoRow label="Total Physical RAM"value={`${u} MB`}/>}
|
|
152
154
|
{e("Free RAM",`${C} MB`)&&<InfoRow label="Available Free RAM"value={`${C} MB`}badge={{text:C<500?"LOW":"HEALTHY",color:C<500?AppColors_1.AppColors.errorColor:AppColors_1.AppColors.emerald500,bg:C<500?`${AppColors_1.AppColors.errorColor}18`:`${AppColors_1.AppColors.emerald500}18`}}/>}
|
|
153
155
|
{e("Storage Capacity",`${A} GB`)&&<InfoRow label="Disk Storage Total"value={`${A} GB`}/>}
|
|
154
156
|
{e("Available Storage",`${v} GB`)&&<InfoRow label="Disk Storage Available"value={`${v} GB`}/>}
|
|
155
|
-
{e("Battery",`${
|
|
156
|
-
{e("API Level",`API ${
|
|
157
|
+
{e("Battery",`${l?.batteryPercent??100}%`)&&<InfoRow label="Battery Level"value={`${l?.batteryPercent??100}%`}badge={{text:l?.isCharging?"CHARGING":"DISCHARGING",color:l?.isCharging?AppColors_1.AppColors.emerald500:AppColors_1.AppColors.grayText,bg:l?.isCharging?`${AppColors_1.AppColors.emerald500}18`:`${AppColors_1.AppColors.grayText}18`}}/>}
|
|
158
|
+
{e("API Level",`API ${l?.apiLevel||react_native_1.Platform.Version}`)&&react_native_1.Platform.OS==="android"&&<InfoRow label="Android API SDK Level"value={`API ${l?.apiLevel||react_native_1.Platform.Version}`}/>}
|
|
157
159
|
{e("Thermal State","Nominal (Cool)")&&<InfoRow label="Thermal State"value="Nominal (Cool)"badge={{text:"OPTIMAL",color:AppColors_1.AppColors.emerald500,bg:`${AppColors_1.AppColors.emerald500}18`}}isLast/>}
|
|
158
160
|
</react_native_1.View>}
|
|
159
161
|
|
|
160
162
|
|
|
161
|
-
{(a==="network"||
|
|
163
|
+
{(a==="network"||o.length>0)&&N&&<react_native_1.View style={styles.sectionCard}>
|
|
162
164
|
<react_native_1.Text style={styles.sectionTitle}>NETWORK & CONNECTIVITY</react_native_1.Text>
|
|
163
165
|
{e("IP Address",f)&&<InfoRow label="Local Device IP"value={f}badge={{text:"IPV4",color:AppColors_1.AppColors.blue500,bg:`${AppColors_1.AppColors.blue500}18`}}/>}
|
|
164
166
|
{e("Internet Reachability","Connected")&&<InfoRow label="Internet Reachability"value="Connected"badge={{text:"ONLINE",color:AppColors_1.AppColors.emerald500,bg:`${AppColors_1.AppColors.emerald500}18`}}/>}
|
|
@@ -169,19 +171,19 @@
|
|
|
169
171
|
</react_native_1.View>}
|
|
170
172
|
|
|
171
173
|
|
|
172
|
-
{(a==="display"||
|
|
174
|
+
{(a==="display"||o.length>0)&&z&&<react_native_1.View style={styles.sectionCard}>
|
|
173
175
|
<react_native_1.Text style={styles.sectionTitle}>DISPLAY & SCREEN GEOMETRY</react_native_1.Text>
|
|
174
|
-
{e("Window Resolution",`${
|
|
175
|
-
{e("Screen Physical Size",`${(
|
|
176
|
-
{e("Pixel Density",`@${
|
|
176
|
+
{e("Window Resolution",`${b.width.toFixed(0)} \xD7 ${b.height.toFixed(0)} pt`)&&<InfoRow label="Window Logical Size"value={`${b.width.toFixed(0)} \xD7 ${b.height.toFixed(0)} pt`}/>}
|
|
177
|
+
{e("Screen Physical Size",`${(h.width*p).toFixed(0)} \xD7 ${(h.height*p).toFixed(0)} px`)&&<InfoRow label="Physical Screen Size"value={`${(h.width*p).toFixed(0)} \xD7 ${(h.height*p).toFixed(0)} px`}/>}
|
|
178
|
+
{e("Pixel Density",`@${p}x (${Math.round(p*160)} dpi)`)&&<InfoRow label="Pixel Ratio (DPI Scale)"value={`@${p}x (${Math.round(p*160)} dpi)`}badge={{text:`@${p}x`,color:AppColors_1.AppColors.purple,bg:`${AppColors_1.AppColors.purple}18`}}/>}
|
|
177
179
|
{e("Font Scale",`${I}x`)&&<InfoRow label="User Font Scale"value={`${I}x (${I===1?"Default":I>1?"Enlarged":"Compact"})`}/>}
|
|
178
|
-
{e("Form Factor",
|
|
180
|
+
{e("Form Factor",w?"Tablet":"Smartphone")&&<InfoRow label="Device Form Factor"value={w?"Tablet":"Smartphone"}badge={{text:w?"TABLET":"PHONE",color:w?AppColors_1.AppColors.blue500:AppColors_1.AppColors.purple,bg:w?`${AppColors_1.AppColors.blue500}18`:`${AppColors_1.AppColors.purple}18`}}/>}
|
|
179
181
|
{e("Orientation",$?"Landscape":"Portrait")&&<InfoRow label="Screen Orientation"value={$?"Landscape":"Portrait"}/>}
|
|
180
182
|
{e("Status Bar Height",`${B} pt`)&&<InfoRow label="Status Bar Inset"value={`${B} pt`}isLast/>}
|
|
181
183
|
</react_native_1.View>}
|
|
182
184
|
|
|
183
185
|
|
|
184
|
-
{(a==="runtime"||
|
|
186
|
+
{(a==="runtime"||o.length>0)&&H&&<react_native_1.View style={styles.sectionCard}>
|
|
185
187
|
<react_native_1.Text style={styles.sectionTitle}>RUNTIME & APPLICATION</react_native_1.Text>
|
|
186
188
|
{e("App Name",t.runtime.appName)&&<InfoRow label="Application Name"value={t.runtime.appName}/>}
|
|
187
189
|
{e("Bundle ID",t.identifiers.bundleId)&&<InfoRow label="Bundle Identifier / Package"value={t.identifiers.bundleId}/>}
|
|
@@ -189,7 +191,7 @@
|
|
|
189
191
|
{e("React Native",`v${V}`)&&<InfoRow label="React Native Framework"value={`v${V}`}badge={{text:"RN",color:AppColors_1.AppColors.sky500,bg:`${AppColors_1.AppColors.sky500}18`}}/>}
|
|
190
192
|
{e("In-App Inspector Version",`v${constants_1.LIB_VERSION}`)&&<InfoRow label="In-App Inspector Library"value={`v${constants_1.LIB_VERSION}`}badge={{text:"LATEST",color:AppColors_1.AppColors.purple,bg:`${AppColors_1.AppColors.purple}18`}}/>}
|
|
191
193
|
{e("Hermes Engine",g?"Enabled (AOT Bytecode)":"Disabled (JSC)")&&<InfoRow label="Hermes JavaScript Engine"value={g?"Enabled (AOT Bytecode)":"Disabled (JSC)"}badge={{text:g?"HERMES":"JSC",color:g?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayText,bg:g?`${AppColors_1.AppColors.purple}18`:`${AppColors_1.AppColors.grayText}18`}}/>}
|
|
192
|
-
{e("New Architecture",
|
|
194
|
+
{e("New Architecture",_?"Enabled":"Legacy Bridge")&&<InfoRow label="Bridgeless TurboModules (New Arch)"value={_?"Enabled":"Legacy Bridge"}badge={{text:_?"NEW ARCH":"LEGACY",color:_?AppColors_1.AppColors.emerald500:AppColors_1.AppColors.blue500,bg:_?`${AppColors_1.AppColors.emerald500}18`:`${AppColors_1.AppColors.blue500}18`}}/>}
|
|
193
195
|
{e("Build Type",__DEV__?"Debug (__DEV__ = true)":"Release / Production")&&<InfoRow label="Build Configuration"value={__DEV__?"Debug (__DEV__ = true)":"Release / Production"}badge={{text:__DEV__?"DEBUG":"RELEASE",color:__DEV__?AppColors_1.AppColors.warningIconGold:AppColors_1.AppColors.emerald500,bg:__DEV__?`${AppColors_1.AppColors.warningIconGold}18`:`${AppColors_1.AppColors.emerald500}18`}}/>}
|
|
194
196
|
{e("Timezone",t.runtime.timezone)&&<InfoRow label="System Timezone"value={t.runtime.timezone}/>}
|
|
195
197
|
{e("Locale",t.runtime.locale)&&<InfoRow label="System Language & Locale"value={t.runtime.locale}/>}
|
|
@@ -197,7 +199,7 @@
|
|
|
197
199
|
</react_native_1.View>}
|
|
198
200
|
|
|
199
201
|
|
|
200
|
-
{(a==="security"||
|
|
202
|
+
{(a==="security"||o.length>0)&&W&&<react_native_1.View style={styles.sectionCard}>
|
|
201
203
|
<react_native_1.Text style={styles.sectionTitle}>DEVICE IDENTIFIERS & SECURITY</react_native_1.Text>
|
|
202
204
|
{e("Pseudo-UDID",y)&&<InfoRow label="Deterministic Pseudo-UDID"value={y}subtext="Stable hardware signature hash for testing & diagnostics"badge={{text:"PERSISTENT",color:AppColors_1.AppColors.purple,bg:`${AppColors_1.AppColors.purple}18`}}/>}
|
|
203
205
|
{e("Bundle ID",t.identifiers.bundleId)&&<InfoRow label="Application Bundle ID"value={t.identifiers.bundleId}/>}
|
|
@@ -207,13 +209,13 @@
|
|
|
207
209
|
</react_native_1.View>}
|
|
208
210
|
|
|
209
211
|
|
|
210
|
-
{
|
|
212
|
+
{o.trim().length>0&&!Z&&<react_native_1.View style={styles.emptySearchCard}>
|
|
211
213
|
<NetworkIcons_1.SearchIcon size={26}color={AppColors_1.AppColors.grayTextWeak}/>
|
|
212
214
|
<react_native_1.Text style={styles.emptySearchTitle}>No matching device specifications</react_native_1.Text>
|
|
213
215
|
<react_native_1.Text style={styles.emptySearchSubtitle}>
|
|
214
|
-
No properties matched “{
|
|
216
|
+
No properties matched “{o}”
|
|
215
217
|
</react_native_1.Text>
|
|
216
|
-
<TouchableScale_1.default onPress={()=>
|
|
218
|
+
<TouchableScale_1.default onPress={()=>s("")}style={styles.clearSearchBtn}>
|
|
217
219
|
<react_native_1.Text style={styles.clearSearchBtnText}>Clear Search</react_native_1.Text>
|
|
218
220
|
</TouchableScale_1.default>
|
|
219
221
|
</react_native_1.View>}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(i,o,n,r){r===void 0&&(r=n);var l=Object.getOwnPropertyDescriptor(o,n);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[n]}}),Object.defineProperty(i,r,l)}):(function(i,o,n,r){r===void 0&&(r=n),i[r]=o[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}):function(i,o){i.default=o}),__importStar=this&&this.__importStar||(function(){var i=function(o){return i=Object.getOwnPropertyNames||function(n){var r=[];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(r[r.length]=l);return r},i(o)};return function(o){if(o&&o.__esModule)return o;var n={};if(o!=null)for(var r=i(o),l=0;l<r.length;l++)r[l]!=="default"&&__createBinding(n,o,r[l]);return __setModuleDefault(n,o),n}})(),__importDefault=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),react_native_linear_gradient_1=__importDefault(require("react-native-linear-gradient")),InspectorContext_1=require("./InspectorContext"),TouchableScale_1=__importDefault(require("../TouchableScale")),AppHeaderLogo_1=__importDefault(require("../AppHeaderLogo")),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),constants_1=require("../../constants"),constants_2=require("../../constants"),helpers_1=require("../../helpers"),NativeInspector_1=require("../../native/NativeInspector"),capture_1=require("../../capture"),toast_1=require("../../helpers/toast"),UpdateAvailableModal_1=require("./UpdateAvailableModal"),MediaPreviewModal_1=require("./MediaPreviewModal"),NetworkIcons_1=require("../NetworkIcons"),i18n_1=require("../../i18n"),InspectorHeader=react_1.default.memo(()=>{const{t:i}=(0,i18n_1.useTranslation)(),{modalHeightPercent:o,appIcon:n,selected:r,setSelected:l,selectedEvent:d,setSelectedEvent:L,selectedLog:p,setSelectedLog:E,selectedReduxSlice:w,setSelectedReduxSlice:q,selectedReduxAction:b,setSelectedReduxAction:W,reduxState:N,reduxLastActionMap:j,showHeaderInfo:se,setShowHeaderInfo:de,updateAvailable:V,latestNpmVersion:U,clearAnim:$,activePulseAnim:G,unreadPulseAnim:K,runClearAllWithAnimation:Q,settingsPage:f,setSettingsPage:z,isAboutOpen:I,setIsAboutOpen:H,resetToDefaults:J,closeModal:O,minimizeInspector:X,detailTitle:Y,activeTab:c,environment:B,visible:ce,selectedCrash:s,setSelectedCrash:Z,refreshMediaCount:_}=(0,InspectorContext_1.useInspector)(),{width:m}=(0,react_native_1.useWindowDimensions)(),e=m<360,C=m<400,pe=m>=600,[ee,D]=react_1.default.useState(!1),[te,ue]=react_1.default.useState(()=>(0,helpers_1.getAppVersionAndBuild)().formatted),[u,T]=react_1.default.useState(!1),[ie,R]=react_1.default.useState(0),g=react_1.default.useRef(null);react_1.default.useEffect(()=>{capture_1.ScreenCapture.isRecording().then(t=>{T(t)}).catch(()=>{})},[]),react_1.default.useEffect(()=>(u?(R(0),g.current=setInterval(()=>{R(t=>t+1)},1e3)):(g.current&&(clearInterval(g.current),g.current=null),R(0)),()=>{g.current&&clearInterval(g.current)}),[u]);const[k,y]=react_1.default.useState(null),re=react_1.default.useCallback(async()=>{try{(0,NativeInspector_1.triggerNativeHaptic)("light");const t=await capture_1.ScreenCapture.takeScreenshot({format:"png",quality:.9,hideInspector:!0});if(t){(0,NativeInspector_1.triggerNativeHaptic)("success");const a={id:`screenshot_${t.timestamp}.png`,type:"image",format:t.format,uri:t.uri,filename:t.uri.split("/").pop()||`screenshot_${t.timestamp}.png`,sizeBytes:t.sizeBytes,timestamp:t.timestamp,width:t.width,height:t.height};y(a),_?.().catch(()=>{}),(0,toast_1.showToast)(i("header.screenshotCaptured"))}else(0,toast_1.showToast)(i("header.screenshotFailed"))}catch{(0,toast_1.showToast)(i("header.screenshotError"))}},[_,i]),ae=react_1.default.useCallback(async()=>{try{if(u){(0,NativeInspector_1.triggerNativeHaptic)("medium");const t=await capture_1.ScreenCapture.stopRecording();if(T(!1),t){(0,NativeInspector_1.triggerNativeHaptic)("success");const a={id:`video_${t.timestamp}.${t.format}`,type:t.format==="gif"?"gif":"video",format:t.format,uri:t.uri,filename:t.uri.split("/").pop()||`video_${t.timestamp}.${t.format}`,sizeBytes:t.sizeBytes,timestamp:t.timestamp,durationMs:t.durationMs,width:t.width,height:t.height,hasAudio:t.hasAudio};y(a),_?.().catch(()=>{}),(0,toast_1.showToast)(i("header.recordingSaved",{duration:(t.durationMs/1e3).toFixed(1)}))}}else(0,NativeInspector_1.triggerNativeHaptic)("medium"),await capture_1.ScreenCapture.startRecording({fps:24,audioSource:"none"})?(T(!0),(0,toast_1.showToast)(i("header.recordingStarted"))):(0,toast_1.showToast)(i("header.recordingStartFailed"))}catch{(0,toast_1.showToast)(i("header.recordingError")),T(!1)}},[u,i]),oe=t=>{const a=Math.floor(t/60),M=t%60;return`${a.toString().padStart(2,"0")}:${M.toString().padStart(2,"0")}`},v=(0,react_1.useMemo)(()=>{const t=(B||(__DEV__?"DEV":"PROD")).trim(),a=t.toUpperCase();return a==="DEV"||a.includes("DEV")||a==="LOCAL"?{label:t,bg:`${AppColors_1.AppColors.emerald500}40`,border:`${AppColors_1.AppColors.emerald400}8C`,text:AppColors_1.AppColors.mintGreenBorder}:a==="UAT"||a==="QA"||a==="TEST"?{label:t,bg:`${AppColors_1.AppColors.amber500}47`,border:`${AppColors_1.AppColors.amber400}99`,text:AppColors_1.AppColors.amberWarmBorder}:a==="PREPROD"||a==="STAGE"||a==="STAGING"?{label:t,bg:`${AppColors_1.AppColors.purple500}47`,border:`${AppColors_1.AppColors.purple400}99`,text:AppColors_1.AppColors.violetSoftBorder}:{label:t,bg:`${AppColors_1.AppColors.rose500}40`,border:`${AppColors_1.AppColors.roseBorder}8C`,text:AppColors_1.AppColors.errorBorder}},[B]),S=c==="apis"&&r!=null||c==="analytics"&&d!=null||c==="logs"&&p!=null||c==="redux"&&(w!=null||b!=null)||c==="crash"&&s!=null,x=f!==null,A=S||x||I,le=(0,react_1.useMemo)(()=>{switch(f){case"apis":return"APIs (Network)";case"logs":return"Console Logs";case"
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(i,o,n,r){r===void 0&&(r=n);var l=Object.getOwnPropertyDescriptor(o,n);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[n]}}),Object.defineProperty(i,r,l)}):(function(i,o,n,r){r===void 0&&(r=n),i[r]=o[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}):function(i,o){i.default=o}),__importStar=this&&this.__importStar||(function(){var i=function(o){return i=Object.getOwnPropertyNames||function(n){var r=[];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(r[r.length]=l);return r},i(o)};return function(o){if(o&&o.__esModule)return o;var n={};if(o!=null)for(var r=i(o),l=0;l<r.length;l++)r[l]!=="default"&&__createBinding(n,o,r[l]);return __setModuleDefault(n,o),n}})(),__importDefault=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),react_native_linear_gradient_1=__importDefault(require("react-native-linear-gradient")),InspectorContext_1=require("./InspectorContext"),TouchableScale_1=__importDefault(require("../TouchableScale")),AppHeaderLogo_1=__importDefault(require("../AppHeaderLogo")),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),constants_1=require("../../constants"),constants_2=require("../../constants"),helpers_1=require("../../helpers"),NativeInspector_1=require("../../native/NativeInspector"),capture_1=require("../../capture"),toast_1=require("../../helpers/toast"),UpdateAvailableModal_1=require("./UpdateAvailableModal"),MediaPreviewModal_1=require("./MediaPreviewModal"),NetworkIcons_1=require("../NetworkIcons"),i18n_1=require("../../i18n"),InspectorHeader=react_1.default.memo(()=>{const{t:i}=(0,i18n_1.useTranslation)(),{modalHeightPercent:o,appIcon:n,selected:r,setSelected:l,selectedEvent:d,setSelectedEvent:L,selectedLog:p,setSelectedLog:E,selectedReduxSlice:w,setSelectedReduxSlice:q,selectedReduxAction:b,setSelectedReduxAction:W,reduxState:N,reduxLastActionMap:j,showHeaderInfo:se,setShowHeaderInfo:de,updateAvailable:V,latestNpmVersion:U,clearAnim:$,activePulseAnim:G,unreadPulseAnim:K,runClearAllWithAnimation:Q,settingsPage:f,setSettingsPage:z,isAboutOpen:I,setIsAboutOpen:H,resetToDefaults:J,closeModal:O,minimizeInspector:X,detailTitle:Y,activeTab:c,environment:B,visible:ce,selectedCrash:s,setSelectedCrash:Z,refreshMediaCount:_}=(0,InspectorContext_1.useInspector)(),{width:m}=(0,react_native_1.useWindowDimensions)(),e=m<360,C=m<400,pe=m>=600,[ee,D]=react_1.default.useState(!1),[te,ue]=react_1.default.useState(()=>(0,helpers_1.getAppVersionAndBuild)().formatted),[u,T]=react_1.default.useState(!1),[ie,R]=react_1.default.useState(0),g=react_1.default.useRef(null);react_1.default.useEffect(()=>{capture_1.ScreenCapture.isRecording().then(t=>{T(t)}).catch(()=>{})},[]),react_1.default.useEffect(()=>(u?(R(0),g.current=setInterval(()=>{R(t=>t+1)},1e3)):(g.current&&(clearInterval(g.current),g.current=null),R(0)),()=>{g.current&&clearInterval(g.current)}),[u]);const[k,y]=react_1.default.useState(null),re=react_1.default.useCallback(async()=>{try{(0,NativeInspector_1.triggerNativeHaptic)("light");const t=await capture_1.ScreenCapture.takeScreenshot({format:"png",quality:.9,hideInspector:!0});if(t){(0,NativeInspector_1.triggerNativeHaptic)("success");const a={id:`screenshot_${t.timestamp}.png`,type:"image",format:t.format,uri:t.uri,filename:t.uri.split("/").pop()||`screenshot_${t.timestamp}.png`,sizeBytes:t.sizeBytes,timestamp:t.timestamp,width:t.width,height:t.height};y(a),_?.().catch(()=>{}),(0,toast_1.showToast)(i("header.screenshotCaptured"))}else(0,toast_1.showToast)(i("header.screenshotFailed"))}catch{(0,toast_1.showToast)(i("header.screenshotError"))}},[_,i]),ae=react_1.default.useCallback(async()=>{try{if(u){(0,NativeInspector_1.triggerNativeHaptic)("medium");const t=await capture_1.ScreenCapture.stopRecording();if(T(!1),t){(0,NativeInspector_1.triggerNativeHaptic)("success");const a={id:`video_${t.timestamp}.${t.format}`,type:t.format==="gif"?"gif":"video",format:t.format,uri:t.uri,filename:t.uri.split("/").pop()||`video_${t.timestamp}.${t.format}`,sizeBytes:t.sizeBytes,timestamp:t.timestamp,durationMs:t.durationMs,width:t.width,height:t.height,hasAudio:t.hasAudio};y(a),_?.().catch(()=>{}),(0,toast_1.showToast)(i("header.recordingSaved",{duration:(t.durationMs/1e3).toFixed(1)}))}}else(0,NativeInspector_1.triggerNativeHaptic)("medium"),await capture_1.ScreenCapture.startRecording({fps:24,audioSource:"none"})?(T(!0),(0,toast_1.showToast)(i("header.recordingStarted"))):(0,toast_1.showToast)(i("header.recordingStartFailed"))}catch{(0,toast_1.showToast)(i("header.recordingError")),T(!1)}},[u,i]),oe=t=>{const a=Math.floor(t/60),M=t%60;return`${a.toString().padStart(2,"0")}:${M.toString().padStart(2,"0")}`},v=(0,react_1.useMemo)(()=>{const t=(B||(__DEV__?"DEV":"PROD")).trim(),a=t.toUpperCase();return a==="DEV"||a.includes("DEV")||a==="LOCAL"?{label:t,bg:`${AppColors_1.AppColors.emerald500}40`,border:`${AppColors_1.AppColors.emerald400}8C`,text:AppColors_1.AppColors.mintGreenBorder}:a==="UAT"||a==="QA"||a==="TEST"?{label:t,bg:`${AppColors_1.AppColors.amber500}47`,border:`${AppColors_1.AppColors.amber400}99`,text:AppColors_1.AppColors.amberWarmBorder}:a==="PREPROD"||a==="STAGE"||a==="STAGING"?{label:t,bg:`${AppColors_1.AppColors.purple500}47`,border:`${AppColors_1.AppColors.purple400}99`,text:AppColors_1.AppColors.violetSoftBorder}:{label:t,bg:`${AppColors_1.AppColors.rose500}40`,border:`${AppColors_1.AppColors.roseBorder}8C`,text:AppColors_1.AppColors.errorBorder}},[B]),S=c==="apis"&&r!=null||c==="analytics"&&d!=null||c==="logs"&&p!=null||c==="redux"&&(w!=null||b!=null)||c==="crash"&&s!=null,x=f!==null,A=S||x||I,le=(0,react_1.useMemo)(()=>{switch(f){case"apis":return"APIs (Network)";case"logs":return"Console Logs";case"crash":return"Crash Protection";case"analytics":return"Analytics Logger";case"redux":return"Redux Inspector";default:return"Settings & Modules"}},[f]),P=(0,react_1.useMemo)(()=>react_native_1.Platform.OS==="ios"?o>=98?m>=390?50:44:0:react_native_1.Platform.OS==="android"&&o>=98?react_native_1.StatusBar.currentHeight||24:0,[o,m]),h=e?28:C?30:32,ne=e?42:C?46:50;return<>
|
|
2
2
|
<react_native_1.View style={[styles_1.default.headerGradient,{minHeight:(e?58:62)+P}]}>
|
|
3
3
|
|
|
4
4
|
<react_native_linear_gradient_1.default colors={[AppColors_1.AppColors.indigo600,AppColors_1.AppColors.violet600]}start={{x:0,y:0}}end={{x:1,y:1}}style={{position:"absolute",top:0,left:0,right:0,bottom:0,borderTopLeftRadius:20,borderTopRightRadius:20}}pointerEvents="none"/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(o,t,l,i){i===void 0&&(i=l);var a=Object.getOwnPropertyDescriptor(t,l);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(o,i,a)}):(function(o,t,l,i){i===void 0&&(i=l),o[i]=t[l]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),__importStar=this&&this.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(l){var i=[];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(i[i.length]=a);return i},o(t)};return function(t){if(t&&t.__esModule)return t;var l={};if(t!=null)for(var i=o(t),a=0;a<i.length;a++)i[a]!=="default"&&__createBinding(l,t,i[a]);return __setModuleDefault(l,t),l}})(),__importDefault=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),i18n_1=require("../../i18n"),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),HighlightText_1=__importDefault(require("../HighlightText")),JsonViewer_1=__importDefault(require("../JsonViewer")),CopyButton_1=__importDefault(require("../CopyButton")),SegmentedTabs_1=__importDefault(require("../SegmentedTabs")),NetworkIcons_1=require("../NetworkIcons"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),styles_1=__importDefault(require("../../styles")),helpers_1=require("../../helpers"),getRelativeTime=o=>{const l=Date.now()-o,i=Math.floor(l/1e3),a=Math.floor(i/60),
|
|
2
|
-
`).map(e=>e.trim()).filter(e=>e.length>0).map((e,n)=>(0,helpers_1.parseStackLine)(e,n===0)):[],[
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(o,t,l,i){i===void 0&&(i=l);var a=Object.getOwnPropertyDescriptor(t,l);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(o,i,a)}):(function(o,t,l,i){i===void 0&&(i=l),o[i]=t[l]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),__importStar=this&&this.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(l){var i=[];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(i[i.length]=a);return i},o(t)};return function(t){if(t&&t.__esModule)return t;var l={};if(t!=null)for(var i=o(t),a=0;a<i.length;a++)i[a]!=="default"&&__createBinding(l,t,i[a]);return __setModuleDefault(l,t),l}})(),__importDefault=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),i18n_1=require("../../i18n"),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),HighlightText_1=__importDefault(require("../HighlightText")),JsonViewer_1=__importDefault(require("../JsonViewer")),CopyButton_1=__importDefault(require("../CopyButton")),SegmentedTabs_1=__importDefault(require("../SegmentedTabs")),NetworkIcons_1=require("../NetworkIcons"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),styles_1=__importDefault(require("../../styles")),helpers_1=require("../../helpers"),getRelativeTime=o=>{const l=Date.now()-o,i=Math.floor(l/1e3),a=Math.floor(i/60),C=Math.floor(a/60),b=Math.floor(C/24);return i<60?`${i}s ago`:a<60?`${a}m ago`:C<24?`${C}h ago`:`${b}d ago`},LogDetail=react_1.default.memo(()=>{const{t:o}=(0,i18n_1.useTranslation)(),{selectedLog:t}=(0,InspectorContext_1.useInspector)(),[l,i]=(0,react_1.useState)("output"),[a,C]=(0,react_1.useState)(""),[b,v]=(0,react_1.useState)("raw"),p=(0,react_1.useMemo)(()=>t?(0,helpers_1.getJsonContent)(t.message):null,[t]),[d,h]=(0,react_1.useState)("structured"),[m,V]=(0,react_1.useState)("caller"),[_,k]=(0,react_1.useState)("app"),y=(0,react_1.useMemo)(()=>t?m==="error"&&t.errorStack?t.errorStack:t.stack||t.caller||"":"",[t,m]),s=(0,react_1.useMemo)(()=>y?y.split(`
|
|
2
|
+
`).map(e=>e.trim()).filter(e=>e.length>0).map((e,n)=>(0,helpers_1.parseStackLine)(e,n===0)):[],[y]),u=(0,react_1.useMemo)(()=>s.filter(e=>e.frameType==="app"||!e.isRuntimeNoise),[s]),x=(0,react_1.useMemo)(()=>_==="app"&&u.length>0?u:s,[_,u,s]),r=(0,react_1.useMemo)(()=>t?u.length>0?u[0]:t.caller&&t.caller!=="Unknown"?(0,helpers_1.parseStackLine)(t.caller,!0):s.length>0?s[0]:null:null,[t,u,s]);if(!t)return null;const g=AppColors_1.AppColors.primaryLight!==AppColors_1.AppColors.white,f=(()=>{const e=(t.type||"log").toLowerCase(),n=(t.sourceMethod||e).toLowerCase();return e==="error"||n==="error"?{border:AppColors_1.AppColors.red500,badgeBg:AppColors_1.AppColors.red100,badgeText:AppColors_1.AppColors.redErrorText,label:"ERROR",methodBorder:AppColors_1.AppColors.errorBorder,methodBg:AppColors_1.AppColors.red100,methodText:AppColors_1.AppColors.redErrorText}:e==="warn"||n==="warn"?{border:AppColors_1.AppColors.amber500,badgeBg:AppColors_1.AppColors.amber100,badgeText:AppColors_1.AppColors.amber800Warm,label:"WARN",methodBorder:AppColors_1.AppColors.amber200,methodBg:AppColors_1.AppColors.amber100,methodText:AppColors_1.AppColors.amber800Warm}:e==="debug"||n==="debug"?{border:AppColors_1.AppColors.violet500,badgeBg:AppColors_1.AppColors.purple100,badgeText:AppColors_1.AppColors.violet600,label:"DEBUG",methodBorder:AppColors_1.AppColors.purple200,methodBg:AppColors_1.AppColors.purple100,methodText:AppColors_1.AppColors.violet600}:e==="info"||n==="info"?{border:AppColors_1.AppColors.sky500,badgeBg:AppColors_1.AppColors.sky100,badgeText:AppColors_1.AppColors.sky600,label:"INFO",methodBorder:AppColors_1.AppColors.sky400,methodBg:AppColors_1.AppColors.sky100,methodText:AppColors_1.AppColors.sky600}:{border:AppColors_1.AppColors.indigo500,badgeBg:AppColors_1.AppColors.indigo50,badgeText:AppColors_1.AppColors.indigo600Alt,label:"LOG",methodBorder:AppColors_1.AppColors.indigo400,methodBg:AppColors_1.AppColors.indigo50,methodText:AppColors_1.AppColors.indigo600Alt}})(),T=t.rawArgs!=null&&t.rawArgs.length>1,S=!!(t.stack&&t.stack.trim().length>0),B=[{key:"output",label:o("console.tabOutput"),icon:e=><NetworkIcons_1.TerminalIcon color={e?AppColors_1.AppColors.white:AppColors_1.AppColors.grayTextWeak}size={12}/>},...T?[{key:"arguments",label:o("console.tabArgs",{count:t.rawArgs?.length}),icon:e=><NetworkIcons_1.RequestIcon color={e?AppColors_1.AppColors.white:AppColors_1.AppColors.grayTextWeak}size={12}/>}]:[],...S?[{key:"stack",label:o("console.tabStack"),icon:e=><NetworkIcons_1.LayersIcon color={e?AppColors_1.AppColors.white:AppColors_1.AppColors.grayTextWeak}size={12}/>}]:[],{key:"metadata",label:o("console.tabMetadata"),icon:e=><NetworkIcons_1.InfoCircleIcon color={e?AppColors_1.AppColors.white:AppColors_1.AppColors.grayTextWeak}size={12}/>}];return<react_native_1.View style={{flex:1}}>
|
|
3
3
|
|
|
4
4
|
<react_native_1.View style={styles_1.default.detailInfoBar}>
|
|
5
5
|
<react_native_1.View style={{flexDirection:"column",gap:10}}>
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
<react_native_1.View style={[styles_1.default.detailSearchRow,{marginBottom:0}]}>
|
|
103
103
|
<react_native_1.View style={[styles_1.default.detailSearchBox,{backgroundColor:g?`${AppColors_1.AppColors.brandPurple}10`:AppColors_1.AppColors.purpleShade50,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor}]}>
|
|
104
104
|
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak}size={15}/>
|
|
105
|
-
<react_native_1.TextInput placeholder="Search in log details..."placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={a}onChangeText={
|
|
106
|
-
{a.length>0&&<react_native_1.Pressable onPress={()=>
|
|
105
|
+
<react_native_1.TextInput placeholder="Search in log details..."placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={a}onChangeText={C}style={styles_1.default.detailSearchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
106
|
+
{a.length>0&&<react_native_1.Pressable onPress={()=>C("")}hitSlop={10}style={{padding:6}}>
|
|
107
107
|
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak}size={13}/>
|
|
108
108
|
</react_native_1.Pressable>}
|
|
109
109
|
</react_native_1.View>
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
</react_native_1.Pressable>
|
|
192
192
|
</react_native_1.View>
|
|
193
193
|
|
|
194
|
-
<CopyButton_1.default value={
|
|
194
|
+
<CopyButton_1.default value={y}label={o("console.fullStackTrace")}/>
|
|
195
195
|
</react_native_1.View>
|
|
196
196
|
</react_native_1.View>
|
|
197
197
|
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
{o("console.noStackAvailable")}
|
|
260
260
|
</react_native_1.Text>}
|
|
261
261
|
</react_native_1.View>:<react_native_1.View style={{backgroundColor:AppColors_1.AppColors.primaryLight,padding:12}}>
|
|
262
|
-
{
|
|
262
|
+
{y.split(`
|
|
263
263
|
`).filter(e=>e.trim().length>0).map((e,n)=><react_native_1.View key={n}style={{flexDirection:"row",alignItems:"flex-start",paddingVertical:2}}>
|
|
264
264
|
<react_native_1.Text style={{width:28,textAlign:"right",paddingRight:8,fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.grayTextWeak,lineHeight:17}}>
|
|
265
265
|
{n+1}
|