react-native-inapp-inspector 2.5.13 → 2.5.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/README.md +0 -8
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +118 -31
- package/dist/commonjs/components/Inspector/ConsoleExportModal.js +1 -1
- package/dist/commonjs/components/Inspector/ConsoleTab.js +7 -7
- package/dist/commonjs/components/Inspector/FabLauncher.js +3 -3
- package/dist/commonjs/components/Inspector/InspectorHeader.js +30 -30
- package/dist/commonjs/components/Inspector/MainScreen.js +38 -75
- package/dist/commonjs/components/Inspector/NetworkExportModal.js +4 -4
- package/dist/commonjs/components/Inspector/NetworkTab.js +51 -51
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +17 -16
- package/dist/commonjs/components/Inspector/SettingsPanel.js +40 -41
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +34 -3
- package/dist/commonjs/components/Inspector/TabBar.js +9 -15
- package/dist/commonjs/components/LogCard.js +7 -7
- package/dist/commonjs/components/SkeletonPlaceholder.d.ts +3 -0
- package/dist/commonjs/components/SkeletonPlaceholder.js +34 -3
- package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
- package/dist/commonjs/constants/telemetryConfig.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/remoteConfig.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.js +14 -14
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/native/NativeInspector.d.ts +2 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/commonjs/styles/AppFonts.d.ts +4 -0
- package/dist/commonjs/styles/AppFonts.js +1 -1
- package/dist/commonjs/styles/index.d.ts +2 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +0 -2
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +1 -1
- package/dist/esm/components/Inspector/ConsoleExportModal.js +1 -1
- package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
- package/dist/esm/components/Inspector/FabLauncher.js +42 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +50 -50
- package/dist/esm/components/Inspector/MainScreen.js +87 -124
- package/dist/esm/components/Inspector/NetworkExportModal.js +1 -1
- package/dist/esm/components/Inspector/NetworkTab.js +83 -83
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +23 -22
- package/dist/esm/components/Inspector/SettingsPanel.js +106 -107
- package/dist/esm/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +42 -11
- package/dist/esm/components/Inspector/TabBar.js +35 -41
- package/dist/esm/components/LogCard.js +53 -53
- package/dist/esm/components/SkeletonPlaceholder.d.ts +3 -0
- package/dist/esm/components/SkeletonPlaceholder.js +42 -11
- package/dist/esm/constants/telemetryConfig.d.ts +3 -3
- package/dist/esm/constants/telemetryConfig.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/remoteConfig.js +1 -1
- package/dist/esm/helpers/shareFormatter.js +14 -14
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/native/NativeInspector.d.ts +2 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/esm/styles/AppFonts.d.ts +4 -0
- package/dist/esm/styles/AppFonts.js +1 -1
- package/dist/esm/styles/index.d.ts +2 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +0 -2
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +1 -1
- package/ios/NetworkInspectorModule.mm +288 -325
- package/package.json +1 -1
- package/src/native/NativeInspector.ts +30 -0
- package/src/native/NativeNetworkInspector.ts +2 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/dist/commonjs/components/Inspector/BoxModelVisualizer.d.ts +0 -8
- package/dist/commonjs/components/Inspector/BoxModelVisualizer.js +0 -76
- package/dist/commonjs/components/Inspector/DebuggingTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/DebuggingTab.js +0 -197
- package/dist/commonjs/components/Inspector/UiA11yAuditPanel.d.ts +0 -7
- package/dist/commonjs/components/Inspector/UiA11yAuditPanel.js +0 -97
- package/dist/commonjs/components/Inspector/UiInspectorDetail.d.ts +0 -2
- package/dist/commonjs/components/Inspector/UiInspectorDetail.js +0 -485
- package/dist/commonjs/components/Inspector/UiInspectorOverlay.d.ts +0 -2
- package/dist/commonjs/components/Inspector/UiInspectorOverlay.js +0 -199
- package/dist/commonjs/components/Inspector/UiInspectorTab.d.ts +0 -2
- package/dist/commonjs/components/Inspector/UiInspectorTab.js +0 -117
- package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.d.ts +0 -10
- package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.js +0 -148
- package/dist/commonjs/components/Inspector/index.d.ts +0 -28
- package/dist/commonjs/components/Inspector/index.js +0 -1
- package/dist/commonjs/customHooks/uiInspectorManager.d.ts +0 -22
- package/dist/commonjs/customHooks/uiInspectorManager.js +0 -1
- package/dist/commonjs/helpers/uiInspectorEngine.d.ts +0 -62
- package/dist/commonjs/helpers/uiInspectorEngine.js +0 -19
- package/dist/esm/components/Inspector/BoxModelVisualizer.d.ts +0 -8
- package/dist/esm/components/Inspector/BoxModelVisualizer.js +0 -76
- package/dist/esm/components/Inspector/DebuggingTab.d.ts +0 -3
- package/dist/esm/components/Inspector/DebuggingTab.js +0 -197
- package/dist/esm/components/Inspector/UiA11yAuditPanel.d.ts +0 -7
- package/dist/esm/components/Inspector/UiA11yAuditPanel.js +0 -97
- package/dist/esm/components/Inspector/UiInspectorDetail.d.ts +0 -2
- package/dist/esm/components/Inspector/UiInspectorDetail.js +0 -422
- package/dist/esm/components/Inspector/UiInspectorOverlay.d.ts +0 -2
- package/dist/esm/components/Inspector/UiInspectorOverlay.js +0 -138
- package/dist/esm/components/Inspector/UiInspectorTab.d.ts +0 -2
- package/dist/esm/components/Inspector/UiInspectorTab.js +0 -117
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.d.ts +0 -10
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.js +0 -148
- package/dist/esm/components/Inspector/index.d.ts +0 -28
- package/dist/esm/components/Inspector/index.js +0 -1
- package/dist/esm/customHooks/uiInspectorManager.d.ts +0 -22
- package/dist/esm/customHooks/uiInspectorManager.js +0 -1
- package/dist/esm/helpers/uiInspectorEngine.d.ts +0 -48
- package/dist/esm/helpers/uiInspectorEngine.js +0 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useCallback as de,useEffect as Oe,useMemo as G,useRef as We,useState as R}from"react";import{Modal as Ct,View as T,Text as C,TextInput as Ne,StyleSheet as Me,Pressable as Tt,Animated as N,Easing as _,ScrollView as St,Share as qe}from"react-native";import D from"../TouchableScale";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as S}from"../../styles/AppFonts";import{ExportIcon as Te,ShareIcon as Bt,SaveIcon as Rt,CopyIcon as Ft,CloseWhite as It,CircleCheckIcon as $e,CircleXIcon as Vt,ClockIcon as At,RequestIcon as zt,ResponseIcon as Dt,LayersIcon as Ue,FilterIcon as Ht,CheckIcon as Pt,ZapIcon as Et,PenIcon as Lt}from"../NetworkIcons";import{triggerNativeHaptic as L,writeNativeExportFile as Ge,shareNativeFile as Ke}from"../../native/NativeInspector";import{copyToClipboard as Ot,showToast as X}from"../../helpers";import{formatNetworkLogsExport as Wt,estimateNetworkLogsExportSize as Nt,generateNetworkLogsFilename as Mt}from"../../helpers/shareFormatter";import{useTranslation as qt}from"../../i18n";export const NetworkExportModal=({visible:ce,onClose:ee,filteredLogs:te,allLogs:oe})=>{const{t:k}=qt(),[$,re]=R("config"),[M,Se]=R("filtered"),[q,ke]=R("all"),[H,ge]=R("all"),[ue,Be]=R("50"),[U,Re]=R(""),[P,ve]=R("txt"),[pe,Fe]=R(!
|
|
1
|
+
import{useCallback as de,useEffect as Oe,useMemo as G,useRef as We,useState as R}from"react";import{Modal as Ct,View as T,Text as C,TextInput as Ne,StyleSheet as Me,Pressable as Tt,Animated as N,Easing as _,ScrollView as St,Share as qe}from"react-native";import D from"../TouchableScale";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as S}from"../../styles/AppFonts";import{ExportIcon as Te,ShareIcon as Bt,SaveIcon as Rt,CopyIcon as Ft,CloseWhite as It,CircleCheckIcon as $e,CircleXIcon as Vt,ClockIcon as At,RequestIcon as zt,ResponseIcon as Dt,LayersIcon as Ue,FilterIcon as Ht,CheckIcon as Pt,ZapIcon as Et,PenIcon as Lt}from"../NetworkIcons";import{triggerNativeHaptic as L,writeNativeExportFile as Ge,shareNativeFile as Ke}from"../../native/NativeInspector";import{copyToClipboard as Ot,showToast as X}from"../../helpers";import{formatNetworkLogsExport as Wt,estimateNetworkLogsExportSize as Nt,generateNetworkLogsFilename as Mt}from"../../helpers/shareFormatter";import{useTranslation as qt}from"../../i18n";export const NetworkExportModal=({visible:ce,onClose:ee,filteredLogs:te,allLogs:oe})=>{const{t:k}=qt(),[$,re]=R("config"),[M,Se]=R("filtered"),[q,ke]=R("all"),[H,ge]=R("all"),[ue,Be]=R("50"),[U,Re]=R(""),[P,ve]=R("txt"),[pe,Fe]=R(!0),[me,Ie]=R(!0),[ye,Ve]=R(!0),[fe,Ae]=R(!0),[he,ze]=R(!0),[xe,De]=R(!0),[we,He]=R(!0),[Qe,be]=R(0),[Je,Ce]=R(0),[O,Pe]=R(""),[E,Ee]=R(""),[Xe,Le]=R(0),K=We(new N.Value(0)).current,ie=We(new N.Value(1)).current,j=G(()=>{if(!U||U.trim().length===0)return{isValid:!0,error:null,regex:null};try{return{isValid:!0,error:null,regex:new RegExp(U.trim(),"i")}}catch(o){return{isValid:!1,error:o?.message||"Invalid pattern",regex:null}}},[U]),ne=G(()=>({includeRequestHeaders:pe,includeRequestBody:me,includeResponseHeaders:ye,includeResponseBody:fe,includeCurlCommand:he,includeTimestamps:xe,includeAppInfo:we,ignorePattern:H==="custom"&&j.isValid?U.trim():void 0}),[pe,me,ye,fe,he,xe,we,H,j.isValid,U]);Oe(()=>{if($==="progress"){const o=N.loop(N.sequence([N.timing(ie,{toValue:1.05,duration:600,easing:_.inOut(_.ease),useNativeDriver:!0}),N.timing(ie,{toValue:1,duration:600,easing:_.inOut(_.ease),useNativeDriver:!0})]));return o.start(),()=>o.stop()}},[$,ie]),Oe(()=>{ce&&(re("config"),ge("all"),ke("all"),ve("txt"),Be("50"),Re(""),Fe(!1),Ie(!1),Ve(!1),Ae(!1),ze(!1),De(!1),He(!1),be(0),Ce(0),Pe(""),Ee(""),Le(0),K.setValue(0))},[ce,K]);const Q=G(()=>M==="filtered"?te:oe,[M,te,oe]),J=G(()=>{let o=0,B=0,F=0,W=0,I=0;return Q.forEach(V=>{const A=typeof V.status=="number"?V.status:parseInt(String(V.status),10);V.status===0||V.status==null||!isNaN(A)&&A>=400?B++:!isNaN(A)&&A>=200&&A<400&&o++,(V.duration||0)>=500&&F++;const se=(V.method||"").toUpperCase();se==="POST"&&W++,se==="GET"&&I++}),{all:Q.length,success:o,error:B,slow:F,post:W,get:I}},[Q]),Y=G(()=>q==="all"?Q:Q.filter(o=>{const B=typeof o.status=="number"?o.status:parseInt(String(o.status),10),F=o.status===0||o.status==null||!isNaN(B)&&B>=400,W=!isNaN(B)&&B>=200&&B<400,I=(o.duration||0)>=500,V=(o.method||"").toUpperCase();return q==="success"?W:q==="error"?F:q==="slow"?I:q==="POST"?V==="POST":q==="GET"?V==="GET":!0}),[Q,q]),{selectedLogs:z,ignoredCount:le}=G(()=>{if(Y.length===0)return{selectedLogs:[],ignoredCount:0};let B=Y,F=0;if(H==="custom"&&j.regex){const I=j.regex,V=B.length;B=B.filter(A=>{const se=A.url||"",ot=A.method||"",rt=A.client||"",it=A.request?JSON.stringify(A.request):"",nt=A.response?JSON.stringify(A.response):"";return!I.test(se)&&!I.test(ot)&&!I.test(rt)&&!I.test(it)&&!I.test(nt)}),F=V-B.length}let W=B.length;if(H==="all")W=B.length;else if(H==="custom"){const I=parseInt(ue,10);W=isNaN(I)||I<=0?B.length:Math.min(I,B.length)}return{selectedLogs:B.slice(-W),ignoredCount:F}},[Y,H,ue,j.regex]),ae=G(()=>Nt(z,P,ne),[z,P,ne]),Z=o=>o<=0?"0 KB":o<1024?`${(o/1024).toFixed(2)} KB`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(2)} MB`,Ye=de(()=>{if(z.length===0){X(k("network.noLogsToExport","No API requests available to export"));return}L("medium"),re("progress"),be(0),Ce(0),K.setValue(0);const o=z.length,B=Math.max(1,Math.floor(o/10));let F=0;const W=setInterval(()=>{F=Math.min(F+B,o);const I=F/o;be(Math.round(I*100)),Ce(F),N.timing(K,{toValue:I,duration:120,easing:_.linear,useNativeDriver:!1}).start(),F>=o&&(clearInterval(W),setTimeout(()=>{const V=Wt(z,P,ne),A=Mt(P);Pe(V),Ee(A),Le(V.length),re("complete"),L("heavy")},180))},45)},[z,P,ne,K,k]),Ze=de(async()=>{if(O){L("light");try{const o=await Ge(E,O);if(o&&await Ke(o,P==="json"?"application/json":"text/plain",E))return;await qe.share({title:E,message:O,url:o||void 0},{dialogTitle:`Share ${E}`,subject:E})}catch(o){o?.message!=="User did not share"&&X(o?.message||"Failed to open share sheet")}}},[O,E,P]),_e=de(async()=>{if(O){L("medium");try{const o=await Ge(E,O);if(o&&await Ke(o,P==="json"?"application/json":"text/plain",`Save ${E}`)){X(k("network.savePromptOpened","Opened save to disk dialog"));return}await qe.share({title:`Save ${E}`,message:O,url:o||void 0},{dialogTitle:`Save to Disk (${E})`,subject:E}),X(k("network.savePromptOpened","Opened save to disk dialog"))}catch(o){o?.message!=="User did not share"&&X(o?.message||"Save error")}}},[O,E,P,k]),et=de(()=>{O&&(L("light"),Ot(O,"API Network Logs"),X(k("network.copiedLogs","API requests copied to clipboard!")))},[O,k]),tt=te.length!==oe.length;return<Ct visible={ce}transparent animationType="slide"onRequestClose={ee}>
|
|
2
2
|
<T style={e.overlay}>
|
|
3
3
|
<Tt style={e.backdrop}onPress={ee}/>
|
|
4
4
|
|
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
import
|
|
2
|
-
<Je pageName={e.pageName}color={e.color}stats={e.stats}activeFilters={e.activeFilters}onToggleFilter={
|
|
3
|
-
</
|
|
4
|
-
<S style={
|
|
5
|
-
<S style={[
|
|
1
|
+
import q,{useCallback as ne,useMemo as D,useRef as We}from"react";import{FlatList as _e,Pressable as Qe,ScrollView as Ue,Text as V,TextInput as Ke,View as S}from"react-native";import{useInspector as Xe}from"./InspectorContext";import $ from"../TouchableScale";import Fe from"../AnimatedEntrance";import Je from"../DomainHeader";import Ye from"../LogCard";import Ze from"../EmptyState";import So from"../EndOfListFooter";import Co from"./NetworkFilterModal";import To from"./NetworkExportModal";import b from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import{METHOD_COLORS as Le}from"../../constants";import{isUrlHidden as xo}from"../../helpers";import{useTranslation as zo}from"../../i18n";import{SearchIcon as Vo,ClearIcon as Io,TrashIcon as Fo,SortArrowIcon as Lo,FilterIcon as Ro,ChevronIcon as Bo,CheckIcon as Po,CircleCheckIcon as Eo,CircleXIcon as $o,LayersIcon as Re,ClockIcon as Mo,RequestIcon as Ao,ResponseIcon as Do,AtomIcon as No,ExportIcon as Oo}from"../NetworkIcons";const vo=q.memo(()=>{const{groupedData:K,loadMoreSection:pe,search:I,setSearch:X,setSearchScope:ge,quickFilter:J,setQuickFilter:de,handleDelete:Be,isGroupByPageEnabled:G,setIsGroupByPageEnabled:Pe,selectedLogs:Y,sortOrder:Ee,setSortOrder:Z,statusFilters:F,setStatusFilters:W,methodFilters:L,setMethodFilters:_,latencyFilter:N,setLatencyFilter:ee,protocolFilter:O,setProtocolFilter:oe,networkSortBy:v,setNetworkSortBy:te,filteredLogs:R,logs:re,hiddenUrlPatterns:le,toggleSectionFilter:he,toggleSectionCollapse:me,minStart:fe,totalRange:ye,newLogIds:we,toggleSelect:Se,setSelected:Ce,maxNetworkLogs:ce}=Xe(),{t:j}=zo(),be=We(null),[$e,Te]=q.useState(!1),[Me,xe]=q.useState(!1),[ze,Ve]=q.useState(!1),[ie,ke]=q.useState(ce||50),ae=!!(I&&I.trim().length>0),B=G&&!ae;q.useEffect(()=>{ke(ce||50),ae&&be.current?.scrollToOffset({offset:0,animated:!1})},[I,J,ce,ae]);const Ae=D(()=>B?K:K.slice(0,ie),[B,K,ie]),De=ne(e=>e?.id?String(e.id):"",[]),M=D(()=>F.size>0&&!F.has("all")||L.size>0&&!L.has("all")||N!=="all"||O!=="all"||v!=="time_desc",[F,L,N,O,v]),Ne=D(()=>{let e=0;return F.size>0&&!F.has("all")&&(e+=F.size),L.size>0&&!L.has("all")&&(e+=L.size),N!=="all"&&e++,O!=="all"&&e++,v!=="time_desc"&&e++,e},[F,L,N,O,v]),Oe=D(()=>({statusCodes:F.size>0?new Set(F):new Set(["all"]),methods:L.size>0?new Set(L):new Set(["all"]),latency:N,protocol:O,sortBy:v}),[F,L,N,O,v]),ve=ne(e=>{e.statusCodes.has("all")||e.statusCodes.size===0?W(new Set):W(new Set(e.statusCodes)),e.methods.has("all")||e.methods.size===0?_(new Set):_(new Set([...e.methods].map(T=>T))),ee(e.latency||"all"),oe(e.protocol||"all"),te(e.sortBy||"time_desc"),e.sortBy==="time_asc"?Z("oldest"):Z("newest")},[W,_,ee,oe,te,Z]),Q=D(()=>!le||le.length===0?re:re.filter(e=>!xo(e.url,le)),[re,le]),P=D(()=>{let e=0,T=0,x=0,z=0,U=0,se=0;return Q.forEach(C=>{const A=typeof C.status=="number"?C.status:parseInt(String(C.status),10);C.status===0||C.status==null||!isNaN(A)&&A>=400?e++:!isNaN(A)&&A>=200&&A<400&&T++,(C.duration||0)>=500&&x++;const E=(C.method||"").toUpperCase();E==="POST"&&z++,E==="GET"&&U++;const ue=(C.url||"").toLowerCase(),H=(C.client||"").toLowerCase();(ue.includes("graphql")||H.includes("graphql")||H.includes("apollo"))&&se++}),{all:Q.length,errors:e,success:T,slow:x,post:z,get:U,graphql:se}},[Q]),He=D(()=>[{id:"all",label:"All",count:P.all,color:o.purple},{id:"errors",label:"Errors",count:P.errors,color:o.errorColor},{id:"success",label:"2xx OK",count:P.success,color:o.greenColor},{id:"slow",label:"Slow >500ms",count:P.slow,color:o.warningIconGold},{id:"POST",label:"POST",count:P.post,color:Le.POST||o.blue500},{id:"GET",label:"GET",count:P.get,color:Le.GET||o.emerald500},{id:"graphql",label:"GraphQL",count:P.graphql,color:o.graphqlPink}],[P]),Ie=ne(e=>{e&&Ce(e)},[Ce]),qe=ne(({item:e,index:T})=>{if(e.type==="header")return<Fe index={T}distance={8}>
|
|
2
|
+
<Je pageName={e.pageName}color={e.color}stats={e.stats}activeFilters={e.activeFilters}onToggleFilter={he}isCollapsed={e.isCollapsed}onToggleCollapse={me}isFirst={e.isFirst}timestamp={e.timestamp}/>
|
|
3
|
+
</Fe>;if(e.type==="loadMore"){const{pageName:se,color:C,remainingCount:A,totalCount:E,loadedCount:ue,loadMoreStep:H,hasMore:Ge}=e;return<S style={[b.treeNodeRow,b.treeNodeRowLast]}>
|
|
4
|
+
<S style={b.treeLines}>
|
|
5
|
+
<S style={[b.modernTreeLine,{borderColor:C},b.modernTreeLineLast]}/>
|
|
6
6
|
</S>
|
|
7
|
-
<S style={
|
|
8
|
-
{Ge?<$ onPress={()=>
|
|
7
|
+
<S style={b.treeCardWrapper}>
|
|
8
|
+
{Ge?<$ onPress={()=>pe(se,H||10)}hitSlop={6}style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:9,paddingHorizontal:12,marginVertical:3,marginRight:2,borderRadius:10,backgroundColor:`${C}14`,borderWidth:1.5,borderColor:`${C}40`,shadowColor:C,shadowOffset:{width:0,height:1.5},shadowOpacity:.1,shadowRadius:3,elevation:2}}>
|
|
9
9
|
<S style={{flexDirection:"row",alignItems:"center",gap:8}}>
|
|
10
|
-
<S style={{width:22,height:22,borderRadius:11,backgroundColor:
|
|
10
|
+
<S style={{width:22,height:22,borderRadius:11,backgroundColor:C,alignItems:"center",justifyContent:"center",shadowColor:C,shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:2,elevation:1}}>
|
|
11
11
|
<Bo color={o.white}size={9}direction="down"/>
|
|
12
12
|
</S>
|
|
13
13
|
<S>
|
|
14
|
-
<
|
|
15
|
-
{
|
|
16
|
-
</
|
|
17
|
-
<
|
|
18
|
-
Showing {
|
|
19
|
-
</
|
|
14
|
+
<V style={{fontFamily:k.interBold,fontSize:12,color:C}}>
|
|
15
|
+
{j("footer.loadMoreRequests",{count:H,defaultValue:`Load ${H} More Requests`})}
|
|
16
|
+
</V>
|
|
17
|
+
<V style={{fontFamily:k.interRegular,fontSize:9.5,color:o.grayTextWeak,marginTop:1}}>
|
|
18
|
+
Showing {ue} of {E} requests
|
|
19
|
+
</V>
|
|
20
20
|
</S>
|
|
21
21
|
</S>
|
|
22
22
|
|
|
23
|
-
<S style={{flexDirection:"row",alignItems:"center",backgroundColor:`${
|
|
24
|
-
<
|
|
25
|
-
+{
|
|
26
|
-
</
|
|
27
|
-
<
|
|
23
|
+
<S style={{flexDirection:"row",alignItems:"center",backgroundColor:`${C}25`,paddingHorizontal:8,paddingVertical:4,borderRadius:8,borderWidth:1,borderColor:`${C}40`,gap:3}}>
|
|
24
|
+
<V style={{fontFamily:k.interBold,fontSize:10.5,color:C}}>
|
|
25
|
+
+{A}
|
|
26
|
+
</V>
|
|
27
|
+
<V style={{fontFamily:k.interRegular,fontSize:9,color:C}}>
|
|
28
28
|
more
|
|
29
|
-
</
|
|
29
|
+
</V>
|
|
30
30
|
</S>
|
|
31
|
-
</$>:<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:7,paddingHorizontal:11,marginVertical:3,marginRight:2,borderRadius:9,backgroundColor:`${
|
|
31
|
+
</$>:<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:7,paddingHorizontal:11,marginVertical:3,marginRight:2,borderRadius:9,backgroundColor:`${C}0A`,borderWidth:1,borderColor:`${C}25`}}>
|
|
32
32
|
<S style={{flexDirection:"row",alignItems:"center",gap:7}}>
|
|
33
|
-
<S style={{width:17,height:17,borderRadius:8.5,backgroundColor:`${
|
|
34
|
-
<Po color={
|
|
33
|
+
<S style={{width:17,height:17,borderRadius:8.5,backgroundColor:`${C}25`,alignItems:"center",justifyContent:"center"}}>
|
|
34
|
+
<Po color={C}size={8}/>
|
|
35
35
|
</S>
|
|
36
|
-
<
|
|
37
|
-
{
|
|
38
|
-
</
|
|
36
|
+
<V style={{fontFamily:k.interMedium,fontSize:11,color:o.grayTextStrong}}>
|
|
37
|
+
{j("footer.allLoaded",{count:E,defaultValue:`All ${E} requests loaded`})}
|
|
38
|
+
</V>
|
|
39
39
|
</S>
|
|
40
40
|
|
|
41
|
-
<S style={{backgroundColor:`${
|
|
42
|
-
<
|
|
43
|
-
{
|
|
44
|
-
</
|
|
41
|
+
<S style={{backgroundColor:`${C}18`,paddingHorizontal:7,paddingVertical:2,borderRadius:6}}>
|
|
42
|
+
<V style={{fontFamily:k.interBold,fontSize:9.5,color:C}}>
|
|
43
|
+
{E}/{E}
|
|
44
|
+
</V>
|
|
45
45
|
</S>
|
|
46
46
|
</S>}
|
|
47
47
|
</S>
|
|
48
|
-
</S>}const{log:x,isLast:z,color:
|
|
49
|
-
{
|
|
50
|
-
<S style={[
|
|
51
|
-
{!z&&<S style={[
|
|
48
|
+
</S>}const{log:x,isLast:z,color:U}=e;return<Fe index={T}distance={8}style={B?[b.treeNodeRow,z&&b.treeNodeRowLast]:{marginBottom:5,marginHorizontal:5}}>
|
|
49
|
+
{B&&<S style={b.treeLines}>
|
|
50
|
+
<S style={[b.modernTreeLine,{borderColor:U},z&&b.modernTreeLineLast]}/>
|
|
51
|
+
{!z&&<S style={[b.modernTreeBranch,{borderColor:U}]}/>}
|
|
52
52
|
</S>}
|
|
53
|
-
<S style={
|
|
54
|
-
<Ye testID={`inspector.network.item.${
|
|
53
|
+
<S style={B?b.treeCardWrapper:{flex:1}}>
|
|
54
|
+
<Ye testID={`inspector.network.item.${x.id}`}item={x}isSelected={Y.has(x.id)}onToggleSelect={Se}onPress={Ie}timelineMinStart={fe}timelineTotalRange={ye}isNew={we.has(x.id)}searchStr={I}/>
|
|
55
55
|
</S>
|
|
56
|
-
</
|
|
56
|
+
</Fe>},[B,fe,ye,we,Y,Se,Ie,I,he,me,pe,j]);return<S style={{flex:1}}>
|
|
57
57
|
<S style={{marginTop:6}}>
|
|
58
58
|
|
|
59
|
-
<S style={
|
|
60
|
-
<S style={[
|
|
61
|
-
<
|
|
62
|
-
<Ke placeholder={
|
|
59
|
+
<S style={b.toolbarRow}>
|
|
60
|
+
<S style={[b.searchContainer,ze&&{borderColor:o.purple,borderWidth:1.5}]}>
|
|
61
|
+
<Vo color={ze?o.purple:o.grayTextWeak}size={15}/>
|
|
62
|
+
<Ke placeholder={j("network.searchPlaceholder","Search APIs...")}placeholderTextColor={o.grayTextWeak}value={I}onChangeText={X}onFocus={()=>Ve(!0)}onBlur={()=>Ve(!1)}style={b.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
63
63
|
|
|
64
|
-
{
|
|
64
|
+
{I.length>0&&<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
65
65
|
<S style={{backgroundColor:`${o.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
66
|
-
<
|
|
67
|
-
{
|
|
68
|
-
</
|
|
66
|
+
<V style={{color:o.purple,fontSize:9.5,fontFamily:k.interBold}}>
|
|
67
|
+
{R.length}
|
|
68
|
+
</V>
|
|
69
69
|
</S>
|
|
70
|
-
<Qe onPress={()=>
|
|
71
|
-
<
|
|
70
|
+
<Qe onPress={()=>X("")}hitSlop={10}style={b.clearBtn}>
|
|
71
|
+
<Io color={o.grayTextWeak}size={13}/>
|
|
72
72
|
</Qe>
|
|
73
73
|
</S>}
|
|
74
74
|
</S>
|
|
75
75
|
|
|
76
|
-
<S style={
|
|
77
|
-
<$ style={[
|
|
76
|
+
<S style={b.toolbarRight}>
|
|
77
|
+
<$ style={[b.toolbarBtn,{borderColor:`${o.purple}38`,backgroundColor:`${o.purple}0F`}]}onPress={()=>xe(!0)}hitSlop={6}testID="inspector.network.exportBtn">
|
|
78
78
|
<Oo color={o.purple}size={15}/>
|
|
79
79
|
</$>
|
|
80
80
|
|
|
81
|
-
<$ style={[
|
|
81
|
+
<$ style={[b.toolbarBtn,{borderColor:`${o.errorColor}38`,backgroundColor:`${o.errorColor}0F`}]}onPress={Be}hitSlop={6}>
|
|
82
82
|
<Fo color={o.errorColor}size={15}/>
|
|
83
|
-
{
|
|
84
|
-
<
|
|
85
|
-
{
|
|
86
|
-
</
|
|
83
|
+
{Y.size>0&&<S style={b.trashBadge}>
|
|
84
|
+
<V style={b.trashBadgeText}>
|
|
85
|
+
{Y.size}
|
|
86
|
+
</V>
|
|
87
87
|
</S>}
|
|
88
88
|
</$>
|
|
89
89
|
|
|
90
|
-
<$ style={[
|
|
91
|
-
<
|
|
92
|
-
{
|
|
90
|
+
<$ style={[b.toolbarBtn,G&&{borderColor:o.purple,backgroundColor:`${o.purple}15`}]}onPress={()=>Pe(e=>!e)}hitSlop={6}accessibilityLabel={ae?"Page Accordion Grouping Preserved (Temporarily in List View for Search Results)":G?"Page Accordion Grouping Enabled (Tap for Plain List)":"Plain List Enabled (Tap for Page Accordion)"}accessibilityRole="button">
|
|
91
|
+
<Re color={G?o.purple:o.grayTextStrong}size={16}/>
|
|
92
|
+
{G&&<S style={b.activeFilterDot}/>}
|
|
93
93
|
</$>
|
|
94
94
|
|
|
95
|
-
<$ style={
|
|
96
|
-
<Lo direction={
|
|
95
|
+
<$ style={b.toolbarBtn}onPress={()=>Z(e=>e==="newest"?"oldest":"newest")}hitSlop={10}>
|
|
96
|
+
<Lo direction={Ee==="newest"?"down":"up"}color={o.grayTextStrong}size={18}/>
|
|
97
97
|
</$>
|
|
98
98
|
</S>
|
|
99
99
|
</S>
|
|
@@ -101,62 +101,62 @@ import H,{useCallback as ge,useMemo as D,useRef as We}from"react";import{FlatLis
|
|
|
101
101
|
|
|
102
102
|
<S style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:8,gap:6}}>
|
|
103
103
|
<Ue horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
104
|
-
{He.map(e=>{const T=
|
|
104
|
+
{He.map(e=>{const T=J===e.id,x=e.color||o.purple,z=T?o.white:x;return<$ testID={`inspector.network.filter.${e.id.toLowerCase()}`}key={e.id}onPress={()=>{de(T?"all":e.id)}}>
|
|
105
105
|
<S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:T?x:`${x}12`,borderWidth:1,borderColor:T?x:`${x}30`,gap:5}}>
|
|
106
|
-
{e.id==="all"&&<
|
|
106
|
+
{e.id==="all"&&<Re size={11}color={z}/>}
|
|
107
107
|
{e.id==="errors"&&<$o size={11}color={z}/>}
|
|
108
108
|
{e.id==="success"&&<Eo size={11}color={z}/>}
|
|
109
109
|
{e.id==="slow"&&<Mo size={11}color={z}/>}
|
|
110
110
|
{e.id==="POST"&&<Ao size={11}color={z}/>}
|
|
111
111
|
{e.id==="GET"&&<Do size={11}color={z}/>}
|
|
112
112
|
{e.id==="graphql"&&<No size={11}color={z}/>}
|
|
113
|
-
<
|
|
113
|
+
<V style={{fontFamily:k.interBold,fontSize:10.5,color:T?o.white:o.primaryBlack}}>
|
|
114
114
|
{e.label}
|
|
115
|
-
</
|
|
115
|
+
</V>
|
|
116
116
|
<S style={{backgroundColor:T?"rgba(255,255,255,0.25)":`${x}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8}}>
|
|
117
|
-
<
|
|
117
|
+
<V style={{fontFamily:k.interBold,fontSize:9,color:T?o.white:x}}>
|
|
118
118
|
{e.count}
|
|
119
|
-
</
|
|
119
|
+
</V>
|
|
120
120
|
</S>
|
|
121
121
|
</S>
|
|
122
122
|
</$>})}
|
|
123
123
|
</Ue>
|
|
124
124
|
|
|
125
|
-
<$ onPress={()=>
|
|
125
|
+
<$ onPress={()=>Te(!0)}style={{flexShrink:0}}>
|
|
126
126
|
<S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:4.5,borderRadius:8,backgroundColor:M?`${o.purple}20`:o.grayBackground,borderWidth:1,borderColor:M?o.purple:o.grayBorderSecondary,gap:5,shadowColor:o.black,shadowOpacity:.04,shadowRadius:2,shadowOffset:{width:0,height:1},elevation:1}}>
|
|
127
127
|
<Ro size={11}color={M?o.purple:o.grayText}/>
|
|
128
|
-
<
|
|
129
|
-
{
|
|
130
|
-
</
|
|
128
|
+
<V style={{fontFamily:k.interBold,fontSize:10.5,color:M?o.purple:o.grayText}}>
|
|
129
|
+
{j("network.moreFilters","More Filters")}
|
|
130
|
+
</V>
|
|
131
131
|
{M&&<S style={{backgroundColor:o.purple,paddingHorizontal:4.5,paddingVertical:1,borderRadius:6}}>
|
|
132
|
-
<
|
|
132
|
+
<V style={{fontFamily:k.interBold,fontSize:8.5,color:o.white}}>
|
|
133
133
|
{Ne}
|
|
134
|
-
</
|
|
134
|
+
</V>
|
|
135
135
|
</S>}
|
|
136
136
|
</S>
|
|
137
137
|
</$>
|
|
138
138
|
</S>
|
|
139
139
|
|
|
140
140
|
|
|
141
|
-
{(
|
|
142
|
-
<
|
|
143
|
-
Showing {
|
|
144
|
-
</
|
|
145
|
-
<$ onPress={()=>{
|
|
146
|
-
<
|
|
141
|
+
{(J!=="all"||I.trim().length>0||M||R.length!==re.length)&&<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginHorizontal:8,marginBottom:8,paddingHorizontal:8,paddingVertical:5.5,backgroundColor:`${o.purple}10`,borderRadius:8,borderWidth:1,borderColor:`${o.purple}25`}}>
|
|
142
|
+
<V style={{fontFamily:k.interMedium,fontSize:10.5,color:o.purple}}>
|
|
143
|
+
Showing {R.length} of {Q.length} requests
|
|
144
|
+
</V>
|
|
145
|
+
<$ onPress={()=>{X(""),de("all"),W(new Set),_(new Set),ee("all"),oe("all"),te("time_desc"),ge("all")}}>
|
|
146
|
+
<V style={{fontFamily:k.interBold,fontSize:10.5,color:o.errorColor}}>
|
|
147
147
|
Clear All Filters
|
|
148
|
-
</
|
|
148
|
+
</V>
|
|
149
149
|
</$>
|
|
150
150
|
</S>}
|
|
151
151
|
</S>
|
|
152
152
|
|
|
153
|
-
<_e ref={
|
|
154
|
-
<So count={
|
|
155
|
-
</S>:null}style={{flex:1}}contentContainerStyle={[
|
|
153
|
+
<_e ref={be}data={Ae}keyExtractor={De}renderItem={qe}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}ListEmptyComponent={<Ze isSearch={I.length>0||M||J!=="all"}searchQuery={I}customTitle={I.length>0?"No matching API requests":"No network activity"}onClearSearch={()=>{X(""),W(new Set),_(new Set),ee("all"),oe("all"),te("time_desc"),de("all"),ge("all")}}/>}ListFooterComponent={K.length>0?<S style={{paddingBottom:24}}>
|
|
154
|
+
<So count={B?R.length:Math.min(ie,R.length)}totalCount={R.length}label="requests"hasMore={!B&&R.length>ie}loadMoreStep={30}onLoadMore={()=>ke(e=>e+30)}/>
|
|
155
|
+
</S>:null}style={{flex:1}}contentContainerStyle={[b.listContent,{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
<Co visible={
|
|
158
|
+
<Co visible={$e}onClose={()=>Te(!1)}filters={Oe}onApply={ve}searchQuery={I}/>
|
|
159
159
|
|
|
160
160
|
|
|
161
|
-
<To visible={
|
|
161
|
+
<To visible={Me}onClose={()=>xe(!1)}filteredLogs={R}allLogs={Q}/>
|
|
162
162
|
</S>});export default vo;
|
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
import{useEffect as
|
|
2
|
-
<
|
|
1
|
+
import _,{useEffect as T,useMemo as ee,useRef as B,useState as k}from"react";import{Animated as v,StyleSheet as P,Text as C,TouchableOpacity as Me,View as M}from"react-native";import Se from"react-native-linear-gradient";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as Fe}from"../../styles/AppFonts";import{ActivityIcon as Be,BatteryChargingIcon as Ae,BatteryFullIcon as Ie,BoltIcon as Re,SpeedIcon as De}from"../NetworkIcons";import{getNativeDeviceMetrics as Te,getNativeFpsMetrics as ke,startNativeFpsMonitoring as Ce,stopNativeFpsMonitoring as Ne}from"../../native/NativeInspector";import{subscribeNetworkLogs as Ve}from"../../customHooks/networkLogger";import{useInspector as $e}from"./InspectorContext";import{useTranslation as He}from"../../i18n";export const SecondaryTelemetryStrip=_.memo(()=>{const{t:U}=He(),{switchActiveTab:Q}=$e(),[A,O]=k(60),[N,X]=k(60),[s,Y]=k(null),[w,I]=k(0),R=B(new v.Value(.4)).current;T(()=>{const r=v.loop(v.sequence([v.timing(R,{toValue:1,duration:900,useNativeDriver:!0}),v.timing(R,{toValue:.4,duration:900,useNativeDriver:!0})]));return r.start(),()=>r.stop()},[R]);const V=B(0),W=B(Date.now());T(()=>{Ce().catch(()=>{});const r=setInterval(async()=>{try{const o=await ke();if(o&&typeof o.fps=="number"&&o.fps>0){O(Math.round(o.fps)),o.targetFps&&X(Math.round(o.targetFps));return}}catch{}const c=Date.now(),x=c-W.current;if(x>=1e3){const o=Math.min(60,Math.round(V.current*1e3/x));O(o),V.current=0,W.current=c}},1e3);let i;const a=()=>{V.current++,i=requestAnimationFrame(a)};return i=requestAnimationFrame(a),()=>{clearInterval(r),cancelAnimationFrame(i),Ne().catch(()=>{})}},[]);const S=B(0),$=B(Date.now());T(()=>{const r=Ve(a=>{if(!a||a.length===0){I(0);return}const c=Date.now(),x=a.slice(0,10);let o=0,G=0,D=0;for(const n of x){let J=0,K=0;n.request&&(J=typeof n.request=="string"?n.request.length:JSON.stringify(n.request).length),n.response&&(K=typeof n.response=="string"?n.response.length:JSON.stringify(n.response).length);const L=J+K;if(L>0&&n.duration&&n.duration>0){const j=L*8/(n.duration/1e3)/1e3;j>0&&D===0&&(D=j),o+=L,G+=n.duration}}let F=0;G>0&&o>0?F=o*8/(G/1e3)/1e3:D>0&&(F=D),F>0?(S.current=F,$.current=c,I(Math.round(F*10)/10)):S.current>0&&c-$.current<12e3&&I(Math.round(S.current*10)/10)}),i=setInterval(()=>{Date.now()-$.current>15e3&&S.current>0&&(S.current=0,I(0))},3e3);return()=>{r(),clearInterval(i)}},[]),T(()=>{let r=!0;const i=async()=>{try{const c=await Te();r&&c&&Y(c)}catch{}};i();const a=setInterval(i,4e3);return()=>{r=!1,clearInterval(a)}},[]);const H=A>=N-5?e.emerald400:A>=N/2?e.amber400:e.rose400,q=ee(()=>{if(s?.usedRAM&&s?.totalRAM){const r=(s.usedRAM/1073741824).toFixed(2),i=(s.totalRAM/(1024*1024*1024)).toFixed(1);return`${r} / ${i} GB`}return s?.residentMemory?`${Math.round(s.residentMemory/1048576)} MB RAM`:s?.usedRAM?`${Math.round(s.usedRAM/1048576)} MB RAM`:null},[s]),z=s?.batteryPercent,E=s?.isCharging,Z=`Telemetry: ${A} FPS of ${N}, Network speed ${w} kbps, ${q||""}`;return<Se colors={[e.telemetrySubHeaderGradStart,e.telemetrySubHeaderGradMid,e.telemetrySubHeaderGradEnd]}start={{x:0,y:0}}end={{x:1,y:0}}style={t.container}>
|
|
2
|
+
<Me activeOpacity={.75}onPress={()=>Q?.("device")}accessible={!0}accessibilityRole="summary"accessibilityLabel={Z}accessibilityHint="Double tap to open Device Diagnostics tab"style={t.inner}>
|
|
3
3
|
|
|
4
4
|
<M style={t.item}>
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
<v.View style={[t.pulseDot,{backgroundColor:H,opacity:R}]}/>
|
|
6
|
+
<Be size={11}color={H}/>
|
|
7
|
+
<C style={[t.monoLabel,{color:H}]}>
|
|
8
|
+
{A} {U("telemetry.fps","FPS")}
|
|
9
|
+
</C>
|
|
9
10
|
</M>
|
|
10
11
|
|
|
11
12
|
<M style={t.divider}/>
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
<M style={t.item}>
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
{
|
|
18
|
-
</
|
|
16
|
+
<De size={11}color={e.sky400}/>
|
|
17
|
+
<C style={[t.monoLabel,{color:e.sky400}]}>
|
|
18
|
+
{w>=1e3?`${(w/1e3).toFixed(2)} Mbps`:w>0?`${w.toFixed(1)} kbps`:"0.0 kbps"}
|
|
19
|
+
</C>
|
|
19
20
|
</M>
|
|
20
21
|
|
|
21
22
|
|
|
22
|
-
{
|
|
23
|
+
{q&&<>
|
|
23
24
|
<M style={t.divider}/>
|
|
24
25
|
<M style={t.item}>
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
{
|
|
28
|
-
</
|
|
26
|
+
<Re size={11}color={e.purple400}/>
|
|
27
|
+
<C style={[t.monoLabel,{color:e.purple400}]}>
|
|
28
|
+
{q}
|
|
29
|
+
</C>
|
|
29
30
|
</M>
|
|
30
31
|
</>}
|
|
31
32
|
|
|
32
33
|
|
|
33
|
-
{
|
|
34
|
+
{z!==void 0&&z>=0&&<>
|
|
34
35
|
<M style={t.divider}/>
|
|
35
36
|
<M style={t.item}>
|
|
36
|
-
{
|
|
37
|
-
<
|
|
38
|
-
{Math.round(
|
|
39
|
-
</
|
|
37
|
+
{E?<Ae size={11}color={e.emerald400}/>:<Ie size={11}color={e.slate400}/>}
|
|
38
|
+
<C style={[t.monoLabel,{color:E?e.emerald400:e.slate400}]}>
|
|
39
|
+
{Math.round(z)}%
|
|
40
|
+
</C>
|
|
40
41
|
</M>
|
|
41
42
|
</>}
|
|
42
|
-
</
|
|
43
|
-
</
|
|
43
|
+
</Me>
|
|
44
|
+
</Se>});const t=P.create({container:{width:"100%",borderBottomWidth:P.hairlineWidth,borderBottomColor:e.telemetrySubHeaderBorder,borderTopWidth:P.hairlineWidth,borderTopColor:e.telemetrySubHeaderBorder,zIndex:9},inner:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:4.5,minHeight:25},item:{flexDirection:"row",alignItems:"center",gap:4},pulseDot:{width:5,height:5,borderRadius:2.5,marginRight:1},divider:{width:1,height:10,backgroundColor:e.borderSubtle},monoLabel:{fontFamily:Fe.monoFont,fontSize:9.5,lineHeight:12,letterSpacing:.2,fontVariant:["tabular-nums"]}});export default SecondaryTelemetryStrip;
|