react-native-inapp-inspector 2.4.2 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +523 -2
- package/dist/commonjs/capture.d.ts +2 -0
- package/dist/commonjs/capture.js +1 -1
- package/dist/commonjs/components/AnalyticsDetail.js +23 -23
- package/dist/commonjs/components/AnalyticsEventCard.js +1 -1
- package/dist/commonjs/components/AnalyticsGraph.js +44 -44
- package/dist/commonjs/components/AnimatedBrandOwl.js +32 -32
- package/dist/commonjs/components/AppHeaderLogo.js +6 -6
- package/dist/commonjs/components/BrandCircleIcon.js +28 -28
- package/dist/commonjs/components/BrandSquareIcon.js +33 -33
- package/dist/commonjs/components/ConsoleLogCard.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +2 -2
- package/dist/commonjs/components/Inspector/ConfirmationModal.js +23 -25
- package/dist/commonjs/components/Inspector/ConsoleTab.js +5 -5
- package/dist/commonjs/components/Inspector/CrashTab.js +44 -11
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +1 -1
- package/dist/commonjs/components/Inspector/FabLauncher.js +30 -25
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +137 -127
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +1 -1
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +114 -32
- package/dist/commonjs/components/Inspector/MainScreen.js +26 -19
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +38 -35
- package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +345 -123
- package/dist/commonjs/components/Inspector/NetworkTab.js +14 -14
- package/dist/commonjs/components/Inspector/PushCard.js +1 -1
- package/dist/commonjs/components/Inspector/PushDetail.js +9 -9
- package/dist/commonjs/components/Inspector/PushTab.js +3 -3
- package/dist/commonjs/components/Inspector/ReduxTab.js +9 -7
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +102 -73
- package/dist/commonjs/components/Inspector/SocketCard.js +1 -1
- package/dist/commonjs/components/Inspector/SocketDetail.js +73 -63
- package/dist/commonjs/components/Inspector/SocketTab.js +4 -4
- package/dist/commonjs/components/Inspector/StorageTab.js +10 -10
- package/dist/commonjs/components/Inspector/SupportModal.js +2 -2
- package/dist/commonjs/components/Inspector/SupportPage.js +1 -1
- package/dist/commonjs/components/JsonViewer.js +47 -45
- package/dist/commonjs/components/LogCard.js +22 -20
- package/dist/commonjs/components/ModuleErrorBoundary.js +5 -5
- package/dist/commonjs/components/NetworkIcons.d.ts +27 -0
- package/dist/commonjs/components/NetworkIcons.js +103 -5
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/crash.d.ts +1 -1
- package/dist/commonjs/crash.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +2 -1
- package/dist/commonjs/customHooks/crashHandler.js +7 -7
- package/dist/commonjs/editor.d.ts +13 -0
- package/dist/commonjs/editor.js +1 -0
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +1 -1
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/telemetry.js +1 -1
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -1
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -1
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -1
- package/dist/commonjs/i18n/locales/it.json +1 -1
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -1
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -1
- package/dist/commonjs/i18n/locales/mr.json +1 -1
- package/dist/commonjs/i18n/locales/nl.json +1 -1
- package/dist/commonjs/i18n/locales/pa.json +1 -1
- package/dist/commonjs/i18n/locales/pl.json +1 -1
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -1
- package/dist/commonjs/i18n/locales/te.json +1 -1
- package/dist/commonjs/i18n/locales/tr.json +1 -1
- package/dist/commonjs/i18n/locales/vi.json +1 -1
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.d.ts +4 -1
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/native/NativeInspector.d.ts +3 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/commonjs/styles/AppColors.d.ts +42 -2
- package/dist/commonjs/styles/AppColors.js +1 -1
- package/dist/commonjs/styles/common.js +1 -1
- package/dist/commonjs/styles/index.d.ts +7 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/editor.d.ts +96 -0
- package/dist/commonjs/types/editor.js +1 -0
- package/dist/commonjs/types/interfaces.d.ts +21 -0
- package/dist/esm/capture.d.ts +2 -0
- package/dist/esm/capture.js +1 -1
- package/dist/esm/components/AnalyticsDetail.js +31 -31
- package/dist/esm/components/AnalyticsEventCard.js +1 -1
- package/dist/esm/components/AnalyticsGraph.js +74 -74
- package/dist/esm/components/AnimatedBrandOwl.js +114 -114
- package/dist/esm/components/AppHeaderLogo.js +7 -7
- package/dist/esm/components/BrandCircleIcon.js +70 -70
- package/dist/esm/components/BrandSquareIcon.js +61 -61
- package/dist/esm/components/ConsoleLogCard.js +1 -1
- package/dist/esm/components/Inspector/AnalyticsTab.js +14 -14
- package/dist/esm/components/Inspector/ConfirmationModal.js +23 -25
- package/dist/esm/components/Inspector/ConsoleTab.js +17 -17
- package/dist/esm/components/Inspector/CrashTab.js +202 -169
- package/dist/esm/components/Inspector/DeviceInfoTab.js +75 -75
- package/dist/esm/components/Inspector/FabLauncher.js +56 -51
- package/dist/esm/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +162 -152
- package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +1 -1
- package/dist/esm/components/Inspector/LanguageSelectorModal.js +140 -58
- package/dist/esm/components/Inspector/MainScreen.js +61 -54
- package/dist/esm/components/Inspector/MediaGalleryTab.js +55 -52
- package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/esm/components/Inspector/MediaPreviewModal.js +345 -123
- package/dist/esm/components/Inspector/NetworkTab.js +74 -74
- package/dist/esm/components/Inspector/PushCard.js +1 -1
- package/dist/esm/components/Inspector/PushDetail.js +18 -18
- package/dist/esm/components/Inspector/PushTab.js +1 -1
- package/dist/esm/components/Inspector/ReduxTab.js +18 -16
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +224 -195
- package/dist/esm/components/Inspector/SocketCard.js +8 -8
- package/dist/esm/components/Inspector/SocketDetail.js +106 -96
- package/dist/esm/components/Inspector/SocketTab.js +18 -18
- package/dist/esm/components/Inspector/StorageTab.js +47 -47
- package/dist/esm/components/Inspector/SupportModal.js +64 -64
- package/dist/esm/components/Inspector/SupportPage.js +5 -5
- package/dist/esm/components/JsonViewer.js +51 -49
- package/dist/esm/components/LogCard.js +41 -39
- package/dist/esm/components/ModuleErrorBoundary.js +10 -10
- package/dist/esm/components/NetworkIcons.d.ts +27 -0
- package/dist/esm/components/NetworkIcons.js +101 -3
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/crash.d.ts +1 -1
- package/dist/esm/crash.js +1 -1
- package/dist/esm/customHooks/crashHandler.d.ts +2 -1
- package/dist/esm/customHooks/crashHandler.js +7 -7
- package/dist/esm/editor.d.ts +13 -0
- package/dist/esm/editor.js +1 -0
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/telemetry.js +1 -1
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -1
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -1
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -1
- package/dist/esm/i18n/locales/it.json +1 -1
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -1
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -1
- package/dist/esm/i18n/locales/mr.json +1 -1
- package/dist/esm/i18n/locales/nl.json +1 -1
- package/dist/esm/i18n/locales/pa.json +1 -1
- package/dist/esm/i18n/locales/pl.json +1 -1
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -1
- package/dist/esm/i18n/locales/te.json +1 -1
- package/dist/esm/i18n/locales/tr.json +1 -1
- package/dist/esm/i18n/locales/vi.json +1 -1
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/native/NativeInspector.d.ts +3 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/esm/styles/AppColors.d.ts +42 -2
- package/dist/esm/styles/AppColors.js +1 -1
- package/dist/esm/styles/common.js +1 -1
- package/dist/esm/styles/index.d.ts +7 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/editor.d.ts +96 -0
- package/dist/esm/types/editor.js +1 -0
- package/dist/esm/types/interfaces.d.ts +21 -0
- package/editor.d.ts +1 -0
- package/editor.js +1 -0
- package/ios/NetworkInspectorModule.mm +429 -0
- package/package.json +10 -1
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/native/NativeInspector.ts +57 -4
- package/src/native/NativeNetworkInspector.ts +4 -0
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import F,{useCallback as k,useMemo as P,useRef as ne}from"react";import{FlatList as Se,Pressable as Ce,ScrollView as Q,Text as A,TextInput as Ie,View as S}from"react-native";import{useInspector as Te}from"./InspectorContext";import{useTranslation as xe}from"../../i18n";import H from"../TouchableScale";import Le from"../AnimatedEntrance";import{ConsoleLogCard as Ae}from"../ConsoleLogCard";import Ve from"../EmptyState";import
|
|
2
|
-
<Ae item={e}searchStr={
|
|
3
|
-
</Le>,[
|
|
1
|
+
import F,{useCallback as k,useMemo as P,useRef as ne}from"react";import{FlatList as Se,Pressable as Ce,ScrollView as Q,Text as A,TextInput as Ie,View as S}from"react-native";import{useInspector as Te}from"./InspectorContext";import{useTranslation as xe}from"../../i18n";import H from"../TouchableScale";import Le from"../AnimatedEntrance";import{ConsoleLogCard as Ae}from"../ConsoleLogCard";import Ve from"../EmptyState";import Ee from"../EndOfListFooter";import T from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as z}from"../../styles/AppFonts";import{LogFilter as V}from"../../types";import{SearchIcon as Be,ClearIcon as Fe,SortArrowIcon as Pe,TrashIcon as He,LayersIcon as Re,UserIcon as We,InfoCircleIcon as $e,WarningTriangleIcon as Oe,ErrorCircleIcon as De,AnalyticsIcon as Ne}from"../NetworkIcons";const Y=10,Ue=F.memo(()=>{const{t:C}=xe(),{logSearch:y,setLogSearch:E,logSortOrder:K,setLogSortOrder:X,handleDelete:j,logFilters:h,setLogFilters:R,logCounts:x,filteredConsoleLogs:w,visibleConsoleLogs:D,maxConsoleLogs:W,setSelectedLog:N}=Te(),q=W||100,U=ne(null),[G,M]=F.useState(q);F.useEffect(()=>{M(W||100),U.current?.scrollToOffset({offset:0,animated:!1})},[y,h,W]);const $=P(()=>w.slice(0,G),[w,G]),v=k(e=>{N(e)},[N]),J=k(({item:e,index:t})=><Le index={t}distance={8}>
|
|
2
|
+
<Ae item={e}searchStr={y}onPress={v}/>
|
|
3
|
+
</Le>,[y,v]),Z=k((e,t)=>({length:148,offset:148*t,index:t}),[]),ee=k((e,t)=>e?.id?.toString()??t.toString(),[]),oe=P(()=>{const e=D.length,t=w.length;if(h.has("all")||!Array.from(h).some(B=>B!=="all"))return<S style={{paddingHorizontal:8,paddingTop:8,paddingBottom:3}}>
|
|
4
4
|
<A style={{fontFamily:z.interMedium,fontSize:11,color:o.grayTextWeak,letterSpacing:.2}}>
|
|
5
5
|
{t===e?`Showing ${e} logs`:`Showing ${t} of ${e} logs`}
|
|
6
6
|
</A>
|
|
7
|
-
</S>;{const
|
|
7
|
+
</S>;{const B=Array.from(h).filter(I=>I!=="all").map(I=>I==="user-log"?"Log":I==="analytics"?"Analytics":I.charAt(0).toUpperCase()+I.slice(1));return<S style={{paddingHorizontal:12,paddingTop:8,paddingBottom:3}}>
|
|
8
8
|
<A style={{fontFamily:z.interMedium,fontSize:11,color:o.grayTextWeak,letterSpacing:.2}}>
|
|
9
|
-
Filtered by {
|
|
9
|
+
Filtered by {B.join(", ")} ({t} of {e} logs)
|
|
10
10
|
</A>
|
|
11
|
-
</S>}},[D.length,
|
|
11
|
+
</S>}},[D.length,w.length,h]),[O,_]=F.useState(!1),te=P(()=>["[AXIOS]","[API]","[GRAPHQL]","[REDUX]","[ANALYTICS]","[AUTH]","[NAV]","[STORAGE]","[PERF]","[WS]","[PUSH]","[PAYMENT]","[SYNC]","[BLE]","[LOCATION]","[TEST]","[DEBUG]"],[]),re=P(()=>[{id:V.All,label:C("common.all","All"),count:x.all?.split("/")?.[0]??"0",color:o.purple,Icon:Re},{id:V.UserLog,label:C("console.log","Log"),count:x["user-log"]?.split("/")?.[0]??"0",color:o.teal600,Icon:We},{id:V.Info,label:C("console.info","Info"),count:x.info?.split("/")?.[0]??"0",color:o.sky600,Icon:$e},{id:V.Warn,label:C("console.warning","Warn"),count:x.warn?.split("/")?.[0]??"0",color:o.amber600,Icon:Oe},{id:V.Error,label:C("console.error","Error"),count:x.error?.split("/")?.[0]??"0",color:o.errorColor,Icon:De},{id:V.Analytics,label:C("console.analytics","Analytics"),count:x.analytics?.split("/")?.[0]??"0",color:o.violet600,Icon:Ne}],[x,C]);return<S style={{flex:1}}>
|
|
12
12
|
<S style={{backgroundColor:o.white,borderBottomWidth:1,borderBottomColor:o.dividerColor,paddingBottom:6}}>
|
|
13
13
|
<S style={[T.toolbarRow,{marginTop:12,marginBottom:8}]}>
|
|
14
14
|
<S style={[T.searchContainer,O&&{borderColor:o.purple,borderWidth:1.5}]}>
|
|
15
|
-
<
|
|
16
|
-
<Ie placeholder={
|
|
17
|
-
{
|
|
15
|
+
<Be color={O?o.purple:o.grayTextWeak}size={16}/>
|
|
16
|
+
<Ie placeholder={C("console.searchPlaceholder")}placeholderTextColor={o.grayTextWeak}value={y}onChangeText={E}onFocus={()=>_(!0)}onBlur={()=>_(!1)}style={T.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
17
|
+
{y.length>0&&<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
18
18
|
<S style={{backgroundColor:`${o.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:2}}>
|
|
19
19
|
<A style={{color:o.purple,fontSize:10,fontFamily:z.interBold}}>
|
|
20
|
-
{
|
|
20
|
+
{w.length}
|
|
21
21
|
</A>
|
|
22
22
|
</S>
|
|
23
|
-
<Ce onPress={()=>
|
|
23
|
+
<Ce onPress={()=>E("")}hitSlop={10}style={T.clearBtn}>
|
|
24
24
|
<Fe color={o.grayTextWeak}size={14}/>
|
|
25
25
|
</Ce>
|
|
26
26
|
</S>}
|
|
@@ -37,8 +37,8 @@ import F,{useCallback as k,useMemo as P,useRef as ne}from"react";import{FlatList
|
|
|
37
37
|
</S>
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
{(O||
|
|
41
|
-
{te.map(e=>{const t=
|
|
40
|
+
{(O||y.length>0)&&<Q horizontal showsHorizontalScrollIndicator={!1}style={{marginBottom:6,maxHeight:30}}contentContainerStyle={{paddingHorizontal:8,flexDirection:"row",alignItems:"center",gap:6}}>
|
|
41
|
+
{te.map(e=>{const t=y.includes(e);return<H key={e}onPress={()=>{E(t?r=>r.replace(e,"").trim():r=>r?`${r} ${e}`.trim():e)}}>
|
|
42
42
|
<S style={{paddingHorizontal:8,paddingVertical:3,borderRadius:6,backgroundColor:t?o.purple:`${o.purple}14`,borderWidth:1,borderColor:t?o.purple:`${o.purple}30`}}>
|
|
43
43
|
<A style={{fontFamily:z.interBold,fontSize:10,color:t?o.white:o.purple}}>
|
|
44
44
|
{e}
|
|
@@ -48,11 +48,11 @@ import F,{useCallback as k,useMemo as P,useRef as ne}from"react";import{FlatList
|
|
|
48
48
|
</Q>}
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
<S style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:
|
|
51
|
+
<S style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:8,gap:6}}>
|
|
52
52
|
<Q horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
53
|
-
{re.map(e=>{const t=e.id==="all"?
|
|
53
|
+
{re.map(e=>{const t=e.id==="all"?h.has("all"):h.has(e.id)&&!h.has("all"),r=e.color||o.purple,B=t?o.white:r,I=e.Icon;return<H key={e.id}onPress={()=>{e.id==="all"?R(new Set(["all"])):R(le=>{const L=new Set(le);return L.delete("all"),L.has(e.id)?L.delete(e.id):L.add(e.id),L.size===0&&L.add("all"),L})}}>
|
|
54
54
|
<S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:t?r:`${r}12`,borderWidth:1,borderColor:t?r:`${r}30`,gap:5}}>
|
|
55
|
-
<I size={11}color={
|
|
55
|
+
<I size={11}color={B}/>
|
|
56
56
|
<A style={{fontFamily:z.interBold,fontSize:10.5,color:t?o.white:o.primaryBlack}}>
|
|
57
57
|
{e.label}
|
|
58
58
|
</A>
|
|
@@ -67,5 +67,5 @@ import F,{useCallback as k,useMemo as P,useRef as ne}from"react";import{FlatList
|
|
|
67
67
|
</S>
|
|
68
68
|
</S>
|
|
69
69
|
|
|
70
|
-
<Se ref={U}data={$}keyExtractor={ee}ListHeaderComponent={oe}renderItem={J}getItemLayout={Z}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}ListEmptyComponent={<Ve isSearch={
|
|
70
|
+
<Se ref={U}data={$}keyExtractor={ee}ListHeaderComponent={oe}renderItem={J}getItemLayout={Z}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}ListEmptyComponent={<Ve isSearch={y.length>0||!h.has("all")}searchQuery={y}customTitle={y.length>0?"No matching console logs":"No console logs"}onClearSearch={()=>{E(""),R(new Set(["all"]))}}/>}ListFooterComponent={w.length>0?<Ee count={$.length}totalCount={w.length}label="logs"loadMoreStep={Y}hasMore={$.length<w.length}onLoadMore={()=>M(e=>e+Y)}/>:null}style={{flex:1}}contentContainerStyle={[T.listContent,{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
71
71
|
</S>});export default Ue;
|
|
@@ -1,211 +1,244 @@
|
|
|
1
|
-
import
|
|
2
|
-
<
|
|
1
|
+
import He,{useCallback as Pe,useEffect as $e,useMemo as Y,useRef as Le,useState as A}from"react";import{FlatList as We,ScrollView as _,StyleSheet as De,Text as C,TextInput as Ae,TouchableOpacity as Me,View as T}from"react-native";import{useTranslation as je}from"../../i18n";import{useInspector as Ee}from"./InspectorContext";import H from"../TouchableScale";import Ne from"../AnimatedEntrance";import Oe from"../EndOfListFooter";import Je from"./FeatureUnderDevNotice";import Ge from"../HighlightText";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import{clearCrashRecords as Ue,simulateTestCrash as J}from"../../customHooks/crashHandler";import _e,{DEFAULT_CRASH_FILTERS as Z,isCrashFiltersDefault as M}from"./CrashFilterModal";import{ConfirmationModal as Qe}from"./ConfirmationModal";import{SearchIcon as Ke,ClearIcon as Xe,TrashIcon as Ye,TerminalIcon as Ze,LayersIcon as er,ClockIcon as Cr,ShieldAlertIcon as Tr,FlameIcon as Sr,JsIcon as Ce,HourglassIcon as Te,SkullIcon as kr,LayoutIcon as Se,ChipIcon as Be,AppleIcon as Br,AndroidIcon as Ir,RepeatIcon as Vr,CodeBracketsIcon as Fr,FilterIcon as Rr,ForwardChevronIcon as Hr}from"../NetworkIcons";const Pr=B=>{const P=Date.now(),N=Math.max(0,P-B),$=Math.floor(N/1e3),j=Math.floor($/60),D=Math.floor(j/60),E=Math.floor(D/24);return $<60?`${$}s ago`:j<60?`${j}m ago`:D<24?`${D}h ago`:`${E}d ago`},Ie=10,$r=He.memo(()=>{const{t:B}=je(),{crashRecords:P,setSelectedCrash:N,maxCrashLogs:$}=Ee(),j=$||50,D=Le(null),[E,Q]=A(j),[z,G]=A(""),[F,q]=A("all"),[S,K]=A(Z),[ze,X]=A(!1),[Ve,U]=A(!1);$e(()=>{Q($||50),D.current?.scrollToOffset({offset:0,animated:!1})},[z,F,S,$]);const V=Y(()=>{const t=P.length;let x=0,w=0,R=0,I=0,O=0;return P.forEach(W=>{W.isFatal&&x++,W.type==="js"?w++:W.type==="promise"?R++:W.type==="render"?I++:W.type==="native"&&O++}),{total:t,fatalCount:x,jsCount:w,promiseCount:R,renderCount:I,nativeCount:O}},[P]),L=Y(()=>{let t=P.filter(x=>{if(F==="fatal"&&!x.isFatal||F==="js"&&x.type!=="js"||F==="promise"&&x.type!=="promise"||F==="render"&&x.type!=="render"||F==="native"&&x.type!=="native"||S.types.size>0&&!S.types.has("all")&&!(S.types.has("fatal")&&x.isFatal||S.types.has("js")&&x.type==="js"||S.types.has("promise")&&x.type==="promise"||S.types.has("render")&&x.type==="render"||S.types.has("native")&&x.type==="native"))return!1;if(S.timeWindow!=="all"){const w=Date.now(),R=S.timeWindow==="15m"?w-900*1e3:S.timeWindow==="1h"?w-3600*1e3:S.timeWindow==="24h"?w-1440*60*1e3:w-10080*60*1e3;if(x.timestamp<R)return!1}if(S.platform!=="all"&&(x.deviceInfo?.platform||"").toLowerCase()!==S.platform)return!1;if(S.engine!=="all"){const w=x.deviceInfo?.isHermes;if(S.engine==="hermes"&&w!==!0||S.engine==="jsc"&&w===!0)return!1}if(z.trim().length>0){const w=z.trim().toLowerCase().split(/\s+/).filter(Boolean),R=[x.message||"",x.name||"",x.stack||"",x.type||"",x.deviceInfo?.platform||"",...(x.breadcrumbs||[]).map(I=>`${I.type||""} ${I.message||""}`)].join(" ").toLowerCase();return w.every(I=>R.includes(I))}return!0});return S.sortBy==="time_asc"&&(t=[...t].sort((x,w)=>x.timestamp-w.timestamp)),t},[P,F,z,S]),Fe=()=>{U(!0)},Re=Pe(({item:t,index:x})=>{const w=t.isFatal,R=t.type.toUpperCase(),I=t.parsedStack&&t.parsedStack.length>0?t.parsedStack.find(ve=>ve.isAppCode)||t.parsedStack[0]:null,O=t.type==="native"?`${e.errorColor}22`:t.type==="render"?`${e.purple}22`:t.type==="promise"?`${e.darkOrange}22`:`${e.offerPurple}22`,W=t.type==="native"?e.errorColor:t.type==="render"?e.purple:t.type==="promise"?e.darkOrange:e.offerPurple;return<Ne index={x}distance={8}>
|
|
2
|
+
<H onPress={()=>{N(t)}}style={[r.cardContainer,w&&r.fatalCardBorder]}>
|
|
3
3
|
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
</C>
|
|
9
|
-
|
|
10
|
-
{x?<C style={t.fatalBadge}>
|
|
11
|
-
<Ee size={10}color={e.white}/>
|
|
12
|
-
<T style={t.fatalBadgeText}>{S("crash.fatalBadge")}</T>
|
|
13
|
-
</C>:<C style={t.caughtBadge}>
|
|
14
|
-
<T style={t.caughtBadgeText}>{S("crash.handledBadge")}</T>
|
|
15
|
-
</C>}
|
|
16
|
-
|
|
17
|
-
<C style={[t.typeBadge,{backgroundColor:O}]}>
|
|
18
|
-
<T style={[t.typeBadgeText,{color:L}]}>
|
|
19
|
-
{F}
|
|
20
|
-
</T>
|
|
21
|
-
</C>
|
|
22
|
-
</C>
|
|
23
|
-
|
|
24
|
-
<C style={t.timeRow}>
|
|
25
|
-
<Me size={11}color={e.grayTextWeak}/>
|
|
26
|
-
<T style={t.timestampText}>
|
|
27
|
-
{r.timeStr||new Date(r.timestamp).toLocaleTimeString()}
|
|
4
|
+
<T style={r.cardHeader}>
|
|
5
|
+
<T style={r.badgeRow}>
|
|
6
|
+
<T style={r.sNoBadge}>
|
|
7
|
+
<C style={r.sNoBadgeText}>#{x+1}</C>
|
|
28
8
|
</T>
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
|
|
10
|
+
{w?<T style={r.fatalBadge}>
|
|
11
|
+
<Sr size={10}color={e.white}/>
|
|
12
|
+
<C style={r.fatalBadgeText}>{B("crash.fatalBadge")}</C>
|
|
13
|
+
</T>:<T style={r.caughtBadge}>
|
|
14
|
+
<C style={r.caughtBadgeText}>{B("crash.handledBadge")}</C>
|
|
15
|
+
</T>}
|
|
16
|
+
|
|
17
|
+
<T style={[r.typeBadge,{backgroundColor:O}]}>
|
|
18
|
+
<C style={[r.typeBadgeText,{color:W}]}>
|
|
19
|
+
{R}
|
|
20
|
+
</C>
|
|
31
21
|
</T>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
</T>
|
|
23
|
+
|
|
24
|
+
<T style={r.timeRow}>
|
|
25
|
+
<Cr size={11}color={e.grayTextWeak}/>
|
|
26
|
+
<C style={r.timestampText}>
|
|
27
|
+
{t.timeStr||new Date(t.timestamp).toLocaleTimeString()}
|
|
28
|
+
</C>
|
|
29
|
+
<C style={r.relativeTimeText}>
|
|
30
|
+
{Pr(t.timestamp)}
|
|
31
|
+
</C>
|
|
32
|
+
<Hr size={13}color={e.grayTextWeak}/>
|
|
33
|
+
</T>
|
|
34
|
+
</T>
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
<
|
|
38
|
-
<
|
|
39
|
-
</
|
|
37
|
+
<T style={{marginVertical:6}}>
|
|
38
|
+
<Ge text={t.message||B("crash.unknownException")}highlight={z}numberOfLines={3}style={r.errorMessageText}/>
|
|
39
|
+
</T>
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
{I&&<
|
|
43
|
-
<
|
|
44
|
-
<
|
|
42
|
+
{I&&<T style={r.locationRow}>
|
|
43
|
+
<Ze size={12}color={e.grayTextWeak}/>
|
|
44
|
+
<C numberOfLines={1}ellipsizeMode="middle"style={r.locationText}>
|
|
45
45
|
{I.method!=="<anonymous>"?`${I.method} `:""}
|
|
46
|
-
<
|
|
46
|
+
<C style={{color:e.purple,fontFamily:k.interBold}}>
|
|
47
47
|
{I.file}:{I.lineNumber}
|
|
48
|
-
</
|
|
49
|
-
</
|
|
50
|
-
</
|
|
48
|
+
</C>
|
|
49
|
+
</C>
|
|
50
|
+
</T>}
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
{
|
|
56
|
-
{
|
|
57
|
-
<
|
|
58
|
-
{
|
|
59
|
-
{
|
|
60
|
-
</
|
|
61
|
-
</
|
|
62
|
-
{
|
|
63
|
-
<
|
|
64
|
-
{
|
|
65
|
-
</
|
|
66
|
-
</
|
|
67
|
-
{
|
|
68
|
-
<
|
|
69
|
-
<
|
|
70
|
-
{
|
|
71
|
-
</
|
|
72
|
-
</
|
|
73
|
-
{
|
|
74
|
-
<
|
|
75
|
-
<
|
|
76
|
-
{
|
|
77
|
-
</
|
|
78
|
-
</
|
|
79
|
-
{
|
|
80
|
-
<
|
|
81
|
-
{
|
|
82
|
-
</
|
|
83
|
-
</
|
|
84
|
-
</
|
|
85
|
-
</
|
|
86
|
-
</
|
|
87
|
-
</
|
|
88
|
-
{
|
|
53
|
+
<T style={r.cardFooter}>
|
|
54
|
+
<T style={{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap"}}>
|
|
55
|
+
{t.deviceInfo&&<T style={r.metaPill}>
|
|
56
|
+
{t.deviceInfo.platform==="ios"?<Br size={10}color={e.grayText}/>:t.deviceInfo.platform==="android"?<Ir size={10}color={e.grayText}/>:null}
|
|
57
|
+
<C style={r.metaPillText}>
|
|
58
|
+
{t.deviceInfo.platform?.toUpperCase()}{" "}
|
|
59
|
+
{t.deviceInfo.osVersion||""}
|
|
60
|
+
</C>
|
|
61
|
+
</T>}
|
|
62
|
+
{t.deviceInfo&&<T style={r.metaPill}>
|
|
63
|
+
<C style={r.metaPillText}>
|
|
64
|
+
{t.deviceInfo.isHermes?"Hermes":"JSC"}
|
|
65
|
+
</C>
|
|
66
|
+
</T>}
|
|
67
|
+
{t.parsedStack&&t.parsedStack.length>0&&<T style={r.metaPill}>
|
|
68
|
+
<Fr size={10}color={e.grayText}/>
|
|
69
|
+
<C style={r.metaPillText}>
|
|
70
|
+
{t.parsedStack.length}
|
|
71
|
+
</C>
|
|
72
|
+
</T>}
|
|
73
|
+
{t.breadcrumbs&&t.breadcrumbs.length>0&&<T style={r.metaPill}>
|
|
74
|
+
<Vr size={10}color={e.grayText}/>
|
|
75
|
+
<C style={r.metaPillText}>
|
|
76
|
+
{t.breadcrumbs.length} trail
|
|
77
|
+
</C>
|
|
78
|
+
</T>}
|
|
79
|
+
{t.memoryInfo&&<T style={r.metaPill}>
|
|
80
|
+
<C style={r.metaPillText}>
|
|
81
|
+
{t.memoryInfo.usedJSHeapSize} MB
|
|
82
|
+
</C>
|
|
83
|
+
</T>}
|
|
84
|
+
</T>
|
|
85
|
+
</T>
|
|
86
|
+
</H>
|
|
87
|
+
</Ne>},[z,N]);return<T style={r.container}>
|
|
88
|
+
{P.length>0&&<>
|
|
89
89
|
|
|
90
|
-
<
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
</
|
|
90
|
+
<T style={r.statsBar}>
|
|
91
|
+
<_ horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={r.statsScrollContent}>
|
|
92
|
+
<T style={[r.statChip,r.statChipActive]}>
|
|
93
|
+
<C style={r.statChipValue}>{V.total}</C>
|
|
94
|
+
<C style={r.statChipLabel}>{B("crash.statCrashes")}</C>
|
|
95
|
+
</T>
|
|
96
96
|
|
|
97
|
-
<
|
|
98
|
-
<
|
|
97
|
+
<T style={r.statChip}>
|
|
98
|
+
<C style={[r.statChipValue,{color:e.errorColor}]}>
|
|
99
99
|
{V.fatalCount}
|
|
100
|
-
</
|
|
101
|
-
<
|
|
102
|
-
</
|
|
100
|
+
</C>
|
|
101
|
+
<C style={r.statChipLabel}>{B("crash.statFatal")}</C>
|
|
102
|
+
</T>
|
|
103
103
|
|
|
104
|
-
<
|
|
105
|
-
<
|
|
104
|
+
<T style={r.statChip}>
|
|
105
|
+
<C style={[r.statChipValue,{color:e.offerPurple}]}>
|
|
106
106
|
{V.jsCount}
|
|
107
|
-
</
|
|
108
|
-
<
|
|
109
|
-
</
|
|
107
|
+
</C>
|
|
108
|
+
<C style={r.statChipLabel}>{B("crash.statJsErrors")}</C>
|
|
109
|
+
</T>
|
|
110
110
|
|
|
111
|
-
<
|
|
112
|
-
<
|
|
111
|
+
<T style={r.statChip}>
|
|
112
|
+
<C style={[r.statChipValue,{color:e.darkOrange}]}>
|
|
113
113
|
{V.promiseCount}
|
|
114
|
-
</
|
|
115
|
-
<
|
|
116
|
-
</
|
|
114
|
+
</C>
|
|
115
|
+
<C style={r.statChipLabel}>{B("crash.statPromises")}</C>
|
|
116
|
+
</T>
|
|
117
117
|
|
|
118
|
-
<
|
|
119
|
-
<
|
|
118
|
+
<T style={r.statChip}>
|
|
119
|
+
<C style={[r.statChipValue,{color:e.purple}]}>
|
|
120
120
|
{V.renderCount}
|
|
121
|
-
</
|
|
122
|
-
<
|
|
123
|
-
</
|
|
121
|
+
</C>
|
|
122
|
+
<C style={r.statChipLabel}>{B("crash.statRender")}</C>
|
|
123
|
+
</T>
|
|
124
124
|
|
|
125
|
-
<
|
|
126
|
-
<
|
|
125
|
+
<T style={r.statChip}>
|
|
126
|
+
<C style={[r.statChipValue,{color:e.skyBlue}]}>
|
|
127
127
|
{V.nativeCount}
|
|
128
|
-
</
|
|
129
|
-
<
|
|
130
|
-
</
|
|
131
|
-
</
|
|
132
|
-
</
|
|
128
|
+
</C>
|
|
129
|
+
<C style={r.statChipLabel}>{B("crash.statNative")}</C>
|
|
130
|
+
</T>
|
|
131
|
+
</_>
|
|
132
|
+
</T>
|
|
133
133
|
|
|
134
134
|
|
|
135
|
-
<
|
|
136
|
-
<
|
|
137
|
-
<
|
|
138
|
-
<
|
|
139
|
-
<
|
|
140
|
-
{
|
|
141
|
-
<
|
|
142
|
-
<
|
|
143
|
-
{
|
|
144
|
-
</
|
|
145
|
-
</
|
|
146
|
-
<
|
|
147
|
-
<
|
|
148
|
-
</
|
|
149
|
-
</
|
|
150
|
-
</
|
|
135
|
+
<T style={r.controlsContainer}>
|
|
136
|
+
<T style={r.searchRow}>
|
|
137
|
+
<T style={r.searchInputWrapper}>
|
|
138
|
+
<Ke color={e.grayTextWeak}size={14}/>
|
|
139
|
+
<Ae value={z}onChangeText={G}placeholder={B("crash.searchPlaceholder")}placeholderTextColor={e.grayTextWeak}style={r.searchInput}autoCapitalize="none"autoCorrect={!1}/>
|
|
140
|
+
{z.length>0&&<T style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
141
|
+
<T style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
142
|
+
<C style={{color:e.purple,fontSize:9.5,fontFamily:k.interBold}}>
|
|
143
|
+
{L.length}
|
|
144
|
+
</C>
|
|
145
|
+
</T>
|
|
146
|
+
<Me onPress={()=>G("")}hitSlop={8}>
|
|
147
|
+
<Xe color={e.grayTextWeak}size={14}/>
|
|
148
|
+
</Me>
|
|
149
|
+
</T>}
|
|
150
|
+
</T>
|
|
151
151
|
|
|
152
152
|
|
|
153
|
-
<
|
|
154
|
-
<
|
|
155
|
-
{
|
|
156
|
-
</
|
|
153
|
+
<H onPress={()=>X(!0)}style={[r.filterButton,!M(S)&&{borderColor:`${e.brandPurple}60`,backgroundColor:`${e.brandPurple}15`}]}>
|
|
154
|
+
<Rr size={14}color={M(S)?e.grayTextStrong:e.brandPurple}/>
|
|
155
|
+
{!M(S)&&<T style={{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:3.5,backgroundColor:e.darkOrange,borderWidth:1,borderColor:e.white}}/>}
|
|
156
|
+
</H>
|
|
157
157
|
|
|
158
158
|
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
</
|
|
162
|
-
</
|
|
159
|
+
<H onPress={Fe}style={r.clearButton}>
|
|
160
|
+
<Ye size={14}color={e.errorColor}/>
|
|
161
|
+
</H>
|
|
162
|
+
</T>
|
|
163
163
|
|
|
164
|
-
<
|
|
164
|
+
<Je featureName="Crash & Exception Sentinel"/>
|
|
165
165
|
|
|
166
166
|
|
|
167
|
-
<
|
|
168
|
-
<
|
|
169
|
-
{[{key:"all",label:
|
|
170
|
-
<
|
|
171
|
-
<I size={11}color={
|
|
172
|
-
<
|
|
173
|
-
{
|
|
174
|
-
</T>
|
|
175
|
-
<C style={{backgroundColor:o?"rgba(255,255,255,0.25)":`${x}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8,alignItems:"center",justifyContent:"center"}}>
|
|
176
|
-
<T style={{fontFamily:k.interBold,fontSize:9.5,color:o?e.white:x}}>
|
|
177
|
-
{r.count}
|
|
178
|
-
</T>
|
|
167
|
+
<T style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
168
|
+
<_ horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
169
|
+
{[{key:"all",label:B("crash.filterAll"),Icon:er,count:V.total,themeColor:e.purple},{key:"fatal",label:B("crash.filterFatal"),Icon:kr,count:V.fatalCount,themeColor:e.errorColor},{key:"js",label:B("crash.filterJsError"),Icon:Ce,count:V.jsCount,themeColor:e.amber600},{key:"promise",label:B("crash.filterPromise"),Icon:Te,count:V.promiseCount,themeColor:e.orange600},{key:"render",label:B("crash.filterRender"),Icon:Se,count:V.renderCount,themeColor:e.violet600},{key:"native",label:B("crash.filterNative"),Icon:Be,count:V.nativeCount,themeColor:e.cyan600}].map(t=>{const x=F===t.key,w=t.themeColor||e.purple,R=x?e.white:w,I=t.Icon;return<H key={t.key}onPress={()=>q(t.key)}>
|
|
170
|
+
<T style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:x?w:`${w}12`,borderWidth:1,borderColor:x?w:`${w}30`,gap:5}}>
|
|
171
|
+
<I size={11}color={R}/>
|
|
172
|
+
<C style={{fontFamily:k.interBold,fontSize:10.5,color:x?e.white:e.primaryBlack}}>
|
|
173
|
+
{t.label}
|
|
179
174
|
</C>
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
175
|
+
<T style={{backgroundColor:x?"rgba(255,255,255,0.25)":`${w}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8,alignItems:"center",justifyContent:"center"}}>
|
|
176
|
+
<C style={{fontFamily:k.interBold,fontSize:9.5,color:x?e.white:w}}>
|
|
177
|
+
{t.count}
|
|
178
|
+
</C>
|
|
179
|
+
</T>
|
|
180
|
+
</T>
|
|
181
|
+
</H>})}
|
|
182
|
+
</_>
|
|
183
|
+
</T>
|
|
184
|
+
</T>
|
|
185
185
|
</>}
|
|
186
186
|
|
|
187
187
|
|
|
188
|
-
{
|
|
189
|
-
<
|
|
190
|
-
<
|
|
191
|
-
</C>
|
|
192
|
-
<T style={t.emptyTitle}>
|
|
193
|
-
{B.length>0?"No matching crash entries":z!=="all"||!$(w)?"No crashes match filters":S("crash.emptyTitle")}
|
|
194
|
-
</T>
|
|
195
|
-
<T style={t.emptySub}>
|
|
196
|
-
{B?`No crash entries matched "${B}"`:z!=="all"||!$(w)?"Try adjusting your filters or search keywords.":S("crash.emptySubtitle")}
|
|
188
|
+
{L.length===0?<_ contentContainerStyle={r.emptyContainer}showsVerticalScrollIndicator={!1}>
|
|
189
|
+
<T style={r.emptyIconCircle}>
|
|
190
|
+
<Tr size={38}color={e.greenColor}/>
|
|
197
191
|
</T>
|
|
198
|
-
|
|
199
|
-
|
|
192
|
+
<C style={r.emptyTitle}>
|
|
193
|
+
{z.length>0?"No matching crash entries":F!=="all"||!M(S)?"No crashes match filters":B("crash.emptyTitle")}
|
|
194
|
+
</C>
|
|
195
|
+
<C style={r.emptySub}>
|
|
196
|
+
{z?`No crash entries matched "${z}"`:F!=="all"||!M(S)?"Try adjusting your filters or search keywords.":B("crash.emptySubtitle")}
|
|
197
|
+
</C>
|
|
198
|
+
{z.length>0||F!=="all"||!M(S)?<H onPress={()=>{G(""),q("all"),K(Z)}}style={{marginTop:10,paddingHorizontal:14,paddingVertical:7,borderRadius:8,backgroundColor:e.purple}}>
|
|
199
|
+
<C style={{fontFamily:k.interBold,fontSize:11.5,color:e.white}}>
|
|
200
200
|
Clear Search & Filters
|
|
201
|
+
</C>
|
|
202
|
+
</H>:<T style={{marginTop:18,alignItems:"center",width:"100%",paddingHorizontal:16}}>
|
|
203
|
+
<C style={{fontFamily:k.interBold,fontSize:10.5,color:e.grayText,letterSpacing:.6,marginBottom:10}}>
|
|
204
|
+
TEST CRASH SENTINEL
|
|
205
|
+
</C>
|
|
206
|
+
<T style={{flexDirection:"row",gap:7,flexWrap:"wrap",justifyContent:"center"}}>
|
|
207
|
+
<H onPress={()=>J("js","Test JavaScript ReferenceError: variable is not defined",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${e.amber600}14`,borderWidth:1,borderColor:`${e.amber600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
|
|
208
|
+
<Ce size={11}color={e.amber600}/>
|
|
209
|
+
<C style={{fontFamily:k.interBold,fontSize:10.5,color:e.primaryBlack}}>
|
|
210
|
+
Simulate JS Crash
|
|
211
|
+
</C>
|
|
212
|
+
</H>
|
|
213
|
+
|
|
214
|
+
<H onPress={()=>J("native","Test Native Crash: SIGSEGV (Segmentation Fault)",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${e.cyan600}14`,borderWidth:1,borderColor:`${e.cyan600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
|
|
215
|
+
<Be size={11}color={e.cyan600}/>
|
|
216
|
+
<C style={{fontFamily:k.interBold,fontSize:10.5,color:e.primaryBlack}}>
|
|
217
|
+
Simulate Native Crash
|
|
218
|
+
</C>
|
|
219
|
+
</H>
|
|
220
|
+
|
|
221
|
+
<H onPress={()=>J("promise","Unhandled Promise Rejection: Gateway connection timed out",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${e.orange600}14`,borderWidth:1,borderColor:`${e.orange600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
|
|
222
|
+
<Te size={11}color={e.orange600}/>
|
|
223
|
+
<C style={{fontFamily:k.interBold,fontSize:10.5,color:e.primaryBlack}}>
|
|
224
|
+
Simulate Promise
|
|
225
|
+
</C>
|
|
226
|
+
</H>
|
|
227
|
+
|
|
228
|
+
<H onPress={()=>J("render","Render Error: Cannot read property of undefined in Component",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${e.violet600}14`,borderWidth:1,borderColor:`${e.violet600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
|
|
229
|
+
<Se size={11}color={e.violet600}/>
|
|
230
|
+
<C style={{fontFamily:k.interBold,fontSize:10.5,color:e.primaryBlack}}>
|
|
231
|
+
Simulate Render
|
|
232
|
+
</C>
|
|
233
|
+
</H>
|
|
201
234
|
</T>
|
|
202
|
-
</
|
|
203
|
-
</
|
|
204
|
-
<
|
|
235
|
+
</T>}
|
|
236
|
+
</_>:<>
|
|
237
|
+
<We ref={D}data={L.slice(0,E)}keyExtractor={t=>t.id}renderItem={Re}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}style={{flex:1}}contentContainerStyle={[r.listContent,{flexGrow:1}]}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}keyboardShouldPersistTaps="handled"ListFooterComponent={L.length>0?<Oe count={Math.min(E,L.length)}totalCount={L.length}label="crashes"loadMoreStep={Ie}hasMore={L.length>E}onLoadMore={()=>Q(t=>t+Ie)}/>:null}/>
|
|
205
238
|
</>}
|
|
206
239
|
|
|
207
240
|
|
|
208
|
-
<
|
|
241
|
+
<_e visible={ze}onClose={()=>X(!1)}filters={S}onApply={K}searchQuery={z}/>
|
|
209
242
|
|
|
210
|
-
<
|
|
211
|
-
</
|
|
243
|
+
<Qe visible={Ve}title={B("crash.clearTitle","Clear Crash Records")}message={B("crash.clearMessage","Are you sure you want to clear all intercepted crash records?")}confirmText={B("crash.clearConfirm","Clear All")}cancelText={B("crash.clearCancel","Cancel")}isDestructive={!0}icon="trash"onConfirm={()=>{U(!1),Ue()}}onCancel={()=>U(!1)}/>
|
|
244
|
+
</T>});export default $r;const r=De.create({container:{flex:1,backgroundColor:e.grayBackground},statsBar:{backgroundColor:e.primaryLight,borderBottomWidth:1,borderBottomColor:e.grayBorderSecondary,paddingVertical:10},statsScrollContent:{paddingHorizontal:8,gap:6},statChip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:10,paddingVertical:5,borderRadius:8,backgroundColor:e.purpleShade50,borderWidth:1,borderColor:`${e.purple}14`},statChipActive:{backgroundColor:`${e.purple}14`,borderColor:`${e.purple}33`},statChipValue:{fontFamily:k.interBold,fontSize:13,color:e.primaryBlack},statChipLabel:{fontFamily:k.interMedium,fontSize:11,color:e.grayText},controlsContainer:{paddingHorizontal:8,paddingTop:10,paddingBottom:6,backgroundColor:e.grayBackground},searchRow:{flexDirection:"row",alignItems:"center",gap:8},searchInputWrapper:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:e.primaryLight,borderWidth:1,borderColor:e.grayBorderSecondary,borderRadius:10,paddingHorizontal:10,height:38,gap:8},searchInput:{flex:1,fontFamily:k.interRegular,fontSize:13,color:e.primaryBlack,paddingVertical:0},clearButton:{width:38,height:38,borderRadius:10,backgroundColor:`${e.errorColor}14`,borderWidth:1,borderColor:`${e.errorColor}22`,alignItems:"center",justifyContent:"center"},filterButton:{width:38,height:38,borderRadius:10,backgroundColor:`${e.brandPurple}0F`,borderWidth:1,borderColor:`${e.brandPurple}30`,alignItems:"center",justifyContent:"center"},filterScrollContent:{paddingVertical:10,gap:6},filterChip:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:10,paddingVertical:5.5,borderRadius:8,backgroundColor:e.primaryLight,borderWidth:1,borderColor:e.grayBorderSecondary},filterChipActive:{backgroundColor:e.purple,borderColor:e.purple},filterChipText:{fontFamily:k.interMedium,fontSize:12,color:e.grayText},filterChipTextActive:{fontFamily:k.interBold,color:e.white},listContent:{paddingHorizontal:8,paddingTop:4,paddingBottom:24,gap:8},cardContainer:{backgroundColor:e.primaryLight,borderRadius:12,borderWidth:1,borderColor:e.grayBorderSecondary,padding:10,shadowColor:e.shadowColorString,shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:3,elevation:2},fatalCardBorder:{borderColor:`${e.errorColor}44`},cardHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},badgeRow:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1},sNoBadge:{backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary,paddingHorizontal:6,paddingVertical:3,borderRadius:5},sNoBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.grayText,letterSpacing:.3},fatalBadge:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.errorColor,paddingHorizontal:6,paddingVertical:3,borderRadius:5},fatalBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.white,letterSpacing:.5},caughtBadge:{backgroundColor:`${e.greenColor}1F`,paddingHorizontal:6,paddingVertical:3,borderRadius:5},caughtBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.greenColor,letterSpacing:.5},typeBadge:{paddingHorizontal:6,paddingVertical:3,borderRadius:5},typeBadgeText:{fontFamily:k.interBold,fontSize:9.5,letterSpacing:.5},timeRow:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1},timestampText:{fontFamily:k.interRegular,fontSize:11,color:e.grayTextWeak},relativeTimeText:{fontFamily:k.interBold,fontSize:10,color:e.grayTextWeak,backgroundColor:e.grayBackground,paddingHorizontal:5,paddingVertical:1,borderRadius:4,overflow:"hidden"},errorMessageText:{fontFamily:k.interBold,fontSize:13.5,color:e.primaryBlack,lineHeight:18},locationRow:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2,marginBottom:6,backgroundColor:e.purpleShade50,paddingHorizontal:8,paddingVertical:4,borderRadius:6},locationText:{fontFamily:k.interRegular,fontSize:11,color:e.grayText,flex:1},cardFooter:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginTop:6,paddingTop:8,borderTopWidth:1,borderTopColor:e.dividerColor},metaPill:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.purpleShade50,paddingHorizontal:6,paddingVertical:2,borderRadius:4},metaPillText:{fontFamily:k.interMedium,fontSize:10,color:e.grayTextWeak},emptyContainer:{flexGrow:1,alignItems:"center",justifyContent:"center",padding:32,paddingBottom:80},emptyIconCircle:{width:72,height:72,borderRadius:36,backgroundColor:`${e.greenColor}1F`,alignItems:"center",justifyContent:"center",marginBottom:16},emptyTitle:{fontFamily:k.interBold,fontSize:17,color:e.primaryBlack,marginBottom:6},emptySub:{fontFamily:k.interRegular,fontSize:13,color:e.grayText,textAlign:"center",lineHeight:18,maxWidth:280}});
|