react-native-inapp-inspector 2.3.23 → 2.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/commonjs/components/AnalyticsDetail.js +8 -8
  2. package/dist/commonjs/components/AnalyticsEventCard.js +11 -8
  3. package/dist/commonjs/components/AppHeaderLogo.js +1 -1
  4. package/dist/commonjs/components/BrandSquareIcon.js +12 -12
  5. package/dist/commonjs/components/ConsoleLogCard.d.ts +1 -0
  6. package/dist/commonjs/components/ConsoleLogCard.js +92 -80
  7. package/dist/commonjs/components/EndOfListFooter.d.ts +5 -1
  8. package/dist/commonjs/components/EndOfListFooter.js +27 -5
  9. package/dist/commonjs/components/Inspector/AnalyticsTab.js +30 -298
  10. package/dist/commonjs/components/Inspector/ConsoleTab.js +38 -93
  11. package/dist/commonjs/components/Inspector/CrashDetail.js +12 -12
  12. package/dist/commonjs/components/Inspector/CrashTab.js +43 -33
  13. package/dist/commonjs/components/Inspector/DebuggingTab.js +9 -9
  14. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +54 -52
  15. package/dist/commonjs/components/Inspector/InspectorHeader.js +1 -1
  16. package/dist/commonjs/components/Inspector/LogDetail.js +6 -6
  17. package/dist/commonjs/components/Inspector/MainScreen.js +23 -25
  18. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +1 -1
  19. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +3 -3
  20. package/dist/commonjs/components/Inspector/NetworkTab.js +31 -31
  21. package/dist/commonjs/components/Inspector/NpmStarPrompt.js +3 -3
  22. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +21 -22
  23. package/dist/commonjs/components/Inspector/ReduxDetail.js +1 -1
  24. package/dist/commonjs/components/Inspector/ReduxTab.js +110 -97
  25. package/dist/commonjs/components/Inspector/SettingsPanel.js +48 -100
  26. package/dist/commonjs/components/Inspector/StorageTab.js +56 -52
  27. package/dist/commonjs/components/Inspector/TabBar.js +29 -26
  28. package/dist/commonjs/components/JsonViewer.js +169 -164
  29. package/dist/commonjs/components/LogCard.js +34 -38
  30. package/dist/commonjs/components/LogSyntaxHighlighter.js +3 -3
  31. package/dist/commonjs/components/SegmentedTabs.d.ts +4 -1
  32. package/dist/commonjs/components/SegmentedTabs.js +8 -8
  33. package/dist/commonjs/constants/index.js +1 -1
  34. package/dist/commonjs/constants/version.d.ts +1 -1
  35. package/dist/commonjs/constants/version.js +1 -1
  36. package/dist/commonjs/customHooks/networkLogger.js +1 -2
  37. package/dist/commonjs/helpers/index.d.ts +6 -0
  38. package/dist/commonjs/helpers/index.js +4 -4
  39. package/dist/commonjs/helpers/memoryManager.d.ts +0 -1
  40. package/dist/commonjs/helpers/memoryManager.js +1 -1
  41. package/dist/commonjs/helpers/remoteConfig.js +1 -1
  42. package/dist/commonjs/helpers/settingsStore.js +1 -1
  43. package/dist/commonjs/i18n/index.d.ts +35 -0
  44. package/dist/commonjs/i18n/index.js +1 -1
  45. package/dist/commonjs/i18n/locales/ar.json +1 -0
  46. package/dist/commonjs/i18n/locales/de.json +1 -0
  47. package/dist/commonjs/i18n/locales/en.json +1 -1
  48. package/dist/commonjs/i18n/locales/es.json +1 -0
  49. package/dist/commonjs/i18n/locales/fr.json +1 -0
  50. package/dist/commonjs/i18n/locales/hi.json +1 -0
  51. package/dist/commonjs/i18n/locales/ja.json +1 -0
  52. package/dist/commonjs/i18n/locales/ko.json +1 -0
  53. package/dist/commonjs/i18n/locales/pt.json +1 -0
  54. package/dist/commonjs/i18n/locales/ru.json +1 -0
  55. package/dist/commonjs/i18n/locales/zh.json +1 -0
  56. package/dist/commonjs/index.d.ts +2 -4
  57. package/dist/commonjs/index.js +2 -2
  58. package/dist/commonjs/styles/AppColors.d.ts +40 -0
  59. package/dist/commonjs/styles/AppColors.js +1 -1
  60. package/dist/commonjs/styles/index.js +1 -1
  61. package/dist/commonjs/types/enums.d.ts +0 -20
  62. package/dist/commonjs/types/enums.js +1 -1
  63. package/dist/esm/components/AnalyticsDetail.js +75 -75
  64. package/dist/esm/components/AnalyticsEventCard.js +20 -17
  65. package/dist/esm/components/AppHeaderLogo.js +5 -5
  66. package/dist/esm/components/BrandSquareIcon.js +39 -39
  67. package/dist/esm/components/ConsoleLogCard.d.ts +1 -0
  68. package/dist/esm/components/ConsoleLogCard.js +98 -86
  69. package/dist/esm/components/EndOfListFooter.d.ts +5 -1
  70. package/dist/esm/components/EndOfListFooter.js +36 -14
  71. package/dist/esm/components/Inspector/AnalyticsTab.js +47 -315
  72. package/dist/esm/components/Inspector/ConsoleTab.js +61 -116
  73. package/dist/esm/components/Inspector/CrashDetail.js +49 -49
  74. package/dist/esm/components/Inspector/CrashTab.js +75 -65
  75. package/dist/esm/components/Inspector/DebuggingTab.js +31 -31
  76. package/dist/esm/components/Inspector/DeviceInfoTab.js +146 -144
  77. package/dist/esm/components/Inspector/InspectorHeader.js +5 -5
  78. package/dist/esm/components/Inspector/LogDetail.js +1 -1
  79. package/dist/esm/components/Inspector/MainScreen.js +51 -53
  80. package/dist/esm/components/Inspector/MediaGalleryTab.js +1 -1
  81. package/dist/esm/components/Inspector/MediaPreviewModal.js +31 -31
  82. package/dist/esm/components/Inspector/NetworkTab.js +63 -63
  83. package/dist/esm/components/Inspector/NpmStarPrompt.js +42 -42
  84. package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -46
  85. package/dist/esm/components/Inspector/ReduxDetail.js +1 -1
  86. package/dist/esm/components/Inspector/ReduxTab.js +163 -150
  87. package/dist/esm/components/Inspector/SettingsPanel.js +136 -188
  88. package/dist/esm/components/Inspector/StorageTab.js +88 -84
  89. package/dist/esm/components/Inspector/TabBar.js +37 -34
  90. package/dist/esm/components/JsonViewer.js +173 -168
  91. package/dist/esm/components/LogCard.js +38 -42
  92. package/dist/esm/components/LogSyntaxHighlighter.js +1 -1
  93. package/dist/esm/components/SegmentedTabs.d.ts +4 -1
  94. package/dist/esm/components/SegmentedTabs.js +8 -8
  95. package/dist/esm/constants/index.js +1 -1
  96. package/dist/esm/constants/version.d.ts +1 -1
  97. package/dist/esm/constants/version.js +1 -1
  98. package/dist/esm/customHooks/networkLogger.js +1 -2
  99. package/dist/esm/helpers/index.d.ts +6 -0
  100. package/dist/esm/helpers/index.js +4 -4
  101. package/dist/esm/helpers/memoryManager.d.ts +0 -1
  102. package/dist/esm/helpers/memoryManager.js +1 -1
  103. package/dist/esm/helpers/remoteConfig.js +1 -1
  104. package/dist/esm/helpers/settingsStore.js +1 -1
  105. package/dist/esm/i18n/index.d.ts +35 -0
  106. package/dist/esm/i18n/index.js +1 -1
  107. package/dist/esm/i18n/locales/ar.json +1 -0
  108. package/dist/esm/i18n/locales/de.json +1 -0
  109. package/dist/esm/i18n/locales/en.json +1 -1
  110. package/dist/esm/i18n/locales/es.json +1 -0
  111. package/dist/esm/i18n/locales/fr.json +1 -0
  112. package/dist/esm/i18n/locales/hi.json +1 -0
  113. package/dist/esm/i18n/locales/ja.json +1 -0
  114. package/dist/esm/i18n/locales/ko.json +1 -0
  115. package/dist/esm/i18n/locales/pt.json +1 -0
  116. package/dist/esm/i18n/locales/ru.json +1 -0
  117. package/dist/esm/i18n/locales/zh.json +1 -0
  118. package/dist/esm/index.d.ts +2 -4
  119. package/dist/esm/index.js +5 -5
  120. package/dist/esm/styles/AppColors.d.ts +40 -0
  121. package/dist/esm/styles/AppColors.js +1 -1
  122. package/dist/esm/styles/index.js +1 -1
  123. package/dist/esm/types/enums.d.ts +0 -20
  124. package/dist/esm/types/enums.js +1 -1
  125. package/package.json +1 -15
  126. package/dist/commonjs/bundle.d.ts +0 -2
  127. package/dist/commonjs/bundle.js +0 -1
  128. package/dist/commonjs/components/Inspector/BundleTab.d.ts +0 -48
  129. package/dist/commonjs/components/Inspector/BundleTab.js +0 -1297
  130. package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +0 -27
  131. package/dist/commonjs/components/Inspector/PerformanceTab.js +0 -454
  132. package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +0 -115
  133. package/dist/commonjs/customHooks/bundleAnalyzer.js +0 -1
  134. package/dist/commonjs/customHooks/performanceTracker.d.ts +0 -144
  135. package/dist/commonjs/customHooks/performanceTracker.js +0 -63
  136. package/dist/commonjs/performance.d.ts +0 -2
  137. package/dist/commonjs/performance.js +0 -1
  138. package/dist/esm/bundle.d.ts +0 -2
  139. package/dist/esm/bundle.js +0 -1
  140. package/dist/esm/components/Inspector/BundleTab.d.ts +0 -48
  141. package/dist/esm/components/Inspector/BundleTab.js +0 -1297
  142. package/dist/esm/components/Inspector/PerformanceTab.d.ts +0 -27
  143. package/dist/esm/components/Inspector/PerformanceTab.js +0 -454
  144. package/dist/esm/customHooks/bundleAnalyzer.d.ts +0 -115
  145. package/dist/esm/customHooks/bundleAnalyzer.js +0 -1
  146. package/dist/esm/customHooks/performanceTracker.d.ts +0 -144
  147. package/dist/esm/customHooks/performanceTracker.js +0 -63
  148. package/dist/esm/performance.d.ts +0 -2
  149. package/dist/esm/performance.js +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(a,o,t,l){l===void 0&&(l=t);var r=Object.getOwnPropertyDescriptor(o,t);(!r||("get"in r?!o.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return o[t]}}),Object.defineProperty(a,l,r)}):(function(a,o,t,l){l===void 0&&(l=t),a[l]=o[t]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(a,o){Object.defineProperty(a,"default",{enumerable:!0,value:o})}):function(a,o){a.default=o}),__importStar=this&&this.__importStar||(function(){var a=function(o){return a=Object.getOwnPropertyNames||function(t){var l=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(l[l.length]=r);return l},a(o)};return function(o){if(o&&o.__esModule)return o;var t={};if(o!=null)for(var l=a(o),r=0;r<l.length;r++)l[r]!=="default"&&__createBinding(t,o,l[r]);return __setModuleDefault(t,o),t}})(),__importDefault=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StorageTab=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),TouchableScale_1=__importDefault(require("../TouchableScale")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),i18n_1=require("../../i18n"),NetworkIcons_1=require("../NetworkIcons"),storageInspector_1=require("../../customHooks/storageInspector"),helpers_1=require("../../helpers"),toast_1=require("../../helpers/toast"),getTypeBadge=a=>{switch(a){case"json":return{label:"JSON",color:AppColors_1.AppColors.purple,bg:`${AppColors_1.AppColors.purple}16`};case"number":return{label:"NUM",color:AppColors_1.AppColors.warningIconGold,bg:`${AppColors_1.AppColors.warningIconGold}16`};case"boolean":return{label:"BOOL",color:AppColors_1.AppColors.emerald500,bg:`${AppColors_1.AppColors.emerald500}16`};case"null":return{label:"NULL",color:AppColors_1.AppColors.grayTextWeak,bg:`${AppColors_1.AppColors.grayTextWeak}16`};default:return{label:"STR",color:AppColors_1.AppColors.blue500,bg:`${AppColors_1.AppColors.blue500}16`}}},StorageEntryCard=react_1.default.memo(function({entry:o,isExpanded:t,onToggleExpand:l,onCopy:r,onEdit:v,onDelete:n,badge:p}){const h=(0,react_1.useMemo)(()=>o.byteSize<1024?`${o.byteSize} B`:`${(o.byteSize/1024).toFixed(1)} KB`,[o.byteSize]),T=(0,react_1.useMemo)(()=>{if(!t)return o.value.length>250?o.value.slice(0,250)+"...":o.value;if(o.type==="json")try{const s=o.parsedValue??JSON.parse(o.value);return JSON.stringify(s,null,2)}catch{return o.value}return o.value},[t,o.value,o.type,o.parsedValue]);return<react_native_1.View style={styles.entryCard}>
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,o,t,l){l===void 0&&(l=t);var a=Object.getOwnPropertyDescriptor(o,t);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[t]}}),Object.defineProperty(r,l,a)}):(function(r,o,t,l){l===void 0&&(l=t),r[l]=o[t]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,o){Object.defineProperty(r,"default",{enumerable:!0,value:o})}):function(r,o){r.default=o}),__importStar=this&&this.__importStar||(function(){var r=function(o){return r=Object.getOwnPropertyNames||function(t){var l=[];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(l[l.length]=a);return l},r(o)};return function(o){if(o&&o.__esModule)return o;var t={};if(o!=null)for(var l=r(o),a=0;a<l.length;a++)l[a]!=="default"&&__createBinding(t,o,l[a]);return __setModuleDefault(t,o),t}})(),__importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StorageTab=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),TouchableScale_1=__importDefault(require("../TouchableScale")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),i18n_1=require("../../i18n"),NetworkIcons_1=require("../NetworkIcons"),storageInspector_1=require("../../customHooks/storageInspector"),helpers_1=require("../../helpers"),toast_1=require("../../helpers/toast"),getTypeBadge=r=>{switch(r){case"json":return{label:"JSON",color:AppColors_1.AppColors.purple,bg:`${AppColors_1.AppColors.purple}16`};case"number":return{label:"NUM",color:AppColors_1.AppColors.warningIconGold,bg:`${AppColors_1.AppColors.warningIconGold}16`};case"boolean":return{label:"BOOL",color:AppColors_1.AppColors.emerald500,bg:`${AppColors_1.AppColors.emerald500}16`};case"null":return{label:"NULL",color:AppColors_1.AppColors.grayTextWeak,bg:`${AppColors_1.AppColors.grayTextWeak}16`};default:return{label:"STR",color:AppColors_1.AppColors.blue500,bg:`${AppColors_1.AppColors.blue500}16`}}},StorageEntryCard=react_1.default.memo(function({entry:o,isExpanded:t,onToggleExpand:l,onCopy:a,onEdit:x,onDelete:n,badge:c}){const _=(0,react_1.useMemo)(()=>o.byteSize<1024?`${o.byteSize} B`:`${(o.byteSize/1024).toFixed(1)} KB`,[o.byteSize]),A=(0,react_1.useMemo)(()=>{if(!t)return o.value.length>250?o.value.slice(0,250)+"...":o.value;if(o.type==="json")try{const s=o.parsedValue??JSON.parse(o.value);return JSON.stringify(s,null,2)}catch{return o.value}return o.value},[t,o.value,o.type,o.parsedValue]);return<react_native_1.View style={styles.entryCard}>
2
2
 
3
3
  <react_native_1.View style={styles.entryHeader}>
4
4
  <react_native_1.View style={{flex:1,marginRight:8}}>
@@ -6,22 +6,22 @@
6
6
  <react_native_1.Text style={styles.entryKey}numberOfLines={1}selectable>
7
7
  {o.key}
8
8
  </react_native_1.Text>
9
- <react_native_1.View style={[styles.typeBadge,{backgroundColor:p.bg,borderColor:`${p.color}33`}]}>
10
- <react_native_1.Text style={[styles.typeBadgeText,{color:p.color}]}>
11
- {p.label}
9
+ <react_native_1.View style={[styles.typeBadge,{backgroundColor:c.bg,borderColor:`${c.color}33`}]}>
10
+ <react_native_1.Text style={[styles.typeBadgeText,{color:c.color}]}>
11
+ {c.label}
12
12
  </react_native_1.Text>
13
13
  </react_native_1.View>
14
- <react_native_1.Text style={styles.sizeText}>{h}</react_native_1.Text>
14
+ <react_native_1.Text style={styles.sizeText}>{_}</react_native_1.Text>
15
15
  </react_native_1.View>
16
16
  </react_native_1.View>
17
17
 
18
18
 
19
19
  <react_native_1.View style={styles.entryActions}>
20
- <TouchableScale_1.default hitSlop={6}onPress={()=>r(o)}style={styles.entryActionBtn}>
20
+ <TouchableScale_1.default hitSlop={6}onPress={()=>a(o)}style={styles.entryActionBtn}>
21
21
  <NetworkIcons_1.CopyIcon size={12}color={AppColors_1.AppColors.grayText}/>
22
22
  </TouchableScale_1.default>
23
23
 
24
- <TouchableScale_1.default hitSlop={6}onPress={()=>v(o)}style={styles.entryActionBtn}>
24
+ <TouchableScale_1.default hitSlop={6}onPress={()=>x(o)}style={styles.entryActionBtn}>
25
25
  <NetworkIcons_1.PencilIcon size={12}color={AppColors_1.AppColors.purple}/>
26
26
  </TouchableScale_1.default>
27
27
 
@@ -34,7 +34,7 @@
34
34
 
35
35
  <TouchableScale_1.default onPress={()=>l(o.key)}style={styles.valuePreviewBox}>
36
36
  <react_native_1.Text style={styles.valuePreviewText}numberOfLines={t?void 0:3}selectable={t}>
37
- {T}
37
+ {A}
38
38
  </react_native_1.Text>
39
39
  {o.value.length>80&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4,marginTop:4}}>
40
40
  <react_native_1.Text style={styles.expandHint}>
@@ -43,34 +43,38 @@
43
43
  <NetworkIcons_1.ChevronIcon direction={t?"up":"down"}size={10}color={AppColors_1.AppColors.purple}/>
44
44
  </react_native_1.View>}
45
45
  </TouchableScale_1.default>
46
- </react_native_1.View>});exports.StorageTab=react_1.default.memo(()=>{const{t:a}=(0,i18n_1.useTranslation)(),o=(0,react_1.useRef)(null),[t,l]=(0,react_1.useState)("asyncStorage"),[r,v]=(0,react_1.useState)("default"),[n,p]=(0,react_1.useState)([]),[h,T]=(0,react_1.useState)(!0),[s,_]=(0,react_1.useState)(""),[V,F]=(0,react_1.useState)({}),[P,y]=(0,react_1.useState)(!1),[m,k]=(0,react_1.useState)("create"),[g,S]=(0,react_1.useState)(""),[f,A]=(0,react_1.useState)(""),[d,x]=(0,react_1.useState)("string"),[w,c]=(0,react_1.useState)(null),I=(0,react_1.useMemo)(()=>(0,storageInspector_1.getRegisteredMMKVInstanceIds)(),[]),u=(0,react_1.useCallback)(async()=>{T(!0);try{const e=await(0,storageInspector_1.fetchStorageEntries)(t,t==="mmkv"?r:void 0);p(e)}catch{p([])}finally{T(!1)}},[t,r]);(0,react_1.useEffect)(()=>(u(),(0,storageInspector_1.subscribeToStorageChanges)(u)),[u]);const M=e=>{F(i=>({...i,[e]:!i[e]}))},$=()=>{k("create"),S(""),A(""),x("string"),c(null),y(!0)},O=e=>{k("edit"),S(e.key),A(e.value),x(e.type==="json"?"json":e.type==="number"?"number":e.type==="boolean"?"boolean":"string"),c(null),y(!0)},W=e=>{react_native_1.Alert.alert("Delete Storage Key",`Are you sure you want to permanently delete "${e}" from ${t==="asyncStorage"?"AsyncStorage":"MMKV"}?`,[{text:"Cancel",style:"cancel"},{text:"Delete",style:"destructive",onPress:async()=>{await(0,storageInspector_1.removeStorageEntry)(t,e,t==="mmkv"?r:void 0)?((0,toast_1.showToast)(`Deleted "${e}"`),u()):(0,toast_1.showToast)(`Failed to delete "${e}"`)}}])},D=()=>{react_native_1.Alert.alert("Wipe All Storage Keys",`Are you sure you want to clear all ${n.length} keys in ${t==="asyncStorage"?"AsyncStorage":"MMKV"}? This cannot be undone.`,[{text:"Cancel",style:"cancel"},{text:"Wipe All",style:"destructive",onPress:async()=>{await(0,storageInspector_1.clearStorageDriver)(t,t==="mmkv"?r:void 0)&&((0,toast_1.showToast)("All storage keys wiped"),u())}}])},R=async()=>{if(!g.trim()){(0,toast_1.showToast)("Key name cannot be empty");return}let e=f;if(d==="json")try{const b=JSON.parse(f);e=JSON.stringify(b)}catch(b){c("Invalid JSON: "+b.message);return}else if(d==="number"&&isNaN(Number(f))){c("Value must be a valid number");return}await(0,storageInspector_1.setStorageEntry)(t,g.trim(),e,t==="mmkv"?r:void 0)?((0,toast_1.showToast)(m==="create"?`Added "${g.trim()}"`:`Updated "${g.trim()}"`),y(!1),u()):(0,toast_1.showToast)("Error saving storage key")},K=()=>{try{const e=JSON.parse(f);A(JSON.stringify(e,null,2)),c(null),x("json"),(0,toast_1.showToast)("Formatted JSON")}catch{c("Cannot format: invalid JSON syntax")}},B=(0,react_1.useMemo)(()=>{if(!s.trim())return n;const e=s.toLowerCase().trim().split(/\s+/).filter(Boolean);return n.filter(i=>{const b=`${i.key} ${i.value}`.toLowerCase();return e.every(N=>b.includes(N))})},[n,s]),C=(0,react_1.useMemo)(()=>n.reduce((e,i)=>e+i.byteSize,0),[n]),j=(0,react_1.useMemo)(()=>C<1024?`${C} B`:C<1024*1024?`${(C/1024).toFixed(1)} KB`:`${(C/(1024*1024)).toFixed(2)} MB`,[C]),z=(0,react_1.useCallback)(e=>{(0,helpers_1.copyToClipboard)(e.value,e.key),(0,toast_1.showToast)(`Copied value of "${e.key}"`)},[]),L=(0,react_1.useCallback)(({item:e})=><StorageEntryCard entry={e}isExpanded={!!V[e.key]}onToggleExpand={M}onCopy={z}onEdit={O}onDelete={W}badge={getTypeBadge(e.type)}/>,[V,z]),E=t==="asyncStorage"?(0,storageInspector_1.isAsyncStorageConnected)():(0,storageInspector_1.isMMKVConnected)();return<react_native_1.View style={styles.container}>
46
+ </react_native_1.View>});exports.StorageTab=react_1.default.memo(()=>{const{t:r}=(0,i18n_1.useTranslation)(),o=(0,react_1.useRef)(null),[t,l]=(0,react_1.useState)("asyncStorage"),[a,x]=(0,react_1.useState)("default"),[n,c]=(0,react_1.useState)([]),[_,A]=(0,react_1.useState)(!0),[s,S]=(0,react_1.useState)(""),[w,P]=(0,react_1.useState)(100),[k,M]=(0,react_1.useState)({}),[O,y]=(0,react_1.useState)(!1),[h,I]=(0,react_1.useState)("create"),[C,B]=(0,react_1.useState)(""),[b,T]=(0,react_1.useState)(""),[d,v]=(0,react_1.useState)("string"),[V,p]=(0,react_1.useState)(null),F=(0,react_1.useMemo)(()=>(0,storageInspector_1.getRegisteredMMKVInstanceIds)(),[]),u=(0,react_1.useCallback)(async()=>{A(!0);try{const e=await(0,storageInspector_1.fetchStorageEntries)(t,t==="mmkv"?a:void 0);c(e)}catch{c([])}finally{A(!1)}},[t,a]);(0,react_1.useEffect)(()=>(u(),(0,storageInspector_1.subscribeToStorageChanges)(u)),[u]);const D=e=>{M(i=>({...i,[e]:!i[e]}))},$=()=>{I("create"),B(""),T(""),v("string"),p(null),y(!0)},R=e=>{I("edit"),B(e.key),T(e.value),v(e.type==="json"?"json":e.type==="number"?"number":e.type==="boolean"?"boolean":"string"),p(null),y(!0)},K=e=>{react_native_1.Alert.alert(r("storage.deleteKeyTitle","Delete Key"),r("storage.deleteKeyMessage",{key:e,defaultValue:`Are you sure you want to delete key "${e}"?`}),[{text:r("common.cancel","Cancel"),style:"cancel"},{text:r("common.clear","Delete"),style:"destructive",onPress:async()=>{await(0,storageInspector_1.removeStorageEntry)(t,e,t==="mmkv"?a:void 0)?((0,toast_1.showToast)(`Deleted "${e}"`),u()):(0,toast_1.showToast)(`Failed to delete "${e}"`)}}])},W=()=>{react_native_1.Alert.alert(r("storage.clearTitle","Clear Storage Driver"),r("storage.clearMessage",{driver:t==="asyncStorage"?"AsyncStorage":"MMKV",defaultValue:`Are you sure you want to delete all keys in ${t==="asyncStorage"?"AsyncStorage":"MMKV"}?`}),[{text:r("common.cancel","Cancel"),style:"cancel"},{text:r("storage.clearConfirm","Clear All"),style:"destructive",onPress:async()=>{await(0,storageInspector_1.clearStorageDriver)(t,t==="mmkv"?a:void 0)&&((0,toast_1.showToast)("All storage keys wiped"),u())}}])},L=async()=>{if(!C.trim()){(0,toast_1.showToast)("Key name cannot be empty");return}let e=b;if(d==="json")try{const m=JSON.parse(b);e=JSON.stringify(m)}catch(m){p("Invalid JSON: "+m.message);return}else if(d==="number"&&isNaN(Number(b))){p("Value must be a valid number");return}await(0,storageInspector_1.setStorageEntry)(t,C.trim(),e,t==="mmkv"?a:void 0)?((0,toast_1.showToast)(h==="create"?`Added "${C.trim()}"`:`Updated "${C.trim()}"`),y(!1),u()):(0,toast_1.showToast)("Error saving storage key")},E=()=>{try{const e=JSON.parse(b);T(JSON.stringify(e,null,2)),p(null),v("json"),(0,toast_1.showToast)("Formatted JSON")}catch{p("Cannot format: invalid JSON syntax")}},g=(0,react_1.useMemo)(()=>{if(!s.trim())return n;const e=s.toLowerCase().trim().split(/\s+/).filter(Boolean);return n.filter(i=>{const m=`${i.key} ${i.value}`.toLowerCase();return e.every(H=>m.includes(H))})},[n,s]),f=(0,react_1.useMemo)(()=>n.reduce((e,i)=>e+i.byteSize,0),[n]),N=(0,react_1.useMemo)(()=>f<1024?`${f} B`:f<1024*1024?`${(f/1024).toFixed(1)} KB`:`${(f/(1024*1024)).toFixed(2)} MB`,[f]),z=(0,react_1.useCallback)(e=>{(0,helpers_1.copyToClipboard)(e.value,e.key),(0,toast_1.showToast)(`Copied value of "${e.key}"`)},[]),j=(0,react_1.useCallback)(({item:e})=><StorageEntryCard entry={e}isExpanded={!!k[e.key]}onToggleExpand={D}onCopy={z}onEdit={R}onDelete={K}badge={getTypeBadge(e.type)}/>,[k,z]),J=t==="asyncStorage"?(0,storageInspector_1.isAsyncStorageConnected)():(0,storageInspector_1.isMMKVConnected)();return<react_native_1.View style={styles.container}>
47
47
 
48
48
  <react_native_1.View style={styles.driverTabsWrapper}>
49
49
  <react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={styles.driverTabsContainer}>
50
- <TouchableScale_1.default onPress={()=>l("asyncStorage")}style={[styles.driverTabPill,t==="asyncStorage"&&styles.driverTabPillActive]}>
51
- <NetworkIcons_1.DatabaseIcon size={13}color={t==="asyncStorage"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>
52
- <react_native_1.Text style={[styles.driverTabText,t==="asyncStorage"&&styles.driverTabTextActive]}>
53
- AsyncStorage
50
+ <TouchableScale_1.default onPress={()=>l("asyncStorage")}style={[styles.driverTabPill,{backgroundColor:t==="asyncStorage"?AppColors_1.AppColors.brandPurple:`${AppColors_1.AppColors.brandPurple}0D`,borderColor:t==="asyncStorage"?AppColors_1.AppColors.brandPurple:`${AppColors_1.AppColors.brandPurple}2B`},t==="asyncStorage"&&{shadowColor:AppColors_1.AppColors.brandPurple,shadowOffset:{width:0,height:1.5},shadowOpacity:.25,shadowRadius:3,elevation:3}]}>
51
+ <NetworkIcons_1.DatabaseIcon size={13}color={t==="asyncStorage"?AppColors_1.AppColors.white:AppColors_1.AppColors.brandPurple}/>
52
+ <react_native_1.Text style={[styles.driverTabText,{color:t==="asyncStorage"?AppColors_1.AppColors.white:AppColors_1.AppColors.brandPurple,fontFamily:t==="asyncStorage"?AppFonts_1.AppFonts.interBold:AppFonts_1.AppFonts.interSemiBold}]}>
53
+ {r("storage.subTabs.asyncStorage","AsyncStorage")}
54
54
  </react_native_1.Text>
55
- {t==="asyncStorage"&&n.length>0&&<react_native_1.View style={styles.driverCountBadge}>
56
- <react_native_1.Text style={styles.driverCountText}>{n.length}</react_native_1.Text>
55
+ {n.length>0&&t==="asyncStorage"&&<react_native_1.View style={[styles.driverCountBadge,{backgroundColor:"rgba(255,255,255,0.25)",borderColor:"rgba(255,255,255,0.45)"}]}>
56
+ <react_native_1.Text style={[styles.driverCountText,{color:AppColors_1.AppColors.white}]}>
57
+ {n.length}
58
+ </react_native_1.Text>
57
59
  </react_native_1.View>}
58
60
  </TouchableScale_1.default>
59
61
 
60
- <TouchableScale_1.default onPress={()=>l("mmkv")}style={[styles.driverTabPill,t==="mmkv"&&styles.driverTabPillActive]}>
61
- <NetworkIcons_1.LayersIcon size={13}color={t==="mmkv"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>
62
- <react_native_1.Text style={[styles.driverTabText,t==="mmkv"&&styles.driverTabTextActive]}>
63
- MMKV
62
+ <TouchableScale_1.default onPress={()=>l("mmkv")}style={[styles.driverTabPill,{backgroundColor:t==="mmkv"?AppColors_1.AppColors.teal600:`${AppColors_1.AppColors.teal600}0D`,borderColor:t==="mmkv"?AppColors_1.AppColors.teal600:`${AppColors_1.AppColors.teal600}2B`},t==="mmkv"&&{shadowColor:AppColors_1.AppColors.teal600,shadowOffset:{width:0,height:1.5},shadowOpacity:.25,shadowRadius:3,elevation:3}]}>
63
+ <NetworkIcons_1.LayersIcon size={13}color={t==="mmkv"?AppColors_1.AppColors.white:AppColors_1.AppColors.teal600}/>
64
+ <react_native_1.Text style={[styles.driverTabText,{color:t==="mmkv"?AppColors_1.AppColors.white:AppColors_1.AppColors.teal600,fontFamily:t==="mmkv"?AppFonts_1.AppFonts.interBold:AppFonts_1.AppFonts.interSemiBold}]}>
65
+ {r("storage.subTabs.mmkv","MMKV")}
64
66
  </react_native_1.Text>
65
- {t==="mmkv"&&n.length>0&&<react_native_1.View style={styles.driverCountBadge}>
66
- <react_native_1.Text style={styles.driverCountText}>{n.length}</react_native_1.Text>
67
+ {n.length>0&&t==="mmkv"&&<react_native_1.View style={[styles.driverCountBadge,{backgroundColor:"rgba(255,255,255,0.25)",borderColor:"rgba(255,255,255,0.45)"}]}>
68
+ <react_native_1.Text style={[styles.driverCountText,{color:AppColors_1.AppColors.white}]}>
69
+ {n.length}
70
+ </react_native_1.Text>
67
71
  </react_native_1.View>}
68
72
  </TouchableScale_1.default>
69
73
 
70
74
 
71
- {t==="mmkv"&&I.length>1&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4,marginLeft:6}}>
72
- {I.map(e=><TouchableScale_1.default key={e}onPress={()=>v(e)}style={[styles.instancePill,r===e&&styles.instancePillActive]}>
73
- <react_native_1.Text style={[styles.instancePillText,r===e&&styles.instancePillTextActive]}>
75
+ {t==="mmkv"&&F.length>1&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4,marginLeft:6}}>
76
+ {F.map(e=><TouchableScale_1.default key={e}onPress={()=>x(e)}style={[styles.instancePill,a===e&&styles.instancePillActive]}>
77
+ <react_native_1.Text style={[styles.instancePillText,a===e&&styles.instancePillTextActive]}>
74
78
  {e}
75
79
  </react_native_1.Text>
76
80
  </TouchableScale_1.default>)}
@@ -82,14 +86,14 @@
82
86
  <react_native_1.View style={styles.actionBar}>
83
87
  <react_native_1.View style={styles.searchBar}>
84
88
  <NetworkIcons_1.SearchIcon size={14}color={AppColors_1.AppColors.grayTextWeak}/>
85
- <react_native_1.TextInput value={s}onChangeText={_}placeholder={`Search ${n.length} keys & values...`}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}style={styles.searchInput}clearButtonMode="while-editing"/>
89
+ <react_native_1.TextInput value={s}onChangeText={S}placeholder={r("storage.searchPlaceholder","Search keys, values, types...")}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}style={styles.searchInput}clearButtonMode="while-editing"/>
86
90
  {s.length>0&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4}}>
87
91
  <react_native_1.View style={{backgroundColor:`${AppColors_1.AppColors.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
88
92
  <react_native_1.Text style={{color:AppColors_1.AppColors.purple,fontSize:9.5,fontFamily:AppFonts_1.AppFonts.interBold}}>
89
- {B.length}
93
+ {g.length}
90
94
  </react_native_1.Text>
91
95
  </react_native_1.View>
92
- <TouchableScale_1.default onPress={()=>_("")}hitSlop={8}>
96
+ <TouchableScale_1.default onPress={()=>S("")}hitSlop={8}>
93
97
  <NetworkIcons_1.ClearIcon size={13}color={AppColors_1.AppColors.grayTextWeak}/>
94
98
  </TouchableScale_1.default>
95
99
  </react_native_1.View>}
@@ -98,14 +102,14 @@
98
102
 
99
103
  <TouchableScale_1.default onPress={$}style={styles.addKeyBtn}hitSlop={6}>
100
104
  <NetworkIcons_1.PlusIcon size={13}color={AppColors_1.AppColors.white}/>
101
- <react_native_1.Text style={styles.addKeyBtnText}>Add</react_native_1.Text>
105
+ <react_native_1.Text style={styles.addKeyBtnText}>{r("storage.add","Add")}</react_native_1.Text>
102
106
  </TouchableScale_1.default>
103
107
 
104
108
  <TouchableScale_1.default onPress={u}style={styles.actionIconBtn}hitSlop={6}>
105
109
  <NetworkIcons_1.ResetIcon size={13}color={AppColors_1.AppColors.grayText}/>
106
110
  </TouchableScale_1.default>
107
111
 
108
- {n.length>0&&<TouchableScale_1.default onPress={D}style={[styles.actionIconBtn,{borderColor:`${AppColors_1.AppColors.errorColor}33`,backgroundColor:`${AppColors_1.AppColors.errorColor}12`}]}hitSlop={6}>
112
+ {n.length>0&&<TouchableScale_1.default onPress={W}style={[styles.actionIconBtn,{borderColor:`${AppColors_1.AppColors.errorColor}33`,backgroundColor:`${AppColors_1.AppColors.errorColor}12`}]}hitSlop={6}>
109
113
  <NetworkIcons_1.TrashIcon size={13}color={AppColors_1.AppColors.errorColor}/>
110
114
  </TouchableScale_1.default>}
111
115
  </react_native_1.View>
@@ -113,19 +117,19 @@
113
117
 
114
118
  <react_native_1.View style={styles.statsStrip}>
115
119
  <react_native_1.Text style={styles.statsText}>
116
- {B.length} of {n.length} Keys • {j}
120
+ {g.length} of {n.length} Keys • {N}
117
121
  </react_native_1.Text>
118
122
  <react_native_1.Text style={styles.statsSubtext}>
119
- {t==="asyncStorage"?"SQLite Key-Value":`MMKV (${r})`}
123
+ {t==="asyncStorage"?"SQLite Key-Value":`MMKV (${a})`}
120
124
  </react_native_1.Text>
121
125
  </react_native_1.View>
122
126
 
123
127
 
124
- {h?<react_native_1.View style={styles.loadingContainer}>
128
+ {_?<react_native_1.View style={styles.loadingContainer}>
125
129
  <react_native_1.ActivityIndicator size="small"color={AppColors_1.AppColors.purple}/>
126
- <react_native_1.Text style={styles.loadingText}>Loading storage entries...</react_native_1.Text>
130
+ <react_native_1.Text style={styles.loadingText}>{r("storage.loading","Loading storage entries...")}</react_native_1.Text>
127
131
  </react_native_1.View>:<>
128
- <react_native_1.FlatList ref={o}data={B}keyExtractor={e=>e.key}renderItem={L}initialNumToRender={10}maxToRenderPerBatch={10}windowSize={5}removeClippedSubviews={react_native_1.Platform.OS==="android"}style={styles.scrollArea}contentContainerStyle={styles.scrollContent}showsVerticalScrollIndicator={!1}ListEmptyComponent={<react_native_1.View style={styles.emptyContainer}>
132
+ <react_native_1.FlatList ref={o}data={g.slice(0,w)}keyExtractor={e=>e.key}renderItem={j}initialNumToRender={10}maxToRenderPerBatch={10}windowSize={5}removeClippedSubviews={react_native_1.Platform.OS==="android"}style={styles.scrollArea}contentContainerStyle={styles.scrollContent}showsVerticalScrollIndicator={!1}ListEmptyComponent={<react_native_1.View style={styles.emptyContainer}>
129
133
  <react_native_1.View style={styles.emptyIconWrap}>
130
134
  <NetworkIcons_1.DatabaseIcon size={28}color={AppColors_1.AppColors.grayTextWeak}/>
131
135
  </react_native_1.View>
@@ -135,21 +139,21 @@
135
139
  <react_native_1.Text style={styles.emptySubtitle}>
136
140
  {s.trim().length>0?`No keys or values match "${s}"`:`Storage is auto-detected. Tap "+ Add" above to create your first ${t==="asyncStorage"?"AsyncStorage":"MMKV"} key!`}
137
141
  </react_native_1.Text>
138
- {s.trim().length>0&&<TouchableScale_1.default onPress={()=>_("")}style={{marginTop:12,paddingHorizontal:14,paddingVertical:6,borderRadius:8,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary}}>
142
+ {s.trim().length>0&&<TouchableScale_1.default onPress={()=>S("")}style={{marginTop:12,paddingHorizontal:14,paddingVertical:6,borderRadius:8,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary}}>
139
143
  <react_native_1.Text style={{color:AppColors_1.AppColors.brandPurple,fontSize:12,fontFamily:AppFonts_1.AppFonts.interBold}}>
140
144
  Clear Search
141
145
  </react_native_1.Text>
142
146
  </TouchableScale_1.default>}
143
- </react_native_1.View>}ListFooterComponent={<react_native_1.View style={{height:60}}/>}/>
147
+ </react_native_1.View>}ListFooterComponent={g.length>0?<EndOfListFooter_1.default count={Math.min(w,g.length)}totalCount={g.length}label="keys"hasMore={g.length>w}onLoadMore={()=>P(e=>e+10)}/>:<react_native_1.View style={{height:60}}/>}/>
144
148
  </>}
145
149
 
146
150
 
147
- <react_native_1.Modal visible={P}transparent animationType="fade"onRequestClose={()=>y(!1)}>
151
+ <react_native_1.Modal visible={O}transparent animationType="fade"onRequestClose={()=>y(!1)}>
148
152
  <react_native_1.View style={styles.modalOverlay}>
149
153
  <react_native_1.View style={styles.modalCard}>
150
154
  <react_native_1.View style={styles.modalHeader}>
151
155
  <react_native_1.Text style={styles.modalTitle}>
152
- {m==="create"?"Add Storage Key":`Edit: ${g}`}
156
+ {h==="create"?"Add Storage Key":`Edit: ${C}`}
153
157
  </react_native_1.Text>
154
158
  <TouchableScale_1.default onPress={()=>y(!1)}hitSlop={8}>
155
159
  <NetworkIcons_1.ClearIcon size={16}color={AppColors_1.AppColors.grayText}/>
@@ -158,20 +162,20 @@
158
162
 
159
163
 
160
164
  <react_native_1.View style={styles.inputGroup}>
161
- <react_native_1.Text style={styles.inputLabel}>KEY NAME</react_native_1.Text>
162
- <react_native_1.TextInput value={g}onChangeText={S}placeholder="e.g. user_session, auth_token"placeholderTextColor={AppColors_1.AppColors.grayTextWeak}editable={m==="create"}style={[styles.textInput,m==="edit"&&styles.textInputDisabled]}autoCapitalize="none"/>
165
+ <react_native_1.Text style={styles.inputLabel}>{r("storage.keyName","KEY NAME").toUpperCase()}</react_native_1.Text>
166
+ <react_native_1.TextInput value={C}onChangeText={B}placeholder="e.g. user_session, auth_token"placeholderTextColor={AppColors_1.AppColors.grayTextWeak}editable={h==="create"}style={[styles.textInput,h==="edit"&&styles.textInputDisabled]}autoCapitalize="none"/>
163
167
  </react_native_1.View>
164
168
 
165
169
 
166
170
  <react_native_1.View style={styles.inputGroup}>
167
171
  <react_native_1.View style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4}}>
168
- <react_native_1.Text style={styles.inputLabel}>VALUE TYPE</react_native_1.Text>
169
- {d==="json"&&<TouchableScale_1.default onPress={K}hitSlop={6}>
170
- <react_native_1.Text style={styles.formatJsonBtn}>Beautify JSON</react_native_1.Text>
172
+ <react_native_1.Text style={styles.inputLabel}>{r("storage.type","VALUE TYPE").toUpperCase()}</react_native_1.Text>
173
+ {d==="json"&&<TouchableScale_1.default onPress={E}hitSlop={6}>
174
+ <react_native_1.Text style={styles.formatJsonBtn}>{r("storage.beautifyJson","Beautify JSON")}</react_native_1.Text>
171
175
  </TouchableScale_1.default>}
172
176
  </react_native_1.View>
173
177
  <react_native_1.View style={styles.typeSelectorStrip}>
174
- {["string","json","number","boolean"].map(e=>{const i=d===e;return<TouchableScale_1.default key={e}onPress={()=>{x(e),c(null)}}style={[styles.typePill,i&&styles.typePillActive]}>
178
+ {["string","json","number","boolean"].map(e=>{const i=d===e;return<TouchableScale_1.default key={e}onPress={()=>{v(e),p(null)}}style={[styles.typePill,i&&styles.typePillActive]}>
175
179
  <react_native_1.Text style={[styles.typePillText,i&&styles.typePillTextActive]}>
176
180
  {e.toUpperCase()}
177
181
  </react_native_1.Text>
@@ -181,25 +185,25 @@
181
185
 
182
186
 
183
187
  <react_native_1.View style={styles.inputGroup}>
184
- <react_native_1.Text style={styles.inputLabel}>VALUE CONTENT</react_native_1.Text>
185
- <react_native_1.TextInput value={f}onChangeText={e=>{A(e),w&&c(null)}}placeholder={d==="json"?'{"userId": 123, "isLoggedIn": true}':d==="number"?"42":d==="boolean"?"true":"String value..."}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}style={[styles.textInput,styles.textAreaInput]}multiline textAlignVertical="top"autoCapitalize="none"/>
186
- {w&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:5,marginTop:4}}>
188
+ <react_native_1.Text style={styles.inputLabel}>{r("storage.valueContent","VALUE CONTENT").toUpperCase()}</react_native_1.Text>
189
+ <react_native_1.TextInput value={b}onChangeText={e=>{T(e),V&&p(null)}}placeholder={d==="json"?'{"userId": 123, "isLoggedIn": true}':d==="number"?"42":d==="boolean"?"true":"String value..."}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}style={[styles.textInput,styles.textAreaInput]}multiline textAlignVertical="top"autoCapitalize="none"/>
190
+ {V&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:5,marginTop:4}}>
187
191
  <NetworkIcons_1.WarningTriangleIcon size={12}color={AppColors_1.AppColors.errorColor}/>
188
- <react_native_1.Text style={styles.errorText}>{w}</react_native_1.Text>
192
+ <react_native_1.Text style={styles.errorText}>{V}</react_native_1.Text>
189
193
  </react_native_1.View>}
190
194
  </react_native_1.View>
191
195
 
192
196
 
193
197
  <react_native_1.View style={styles.modalActions}>
194
198
  <TouchableScale_1.default onPress={()=>y(!1)}style={styles.cancelBtn}>
195
- <react_native_1.Text style={styles.cancelBtnText}>Cancel</react_native_1.Text>
199
+ <react_native_1.Text style={styles.cancelBtnText}>{r("common.cancel","Cancel")}</react_native_1.Text>
196
200
  </TouchableScale_1.default>
197
- <TouchableScale_1.default onPress={R}style={styles.saveBtn}>
201
+ <TouchableScale_1.default onPress={L}style={styles.saveBtn}>
198
202
  <NetworkIcons_1.CheckIcon size={14}color={AppColors_1.AppColors.white}/>
199
- <react_native_1.Text style={styles.saveBtnText}>Save Key</react_native_1.Text>
203
+ <react_native_1.Text style={styles.saveBtnText}>{r("storage.saveKey","Save Key")}</react_native_1.Text>
200
204
  </TouchableScale_1.default>
201
205
  </react_native_1.View>
202
206
  </react_native_1.View>
203
207
  </react_native_1.View>
204
208
  </react_native_1.Modal>
205
- </react_native_1.View>});const styles=react_native_1.StyleSheet.create({container:{flex:1,backgroundColor:AppColors_1.AppColors.grayBackground},driverTabsWrapper:{backgroundColor:AppColors_1.AppColors.primaryLight,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,paddingVertical:8},driverTabsContainer:{paddingHorizontal:12,flexDirection:"row",alignItems:"center",gap:6},driverTabPill:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:11,paddingVertical:6,borderRadius:8,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},driverTabPillActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},driverTabText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,color:AppColors_1.AppColors.grayText},driverTabTextActive:{color:AppColors_1.AppColors.white},driverCountBadge:{backgroundColor:"rgba(255, 255, 255, 0.25)",paddingHorizontal:5,paddingVertical:1,borderRadius:6},driverCountText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:AppColors_1.AppColors.white},instancePill:{paddingHorizontal:7,paddingVertical:3,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.purple}14`,borderWidth:1,borderColor:`${AppColors_1.AppColors.purple}30`},instancePillActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},instancePillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.purple},instancePillTextActive:{color:AppColors_1.AppColors.white},actionBar:{flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:8,backgroundColor:AppColors_1.AppColors.primaryLight,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,gap:6},searchBar:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,paddingHorizontal:9,paddingVertical:react_native_1.Platform.OS==="ios"?6:2,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,gap:6},searchInput:{flex:1,fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.primaryBlack,padding:0},addKeyBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:10,paddingVertical:6,borderRadius:8,backgroundColor:AppColors_1.AppColors.purple},addKeyBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.white},actionIconBtn:{width:30,height:30,borderRadius:8,alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},statsStrip:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:5,backgroundColor:`${AppColors_1.AppColors.grayBorderSecondary}40`},statsText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.grayText},statsSubtext:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak},scrollArea:{flex:1},scrollContent:{padding:12,gap:10,paddingBottom:100},entryCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:10,gap:8,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.02,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1},entryHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},entryKey:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12.5,color:AppColors_1.AppColors.primaryBlack},typeBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:4,borderWidth:1},typeBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5},sizeText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak},entryActions:{flexDirection:"row",alignItems:"center",gap:5},entryActionBtn:{padding:5,borderRadius:5,backgroundColor:AppColors_1.AppColors.grayBackground},valuePreviewBox:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:6,padding:8,borderWidth:1,borderColor:`${AppColors_1.AppColors.grayBorderSecondary}80`},valuePreviewText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.primaryBlack,lineHeight:16},expandHint:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.purple,marginTop:4},loadingContainer:{flex:1,alignItems:"center",justifyContent:"center",gap:8},loadingText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.grayText},emptyContainer:{padding:24,alignItems:"center",justifyContent:"center"},emptyIconWrap:{width:56,height:56,borderRadius:28,backgroundColor:`${AppColors_1.AppColors.grayBorderSecondary}40`,alignItems:"center",justifyContent:"center",marginBottom:12},emptyTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.primaryBlack,marginBottom:4},emptySubtitle:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11.5,color:AppColors_1.AppColors.grayText,textAlign:"center",maxWidth:280},connectGuideCard:{marginTop:20,width:"100%",backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:12,gap:6},connectGuideTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.purple},connectGuideCode:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.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:AppColors_1.AppColors.primaryLight,borderRadius:14,padding:16,gap:12,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.2,shadowRadius:10,shadowOffset:{width:0,height:4},elevation:5},modalHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,paddingBottom:10},modalTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.primaryBlack},inputGroup:{gap:4},inputLabel:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.5},textInput:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,paddingHorizontal:10,paddingVertical:8,fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.primaryBlack,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},textInputDisabled:{backgroundColor:`${AppColors_1.AppColors.grayBorderSecondary}40`,color:AppColors_1.AppColors.grayText},textAreaInput:{minHeight:90,maxHeight:160,fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11},typeSelectorStrip:{flexDirection:"row",alignItems:"center",gap:6},typePill:{flex:1,alignItems:"center",paddingVertical:6,borderRadius:6,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},typePillActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},typePillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.grayText},typePillTextActive:{color:AppColors_1.AppColors.white},formatJsonBtn:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.purple},errorText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.errorColor,marginTop:2},modalActions:{flexDirection:"row",alignItems:"center",gap:10,marginTop:4},cancelBtn:{flex:1,alignItems:"center",paddingVertical:10,borderRadius:8,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},cancelBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.grayText},saveBtn:{flex:1.5,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:5,paddingVertical:10,borderRadius:8,backgroundColor:AppColors_1.AppColors.purple},saveBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.white}});exports.default=exports.StorageTab;
209
+ </react_native_1.View>});const styles=react_native_1.StyleSheet.create({container:{flex:1,backgroundColor:AppColors_1.AppColors.grayBackground},driverTabsWrapper:{backgroundColor:AppColors_1.AppColors.primaryLight,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.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:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},driverTabPillActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},driverTabText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.grayText},driverTabTextActive:{color:AppColors_1.AppColors.white},driverCountBadge:{backgroundColor:"rgba(255, 255, 255, 0.25)",paddingHorizontal:5,paddingVertical:1,borderRadius:8},driverCountText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.white},instancePill:{paddingHorizontal:7,paddingVertical:3,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.purple}14`,borderWidth:1,borderColor:`${AppColors_1.AppColors.purple}30`},instancePillActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},instancePillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.purple},instancePillTextActive:{color:AppColors_1.AppColors.white},actionBar:{flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:8,backgroundColor:AppColors_1.AppColors.primaryLight,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,gap:6},searchBar:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,paddingHorizontal:9,paddingVertical:react_native_1.Platform.OS==="ios"?6:2,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,gap:6},searchInput:{flex:1,fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.primaryBlack,padding:0},addKeyBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:10,paddingVertical:6,borderRadius:8,backgroundColor:AppColors_1.AppColors.purple},addKeyBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.white},actionIconBtn:{width:30,height:30,borderRadius:8,alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},statsStrip:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:5,backgroundColor:`${AppColors_1.AppColors.grayBorderSecondary}40`},statsText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.grayText},statsSubtext:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak},scrollArea:{flex:1},scrollContent:{padding:12,gap:10,paddingBottom:100},entryCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:10,gap:8,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.02,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1},entryHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},entryKey:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12.5,color:AppColors_1.AppColors.primaryBlack},typeBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:4,borderWidth:1},typeBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5},sizeText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak},entryActions:{flexDirection:"row",alignItems:"center",gap:5},entryActionBtn:{padding:5,borderRadius:5,backgroundColor:AppColors_1.AppColors.grayBackground},valuePreviewBox:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:6,padding:8,borderWidth:1,borderColor:`${AppColors_1.AppColors.grayBorderSecondary}80`},valuePreviewText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.primaryBlack,lineHeight:16},expandHint:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.purple,marginTop:4},loadingContainer:{flex:1,alignItems:"center",justifyContent:"center",gap:8},loadingText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.grayText},emptyContainer:{padding:24,alignItems:"center",justifyContent:"center"},emptyIconWrap:{width:56,height:56,borderRadius:28,backgroundColor:`${AppColors_1.AppColors.grayBorderSecondary}40`,alignItems:"center",justifyContent:"center",marginBottom:12},emptyTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.primaryBlack,marginBottom:4},emptySubtitle:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11.5,color:AppColors_1.AppColors.grayText,textAlign:"center",maxWidth:280},connectGuideCard:{marginTop:20,width:"100%",backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:12,gap:6},connectGuideTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.purple},connectGuideCode:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.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:AppColors_1.AppColors.primaryLight,borderRadius:14,padding:16,gap:12,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.2,shadowRadius:10,shadowOffset:{width:0,height:4},elevation:5},modalHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,paddingBottom:10},modalTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.primaryBlack},inputGroup:{gap:4},inputLabel:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.5},textInput:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,paddingHorizontal:10,paddingVertical:8,fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.primaryBlack,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},textInputDisabled:{backgroundColor:`${AppColors_1.AppColors.grayBorderSecondary}40`,color:AppColors_1.AppColors.grayText},textAreaInput:{minHeight:90,maxHeight:160,fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11},typeSelectorStrip:{flexDirection:"row",alignItems:"center",gap:6},typePill:{flex:1,alignItems:"center",paddingVertical:6,borderRadius:6,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},typePillActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},typePillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.grayText},typePillTextActive:{color:AppColors_1.AppColors.white},formatJsonBtn:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.purple},errorText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.errorColor,marginTop:2},modalActions:{flexDirection:"row",alignItems:"center",gap:10,marginTop:4},cancelBtn:{flex:1,alignItems:"center",paddingVertical:10,borderRadius:8,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},cancelBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.grayText},saveBtn:{flex:1.5,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:5,paddingVertical:10,borderRadius:8,backgroundColor:AppColors_1.AppColors.purple},saveBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.white}});exports.default=exports.StorageTab;
@@ -1,51 +1,54 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,o,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(o,n);(!i||("get"in i?!o.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return o[n]}}),Object.defineProperty(t,r,i)}):(function(t,o,n,r){r===void 0&&(r=n),t[r]=o[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,o){Object.defineProperty(t,"default",{enumerable:!0,value:o})}):function(t,o){t.default=o}),__importStar=this&&this.__importStar||(function(){var t=function(o){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(o)};return function(o){if(o&&o.__esModule)return o;var n={};if(o!=null)for(var r=t(o),i=0;i<r.length;i++)r[i]!=="default"&&__createBinding(n,o,r[i]);return __setModuleDefault(n,o),n}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),TouchableScale_1=__importDefault(require("../TouchableScale")),NetworkIcons_1=require("../NetworkIcons"),reduxLogger_1=require("../../customHooks/reduxLogger"),analyticsLogger_1=require("../../customHooks/analyticsLogger"),helpers_1=require("../../helpers"),TabBar=react_1.default.memo(()=>{const{activeTab:t,switchActiveTab:o,tabVisibility:n,logs:r,consoleLogs:i,analyticsEvents:w,crashRecords:f,lastReadApisCount:A,lastReadLogsCount:m,lastReadCrashesCount:S,mediaCount:y}=(0,InspectorContext_1.useInspector)(),x=(0,reduxLogger_1.isReduxConnected)(),I=(0,analyticsLogger_1.isAnalyticsConnected)(),s=t==="media",p=(n?.media??!0)&&y>0,C=(0,react_1.useRef)(null),[g,T]=(0,react_1.useState)(!1),[_,R]=(0,react_1.useState)(!0),b=(0,react_1.useRef)(0),k=e=>{const{contentOffset:c,layoutMeasurement:l,contentSize:h}=e.nativeEvent,a=c.x;b.current=a;const u=a>8,d=a<h.width-l.width-8;g!==u&&T(u),_!==d&&R(d)},v=e=>{C.current?.scrollTo({x:Math.max(0,b.current+e),animated:!0})};return<react_native_1.View style={[styles_1.default.tabBarContainer,{flexDirection:"row",alignItems:"center",paddingHorizontal:0}]}>
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,o,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(o,n);(!i||("get"in i?!o.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return o[n]}}),Object.defineProperty(t,r,i)}):(function(t,o,n,r){r===void 0&&(r=n),t[r]=o[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,o){Object.defineProperty(t,"default",{enumerable:!0,value:o})}):function(t,o){t.default=o}),__importStar=this&&this.__importStar||(function(){var t=function(o){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(o)};return function(o){if(o&&o.__esModule)return o;var n={};if(o!=null)for(var r=t(o),i=0;i<r.length;i++)r[i]!=="default"&&__createBinding(n,o,r[i]);return __setModuleDefault(n,o),n}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),TouchableScale_1=__importDefault(require("../TouchableScale")),NetworkIcons_1=require("../NetworkIcons"),reduxLogger_1=require("../../customHooks/reduxLogger"),analyticsLogger_1=require("../../customHooks/analyticsLogger"),helpers_1=require("../../helpers"),HEADER_TAB_THEME={themeColor:AppColors_1.AppColors.brandPurple,bgInactive:`${AppColors_1.AppColors.brandPurple}0D`,borderInactive:`${AppColors_1.AppColors.brandPurple}2B`,iconInactive:AppColors_1.AppColors.brandPurple,idBadgeBg:`${AppColors_1.AppColors.brandPurple}1C`,idBadgeBorder:`${AppColors_1.AppColors.brandPurple}3D`,idBadgeText:AppColors_1.AppColors.brandPurple},TAB_THEMES={apis:HEADER_TAB_THEME,logs:HEADER_TAB_THEME,analytics:HEADER_TAB_THEME,redux:HEADER_TAB_THEME,storage:HEADER_TAB_THEME,device:HEADER_TAB_THEME,crash:HEADER_TAB_THEME,debugging:HEADER_TAB_THEME,media:HEADER_TAB_THEME},TabBar=react_1.default.memo(()=>{const{activeTab:t,switchActiveTab:o,tabVisibility:n,logs:r,consoleLogs:i,analyticsEvents:v,crashRecords:f,lastReadApisCount:A,lastReadLogsCount:m,lastReadCrashesCount:S,mediaCount:y}=(0,InspectorContext_1.useInspector)(),x=(0,reduxLogger_1.isReduxConnected)(),I=(0,analyticsLogger_1.isAnalyticsConnected)(),c=t==="media",g=(n?.media??!0)&&y>0,C=(0,react_1.useRef)(null),[h,T]=(0,react_1.useState)(!1),[b,B]=(0,react_1.useState)(!0),_=(0,react_1.useRef)(0),R=e=>{const{contentOffset:a,layoutMeasurement:l,contentSize:s}=e.nativeEvent,d=a.x;_.current=d;const u=d>8,p=d<s.width-l.width-8;h!==u&&T(u),b!==p&&B(p)},w=e=>{C.current?.scrollTo({x:Math.max(0,_.current+e),animated:!0})};return<react_native_1.View style={[styles_1.default.tabBarContainer,{flexDirection:"row",alignItems:"center",paddingHorizontal:0}]}>
2
2
 
3
- {g&&<react_native_1.TouchableOpacity onPress={()=>v(-160)}hitSlop={{top:6,bottom:6,left:6,right:6}}activeOpacity={.7}style={{paddingLeft:6,paddingRight:2,justifyContent:"center",alignItems:"center"}}>
3
+ {h&&<react_native_1.TouchableOpacity 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
  <react_native_1.View style={{width:22,height:22,borderRadius:11,backgroundColor:AppColors_1.AppColors.grayBorderSecondary,alignItems:"center",justifyContent:"center"}}>
5
- <NetworkIcons_1.ChevronIcon direction="left"size={13}color={AppColors_1.AppColors.purple}/>
5
+ <NetworkIcons_1.ChevronIcon direction="left"size={13}color={AppColors_1.AppColors.grayTextStrong}/>
6
6
  </react_native_1.View>
7
7
  </react_native_1.TouchableOpacity>}
8
8
 
9
9
 
10
- <react_native_1.ScrollView ref={C}horizontal showsHorizontalScrollIndicator={!1}onScroll={k}scrollEventThrottle={16}style={{flex:1}}contentContainerStyle={{paddingLeft:g?4:12,paddingRight:p?6:12}}>
11
- {[{id:1,key:"apis",label:"APIs",count:r.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:i.length,icon:"logs"},{id:3,key:"analytics",label:"Analytics",count:w.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:f?.length||0,icon:"crash"},{id:8,key:"bundle",label:"Bundle",count:0,icon:"bundle"},{id:9,key:"performance",label:"Performance",count:0,icon:"performance"},{id:10,key:"debugging",label:"Debugging",count:0,icon:"debugging"}].filter(e=>e.key==="debugging"?react_native_1.Platform.OS==="android"&&(0,helpers_1.isLocalDebugEnvironment)()&&!!n?.debugging:!(!n?.[e.key]||e.key==="redux"&&!x||e.key==="analytics"&&!I)).map(e=>{const c=t===e.key,l=c?AppColors_1.AppColors.white:e.key==="crash"&&e.count>0?AppColors_1.AppColors.errorColor:AppColors_1.AppColors.grayText,h=e.count>9?"9+":String(e.count),a=t!=="apis"&&r.length>A,u=t!=="logs"&&i.length>m,d=t!=="crash"&&(f?.length||0)>(S||0);return<TouchableScale_1.default key={e.key}onPress={()=>{o(e.key)}}style={[styles_1.default.contentTabButton,c&&styles_1.default.contentTabButtonActive]}>
10
+ <react_native_1.ScrollView ref={C}horizontal showsHorizontalScrollIndicator={!1}onScroll={R}scrollEventThrottle={16}style={{flex:1}}contentContainerStyle={{paddingLeft:h?4:12,paddingRight:g?6:12}}>
11
+ {[{id:1,key:"apis",label:"APIs",count:r.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:i.length,icon:"logs"},{id:3,key:"analytics",label:"Analytics",count:v.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:f?.length||0,icon:"crash"},{id:8,key:"debugging",label:"Debugging",count:0,icon:"debugging"}].filter(e=>e.key==="debugging"?react_native_1.Platform.OS==="android"&&(0,helpers_1.isLocalDebugEnvironment)()&&!!n?.debugging:!(!n?.[e.key]||e.key==="redux"&&!x||e.key==="analytics"&&!I)).map(e=>{const a=t===e.key,l=TAB_THEMES[e.key]||TAB_THEMES.apis,s=a?AppColors_1.AppColors.white:l.iconInactive,d=e.count>99?"99+":String(e.count),u=t!=="apis"&&r.length>A,p=t!=="logs"&&i.length>m,O=t!=="crash"&&(f?.length||0)>(S||0);return<TouchableScale_1.default key={e.key}onPress={()=>{o(e.key)}}style={[styles_1.default.contentTabButton,{backgroundColor:a?l.themeColor:l.bgInactive,borderColor:a?l.themeColor:l.borderInactive},a&&{shadowColor:l.themeColor,shadowOffset:{width:0,height:2},shadowOpacity:.28,shadowRadius:3.5,elevation:3}]}>
12
12
  <react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6}}>
13
- {e.icon==="apis"&&<NetworkIcons_1.SignalIcon color={l}size={14}/>}
14
- {e.icon==="logs"&&<NetworkIcons_1.TerminalIcon color={l}size={14}/>}
15
- {e.icon==="analytics"&&<NetworkIcons_1.AnalyticsIcon color={l}size={14}/>}
16
- {e.icon==="redux"&&<NetworkIcons_1.ReduxIcon color={l}size={14}/>}
17
- {e.icon==="storage"&&<NetworkIcons_1.DatabaseIcon color={l}size={14}/>}
18
- {e.icon==="device"&&<NetworkIcons_1.SmartphoneIcon color={l}size={14}/>}
19
- {e.icon==="crash"&&<NetworkIcons_1.CrashIcon color={l}size={14}/>}
20
- {e.icon==="bundle"&&<NetworkIcons_1.PackageIcon color={l}size={14}/>}
21
- {e.icon==="performance"&&<NetworkIcons_1.PerformanceIcon color={l}size={14}/>}
22
- {e.icon==="debugging"&&<NetworkIcons_1.QrCodeIcon color={l}size={14}/>}
23
- <react_native_1.View style={{minWidth:20,height:20,paddingHorizontal:4,borderRadius:10,backgroundColor:c?`${AppColors_1.AppColors.white}33`:`${AppColors_1.AppColors.purple}1F`,borderWidth:1,borderColor:c?`${AppColors_1.AppColors.white}66`:`${AppColors_1.AppColors.purple}40`,alignItems:"center",justifyContent:"center"}}>
24
- <react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12,color:c?AppColors_1.AppColors.white:AppColors_1.AppColors.purple}}>
13
+ {e.icon==="apis"&&<NetworkIcons_1.SignalIcon color={s}size={14}/>}
14
+ {e.icon==="logs"&&<NetworkIcons_1.TerminalIcon color={s}size={14}/>}
15
+ {e.icon==="analytics"&&<NetworkIcons_1.AnalyticsIcon color={s}size={14}/>}
16
+ {e.icon==="redux"&&<NetworkIcons_1.ReduxIcon color={s}size={14}/>}
17
+ {e.icon==="storage"&&<NetworkIcons_1.DatabaseIcon color={s}size={14}/>}
18
+ {e.icon==="device"&&<NetworkIcons_1.SmartphoneIcon color={s}size={14}/>}
19
+ {e.icon==="crash"&&<NetworkIcons_1.CrashIcon color={s}size={14}/>}
20
+ {e.icon==="debugging"&&<NetworkIcons_1.QrCodeIcon color={s}size={14}/>}
21
+ <react_native_1.View style={{minWidth:20,height:20,paddingHorizontal:4,borderRadius:10,backgroundColor:a?`${AppColors_1.AppColors.white}33`:l.idBadgeBg,borderWidth:1,borderColor:a?`${AppColors_1.AppColors.white}66`:l.idBadgeBorder,alignItems:"center",justifyContent:"center"}}>
22
+ <react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12,color:a?AppColors_1.AppColors.white:l.idBadgeText}}>
25
23
  #{e.id}
26
24
  </react_native_1.Text>
27
25
  </react_native_1.View>
28
- <react_native_1.Text numberOfLines={1}ellipsizeMode="tail"style={[styles_1.default.contentTabButtonText,c&&styles_1.default.contentTabButtonTextActive]}>
29
- {e.label} {e.count>0?`(${h})`:""}
26
+ <react_native_1.Text numberOfLines={1}ellipsizeMode="tail"style={[styles_1.default.contentTabButtonText,{color:a?AppColors_1.AppColors.white:AppColors_1.AppColors.grayTextStrong,fontFamily:a?AppFonts_1.AppFonts.interBold:AppFonts_1.AppFonts.interSemiBold}]}>
27
+ {e.label}
30
28
  </react_native_1.Text>
31
- {(e.key==="apis"&&a||e.key==="logs"&&u||e.key==="crash"&&d)&&<react_native_1.View style={{width:6,height:6,borderRadius:3,backgroundColor:AppColors_1.AppColors.errorColor,marginLeft:4,alignSelf:"center"}}/>}
29
+ {e.count>0&&<react_native_1.View style={{paddingHorizontal:5,paddingVertical:1,borderRadius:8,backgroundColor:a?"rgba(255,255,255,0.25)":l.idBadgeBg,borderWidth:.5,borderColor:a?"rgba(255,255,255,0.45)":l.idBadgeBorder,marginLeft:1,alignItems:"center",justifyContent:"center"}}>
30
+ <react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12,color:a?AppColors_1.AppColors.white:l.themeColor}}>
31
+ {d}
32
+ </react_native_1.Text>
33
+ </react_native_1.View>}
34
+ {(e.key==="apis"&&u||e.key==="logs"&&p||e.key==="crash"&&O)&&<react_native_1.View style={{width:6,height:6,borderRadius:3,backgroundColor:AppColors_1.AppColors.errorColor,marginLeft:4,alignSelf:"center"}}/>}
32
35
  </react_native_1.View>
33
36
  </TouchableScale_1.default>})}
34
37
  </react_native_1.ScrollView>
35
38
 
36
39
 
37
- {_&&<react_native_1.TouchableOpacity onPress={()=>v(160)}hitSlop={{top:6,bottom:6,left:6,right:6}}activeOpacity={.7}style={{paddingLeft:2,paddingRight:p?4:8,justifyContent:"center",alignItems:"center"}}>
40
+ {b&&<react_native_1.TouchableOpacity onPress={()=>w(160)}hitSlop={{top:6,bottom:6,left:6,right:6}}activeOpacity={.7}style={{paddingLeft:2,paddingRight:g?4:8,justifyContent:"center",alignItems:"center"}}>
38
41
  <react_native_1.View style={{width:22,height:22,borderRadius:11,backgroundColor:AppColors_1.AppColors.grayBorderSecondary,alignItems:"center",justifyContent:"center"}}>
39
- <NetworkIcons_1.ChevronIcon direction="right"size={13}color={AppColors_1.AppColors.purple}/>
42
+ <NetworkIcons_1.ChevronIcon direction="right"size={13}color={AppColors_1.AppColors.grayTextStrong}/>
40
43
  </react_native_1.View>
41
44
  </react_native_1.TouchableOpacity>}
42
45
 
43
46
 
44
- {p&&<react_native_1.View style={{paddingLeft:6,paddingRight:10,borderLeftWidth:1,borderLeftColor:AppColors_1.AppColors.dividerColor,backgroundColor:AppColors_1.AppColors.primaryLight,justifyContent:"center",shadowColor:AppColors_1.AppColors.shadowColorString,shadowOffset:{width:-3,height:0},shadowOpacity:.12,shadowRadius:4,elevation:4,zIndex:10}}>
45
- <TouchableScale_1.default key="media"onPress={()=>{o("media")}}accessibilityRole="button"accessibilityLabel="Media Gallery"style={[styles_1.default.contentTabButton,{marginRight:0,borderRadius:8,backgroundColor:s?AppColors_1.AppColors.purple:AppColors_1.AppColors.graySurface,borderColor:s?AppColors_1.AppColors.purple:AppColors_1.AppColors.dividerColor,borderWidth:1,paddingHorizontal:10,paddingVertical:7,alignItems:"center",justifyContent:"center"},s&&styles_1.default.contentTabButtonActive]}>
47
+ {g&&<react_native_1.View style={{paddingLeft:6,paddingRight:10,borderLeftWidth:1,borderLeftColor:AppColors_1.AppColors.dividerColor,backgroundColor:AppColors_1.AppColors.primaryLight,justifyContent:"center",shadowColor:AppColors_1.AppColors.shadowColorString,shadowOffset:{width:-3,height:0},shadowOpacity:.12,shadowRadius:4,elevation:4,zIndex:10}}>
48
+ <TouchableScale_1.default key="media"onPress={()=>{o("media")}}accessibilityRole="button"accessibilityLabel="Media Gallery"style={[styles_1.default.contentTabButton,{marginRight:0,borderRadius:8,backgroundColor:c?AppColors_1.AppColors.brandPurple:`${AppColors_1.AppColors.brandPurple}0D`,borderColor:c?AppColors_1.AppColors.brandPurple:`${AppColors_1.AppColors.brandPurple}2B`,borderWidth:1,paddingHorizontal:10,paddingVertical:7,alignItems:"center",justifyContent:"center"},c&&{shadowColor:AppColors_1.AppColors.brandPurple,shadowOffset:{width:0,height:2},shadowOpacity:.28,shadowRadius:3.5,elevation:3}]}>
46
49
  <react_native_1.View style={{position:"relative",alignItems:"center",justifyContent:"center"}}>
47
- <NetworkIcons_1.ScreencastIcon color={s?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={15}/>
48
- {y>0&&<react_native_1.View style={{position:"absolute",top:-3,right:-4,width:7,height:7,borderRadius:3.5,backgroundColor:s?AppColors_1.AppColors.emerald400:AppColors_1.AppColors.purple,borderWidth:1.2,borderColor:s?AppColors_1.AppColors.purple:AppColors_1.AppColors.white}}/>}
50
+ <NetworkIcons_1.ScreencastIcon color={c?AppColors_1.AppColors.white:AppColors_1.AppColors.brandPurple}size={15}/>
51
+ {y>0&&<react_native_1.View style={{position:"absolute",top:-3,right:-4,width:7,height:7,borderRadius:3.5,backgroundColor:c?AppColors_1.AppColors.white:AppColors_1.AppColors.brandPurple,borderWidth:1.2,borderColor:c?AppColors_1.AppColors.brandPurple:AppColors_1.AppColors.white}}/>}
49
52
  </react_native_1.View>
50
53
  </TouchableScale_1.default>
51
54
  </react_native_1.View>}