react-native-inapp-inspector 2.3.25 → 2.4.1
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 +26 -5
- package/dist/commonjs/components/AnalyticsDetail.js +9 -6
- package/dist/commonjs/components/AppHeaderLogo.js +4 -6
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +18 -22
- package/dist/commonjs/components/Inspector/ConsoleTab.js +13 -16
- package/dist/commonjs/components/Inspector/CrashDetail.js +7 -6
- package/dist/commonjs/components/Inspector/CrashTab.js +23 -23
- package/dist/commonjs/components/Inspector/DebuggingTab.js +6 -6
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +77 -43
- package/dist/commonjs/components/Inspector/FabLauncher.js +8 -9
- package/dist/commonjs/components/Inspector/InspectorHeader.js +93 -70
- package/dist/commonjs/components/Inspector/LogDetail.js +10 -7
- package/dist/commonjs/components/Inspector/MainScreen.js +67 -29
- package/dist/commonjs/components/Inspector/NetworkDetail.js +29 -28
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/NetworkTab.js +87 -85
- package/dist/commonjs/components/Inspector/PushCard.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushCard.js +89 -0
- package/dist/commonjs/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushDetail.js +190 -0
- package/dist/commonjs/components/Inspector/PushTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/PushTab.js +45 -0
- package/dist/commonjs/components/Inspector/ReduxDetail.js +16 -13
- package/dist/commonjs/components/Inspector/ReduxTab.js +18 -28
- package/dist/commonjs/components/Inspector/SettingsPanel.js +253 -105
- package/dist/commonjs/components/Inspector/StorageTab.js +40 -40
- package/dist/commonjs/components/Inspector/TabBar.js +9 -8
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -2
- package/dist/commonjs/components/JsonViewer.js +77 -90
- package/dist/commonjs/components/LogCard.js +9 -6
- package/dist/commonjs/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/commonjs/components/ModuleErrorBoundary.js +33 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +3 -3
- package/dist/commonjs/components/NetworkIcons.js +10 -6
- package/dist/commonjs/components/SegmentedTabs.d.ts +4 -1
- package/dist/commonjs/components/SegmentedTabs.js +12 -8
- package/dist/commonjs/components/ShareButton.d.ts +11 -0
- package/dist/commonjs/components/ShareButton.js +6 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.js +4 -4
- package/dist/commonjs/customHooks/networkLogger.js +1 -1
- package/dist/commonjs/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/commonjs/customHooks/pushNotificationLogger.js +1 -0
- package/dist/commonjs/helpers/memoryManager.d.ts +2 -1
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +13 -0
- package/dist/commonjs/helpers/shareFormatter.js +7 -0
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/index.d.ts +5 -2
- package/dist/commonjs/index.js +4 -4
- package/dist/commonjs/push.d.ts +4 -0
- package/dist/commonjs/push.js +1 -0
- package/dist/commonjs/types/enums.d.ts +30 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/index.d.ts +10 -0
- package/dist/commonjs/types/interfaces.d.ts +63 -7
- package/dist/esm/components/AnalyticsDetail.js +28 -25
- package/dist/esm/components/AppHeaderLogo.js +5 -7
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +14 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +36 -40
- package/dist/esm/components/Inspector/ConsoleTab.js +52 -55
- package/dist/esm/components/Inspector/CrashDetail.js +11 -10
- package/dist/esm/components/Inspector/CrashTab.js +23 -23
- package/dist/esm/components/Inspector/DebuggingTab.js +10 -10
- package/dist/esm/components/Inspector/DeviceInfoTab.js +208 -174
- package/dist/esm/components/Inspector/FabLauncher.js +41 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +138 -115
- package/dist/esm/components/Inspector/LogDetail.js +24 -21
- package/dist/esm/components/Inspector/MainScreen.js +100 -62
- package/dist/esm/components/Inspector/NetworkDetail.js +88 -87
- package/dist/esm/components/Inspector/NetworkFilterModal.js +8 -8
- package/dist/esm/components/Inspector/NetworkTab.js +136 -134
- package/dist/esm/components/Inspector/PushCard.d.ts +4 -0
- package/dist/esm/components/Inspector/PushCard.js +89 -0
- package/dist/esm/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/PushDetail.js +190 -0
- package/dist/esm/components/Inspector/PushTab.d.ts +3 -0
- package/dist/esm/components/Inspector/PushTab.js +45 -0
- package/dist/esm/components/Inspector/ReduxDetail.js +40 -37
- package/dist/esm/components/Inspector/ReduxTab.js +109 -119
- package/dist/esm/components/Inspector/SettingsPanel.js +406 -258
- package/dist/esm/components/Inspector/StorageTab.js +174 -174
- package/dist/esm/components/Inspector/TabBar.js +28 -27
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +1 -1
- package/dist/esm/components/JsonViewer.js +101 -114
- package/dist/esm/components/LogCard.js +25 -22
- package/dist/esm/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/esm/components/ModuleErrorBoundary.js +33 -0
- package/dist/esm/components/NetworkIcons.d.ts +3 -3
- package/dist/esm/components/NetworkIcons.js +7 -3
- package/dist/esm/components/SegmentedTabs.d.ts +4 -1
- package/dist/esm/components/SegmentedTabs.js +12 -8
- package/dist/esm/components/ShareButton.d.ts +11 -0
- package/dist/esm/components/ShareButton.js +6 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/crashHandler.js +6 -6
- package/dist/esm/customHooks/networkLogger.js +1 -1
- package/dist/esm/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/esm/customHooks/pushNotificationLogger.js +1 -0
- package/dist/esm/helpers/memoryManager.d.ts +2 -1
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +13 -0
- package/dist/esm/helpers/shareFormatter.js +7 -0
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/index.d.ts +5 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/push.d.ts +4 -0
- package/dist/esm/push.js +1 -0
- package/dist/esm/types/enums.d.ts +30 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/index.d.ts +10 -0
- package/dist/esm/types/interfaces.d.ts +63 -7
- package/package.json +53 -10
- package/src/native/NativeInspector.ts +0 -1
- package/dist/commonjs/components/BrandSquareIcon.d.ts +0 -5
- package/dist/commonjs/components/BrandSquareIcon.js +0 -112
- package/dist/esm/components/BrandSquareIcon.d.ts +0 -5
- package/dist/esm/components/BrandSquareIcon.js +0 -112
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import De,{useMemo as A,useState as L}from"react";import{useTranslation as Ie}from"../../i18n";import{Pressable as Q,ScrollView as
|
|
2
|
-
`).map(t=>t.trim()).filter(t=>t.length>0).map((t,v)=>Ve(t,v===0)):[],[O]),
|
|
1
|
+
import De,{useMemo as A,useState as L}from"react";import{useTranslation as Ie}from"../../i18n";import{Pressable as Q,ScrollView as Re,StyleSheet as Ne,Text as T,TextInput as He,View as C}from"react-native";import{useInspector as Pe}from"./InspectorContext";import X from"../HighlightText";import Ce from"../JsonViewer";import M from"../CopyButton";import Ae from"../ShareButton";import Y from"../SegmentedTabs";import{ClearIcon as Le,SearchIcon as Me,PrettyIcon as Ee,RawIcon as Te,TableIcon as Oe,LayersIcon as Se,TerminalIcon as Ue,RequestIcon as Je,InfoCircleIcon as Ke,DocIcon as Ge,ExternalLinkIcon as Qe,FolderIcon as Xe}from"../NetworkIcons";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as B}from"../../styles/AppFonts";import z from"../../styles";import{getJsonContent as Ye,getSize as _,formatDateTime as ee,parseStackLine as Ve,openInVSCode as Ze}from"../../helpers";import{shareLogReport as _e}from"../../helpers/shareFormatter";const Be=S=>{const D=Date.now()-S,E=Math.floor(D/1e3),$=Math.floor(E/60),P=Math.floor($/60),J=Math.floor(P/24);return E<60?`${E}s ago`:$<60?`${$}m ago`:P<24?`${P}h ago`:`${J}d ago`},et=De.memo(()=>{const{t:S}=Ie(),{selectedLog:r}=Pe(),[D,E]=L("output"),[$,P]=L(""),[J,ze]=L("raw"),W=A(()=>r?Ye(r.message):null,[r]),[R,re]=L("structured"),[K,ve]=L("caller"),[Z,We]=L("app"),O=A(()=>r?K==="error"&&r.errorStack?r.errorStack:r.stack||r.caller||"":"",[r,K]),F=A(()=>O?O.split(`
|
|
2
|
+
`).map(t=>t.trim()).filter(t=>t.length>0).map((t,v)=>Ve(t,v===0)):[],[O]),N=A(()=>F.filter(t=>t.frameType==="app"||!t.isRuntimeNoise),[F]),oe=A(()=>Z==="app"&&N.length>0?N:F,[Z,N,F]),V=A(()=>r?N.length>0?N[0]:r.caller&&r.caller!=="Unknown"?Ve(r.caller,!0):F.length>0?F[0]:null:null,[r,N,F]);if(!r)return null;const H=e.primaryLight!==e.white,U=(()=>{const t=(r.type||"log").toLowerCase(),v=(r.sourceMethod||t).toLowerCase();return t==="error"||v==="error"?{border:e.red500,badgeBg:e.red100,badgeText:e.redErrorText,label:"ERROR",methodBorder:e.errorBorder,methodBg:e.red100,methodText:e.redErrorText}:t==="warn"||v==="warn"?{border:e.amber500,badgeBg:e.amber100,badgeText:e.amber800Warm,label:"WARN",methodBorder:e.amber200,methodBg:e.amber100,methodText:e.amber800Warm}:t==="debug"||v==="debug"?{border:e.violet500,badgeBg:e.purple100,badgeText:e.violet600,label:"DEBUG",methodBorder:e.purple200,methodBg:e.purple100,methodText:e.violet600}:t==="info"||v==="info"?{border:e.sky500,badgeBg:e.sky100,badgeText:e.sky600,label:"INFO",methodBorder:e.sky400,methodBg:e.sky100,methodText:e.sky600}:{border:e.indigo500,badgeBg:e.indigo50,badgeText:e.indigo600Alt,label:"LOG",methodBorder:e.indigo400,methodBg:e.indigo50,methodText:e.indigo600Alt}})(),le=r.rawArgs!=null&&r.rawArgs.length>1,$e=!!(r.stack&&r.stack.trim().length>0),Fe=[{key:"output",label:S("console.tabOutput"),icon:t=><Ue color={t?e.white:e.grayTextWeak}size={12}/>},...le?[{key:"arguments",label:S("console.tabArgs",{count:r.rawArgs?.length}),icon:t=><Je color={t?e.white:e.grayTextWeak}size={12}/>}]:[],...$e?[{key:"stack",label:S("console.tabStack"),icon:t=><Se color={t?e.white:e.grayTextWeak}size={12}/>}]:[],{key:"metadata",label:S("console.tabMetadata"),icon:t=><Ke color={t?e.white:e.grayTextWeak}size={12}/>}];return<C style={{flex:1}}>
|
|
3
3
|
|
|
4
4
|
<C style={z.detailInfoBar}>
|
|
5
5
|
<C style={{flexDirection:"column",gap:10}}>
|
|
@@ -45,7 +45,10 @@ import De,{useMemo as A,useState as L}from"react";import{useTranslation as Ie}fr
|
|
|
45
45
|
</C>
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
<
|
|
48
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
49
|
+
<Ae onShare={()=>_e(r)}/>
|
|
50
|
+
<M value={r.message}label={S("console.logMessage")}/>
|
|
51
|
+
</C>
|
|
49
52
|
</C>
|
|
50
53
|
|
|
51
54
|
|
|
@@ -61,15 +64,15 @@ import De,{useMemo as A,useState as L}from"react";import{useTranslation as Ie}fr
|
|
|
61
64
|
{V?.functionName&&V.functionName!=="<anonymous>"?`${V.functionName}()`:V?.fileName||S("console.consoleLog")}
|
|
62
65
|
</T>
|
|
63
66
|
|
|
64
|
-
{V?.fileName&&<Q onPress={()=>
|
|
67
|
+
{V?.fileName&&<Q onPress={()=>Ze(V.rawFilePath||V.fullPath||V.fileName,V.lineNumber,V.columnNumber)}hitSlop={8}style={[z.metaChip,{backgroundColor:`${e.brandPurple}15`,borderColor:`${e.brandPurple}40`,paddingHorizontal:7,paddingVertical:2}]}>
|
|
65
68
|
<C style={{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1}}>
|
|
66
|
-
<
|
|
69
|
+
<Ge color={e.brandPurple}size={10}/>
|
|
67
70
|
<T style={[z.metaChipText,{color:e.brandPurple,fontSize:10,fontFamily:B.interBold,flexShrink:1}]}>
|
|
68
71
|
{V.fileName}
|
|
69
72
|
{V.lineNumber?`:${V.lineNumber}`:""}
|
|
70
73
|
{V.columnNumber?`:${V.columnNumber}`:""}
|
|
71
74
|
</T>
|
|
72
|
-
<
|
|
75
|
+
<Qe color={e.brandPurple}size={9}/>
|
|
73
76
|
</C>
|
|
74
77
|
</Q>}
|
|
75
78
|
</C>
|
|
@@ -101,17 +104,17 @@ import De,{useMemo as A,useState as L}from"react";import{useTranslation as Ie}fr
|
|
|
101
104
|
{D!=="metadata"&&<C style={{paddingHorizontal:12,paddingTop:6,paddingBottom:4}}>
|
|
102
105
|
<C style={[z.detailSearchRow,{marginBottom:0}]}>
|
|
103
106
|
<C style={[z.detailSearchBox,{backgroundColor:H?`${e.brandPurple}10`:e.purpleShade50,borderWidth:1,borderColor:e.dividerColor}]}>
|
|
104
|
-
<
|
|
107
|
+
<Me color={e.grayTextWeak}size={15}/>
|
|
105
108
|
<He placeholder="Search in log details..."placeholderTextColor={e.grayTextWeak}value={$}onChangeText={P}style={z.detailSearchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
106
109
|
{$.length>0&&<Q onPress={()=>P("")}hitSlop={10}style={{padding:6}}>
|
|
107
|
-
<
|
|
110
|
+
<Le color={e.grayTextWeak}size={13}/>
|
|
108
111
|
</Q>}
|
|
109
112
|
</C>
|
|
110
113
|
</C>
|
|
111
114
|
</C>}
|
|
112
115
|
|
|
113
116
|
|
|
114
|
-
<
|
|
117
|
+
<Re style={{flex:1}}contentContainerStyle={{paddingHorizontal:12,paddingTop:6,paddingBottom:28,flexGrow:1}}showsVerticalScrollIndicator={!0}keyboardShouldPersistTaps="handled">
|
|
115
118
|
|
|
116
119
|
{D==="output"&&<C style={[z.sectionContainer,{backgroundColor:H?`${e.purple}12`:e.purpleShade50,borderWidth:1,borderColor:e.dividerColor,borderRadius:12,overflow:"hidden",flex:1}]}>
|
|
117
120
|
|
|
@@ -123,7 +126,7 @@ import De,{useMemo as A,useState as L}from"react";import{useTranslation as Ie}fr
|
|
|
123
126
|
<M value={r.message}label={S("console.logMessage")}/>
|
|
124
127
|
</C>
|
|
125
128
|
|
|
126
|
-
{W&&<Y tabs={[{key:"pretty",label:S("network.jsonViewer.pretty"),icon:t=><
|
|
129
|
+
{W&&<Y tabs={[{key:"pretty",label:S("network.jsonViewer.pretty"),icon:t=><Ee color={t?e.white:e.grayTextWeak}size={12}/>},{key:"raw",label:S("network.jsonViewer.raw"),icon:t=><Te color={t?e.white:e.grayTextWeak}size={12}/>},{key:"table",label:S("network.jsonViewer.table"),icon:t=><Oe color={t?e.white:e.grayTextWeak}size={12}/>}]}activeKey={J}onChange={t=>ze(t)}/>}
|
|
127
130
|
</C>
|
|
128
131
|
|
|
129
132
|
|
|
@@ -176,16 +179,16 @@ import De,{useMemo as A,useState as L}from"react";import{useTranslation as Ie}fr
|
|
|
176
179
|
|
|
177
180
|
<C style={{flexDirection:"row",alignItems:"center",gap:5}}>
|
|
178
181
|
<C style={{flexDirection:"row",backgroundColor:H?e.primaryLight:e.white,borderRadius:7,padding:2,borderWidth:1,borderColor:e.dividerColor}}>
|
|
179
|
-
<Q onPress={()=>re("structured")}style={{flexDirection:"row",alignItems:"center",gap:3,paddingVertical:3.5,paddingHorizontal:7,borderRadius:5,backgroundColor:
|
|
180
|
-
<Se color={
|
|
181
|
-
<T style={{fontFamily:B.interBold,fontSize:10,color:
|
|
182
|
+
<Q onPress={()=>re("structured")}style={{flexDirection:"row",alignItems:"center",gap:3,paddingVertical:3.5,paddingHorizontal:7,borderRadius:5,backgroundColor:R==="structured"?e.brandPurple:"transparent"}}>
|
|
183
|
+
<Se color={R==="structured"?e.white:e.grayTextWeak}size={11}/>
|
|
184
|
+
<T style={{fontFamily:B.interBold,fontSize:10,color:R==="structured"?e.white:e.grayTextStrong}}>
|
|
182
185
|
{S("console.cardsView")}
|
|
183
186
|
</T>
|
|
184
187
|
</Q>
|
|
185
188
|
|
|
186
|
-
<Q onPress={()=>re("raw")}style={{flexDirection:"row",alignItems:"center",gap:3,paddingVertical:3.5,paddingHorizontal:7,borderRadius:5,backgroundColor:
|
|
187
|
-
<Te color={
|
|
188
|
-
<T style={{fontFamily:B.interBold,fontSize:10,color:
|
|
189
|
+
<Q onPress={()=>re("raw")}style={{flexDirection:"row",alignItems:"center",gap:3,paddingVertical:3.5,paddingHorizontal:7,borderRadius:5,backgroundColor:R==="raw"?e.brandPurple:"transparent"}}>
|
|
190
|
+
<Te color={R==="raw"?e.white:e.grayTextWeak}size={11}/>
|
|
191
|
+
<T style={{fontFamily:B.interBold,fontSize:10,color:R==="raw"?e.white:e.grayTextStrong}}>
|
|
189
192
|
{S("console.rawTraceView")}
|
|
190
193
|
</T>
|
|
191
194
|
</Q>
|
|
@@ -199,11 +202,11 @@ import De,{useMemo as A,useState as L}from"react";import{useTranslation as Ie}fr
|
|
|
199
202
|
{r.errorStack&&<Y tabs={[{key:"caller",label:S("console.callOriginStack")},{key:"error",label:S("console.errorThrownStack")}]}activeKey={K}onChange={t=>ve(t)}/>}
|
|
200
203
|
|
|
201
204
|
|
|
202
|
-
<Y tabs={[{key:"app",label:S("console.appCodeScope",{count:
|
|
205
|
+
<Y tabs={[{key:"app",label:S("console.appCodeScope",{count:N.length})},{key:"all",label:S("console.allFramesScope",{count:F.length})}]}activeKey={Z}onChange={t=>We(t)}/>
|
|
203
206
|
</C>
|
|
204
207
|
|
|
205
208
|
|
|
206
|
-
{
|
|
209
|
+
{R==="structured"?<C style={{padding:12,gap:10}}>
|
|
207
210
|
{oe.length>0?oe.map((t,v)=>{const I=v===0,G=t.frameType==="app"?`${e.brandPurple}15`:t.frameType==="dependency"?`${e.amber500}18`:t.frameType==="native"?`${e.sky500}18`:e.grayBorderSecondary,q=t.frameType==="app"?e.brandPurple:t.frameType==="dependency"?e.amber700:t.frameType==="native"?e.sky500:e.grayTextWeak;return<C key={v}style={{backgroundColor:I?`${e.brandPurple}0A`:e.primaryLight,borderRadius:10,borderWidth:1,borderColor:I?`${e.brandPurple}35`:e.dividerColor,padding:11,gap:6}}>
|
|
208
211
|
|
|
209
212
|
<C style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:6}}>
|
|
@@ -243,7 +246,7 @@ import De,{useMemo as A,useState as L}from"react";import{useTranslation as Ie}fr
|
|
|
243
246
|
|
|
244
247
|
<C style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:H?`${e.primaryBlack}25`:e.grayBackground,borderRadius:6,paddingHorizontal:8,paddingVertical:4.5,gap:6}}>
|
|
245
248
|
<C style={{flexDirection:"row",alignItems:"center",gap:5,flex:1}}>
|
|
246
|
-
<
|
|
249
|
+
<Xe size={12}color={e.grayTextWeak}/>
|
|
247
250
|
<T selectable style={{fontFamily:B.interRegular,fontSize:9.5,color:e.grayTextStrong,flex:1}}numberOfLines={1}>
|
|
248
251
|
{t.fullPath}
|
|
249
252
|
</T>
|
|
@@ -289,5 +292,5 @@ import De,{useMemo as A,useState as L}from"react";import{useTranslation as Ie}fr
|
|
|
289
292
|
</C>)}
|
|
290
293
|
</C>
|
|
291
294
|
</C>}
|
|
292
|
-
</
|
|
293
|
-
</C>}),te=
|
|
295
|
+
</Re>
|
|
296
|
+
</C>}),te=Ne.create({metaDot:{fontSize:10,color:e.grayTextWeak,opacity:.7},tabsHeaderWrap:{paddingHorizontal:12,paddingTop:8,paddingBottom:4}});export default et;
|
|
@@ -1,96 +1,134 @@
|
|
|
1
|
-
import
|
|
2
|
-
{(
|
|
3
|
-
<
|
|
4
|
-
<
|
|
1
|
+
import Q,{useEffect as L,useRef as I}from"react";import{Animated as w,Modal as X,Platform as O,Pressable as Z,StatusBar as Se,StyleSheet as E,View as S}from"react-native";import{useInspector as we}from"./InspectorContext";import Be from"../ErrorBoundary";import B from"../ModuleErrorBoundary";import Ce from"./FabLauncher";import Ve from"./InspectorHeader";import Re from"./TabBar";import Ne from"./NetworkTab";import De from"./NetworkDetail";import Me from"./LogDetail";import Ee from"./ConsoleTab";import Te from"./AnalyticsTab";import Ae from"../AnalyticsDetail";import Pe from"./ReduxTab";import Le from"./ReduxDetail";import Ie from"./CrashTab";import Oe from"./CrashDetail";import Fe from"./PushTab";import Ge from"./PushDetail";import We from"./DeviceInfoTab";import He from"./StorageTab";import Ue from"./DebuggingTab";import{MediaGalleryTab as Ye}from"./MediaGalleryTab";import _e from"./SettingsPanel";import $e from"./AboutModal";import Je from"./NpmUpdateToast";import Ke from"./NpmStarPrompt";import Qe from"../Toast";import F from"../../styles";import{AppColors as C}from"../../styles/AppColors";import Xe from"./NavigationTracker";import{isLocalDebugEnvironment as Ze}from"../../helpers";const eo=()=>{const{visible:T,modalAnimationType:V,closeModal:R,modalHeightPercent:x,selected:G,selectedEvent:A,selectedLog:W,selectedReduxSlice:z,selectedReduxAction:U,selectedCrash:q,selectedPush:P,setSelectedPush:Y,settingsPage:N,isAboutOpen:D,setIsAboutOpen:_,activeTab:e,isReady:$,enabled:j,hasNavigationContext:J,setNavState:K}=we(),H=e==="apis"&&G!=null||e==="analytics"&&A!=null||e==="logs"&&W!=null||e==="redux"&&(z!=null||U!=null)||e==="crash"&&q!=null||e==="push"&&P!=null,M=I(new w.Value(0)).current;L(()=>{N!==null&&(M.setValue(0),w.spring(M,{toValue:1,friction:8,tension:65,useNativeDriver:!1}).start())},[N!==null]);const v=I(new w.Value(0)).current;return L(()=>{D&&(v.setValue(0),w.spring(v,{toValue:1,friction:8,tension:65,useNativeDriver:!1}).start())},[D]),<>
|
|
2
|
+
{(O.OS==="ios"||O.OS==="android")&&j&&!T&&<Ce/>}
|
|
3
|
+
<X visible={T}animationType={V}transparent statusBarTranslucent={!0}onRequestClose={R}>
|
|
4
|
+
<Be onClose={R}>
|
|
5
5
|
<S style={F.modalBackdrop}>
|
|
6
|
-
<
|
|
7
|
-
<S style={[F.modalContentCard,{height:`${
|
|
8
|
-
<
|
|
6
|
+
<Z style={F.modalBackdropPressable}onPress={R}/>
|
|
7
|
+
<S style={[F.modalContentCard,{height:`${x}%`,borderTopLeftRadius:x>=100?0:20,borderTopRightRadius:x>=100?0:20}]}>
|
|
8
|
+
<Se translucent backgroundColor="transparent"barStyle="light-content"/>
|
|
9
9
|
|
|
10
|
-
<
|
|
10
|
+
<Ve/>
|
|
11
11
|
|
|
12
12
|
<S style={{flex:1}}>
|
|
13
13
|
|
|
14
|
-
<S style={{flex:1}}pointerEvents={
|
|
14
|
+
<S style={{flex:1}}pointerEvents={H||N!==null||D?"none":"auto"}>
|
|
15
15
|
<Re/>
|
|
16
|
-
{
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
{$?<S style={{flex:1}}>
|
|
17
|
+
{e==="apis"&&<B moduleName="Network API Monitor">
|
|
18
|
+
<Ne/>
|
|
19
|
+
</B>}
|
|
20
|
+
{e==="logs"&&<B moduleName="Console Logs Monitor">
|
|
21
|
+
<Ee/>
|
|
22
|
+
</B>}
|
|
23
|
+
{e==="analytics"&&<B moduleName="Analytics Event Tracker">
|
|
24
|
+
<Te/>
|
|
25
|
+
</B>}
|
|
26
|
+
{e==="redux"&&<B moduleName="Redux State Inspector">
|
|
27
|
+
<Pe/>
|
|
28
|
+
</B>}
|
|
29
|
+
{e==="crash"&&<B moduleName="Crash Reporter">
|
|
30
|
+
<Ie/>
|
|
31
|
+
</B>}
|
|
32
|
+
{e==="push"&&<B moduleName="Push Notifications">
|
|
33
|
+
<Fe/>
|
|
34
|
+
</B>}
|
|
35
|
+
{e==="device"&&<B moduleName="Device Diagnostics">
|
|
36
|
+
<We/>
|
|
37
|
+
</B>}
|
|
38
|
+
{e==="storage"&&<B moduleName="Storage Inspector">
|
|
39
|
+
<He/>
|
|
40
|
+
</B>}
|
|
41
|
+
{e==="media"&&<B moduleName="Media Gallery">
|
|
42
|
+
<Ye/>
|
|
43
|
+
</B>}
|
|
44
|
+
{O.OS==="android"&&Ze()&&e==="debugging"&&<B moduleName="Debugging Utilities">
|
|
45
|
+
<Ue/>
|
|
46
|
+
</B>}
|
|
47
|
+
</S>:<So/>}
|
|
27
48
|
</S>
|
|
28
49
|
|
|
29
50
|
|
|
30
|
-
{
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
|
|
51
|
+
{H&&<S style={[E.absoluteFill,{backgroundColor:C.contentBg,zIndex:10}]}>
|
|
52
|
+
{e==="apis"&&G!=null&&<B moduleName="Network Request Details">
|
|
53
|
+
<De/>
|
|
54
|
+
</B>}
|
|
55
|
+
{e==="analytics"&&A!=null&&<B moduleName="Analytics Event Details">
|
|
56
|
+
<Ae event={A}/>
|
|
57
|
+
</B>}
|
|
58
|
+
{e==="logs"&&W!=null&&<B moduleName="Console Log Details">
|
|
59
|
+
<Me/>
|
|
60
|
+
</B>}
|
|
61
|
+
{e==="redux"&&<B moduleName="Redux Action & State Details">
|
|
62
|
+
<Le/>
|
|
63
|
+
</B>}
|
|
64
|
+
{e==="crash"&&q!=null&&<B moduleName="Crash Log Details">
|
|
65
|
+
<Oe/>
|
|
66
|
+
</B>}
|
|
67
|
+
{e==="push"&&P!=null&&<B moduleName="Push Notification Details">
|
|
68
|
+
<Ge item={P}onClose={()=>Y(null)}/>
|
|
69
|
+
</B>}
|
|
36
70
|
</S>}
|
|
37
71
|
|
|
38
72
|
|
|
39
|
-
{
|
|
40
|
-
<
|
|
41
|
-
|
|
73
|
+
{N!==null&&<w.View style={[E.absoluteFill,{backgroundColor:C.grayBackground,opacity:M,transform:[{translateY:M.interpolate({inputRange:[0,1],outputRange:[24,0]})}]}]}>
|
|
74
|
+
<B moduleName="Settings Panel">
|
|
75
|
+
<_e/>
|
|
76
|
+
</B>
|
|
77
|
+
</w.View>}
|
|
42
78
|
|
|
43
79
|
|
|
44
|
-
{
|
|
45
|
-
<
|
|
46
|
-
|
|
80
|
+
{D&&<w.View style={[E.absoluteFill,{backgroundColor:C.primaryLight,opacity:v,transform:[{translateY:v.interpolate({inputRange:[0,1],outputRange:[24,0]})}]}]}>
|
|
81
|
+
<B moduleName="About & Diagnostics">
|
|
82
|
+
<$e onClose={()=>_(!1)}/>
|
|
83
|
+
</B>
|
|
84
|
+
</w.View>}
|
|
47
85
|
</S>
|
|
48
86
|
|
|
49
87
|
|
|
50
|
-
<
|
|
88
|
+
<Qe/>
|
|
51
89
|
|
|
52
90
|
|
|
53
|
-
<
|
|
91
|
+
<Je/>
|
|
54
92
|
|
|
55
93
|
|
|
56
|
-
|
|
94
|
+
<Ke/>
|
|
57
95
|
</S>
|
|
58
96
|
</S>
|
|
59
|
-
</
|
|
60
|
-
{
|
|
61
|
-
</
|
|
62
|
-
</>},
|
|
97
|
+
</Be>
|
|
98
|
+
{J&&<Xe onStateChange={K}/>}
|
|
99
|
+
</X>
|
|
100
|
+
</>},So=Q.memo(function(){const V=I(new w.Value(.35)).current;return L(()=>{const R=w.loop(w.sequence([w.timing(V,{toValue:.85,duration:750,useNativeDriver:!1}),w.timing(V,{toValue:.35,duration:750,useNativeDriver:!1})]));return R.start(),()=>R.stop()},[V]),<S style={o.container}>
|
|
63
101
|
|
|
64
|
-
<S style={
|
|
65
|
-
<
|
|
66
|
-
<S style={
|
|
67
|
-
<
|
|
68
|
-
<
|
|
102
|
+
<S style={o.toolbarSkeleton}>
|
|
103
|
+
<w.View style={[o.searchBarSkeleton,{opacity:V}]}/>
|
|
104
|
+
<S style={o.actionButtonsRow}>
|
|
105
|
+
<w.View style={[o.iconButtonSkeleton,{opacity:V}]}/>
|
|
106
|
+
<w.View style={[o.iconButtonSkeleton,{opacity:V}]}/>
|
|
69
107
|
</S>
|
|
70
108
|
</S>
|
|
71
109
|
|
|
72
110
|
|
|
73
|
-
<S style={
|
|
74
|
-
<
|
|
75
|
-
<
|
|
76
|
-
<
|
|
77
|
-
<
|
|
111
|
+
<S style={o.chipStripSkeleton}>
|
|
112
|
+
<w.View style={[o.chipSkeleton,{width:48,opacity:V}]}/>
|
|
113
|
+
<w.View style={[o.chipSkeleton,{width:68,opacity:V}]}/>
|
|
114
|
+
<w.View style={[o.chipSkeleton,{width:76,opacity:V}]}/>
|
|
115
|
+
<w.View style={[o.chipSkeleton,{width:58,opacity:V}]}/>
|
|
78
116
|
</S>
|
|
79
117
|
|
|
80
118
|
|
|
81
|
-
{[0,1,2,3].map(R=><
|
|
82
|
-
<S style={
|
|
83
|
-
<S style={
|
|
84
|
-
<S style={
|
|
85
|
-
<S style={
|
|
119
|
+
{[0,1,2,3].map(R=><w.View key={`skeleton_card_${R}`}style={[o.cardSkeleton,{opacity:V}]}>
|
|
120
|
+
<S style={o.cardTopRow}>
|
|
121
|
+
<S style={o.badgeGroup}>
|
|
122
|
+
<S style={o.statusBadgeSkeleton}/>
|
|
123
|
+
<S style={o.methodBadgeSkeleton}/>
|
|
86
124
|
</S>
|
|
87
|
-
<S style={
|
|
125
|
+
<S style={o.timeSkeleton}/>
|
|
88
126
|
</S>
|
|
89
|
-
<S style={
|
|
90
|
-
<S style={
|
|
91
|
-
<S style={
|
|
92
|
-
<S style={
|
|
93
|
-
<S style={
|
|
127
|
+
<S style={o.urlLineLong}/>
|
|
128
|
+
<S style={o.urlLineShort}/>
|
|
129
|
+
<S style={o.cardBottomRow}>
|
|
130
|
+
<S style={o.metaPillSkeleton}/>
|
|
131
|
+
<S style={o.metaPillSkeleton}/>
|
|
94
132
|
</S>
|
|
95
|
-
</
|
|
96
|
-
</S>}),
|
|
133
|
+
</w.View>)}
|
|
134
|
+
</S>}),o=E.create({container:{flex:1,paddingHorizontal:12,paddingTop:8},toolbarSkeleton:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},searchBarSkeleton:{flex:1,height:36,borderRadius:8,backgroundColor:C.graySurface,borderWidth:1,borderColor:C.dividerColor},actionButtonsRow:{flexDirection:"row",gap:6},iconButtonSkeleton:{width:36,height:36,borderRadius:8,backgroundColor:C.graySurface,borderWidth:1,borderColor:C.dividerColor},chipStripSkeleton:{flexDirection:"row",gap:6,marginBottom:10},chipSkeleton:{height:24,borderRadius:6,backgroundColor:C.graySurface,borderWidth:1,borderColor:C.dividerColor},cardSkeleton:{backgroundColor:C.primaryLight,borderRadius:10,padding:12,marginBottom:8,borderWidth:1,borderColor:C.dividerColor},cardTopRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},badgeGroup:{flexDirection:"row",alignItems:"center",gap:6},statusBadgeSkeleton:{width:38,height:18,borderRadius:4,backgroundColor:C.graySurface},methodBadgeSkeleton:{width:44,height:18,borderRadius:4,backgroundColor:C.graySurface},timeSkeleton:{width:48,height:12,borderRadius:4,backgroundColor:C.graySurface},urlLineLong:{height:13,borderRadius:4,backgroundColor:C.graySurface,marginBottom:5,width:"90%"},urlLineShort:{height:11,borderRadius:4,backgroundColor:C.graySurface,marginBottom:8,width:"55%"},cardBottomRow:{flexDirection:"row",gap:8,marginTop:2},metaPillSkeleton:{width:52,height:14,borderRadius:4,backgroundColor:C.graySurface}});export default eo;
|