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,209 +1,209 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ke,{useState as z,useEffect as ve,useMemo as N,useCallback as oe,useRef as Ue}from"react";import{View as S,Text as C,ScrollView as _e,FlatList as Ye,TextInput as Se,Modal as Qe,Alert as Ve,StyleSheet as Ze,ActivityIndicator as Xe,Platform as Ie}from"react-native";import V from"../TouchableScale";import St from"../EndOfListFooter";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as T}from"../../styles/AppFonts";import{useTranslation as Tt}from"../../i18n";import{DatabaseIcon as Pe,SearchIcon as Ct,ClearIcon as Ae,PlusIcon as Bt,PencilIcon as Vt,TrashIcon as Me,CopyIcon as It,CheckIcon as Pt,LayersIcon as At,ResetIcon as Mt,ChevronIcon as Ft,WarningTriangleIcon as Lt}from"../NetworkIcons";import{fetchStorageEntries as Dt,setStorageEntry as $t,removeStorageEntry as Rt,clearStorageDriver as Wt,getRegisteredMMKVInstanceIds as Et,subscribeToStorageChanges as Kt}from"../../customHooks/storageInspector";import{copyToClipboard as Ot}from"../../helpers";import{showToast as D}from"../../helpers/toast";const Nt=w=>{switch(w){case"json":return{label:"JSON",color:e.purple,bg:`${e.purple}16`};case"number":return{label:"NUM",color:e.warningIconGold,bg:`${e.warningIconGold}16`};case"boolean":return{label:"BOOL",color:e.emerald500,bg:`${e.emerald500}16`};case"null":return{label:"NULL",color:e.grayTextWeak,bg:`${e.grayTextWeak}16`};default:return{label:"STR",color:e.blue500,bg:`${e.blue500}16`}}},Ht=ke.memo(function({entry:B,isExpanded:r,onToggleExpand:J,onCopy:M,onEdit:q,onDelete:I,badge:$}){const Q=N(()=>B.byteSize<1024?`${B.byteSize.toLocaleString()} B`:`${(B.byteSize/1024).toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})} KB`,[B.byteSize]),G=N(()=>{if(!r)return B.value.length>250?B.value.slice(0,250)+"...":B.value;if(B.type==="json")try{const P=B.parsedValue??JSON.parse(B.value);return JSON.stringify(P,null,2)}catch{return B.value}return B.value},[r,B.value,B.type,B.parsedValue]);return<S style={t.entryCard}>
|
|
2
2
|
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
{
|
|
3
|
+
<S style={t.entryHeader}>
|
|
4
|
+
<S style={{flex:1,marginRight:8}}>
|
|
5
|
+
<S style={{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap"}}>
|
|
6
|
+
<C style={t.entryKey}numberOfLines={1}selectable>
|
|
7
|
+
{B.key}
|
|
8
|
+
</C>
|
|
9
|
+
<S style={[t.typeBadge,{backgroundColor:$.bg,borderColor:`${$.color}33`}]}>
|
|
10
|
+
<C style={[t.typeBadgeText,{color:$.color}]}>
|
|
11
|
+
{$.label}
|
|
12
|
+
</C>
|
|
8
13
|
</S>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</S>
|
|
13
|
-
</T>
|
|
14
|
-
<S style={t.sizeText}>{Y}</S>
|
|
15
|
-
</T>
|
|
16
|
-
</T>
|
|
14
|
+
<C style={t.sizeText}>{Q}</C>
|
|
15
|
+
</S>
|
|
16
|
+
</S>
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
</
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
</
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
<
|
|
30
|
-
</
|
|
31
|
-
</
|
|
32
|
-
</
|
|
19
|
+
<S style={t.entryActions}>
|
|
20
|
+
<V hitSlop={6}onPress={()=>M(B)}style={t.entryActionBtn}>
|
|
21
|
+
<It size={12}color={e.grayText}/>
|
|
22
|
+
</V>
|
|
23
|
+
|
|
24
|
+
<V hitSlop={6}onPress={()=>q(B)}style={t.entryActionBtn}>
|
|
25
|
+
<Vt size={12}color={e.purple}/>
|
|
26
|
+
</V>
|
|
27
|
+
|
|
28
|
+
<V hitSlop={6}onPress={()=>I(B.key)}style={[t.entryActionBtn,{backgroundColor:`${e.errorColor}12`}]}>
|
|
29
|
+
<Me size={12}color={e.errorColor}/>
|
|
30
|
+
</V>
|
|
31
|
+
</S>
|
|
32
|
+
</S>
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
<
|
|
36
|
-
<
|
|
37
|
-
{
|
|
38
|
-
</
|
|
39
|
-
{
|
|
40
|
-
<
|
|
35
|
+
<V onPress={()=>J(B.key)}style={t.valuePreviewBox}>
|
|
36
|
+
<C style={t.valuePreviewText}numberOfLines={r?void 0:3}selectable={r}>
|
|
37
|
+
{G}
|
|
38
|
+
</C>
|
|
39
|
+
{B.value.length>80&&<S style={{flexDirection:"row",alignItems:"center",gap:4,marginTop:4}}>
|
|
40
|
+
<C style={t.expandHint}>
|
|
41
41
|
{r?"Collapse":"Expand"}
|
|
42
|
-
</
|
|
43
|
-
<
|
|
44
|
-
</
|
|
45
|
-
</
|
|
46
|
-
</
|
|
42
|
+
</C>
|
|
43
|
+
<Ft direction={r?"up":"down"}size={10}color={e.purple}/>
|
|
44
|
+
</S>}
|
|
45
|
+
</V>
|
|
46
|
+
</S>}),Fe=50,Le=10;export const StorageTab=ke.memo(()=>{const{t:w}=Tt(),B=Ue(null),[r,J]=z("asyncStorage"),[M,q]=z("default"),[I,$]=z([]),[Q,G]=z(!0),[P,Z]=z(""),[X,Te]=z(Fe),[xe,De]=z({});ve(()=>{Te(Fe),B.current?.scrollToOffset({offset:0,animated:!1})},[P,r,M]);const[$e,E]=z(!1),[U,Ce]=z("create"),[K,ee]=z(""),[H,_]=z(""),[R,Y]=z("string"),[te,F]=z(null),Be=N(()=>Et(),[]),W=oe(async()=>{G(!0);try{const o=await Dt(r,r==="mmkv"?M:void 0);$(o)}catch{$([])}finally{G(!1)}},[r,M]);ve(()=>(W(),Kt(W)),[W]);const Re=o=>{De(A=>({...A,[o]:!A[o]}))},We=()=>{Ce("create"),ee(""),_(""),Y("string"),F(null),E(!0)},Ee=o=>{Ce("edit"),ee(o.key),_(o.value),Y(o.type==="json"?"json":o.type==="number"?"number":o.type==="boolean"?"boolean":"string"),F(null),E(!0)},Ke=o=>{Ve.alert(w("storage.deleteKeyTitle","Delete Key"),w("storage.deleteKeyMessage",{key:o,defaultValue:`Are you sure you want to delete key "${o}"?`}),[{text:w("common.cancel","Cancel"),style:"cancel"},{text:w("common.clear","Delete"),style:"destructive",onPress:async()=>{await Rt(r,o,r==="mmkv"?M:void 0)?(D(`Deleted "${o}"`),W()):D(`Failed to delete "${o}"`)}}])},Oe=()=>{Ve.alert(w("storage.clearTitle","Clear Storage Driver"),w("storage.clearMessage",{driver:r==="asyncStorage"?"AsyncStorage":"MMKV",defaultValue:`Are you sure you want to delete all keys in ${r==="asyncStorage"?"AsyncStorage":"MMKV"}?`}),[{text:w("common.cancel","Cancel"),style:"cancel"},{text:w("storage.clearConfirm","Clear All"),style:"destructive",onPress:async()=>{await Wt(r,r==="mmkv"?M:void 0)&&(D("All storage keys wiped"),W())}}])},Ne=async()=>{if(!K.trim()){D("Key name cannot be empty");return}let o=H;if(R==="json")try{const j=JSON.parse(H);o=JSON.stringify(j)}catch(j){F("Invalid JSON: "+j.message);return}else if(R==="number"&&isNaN(Number(H))){F("Value must be a valid number");return}await $t(r,K.trim(),o,r==="mmkv"?M:void 0)?(D(U==="create"?`Added "${K.trim()}"`:`Updated "${K.trim()}"`),E(!1),W()):D("Error saving storage key")},He=()=>{try{const o=JSON.parse(H);_(JSON.stringify(o,null,2)),F(null),Y("json"),D("Formatted JSON")}catch{F("Cannot format: invalid JSON syntax")}},L=N(()=>{if(!P.trim())return I;const o=P.toLowerCase().trim().split(/\s+/).filter(Boolean);return I.filter(A=>{const j=`${A.key} ${A.value}`.toLowerCase();return o.every(Ge=>j.includes(Ge))})},[I,P]),O=N(()=>I.reduce((o,A)=>o+A.byteSize,0),[I]),je=N(()=>O<1024?`${O.toLocaleString()} B`:O<1024*1024?`${(O/1024).toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})} KB`:`${(O/(1024*1024)).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})} MB`,[O]),we=oe(o=>{Ot(o.value,o.key),D(`Copied value of "${o.key}"`)},[]),Je=oe(({item:o})=><Ht entry={o}isExpanded={!!xe[o.key]}onToggleExpand={Re}onCopy={we}onEdit={Ee}onDelete={Ke}badge={Nt(o.type)}/>,[xe,we]);return<S style={t.container}>
|
|
47
47
|
|
|
48
|
-
<
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
{
|
|
54
|
-
</
|
|
55
|
-
{
|
|
56
|
-
<
|
|
57
|
-
{
|
|
58
|
-
</
|
|
59
|
-
</
|
|
60
|
-
</
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
<
|
|
65
|
-
{
|
|
66
|
-
</
|
|
67
|
-
{
|
|
68
|
-
<
|
|
69
|
-
{
|
|
70
|
-
</
|
|
71
|
-
</
|
|
72
|
-
</
|
|
48
|
+
<S style={t.driverTabsWrapper}>
|
|
49
|
+
<_e horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={t.driverTabsContainer}>
|
|
50
|
+
<V onPress={()=>J("asyncStorage")}style={[t.driverTabPill,r==="asyncStorage"&&{backgroundColor:e.brandPurple,borderColor:e.brandPurple},r!=="asyncStorage"&&{backgroundColor:`${e.brandPurple}12`,borderColor:`${e.brandPurple}30`}]}>
|
|
51
|
+
<Pe size={11}color={r==="asyncStorage"?e.white:e.brandPurple}/>
|
|
52
|
+
<C style={[t.driverTabText,{color:r==="asyncStorage"?e.white:e.primaryBlack}]}>
|
|
53
|
+
{w("storage.subTabs.asyncStorage","AsyncStorage")}
|
|
54
|
+
</C>
|
|
55
|
+
{I.length>0&&r==="asyncStorage"&&<S style={[t.driverCountBadge,{backgroundColor:"rgba(255,255,255,0.25)"}]}>
|
|
56
|
+
<C style={[t.driverCountText,{color:e.white}]}>
|
|
57
|
+
{I.length}
|
|
58
|
+
</C>
|
|
59
|
+
</S>}
|
|
60
|
+
</V>
|
|
61
|
+
|
|
62
|
+
<V onPress={()=>J("mmkv")}style={[t.driverTabPill,r==="mmkv"&&{backgroundColor:e.teal600,borderColor:e.teal600},r!=="mmkv"&&{backgroundColor:`${e.teal600}12`,borderColor:`${e.teal600}30`}]}>
|
|
63
|
+
<At size={11}color={r==="mmkv"?e.white:e.teal600}/>
|
|
64
|
+
<C style={[t.driverTabText,{color:r==="mmkv"?e.white:e.primaryBlack}]}>
|
|
65
|
+
{w("storage.subTabs.mmkv","MMKV")}
|
|
66
|
+
</C>
|
|
67
|
+
{I.length>0&&r==="mmkv"&&<S style={[t.driverCountBadge,{backgroundColor:"rgba(255,255,255,0.25)"}]}>
|
|
68
|
+
<C style={[t.driverCountText,{color:e.white}]}>
|
|
69
|
+
{I.length}
|
|
70
|
+
</C>
|
|
71
|
+
</S>}
|
|
72
|
+
</V>
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
{r==="mmkv"&&
|
|
76
|
-
{
|
|
77
|
-
<
|
|
75
|
+
{r==="mmkv"&&Be.length>1&&<S style={{flexDirection:"row",alignItems:"center",gap:4,marginLeft:6}}>
|
|
76
|
+
{Be.map(o=><V key={o}onPress={()=>q(o)}style={[t.instancePill,M===o&&t.instancePillActive]}>
|
|
77
|
+
<C style={[t.instancePillText,M===o&&t.instancePillTextActive]}>
|
|
78
78
|
{o}
|
|
79
|
-
</
|
|
80
|
-
</
|
|
81
|
-
</
|
|
82
|
-
</
|
|
83
|
-
</
|
|
79
|
+
</C>
|
|
80
|
+
</V>)}
|
|
81
|
+
</S>}
|
|
82
|
+
</_e>
|
|
83
|
+
</S>
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
<
|
|
87
|
-
<
|
|
88
|
-
<
|
|
89
|
-
<
|
|
90
|
-
{
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
{
|
|
94
|
-
</
|
|
95
|
-
</
|
|
96
|
-
<
|
|
97
|
-
<
|
|
98
|
-
</
|
|
99
|
-
</
|
|
100
|
-
</
|
|
86
|
+
<S style={t.actionBar}>
|
|
87
|
+
<S style={t.searchBar}>
|
|
88
|
+
<Ct size={14}color={e.grayTextWeak}/>
|
|
89
|
+
<Se value={P}onChangeText={Z}placeholder={w("storage.searchPlaceholder","Search keys, values, types...")}placeholderTextColor={e.grayTextWeak}style={t.searchInput}clearButtonMode="while-editing"/>
|
|
90
|
+
{P.length>0&&<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
91
|
+
<S style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
92
|
+
<C style={{color:e.purple,fontSize:9.5,fontFamily:T.interBold}}>
|
|
93
|
+
{L.length}
|
|
94
|
+
</C>
|
|
95
|
+
</S>
|
|
96
|
+
<V onPress={()=>Z("")}hitSlop={8}>
|
|
97
|
+
<Ae size={13}color={e.grayTextWeak}/>
|
|
98
|
+
</V>
|
|
99
|
+
</S>}
|
|
100
|
+
</S>
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
<
|
|
104
|
-
<
|
|
105
|
-
<
|
|
106
|
-
</
|
|
103
|
+
<V onPress={We}style={t.addKeyBtn}hitSlop={6}>
|
|
104
|
+
<Bt size={13}color={e.white}/>
|
|
105
|
+
<C style={t.addKeyBtnText}>{w("storage.add","Add")}</C>
|
|
106
|
+
</V>
|
|
107
107
|
|
|
108
|
-
<
|
|
109
|
-
<
|
|
110
|
-
</
|
|
108
|
+
<V onPress={W}style={t.actionIconBtn}hitSlop={6}>
|
|
109
|
+
<Mt size={13}color={e.grayText}/>
|
|
110
|
+
</V>
|
|
111
111
|
|
|
112
|
-
{
|
|
113
|
-
<
|
|
114
|
-
</
|
|
115
|
-
</
|
|
112
|
+
{I.length>0&&<V onPress={Oe}style={[t.actionIconBtn,{borderColor:`${e.errorColor}33`,backgroundColor:`${e.errorColor}12`}]}hitSlop={6}>
|
|
113
|
+
<Me size={13}color={e.errorColor}/>
|
|
114
|
+
</V>}
|
|
115
|
+
</S>
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
<
|
|
119
|
-
<
|
|
120
|
-
{
|
|
121
|
-
</
|
|
122
|
-
<
|
|
123
|
-
{r==="asyncStorage"?"SQLite Key-Value":`MMKV (${
|
|
124
|
-
</
|
|
125
|
-
</
|
|
118
|
+
<S style={t.statsStrip}>
|
|
119
|
+
<C style={t.statsText}>
|
|
120
|
+
{L.length.toLocaleString()} of {I.length.toLocaleString()} Keys • {je}
|
|
121
|
+
</C>
|
|
122
|
+
<C style={t.statsSubtext}>
|
|
123
|
+
{r==="asyncStorage"?"SQLite Key-Value":`MMKV (${M})`}
|
|
124
|
+
</C>
|
|
125
|
+
</S>
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
{
|
|
129
|
-
<
|
|
130
|
-
<
|
|
131
|
-
</
|
|
132
|
-
<
|
|
133
|
-
<
|
|
134
|
-
<
|
|
135
|
-
</T>
|
|
136
|
-
<S style={t.emptyTitle}>
|
|
137
|
-
{z.trim().length>0?"No matching keys found":`No ${r==="asyncStorage"?"AsyncStorage":"MMKV"} Keys`}
|
|
138
|
-
</S>
|
|
139
|
-
<S style={t.emptySubtitle}>
|
|
140
|
-
{z.trim().length>0?`No keys or values match "${z}"`:`Storage is auto-detected. Tap "+ Add" above to create your first ${r==="asyncStorage"?"AsyncStorage":"MMKV"} key!`}
|
|
128
|
+
{Q?<S style={t.loadingContainer}>
|
|
129
|
+
<Xe size="small"color={e.purple}/>
|
|
130
|
+
<C style={t.loadingText}>{w("storage.loading","Loading storage entries...")}</C>
|
|
131
|
+
</S>:<>
|
|
132
|
+
<Ye ref={B}data={L.slice(0,X)}keyExtractor={o=>o.key}renderItem={Je}initialNumToRender={10}maxToRenderPerBatch={10}windowSize={5}removeClippedSubviews={Ie.OS==="android"}style={t.scrollArea}contentContainerStyle={L.length===0?t.emptyScrollContent:t.scrollContent}showsVerticalScrollIndicator={!1}ListEmptyComponent={<S style={t.emptyContainer}>
|
|
133
|
+
<S style={t.emptyIconWrap}>
|
|
134
|
+
<Pe size={28}color={e.grayTextWeak}/>
|
|
141
135
|
</S>
|
|
142
|
-
|
|
143
|
-
|
|
136
|
+
<C style={t.emptyTitle}>
|
|
137
|
+
{P.trim().length>0?"No matching keys found":`No ${r==="asyncStorage"?"AsyncStorage":"MMKV"} Keys`}
|
|
138
|
+
</C>
|
|
139
|
+
<C style={t.emptySubtitle}>
|
|
140
|
+
{P.trim().length>0?`No keys or values match "${P}"`:`Storage is auto-detected. Tap "+ Add" above to create your first ${r==="asyncStorage"?"AsyncStorage":"MMKV"} key!`}
|
|
141
|
+
</C>
|
|
142
|
+
{P.trim().length>0&&<V onPress={()=>Z("")}style={{marginTop:12,paddingHorizontal:14,paddingVertical:6,borderRadius:8,backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary}}>
|
|
143
|
+
<C style={{color:e.brandPurple,fontSize:12,fontFamily:T.interBold}}>
|
|
144
144
|
Clear Search
|
|
145
|
-
</
|
|
146
|
-
</
|
|
147
|
-
</
|
|
145
|
+
</C>
|
|
146
|
+
</V>}
|
|
147
|
+
</S>}ListFooterComponent={L.length>0?<St count={Math.min(X,L.length)}totalCount={L.length}label="keys"loadMoreStep={Le}hasMore={L.length>X}onLoadMore={()=>Te(o=>o+Le)}/>:<S style={{height:60}}/>}/>
|
|
148
148
|
</>}
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
<
|
|
152
|
-
<
|
|
153
|
-
<
|
|
154
|
-
<
|
|
155
|
-
<
|
|
156
|
-
{
|
|
157
|
-
</
|
|
158
|
-
<
|
|
159
|
-
<
|
|
160
|
-
</
|
|
161
|
-
</
|
|
151
|
+
<Qe visible={$e}transparent animationType="fade"onRequestClose={()=>E(!1)}>
|
|
152
|
+
<S style={t.modalOverlay}>
|
|
153
|
+
<S style={t.modalCard}>
|
|
154
|
+
<S style={t.modalHeader}>
|
|
155
|
+
<C style={t.modalTitle}>
|
|
156
|
+
{U==="create"?"Add Storage Key":`Edit: ${K}`}
|
|
157
|
+
</C>
|
|
158
|
+
<V onPress={()=>E(!1)}hitSlop={8}>
|
|
159
|
+
<Ae size={16}color={e.grayText}/>
|
|
160
|
+
</V>
|
|
161
|
+
</S>
|
|
162
162
|
|
|
163
163
|
|
|
164
|
-
<
|
|
165
|
-
<
|
|
166
|
-
<
|
|
167
|
-
</
|
|
164
|
+
<S style={t.inputGroup}>
|
|
165
|
+
<C style={t.inputLabel}>{w("storage.keyName","KEY NAME").toUpperCase()}</C>
|
|
166
|
+
<Se value={K}onChangeText={ee}placeholder="e.g. user_session, auth_token"placeholderTextColor={e.grayTextWeak}editable={U==="create"}style={[t.textInput,U==="edit"&&t.textInputDisabled]}autoCapitalize="none"/>
|
|
167
|
+
</S>
|
|
168
168
|
|
|
169
169
|
|
|
170
|
-
<
|
|
171
|
-
<
|
|
172
|
-
<
|
|
173
|
-
{
|
|
174
|
-
<
|
|
175
|
-
</
|
|
176
|
-
</
|
|
177
|
-
<
|
|
178
|
-
{["string","json","number","boolean"].map(o=>{const
|
|
179
|
-
<
|
|
170
|
+
<S style={t.inputGroup}>
|
|
171
|
+
<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4}}>
|
|
172
|
+
<C style={t.inputLabel}>{w("storage.type","VALUE TYPE").toUpperCase()}</C>
|
|
173
|
+
{R==="json"&&<V onPress={He}hitSlop={6}>
|
|
174
|
+
<C style={t.formatJsonBtn}>{w("storage.beautifyJson","Beautify JSON")}</C>
|
|
175
|
+
</V>}
|
|
176
|
+
</S>
|
|
177
|
+
<S style={t.typeSelectorStrip}>
|
|
178
|
+
{["string","json","number","boolean"].map(o=>{const A=R===o;return<V key={o}onPress={()=>{Y(o),F(null)}}style={[t.typePill,A&&t.typePillActive]}>
|
|
179
|
+
<C style={[t.typePillText,A&&t.typePillTextActive]}>
|
|
180
180
|
{o.toUpperCase()}
|
|
181
|
-
</
|
|
182
|
-
</
|
|
183
|
-
</
|
|
184
|
-
</
|
|
181
|
+
</C>
|
|
182
|
+
</V>})}
|
|
183
|
+
</S>
|
|
184
|
+
</S>
|
|
185
185
|
|
|
186
186
|
|
|
187
|
-
<
|
|
188
|
-
<
|
|
189
|
-
<
|
|
190
|
-
{
|
|
191
|
-
<
|
|
192
|
-
<
|
|
193
|
-
</
|
|
194
|
-
</
|
|
187
|
+
<S style={t.inputGroup}>
|
|
188
|
+
<C style={t.inputLabel}>{w("storage.valueContent","VALUE CONTENT").toUpperCase()}</C>
|
|
189
|
+
<Se value={H}onChangeText={o=>{_(o),te&&F(null)}}placeholder={R==="json"?'{"userId": 123, "isLoggedIn": true}':R==="number"?"42":R==="boolean"?"true":"String value..."}placeholderTextColor={e.grayTextWeak}style={[t.textInput,t.textAreaInput]}multiline textAlignVertical="top"autoCapitalize="none"/>
|
|
190
|
+
{te&&<S style={{flexDirection:"row",alignItems:"center",gap:5,marginTop:4}}>
|
|
191
|
+
<Lt size={12}color={e.errorColor}/>
|
|
192
|
+
<C style={t.errorText}>{te}</C>
|
|
193
|
+
</S>}
|
|
194
|
+
</S>
|
|
195
195
|
|
|
196
196
|
|
|
197
|
-
<
|
|
198
|
-
<
|
|
199
|
-
<
|
|
200
|
-
</
|
|
201
|
-
<
|
|
202
|
-
<
|
|
203
|
-
<
|
|
204
|
-
</
|
|
205
|
-
</
|
|
206
|
-
</
|
|
207
|
-
</
|
|
208
|
-
</
|
|
209
|
-
</
|
|
197
|
+
<S style={t.modalActions}>
|
|
198
|
+
<V onPress={()=>E(!1)}style={t.cancelBtn}>
|
|
199
|
+
<C style={t.cancelBtnText}>{w("common.cancel","Cancel")}</C>
|
|
200
|
+
</V>
|
|
201
|
+
<V onPress={Ne}style={t.saveBtn}>
|
|
202
|
+
<Pt size={14}color={e.white}/>
|
|
203
|
+
<C style={t.saveBtnText}>{w("storage.saveKey","Save Key")}</C>
|
|
204
|
+
</V>
|
|
205
|
+
</S>
|
|
206
|
+
</S>
|
|
207
|
+
</S>
|
|
208
|
+
</Qe>
|
|
209
|
+
</S>});const t=Ze.create({container:{flex:1,backgroundColor:e.grayBackground},driverTabsWrapper:{backgroundColor:e.primaryLight,borderBottomWidth:1,borderBottomColor:e.dividerColor,paddingVertical:8},driverTabsContainer:{paddingHorizontal:12,flexDirection:"row",alignItems:"center",gap:6},driverTabPill:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary},driverTabPillActive:{backgroundColor:e.purple,borderColor:e.purple},driverTabText:{fontFamily:T.interBold,fontSize:10.5,color:e.grayText},driverTabTextActive:{color:e.white},driverCountBadge:{backgroundColor:"rgba(255, 255, 255, 0.25)",paddingHorizontal:5,paddingVertical:1,borderRadius:8},driverCountText:{fontFamily:T.interBold,fontSize:9.5,color:e.white},instancePill:{paddingHorizontal:7,paddingVertical:3,borderRadius:6,backgroundColor:`${e.purple}14`,borderWidth:1,borderColor:`${e.purple}30`},instancePillActive:{backgroundColor:e.purple,borderColor:e.purple},instancePillText:{fontFamily:T.interBold,fontSize:10,color:e.purple},instancePillTextActive:{color:e.white},actionBar:{flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:8,backgroundColor:e.primaryLight,borderBottomWidth:1,borderBottomColor:e.dividerColor,gap:6},searchBar:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:e.grayBackground,borderRadius:8,paddingHorizontal:9,paddingVertical:Ie.OS==="ios"?6:2,borderWidth:1,borderColor:e.grayBorderSecondary,gap:6},searchInput:{flex:1,fontFamily:T.interMedium,fontSize:12,color:e.primaryBlack,padding:0},addKeyBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:10,paddingVertical:6,borderRadius:8,backgroundColor:e.purple},addKeyBtnText:{fontFamily:T.interBold,fontSize:11,color:e.white},actionIconBtn:{width:30,height:30,borderRadius:8,alignItems:"center",justifyContent:"center",backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary},statsStrip:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:5,backgroundColor:`${e.grayBorderSecondary}40`},statsText:{fontFamily:T.interMedium,fontSize:10,color:e.grayText},statsSubtext:{fontFamily:T.interBold,fontSize:9.5,color:e.grayTextWeak},scrollArea:{flex:1},scrollContent:{padding:12,gap:10,paddingBottom:100},emptyScrollContent:{flexGrow:1,justifyContent:"center",alignItems:"center",padding:24,paddingBottom:60},entryCard:{backgroundColor:e.primaryLight,borderRadius:10,borderWidth:1,borderColor:e.grayBorderSecondary,padding:10,gap:8,shadowColor:e.black,shadowOpacity:.02,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1},entryHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},entryKey:{fontFamily:T.interBold,fontSize:12.5,color:e.primaryBlack},typeBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:4,borderWidth:1},typeBadgeText:{fontFamily:T.interBold,fontSize:8.5},sizeText:{fontFamily:T.interRegular,fontSize:10,color:e.grayTextWeak},entryActions:{flexDirection:"row",alignItems:"center",gap:5},entryActionBtn:{padding:5,borderRadius:5,backgroundColor:e.grayBackground},valuePreviewBox:{backgroundColor:e.grayBackground,borderRadius:6,padding:8,borderWidth:1,borderColor:`${e.grayBorderSecondary}80`},valuePreviewText:{fontFamily:T.interRegular,fontSize:11,color:e.primaryBlack,lineHeight:16},expandHint:{fontFamily:T.interBold,fontSize:9.5,color:e.purple,marginTop:4},loadingContainer:{flex:1,alignItems:"center",justifyContent:"center",gap:8},loadingText:{fontFamily:T.interMedium,fontSize:12,color:e.grayText},emptyContainer:{padding:24,alignItems:"center",justifyContent:"center"},emptyIconWrap:{width:56,height:56,borderRadius:28,backgroundColor:`${e.grayBorderSecondary}40`,alignItems:"center",justifyContent:"center",marginBottom:12},emptyTitle:{fontFamily:T.interBold,fontSize:14,color:e.primaryBlack,marginBottom:4},emptySubtitle:{fontFamily:T.interRegular,fontSize:11.5,color:e.grayText,textAlign:"center",maxWidth:280},connectGuideCard:{marginTop:20,width:"100%",backgroundColor:e.primaryLight,borderRadius:10,borderWidth:1,borderColor:e.grayBorderSecondary,padding:12,gap:6},connectGuideTitle:{fontFamily:T.interBold,fontSize:11,color:e.purple},connectGuideCode:{fontFamily:T.interRegular,fontSize:10,color:e.grayText,lineHeight:15},modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:16},modalCard:{width:"100%",maxWidth:400,backgroundColor:e.primaryLight,borderRadius:14,padding:16,gap:12,shadowColor:e.black,shadowOpacity:.2,shadowRadius:10,shadowOffset:{width:0,height:4},elevation:5},modalHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottomWidth:1,borderBottomColor:e.dividerColor,paddingBottom:10},modalTitle:{fontFamily:T.interBold,fontSize:14,color:e.primaryBlack},inputGroup:{gap:4},inputLabel:{fontFamily:T.interBold,fontSize:9.5,color:e.grayTextWeak,letterSpacing:.5},textInput:{backgroundColor:e.grayBackground,borderRadius:8,paddingHorizontal:10,paddingVertical:8,fontFamily:T.interMedium,fontSize:12,color:e.primaryBlack,borderWidth:1,borderColor:e.grayBorderSecondary},textInputDisabled:{backgroundColor:`${e.grayBorderSecondary}40`,color:e.grayText},textAreaInput:{minHeight:90,maxHeight:160,fontFamily:T.interRegular,fontSize:11},typeSelectorStrip:{flexDirection:"row",alignItems:"center",gap:6},typePill:{flex:1,alignItems:"center",paddingVertical:6,borderRadius:6,backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary},typePillActive:{backgroundColor:e.purple,borderColor:e.purple},typePillText:{fontFamily:T.interBold,fontSize:10,color:e.grayText},typePillTextActive:{color:e.white},formatJsonBtn:{fontFamily:T.interBold,fontSize:10,color:e.purple},errorText:{fontFamily:T.interMedium,fontSize:10,color:e.errorColor,marginTop:2},modalActions:{flexDirection:"row",alignItems:"center",gap:10,marginTop:4},cancelBtn:{flex:1,alignItems:"center",paddingVertical:10,borderRadius:8,backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary},cancelBtnText:{fontFamily:T.interBold,fontSize:12,color:e.grayText},saveBtn:{flex:1.5,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:5,paddingVertical:10,borderRadius:8,backgroundColor:e.purple},saveBtnText:{fontFamily:T.interBold,fontSize:12,color:e.white}});export default StorageTab;
|
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ne,{useRef as F,useState as U}from"react";import{Platform as ae,ScrollView as Ce,Text as L,TouchableOpacity as _,View as C}from"react-native";import{useInspector as we}from"./InspectorContext";import T from"../../styles";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as v}from"../../styles/AppFonts";import G from"../TouchableScale";import{SignalIcon as Se,TerminalIcon as Re,AnalyticsIcon as Be,ReduxIcon as Ie,CrashIcon as Te,BellIcon as Pe,SmartphoneIcon as Le,DatabaseIcon as Ae,QrCodeIcon as Oe,ScreencastIcon as Ve,ChevronIcon as Q}from"../NetworkIcons";import{isReduxConnected as De}from"../../customHooks/reduxLogger";import{isAnalyticsConnected as Ee}from"../../customHooks/analyticsLogger";import{isLocalDebugEnvironment as He}from"../../helpers";const w={themeColor:e.brandPurple,bgInactive:`${e.brandPurple}0D`,borderInactive:`${e.brandPurple}2B`,iconInactive:e.brandPurple,idBadgeBg:`${e.brandPurple}1C`,idBadgeBorder:`${e.brandPurple}3D`,idBadgeText:e.brandPurple},q={apis:w,logs:w,analytics:w,redux:w,storage:w,device:w,crash:w,push:w,debugging:w,media:w},je=ne.memo(()=>{const{activeTab:k,switchActiveTab:A,tabVisibility:x,logs:O,consoleLogs:V,analyticsEvents:J,crashRecords:D,pushRecords:E,unreadPushCount:K,lastReadApisCount:N,lastReadLogsCount:X,lastReadCrashesCount:Y,mediaCount:H}=we(),Z=De(),ee=Ee(),S=k==="media",z=(x?.media??!0)&&H>0,j=F(null),[P,oe]=U(!1),[M,te]=U(!0),$=F(0),ie=o=>{const{contentOffset:t,layoutMeasurement:i,contentSize:r}=o.nativeEvent,R=t.x;$.current=R;const B=R>8,I=R<r.width-i.width-8;P!==B&&oe(B),M!==I&&te(I)},W=o=>{j.current?.scrollTo({x:Math.max(0,$.current+o),animated:!0})};return<C style={[T.tabBarContainer,{flexDirection:"row",alignItems:"center",paddingHorizontal:0}]}>
|
|
2
2
|
|
|
3
|
-
{P&&<
|
|
3
|
+
{P&&<_ onPress={()=>W(-160)}hitSlop={{top:6,bottom:6,left:6,right:6}}activeOpacity={.7}style={{paddingLeft:6,paddingRight:2,justifyContent:"center",alignItems:"center"}}>
|
|
4
4
|
<C style={{width:22,height:22,borderRadius:11,backgroundColor:e.grayBorderSecondary,alignItems:"center",justifyContent:"center"}}>
|
|
5
|
-
<
|
|
5
|
+
<Q direction="left"size={13}color={e.grayTextStrong}/>
|
|
6
6
|
</C>
|
|
7
|
-
</
|
|
7
|
+
</_>}
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
<Ce ref={
|
|
11
|
-
{[{id:1,key:"apis",label:"APIs",count:O.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:V.length,icon:"logs"},{id:3,key:"analytics",label:"Analytics",count:
|
|
10
|
+
<Ce ref={j}horizontal showsHorizontalScrollIndicator={!1}onScroll={ie}scrollEventThrottle={16}style={{flex:1}}contentContainerStyle={{paddingLeft:P?4:12,paddingRight:z?6:12}}>
|
|
11
|
+
{[{id:1,key:"apis",label:"APIs",count:O.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:V.length,icon:"logs"},{id:3,key:"analytics",label:"Analytics",count:J.length,icon:"analytics"},{id:4,key:"redux",label:"Redux",count:0,icon:"redux"},{id:5,key:"storage",label:"Storage",count:0,icon:"storage"},{id:6,key:"device",label:"Device",count:0,icon:"device"},{id:7,key:"crash",label:"Crash",count:D?.length||0,icon:"crash"},{id:8,key:"push",label:"Push",count:E?.length||0,icon:"push"},{id:9,key:"debugging",label:"Debugging",count:0,icon:"debugging"}].filter(o=>o.key==="debugging"?ae.OS==="android"&&He()&&!!x?.debugging:!(!x?.[o.key]||o.key==="redux"&&!Z||o.key==="analytics"&&!ee)).map(o=>{const t=k===o.key,i=q[o.key]||q.apis,r=t?e.white:i.iconInactive,R=o.count>99?"99+":String(o.count),B=k!=="apis"&&O.length>N,I=k!=="logs"&&V.length>X,re=k!=="crash"&&(D?.length||0)>(Y||0);return<G key={o.key}onPress={()=>{A(o.key)}}style={[T.contentTabButton,{backgroundColor:t?i.themeColor:i.bgInactive,borderColor:t?i.themeColor:i.borderInactive},t&&{shadowColor:i.themeColor,shadowOffset:{width:0,height:2},shadowOpacity:.28,shadowRadius:3.5,elevation:3}]}>
|
|
12
12
|
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
13
13
|
{o.icon==="apis"&&<Se color={r}size={14}/>}
|
|
14
14
|
{o.icon==="logs"&&<Re color={r}size={14}/>}
|
|
15
|
-
{o.icon==="analytics"&&<
|
|
16
|
-
{o.icon==="redux"&&<
|
|
17
|
-
{o.icon==="storage"&&<
|
|
18
|
-
{o.icon==="device"&&<
|
|
19
|
-
{o.icon==="crash"&&<
|
|
20
|
-
{o.icon==="
|
|
15
|
+
{o.icon==="analytics"&&<Be color={r}size={14}/>}
|
|
16
|
+
{o.icon==="redux"&&<Ie color={r}size={14}/>}
|
|
17
|
+
{o.icon==="storage"&&<Ae color={r}size={14}/>}
|
|
18
|
+
{o.icon==="device"&&<Le color={r}size={14}/>}
|
|
19
|
+
{o.icon==="crash"&&<Te color={r}size={14}/>}
|
|
20
|
+
{o.icon==="push"&&<Pe color={r}size={14}/>}
|
|
21
|
+
{o.icon==="debugging"&&<Oe color={r}size={14}/>}
|
|
21
22
|
<C style={{minWidth:20,height:20,paddingHorizontal:4,borderRadius:10,backgroundColor:t?`${e.white}33`:i.idBadgeBg,borderWidth:1,borderColor:t?`${e.white}66`:i.idBadgeBorder,alignItems:"center",justifyContent:"center"}}>
|
|
22
|
-
<L style={{fontFamily:
|
|
23
|
+
<L style={{fontFamily:v.interBold,fontSize:9.5,lineHeight:12,color:t?e.white:i.idBadgeText}}>
|
|
23
24
|
#{o.id}
|
|
24
25
|
</L>
|
|
25
26
|
</C>
|
|
26
|
-
<L numberOfLines={1}ellipsizeMode="tail"style={[
|
|
27
|
+
<L numberOfLines={1}ellipsizeMode="tail"style={[T.contentTabButtonText,{color:t?e.white:e.grayTextStrong,fontFamily:t?v.interBold:v.interSemiBold}]}>
|
|
27
28
|
{o.label}
|
|
28
29
|
</L>
|
|
29
|
-
{o.count>0&&<C style={{paddingHorizontal:5,paddingVertical:1,borderRadius:8,backgroundColor:t?"rgba(255,255,255,0.25)":i.idBadgeBg,borderWidth:.5,borderColor:t?"rgba(255,255,255,0.45)":i.idBadgeBorder,marginLeft:1,alignItems:"center",justifyContent:"center"}}>
|
|
30
|
-
<L style={{fontFamily:
|
|
31
|
-
{
|
|
30
|
+
{o.count>0&&o.key!=="push"&&<C style={{paddingHorizontal:5,paddingVertical:1,borderRadius:8,backgroundColor:t?"rgba(255,255,255,0.25)":i.idBadgeBg,borderWidth:.5,borderColor:t?"rgba(255,255,255,0.45)":i.idBadgeBorder,marginLeft:1,alignItems:"center",justifyContent:"center"}}>
|
|
31
|
+
<L style={{fontFamily:v.interBold,fontSize:9.5,lineHeight:12,color:t?e.white:i.themeColor}}>
|
|
32
|
+
{R}
|
|
32
33
|
</L>
|
|
33
34
|
</C>}
|
|
34
|
-
{(o.key==="apis"&&
|
|
35
|
+
{(o.key==="apis"&&B||o.key==="logs"&&I||o.key==="crash"&&re||o.key==="push"&&((E?.length||0)>0||K>0))&&<C style={{width:6,height:6,borderRadius:3,backgroundColor:e.errorColor,marginLeft:4,alignSelf:"center"}}/>}
|
|
35
36
|
</C>
|
|
36
|
-
</
|
|
37
|
+
</G>})}
|
|
37
38
|
</Ce>
|
|
38
39
|
|
|
39
40
|
|
|
40
|
-
{
|
|
41
|
+
{M&&<_ onPress={()=>W(160)}hitSlop={{top:6,bottom:6,left:6,right:6}}activeOpacity={.7}style={{paddingLeft:2,paddingRight:z?4:8,justifyContent:"center",alignItems:"center"}}>
|
|
41
42
|
<C style={{width:22,height:22,borderRadius:11,backgroundColor:e.grayBorderSecondary,alignItems:"center",justifyContent:"center"}}>
|
|
42
|
-
<
|
|
43
|
+
<Q direction="right"size={13}color={e.grayTextStrong}/>
|
|
43
44
|
</C>
|
|
44
|
-
</
|
|
45
|
+
</_>}
|
|
45
46
|
|
|
46
47
|
|
|
47
48
|
{z&&<C style={{paddingLeft:6,paddingRight:10,borderLeftWidth:1,borderLeftColor:e.dividerColor,backgroundColor:e.primaryLight,justifyContent:"center",shadowColor:e.shadowColorString,shadowOffset:{width:-3,height:0},shadowOpacity:.12,shadowRadius:4,elevation:4,zIndex:10}}>
|
|
48
|
-
<
|
|
49
|
+
<G key="media"onPress={()=>{A("media")}}accessibilityRole="button"accessibilityLabel="Media Gallery"style={[T.contentTabButton,{marginRight:0,borderRadius:8,backgroundColor:S?e.brandPurple:`${e.brandPurple}0D`,borderColor:S?e.brandPurple:`${e.brandPurple}2B`,borderWidth:1,paddingHorizontal:10,paddingVertical:7,alignItems:"center",justifyContent:"center"},S&&{shadowColor:e.brandPurple,shadowOffset:{width:0,height:2},shadowOpacity:.28,shadowRadius:3.5,elevation:3}]}>
|
|
49
50
|
<C style={{position:"relative",alignItems:"center",justifyContent:"center"}}>
|
|
50
|
-
<
|
|
51
|
-
{
|
|
51
|
+
<Ve color={S?e.white:e.brandPurple}size={15}/>
|
|
52
|
+
{H>0&&<C style={{position:"absolute",top:-3,right:-4,width:7,height:7,borderRadius:3.5,backgroundColor:S?e.white:e.brandPurple,borderWidth:1.2,borderColor:S?e.brandPurple:e.white}}/>}
|
|
52
53
|
</C>
|
|
53
|
-
</
|
|
54
|
+
</G>
|
|
54
55
|
</C>}
|
|
55
|
-
</C>});export default
|
|
56
|
+
</C>});export default je;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useState as M,useEffect as F}from"react";import{Modal as G,View as C,Text as S,TouchableOpacity as O,StyleSheet as Y,Animated as T,Linking as J}from"react-native";import B,{Path as L}from"react-native-svg";import{
|
|
1
|
+
import{useState as M,useEffect as F}from"react";import{Modal as G,View as C,Text as S,TouchableOpacity as O,StyleSheet as Y,Animated as T,Linking as J}from"react-native";import B,{Path as L}from"react-native-svg";import{BrandCircleIcon as K}from"../BrandCircleIcon";import{NpmIcon as Q}from"../NetworkIcons";import{LIB_VERSION as X}from"../../constants";import{copyToClipboard as Z}from"../../helpers";import{showToast as $}from"../../helpers/toast";import{AppFonts as P}from"../../styles/AppFonts";import{AppColors as e}from"../../styles/AppColors";const Ce=({size:o=14,color:r=e.grayTextWeak})=><B width={o}height={o}viewBox="0 0 24 24"fill="none">
|
|
2
2
|
<L d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2z"stroke={r}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
3
3
|
<L d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"stroke={r}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
4
4
|
</B>,N=({size:o=14,color:r=e.emerald500})=><B width={o}height={o}viewBox="0 0 24 24"fill="none">
|