react-native-inapp-inspector 2.3.24 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/README.md +26 -5
  2. package/dist/commonjs/components/AnalyticsDetail.js +15 -12
  3. package/dist/commonjs/components/AnalyticsEventCard.js +11 -8
  4. package/dist/commonjs/components/AppHeaderLogo.js +4 -6
  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/AnalyticsFilterModal.js +1 -1
  10. package/dist/commonjs/components/Inspector/AnalyticsTab.js +27 -299
  11. package/dist/commonjs/components/Inspector/ConsoleTab.js +36 -94
  12. package/dist/commonjs/components/Inspector/CrashDetail.js +11 -10
  13. package/dist/commonjs/components/Inspector/CrashTab.js +43 -33
  14. package/dist/commonjs/components/Inspector/DebuggingTab.js +13 -13
  15. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +107 -71
  16. package/dist/commonjs/components/Inspector/FabLauncher.js +8 -9
  17. package/dist/commonjs/components/Inspector/InspectorHeader.js +93 -70
  18. package/dist/commonjs/components/Inspector/LogDetail.js +10 -7
  19. package/dist/commonjs/components/Inspector/MainScreen.js +66 -30
  20. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +1 -1
  21. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +3 -3
  22. package/dist/commonjs/components/Inspector/NetworkDetail.js +29 -28
  23. package/dist/commonjs/components/Inspector/NetworkFilterModal.js +1 -1
  24. package/dist/commonjs/components/Inspector/NetworkTab.js +87 -85
  25. package/dist/commonjs/components/Inspector/NpmStarPrompt.js +3 -3
  26. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +21 -22
  27. package/dist/commonjs/components/Inspector/PushCard.d.ts +4 -0
  28. package/dist/commonjs/components/Inspector/PushCard.js +89 -0
  29. package/dist/commonjs/components/Inspector/PushDetail.d.ts +4 -0
  30. package/dist/commonjs/components/Inspector/PushDetail.js +190 -0
  31. package/dist/commonjs/components/Inspector/PushTab.d.ts +3 -0
  32. package/dist/commonjs/components/Inspector/PushTab.js +45 -0
  33. package/dist/commonjs/components/Inspector/ReduxDetail.js +16 -13
  34. package/dist/commonjs/components/Inspector/ReduxTab.js +109 -106
  35. package/dist/commonjs/components/Inspector/SettingsPanel.js +230 -134
  36. package/dist/commonjs/components/Inspector/StorageTab.js +55 -51
  37. package/dist/commonjs/components/Inspector/TabBar.js +30 -26
  38. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -2
  39. package/dist/commonjs/components/JsonViewer.js +151 -159
  40. package/dist/commonjs/components/LogCard.js +34 -38
  41. package/dist/commonjs/components/LogSyntaxHighlighter.js +3 -3
  42. package/dist/commonjs/components/ModuleErrorBoundary.d.ts +24 -0
  43. package/dist/commonjs/components/ModuleErrorBoundary.js +33 -0
  44. package/dist/commonjs/components/NetworkIcons.d.ts +3 -3
  45. package/dist/commonjs/components/NetworkIcons.js +10 -6
  46. package/dist/commonjs/components/SegmentedTabs.d.ts +8 -2
  47. package/dist/commonjs/components/SegmentedTabs.js +11 -7
  48. package/dist/commonjs/components/ShareButton.d.ts +11 -0
  49. package/dist/commonjs/components/ShareButton.js +6 -0
  50. package/dist/commonjs/constants/index.js +1 -1
  51. package/dist/commonjs/constants/version.d.ts +1 -1
  52. package/dist/commonjs/constants/version.js +1 -1
  53. package/dist/commonjs/customHooks/crashHandler.js +4 -4
  54. package/dist/commonjs/customHooks/networkLogger.js +1 -2
  55. package/dist/commonjs/customHooks/pushNotificationLogger.d.ts +19 -0
  56. package/dist/commonjs/customHooks/pushNotificationLogger.js +1 -0
  57. package/dist/commonjs/helpers/index.d.ts +6 -0
  58. package/dist/commonjs/helpers/index.js +4 -4
  59. package/dist/commonjs/helpers/memoryManager.d.ts +2 -2
  60. package/dist/commonjs/helpers/memoryManager.js +1 -1
  61. package/dist/commonjs/helpers/remoteConfig.js +1 -1
  62. package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
  63. package/dist/commonjs/helpers/settingsStore.js +1 -1
  64. package/dist/commonjs/helpers/shareFormatter.d.ts +13 -0
  65. package/dist/commonjs/helpers/shareFormatter.js +7 -0
  66. package/dist/commonjs/i18n/index.d.ts +35 -0
  67. package/dist/commonjs/i18n/index.js +1 -1
  68. package/dist/commonjs/i18n/locales/ar.json +1 -0
  69. package/dist/commonjs/i18n/locales/de.json +1 -0
  70. package/dist/commonjs/i18n/locales/en.json +1 -1
  71. package/dist/commonjs/i18n/locales/es.json +1 -0
  72. package/dist/commonjs/i18n/locales/fr.json +1 -0
  73. package/dist/commonjs/i18n/locales/hi.json +1 -0
  74. package/dist/commonjs/i18n/locales/ja.json +1 -0
  75. package/dist/commonjs/i18n/locales/ko.json +1 -0
  76. package/dist/commonjs/i18n/locales/pt.json +1 -0
  77. package/dist/commonjs/i18n/locales/ru.json +1 -0
  78. package/dist/commonjs/i18n/locales/zh.json +1 -0
  79. package/dist/commonjs/index.d.ts +6 -5
  80. package/dist/commonjs/index.js +4 -4
  81. package/dist/commonjs/push.d.ts +4 -0
  82. package/dist/commonjs/push.js +1 -0
  83. package/dist/commonjs/styles/AppColors.d.ts +40 -0
  84. package/dist/commonjs/styles/AppColors.js +1 -1
  85. package/dist/commonjs/styles/index.js +1 -1
  86. package/dist/commonjs/types/enums.d.ts +30 -20
  87. package/dist/commonjs/types/enums.js +1 -1
  88. package/dist/commonjs/types/index.d.ts +10 -0
  89. package/dist/commonjs/types/interfaces.d.ts +63 -7
  90. package/dist/esm/components/AnalyticsDetail.js +84 -81
  91. package/dist/esm/components/AnalyticsEventCard.js +20 -17
  92. package/dist/esm/components/AppHeaderLogo.js +5 -7
  93. package/dist/esm/components/ConsoleLogCard.d.ts +1 -0
  94. package/dist/esm/components/ConsoleLogCard.js +98 -86
  95. package/dist/esm/components/EndOfListFooter.d.ts +5 -1
  96. package/dist/esm/components/EndOfListFooter.js +36 -14
  97. package/dist/esm/components/Inspector/AnalyticsFilterModal.js +14 -14
  98. package/dist/esm/components/Inspector/AnalyticsTab.js +44 -316
  99. package/dist/esm/components/Inspector/ConsoleTab.js +55 -113
  100. package/dist/esm/components/Inspector/CrashDetail.js +53 -52
  101. package/dist/esm/components/Inspector/CrashTab.js +74 -64
  102. package/dist/esm/components/Inspector/DebuggingTab.js +33 -33
  103. package/dist/esm/components/Inspector/DeviceInfoTab.js +174 -138
  104. package/dist/esm/components/Inspector/FabLauncher.js +41 -42
  105. package/dist/esm/components/Inspector/InspectorHeader.js +138 -115
  106. package/dist/esm/components/Inspector/LogDetail.js +24 -21
  107. package/dist/esm/components/Inspector/MainScreen.js +98 -62
  108. package/dist/esm/components/Inspector/MediaGalleryTab.js +1 -1
  109. package/dist/esm/components/Inspector/MediaPreviewModal.js +31 -31
  110. package/dist/esm/components/Inspector/NetworkDetail.js +88 -87
  111. package/dist/esm/components/Inspector/NetworkFilterModal.js +8 -8
  112. package/dist/esm/components/Inspector/NetworkTab.js +132 -130
  113. package/dist/esm/components/Inspector/NpmStarPrompt.js +42 -42
  114. package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -46
  115. package/dist/esm/components/Inspector/PushCard.d.ts +4 -0
  116. package/dist/esm/components/Inspector/PushCard.js +89 -0
  117. package/dist/esm/components/Inspector/PushDetail.d.ts +4 -0
  118. package/dist/esm/components/Inspector/PushDetail.js +190 -0
  119. package/dist/esm/components/Inspector/PushTab.d.ts +3 -0
  120. package/dist/esm/components/Inspector/PushTab.js +45 -0
  121. package/dist/esm/components/Inspector/ReduxDetail.js +40 -37
  122. package/dist/esm/components/Inspector/ReduxTab.js +155 -152
  123. package/dist/esm/components/Inspector/SettingsPanel.js +380 -284
  124. package/dist/esm/components/Inspector/StorageTab.js +177 -173
  125. package/dist/esm/components/Inspector/TabBar.js +38 -34
  126. package/dist/esm/components/Inspector/UpdateAvailableModal.js +1 -1
  127. package/dist/esm/components/JsonViewer.js +161 -169
  128. package/dist/esm/components/LogCard.js +38 -42
  129. package/dist/esm/components/LogSyntaxHighlighter.js +1 -1
  130. package/dist/esm/components/ModuleErrorBoundary.d.ts +24 -0
  131. package/dist/esm/components/ModuleErrorBoundary.js +33 -0
  132. package/dist/esm/components/NetworkIcons.d.ts +3 -3
  133. package/dist/esm/components/NetworkIcons.js +7 -3
  134. package/dist/esm/components/SegmentedTabs.d.ts +8 -2
  135. package/dist/esm/components/SegmentedTabs.js +12 -8
  136. package/dist/esm/components/ShareButton.d.ts +11 -0
  137. package/dist/esm/components/ShareButton.js +6 -0
  138. package/dist/esm/constants/index.js +1 -1
  139. package/dist/esm/constants/version.d.ts +1 -1
  140. package/dist/esm/constants/version.js +1 -1
  141. package/dist/esm/customHooks/crashHandler.js +6 -6
  142. package/dist/esm/customHooks/networkLogger.js +1 -2
  143. package/dist/esm/customHooks/pushNotificationLogger.d.ts +19 -0
  144. package/dist/esm/customHooks/pushNotificationLogger.js +1 -0
  145. package/dist/esm/helpers/index.d.ts +6 -0
  146. package/dist/esm/helpers/index.js +4 -4
  147. package/dist/esm/helpers/memoryManager.d.ts +2 -2
  148. package/dist/esm/helpers/memoryManager.js +1 -1
  149. package/dist/esm/helpers/remoteConfig.js +1 -1
  150. package/dist/esm/helpers/settingsStore.d.ts +1 -0
  151. package/dist/esm/helpers/settingsStore.js +1 -1
  152. package/dist/esm/helpers/shareFormatter.d.ts +13 -0
  153. package/dist/esm/helpers/shareFormatter.js +7 -0
  154. package/dist/esm/i18n/index.d.ts +35 -0
  155. package/dist/esm/i18n/index.js +1 -1
  156. package/dist/esm/i18n/locales/ar.json +1 -0
  157. package/dist/esm/i18n/locales/de.json +1 -0
  158. package/dist/esm/i18n/locales/en.json +1 -1
  159. package/dist/esm/i18n/locales/es.json +1 -0
  160. package/dist/esm/i18n/locales/fr.json +1 -0
  161. package/dist/esm/i18n/locales/hi.json +1 -0
  162. package/dist/esm/i18n/locales/ja.json +1 -0
  163. package/dist/esm/i18n/locales/ko.json +1 -0
  164. package/dist/esm/i18n/locales/pt.json +1 -0
  165. package/dist/esm/i18n/locales/ru.json +1 -0
  166. package/dist/esm/i18n/locales/zh.json +1 -0
  167. package/dist/esm/index.d.ts +6 -5
  168. package/dist/esm/index.js +7 -7
  169. package/dist/esm/push.d.ts +4 -0
  170. package/dist/esm/push.js +1 -0
  171. package/dist/esm/styles/AppColors.d.ts +40 -0
  172. package/dist/esm/styles/AppColors.js +1 -1
  173. package/dist/esm/styles/index.js +1 -1
  174. package/dist/esm/types/enums.d.ts +30 -20
  175. package/dist/esm/types/enums.js +1 -1
  176. package/dist/esm/types/index.d.ts +10 -0
  177. package/dist/esm/types/interfaces.d.ts +63 -7
  178. package/package.json +53 -24
  179. package/src/native/NativeInspector.ts +0 -1
  180. package/dist/commonjs/bundle.d.ts +0 -2
  181. package/dist/commonjs/bundle.js +0 -1
  182. package/dist/commonjs/components/BrandSquareIcon.d.ts +0 -5
  183. package/dist/commonjs/components/BrandSquareIcon.js +0 -112
  184. package/dist/commonjs/components/Inspector/BundleTab.d.ts +0 -48
  185. package/dist/commonjs/components/Inspector/BundleTab.js +0 -1297
  186. package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +0 -27
  187. package/dist/commonjs/components/Inspector/PerformanceTab.js +0 -454
  188. package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +0 -115
  189. package/dist/commonjs/customHooks/bundleAnalyzer.js +0 -1
  190. package/dist/commonjs/customHooks/performanceTracker.d.ts +0 -144
  191. package/dist/commonjs/customHooks/performanceTracker.js +0 -63
  192. package/dist/commonjs/performance.d.ts +0 -2
  193. package/dist/commonjs/performance.js +0 -1
  194. package/dist/esm/bundle.d.ts +0 -2
  195. package/dist/esm/bundle.js +0 -1
  196. package/dist/esm/components/BrandSquareIcon.d.ts +0 -5
  197. package/dist/esm/components/BrandSquareIcon.js +0 -112
  198. package/dist/esm/components/Inspector/BundleTab.d.ts +0 -48
  199. package/dist/esm/components/Inspector/BundleTab.js +0 -1297
  200. package/dist/esm/components/Inspector/PerformanceTab.d.ts +0 -27
  201. package/dist/esm/components/Inspector/PerformanceTab.js +0 -454
  202. package/dist/esm/customHooks/bundleAnalyzer.d.ts +0 -115
  203. package/dist/esm/customHooks/bundleAnalyzer.js +0 -1
  204. package/dist/esm/customHooks/performanceTracker.d.ts +0 -144
  205. package/dist/esm/customHooks/performanceTracker.js +0 -63
  206. package/dist/esm/performance.d.ts +0 -2
  207. package/dist/esm/performance.js +0 -1
@@ -1,151 +1,153 @@
1
- import J,{useCallback as de,useMemo as Q,useRef as Oe}from"react";import{FlatList as Ne,Platform as De,Pressable as Ee,ScrollView as He,Text as I,TextInput as Ae,View as S}from"react-native";import{useInspector as Me}from"./InspectorContext";import D from"../TouchableScale";import Se from"../AnimatedEntrance";import We from"../DomainHeader";import $e from"../LogCard";import Ge from"../EmptyState";import Qe from"../EndOfListFooter";import _e from"./NetworkFilterModal";import w from"../../styles";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as B}from"../../styles/AppFonts";import{METHOD_COLORS as we}from"../../constants";import{useTranslation as Ue}from"../../i18n";import{SearchIcon as Ke,ClearIcon as Xe,TrashIcon as Je,SortArrowIcon as Ye,FilterIcon as Ce,CircleCheckIcon as Ze,CircleXIcon as So,LayersIcon as Co,HeaderPauseIcon as To,ClockIcon as Te,RequestIcon as Io,ResponseIcon as Fo,AtomIcon as Ro}from"../NetworkIcons";const Bo=J.memo(()=>{const{groupedData:Y,search:L,setSearch:q,searchScope:Vo,setSearchScope:xe,isRegexSearch:Po,setIsRegexSearch:Lo,isCaseSensitive:Oo,setIsCaseSensitive:vo,quickFilter:_,setQuickFilter:U,handleDelete:ke,selectedLogs:W,sortOrder:j,setSortOrder:$,statusFilters:T,setStatusFilters:H,methodFilters:x,setMethodFilters:A,availableMethods:No,filteredLogs:M,logs:P,toggleSectionFilter:Z,toggleSectionCollapse:ee,minStart:oe,totalRange:te,newLogIds:re,toggleSelect:le,setSelected:se,isNetworkPaused:K,setIsNetworkPaused:Ie}=Me(),{t:ae}=Ue(),Fe=Oe(null),[Re,X]=J.useState(!1),[ie,ne]=J.useState(!1),Be=Q(()=>({statusCodes:T.size>0?new Set(T):new Set(["all"]),methods:x.size>0?new Set(x):new Set(["all"]),latency:"all",protocol:"all",sortBy:j==="newest"?"time_desc":"time_asc"}),[T,x,j]),Ve=de(o=>{o.statusCodes.has("all")||o.statusCodes.size===0?H(new Set):H(new Set(o.statusCodes)),o.methods.has("all")||o.methods.size===0?A(new Set):A(new Set([...o.methods].map(C=>C))),o.sortBy==="time_asc"?$("oldest"):$("newest")},[H,A,$]),O=Q(()=>{let o=0,C=0,b=0,z=0,F=0,G=0;return P.forEach(V=>{const E=typeof V.status=="number"?V.status:parseInt(String(V.status),10);V.status===0||V.status==null||!isNaN(E)&&E>=400?o++:!isNaN(E)&&E>=200&&E<400&&C++,(V.duration||0)>=500&&b++;const R=(V.method||"").toUpperCase();R==="POST"&&z++,R==="GET"&&F++;const N=(V.url||"").toLowerCase(),ce=(V.client||"").toLowerCase();(N.includes("graphql")||ce.includes("graphql")||ce.includes("apollo"))&&G++}),{all:P.length,errors:o,success:C,slow:b,post:z,get:F,graphql:G}},[P]),Pe=Q(()=>[{id:"all",label:"All",count:O.all,color:e.purple},{id:"errors",label:"Errors",count:O.errors,color:e.errorColor},{id:"success",label:"2xx OK",count:O.success,color:e.greenColor},{id:"slow",label:"Slow >500ms",count:O.slow,color:e.warningIconGold},{id:"POST",label:"POST",count:O.post,color:we.POST||"#3B82F6"},{id:"GET",label:"GET",count:O.get,color:we.GET||"#10B981"},{id:"graphql",label:"GraphQL",count:O.graphql,color:"#E10098"}],[O]),v=Q(()=>{if(!P||P.length===0)return null;let o=0,C=0,b=0,z=0;const F=[];P.forEach(R=>{if(R.status!=null){C++;const N=typeof R.status=="number"?R.status:parseInt(String(R.status),10);isNaN(N)||N>=200&&N<400&&o++}typeof R.duration=="number"&&R.duration>0&&(F.push(R.duration),b+=R.duration)}),F.sort((R,N)=>R-N);const G=F.length>0?Math.round(b/F.length):0,V=F.length>0?F[Math.floor(F.length*.95)]:0;return{successRate:C>0?Math.round(o/C*100):100,avgDuration:G,p95:V,totalCount:P.length}},[P]),Le=de(({item:o,index:C})=>{if(o.type==="header")return<Se index={C}distance={8}>
2
- <We pageName={o.pageName}color={o.color}stats={o.stats}activeFilters={o.activeFilters}onToggleFilter={Z}isCollapsed={o.isCollapsed}onToggleCollapse={ee}isFirst={o.isFirst}timestamp={o.timestamp}/>
3
- </Se>;const{log:b,isLast:z,color:F}=o;return<Se index={C}distance={8}style={[w.treeNodeRow,z&&w.treeNodeRowLast]}>
4
- <S style={w.treeLines}>
5
- <S style={[w.modernTreeLine,{borderColor:F},z&&w.modernTreeLineLast]}/>
6
- {!z&&<S style={[w.modernTreeBranch,{borderColor:F}]}/>}
7
- </S>
8
- <S style={w.treeCardWrapper}>
9
- <$e item={b}isSelected={W.has(b.id)}onToggleSelect={le}onPress={()=>{se(b)}}timelineMinStart={oe}timelineTotalRange={te}isNew={re.has(b.id)}searchStr={L}/>
10
- </S>
11
- </Se>},[oe,te,re,W,le,L,Z,ee,se]);return<S style={{flex:1}}>
12
- <S style={{marginTop:6}}>
13
-
14
- {v!=null&&v.totalCount>0&&<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:e.grayBackground,borderRadius:8,paddingHorizontal:10,paddingVertical:5.5,marginHorizontal:12,marginBottom:6,borderWidth:1,borderColor:e.dividerColor}}>
15
-
16
- <S style={{flexDirection:"row",alignItems:"center",gap:4.5}}>
17
- <S style={{width:6,height:6,borderRadius:3,backgroundColor:v.successRate>=95?e.greenColor:v.successRate>=80?e.amber500:e.errorColor}}/>
18
- <I style={{fontFamily:B.interBold,fontSize:10.5,color:e.primaryBlack}}>
19
- {v.successRate}%
20
- </I>
21
- <I style={{fontFamily:B.interRegular,fontSize:10,color:e.grayTextWeak}}>
22
- {ae("network.successRate")}
23
- </I>
24
- </S>
25
-
26
- <S style={{width:1,height:11,backgroundColor:e.dividerColor}}/>
27
-
28
-
29
- <S style={{flexDirection:"row",alignItems:"center",gap:4}}>
30
- <Te color={e.purple}size={10}/>
31
- <I style={{fontFamily:B.interBold,fontSize:10.5,color:e.purple}}>
32
- {v.avgDuration}ms
33
- </I>
34
- <I style={{fontFamily:B.interRegular,fontSize:10,color:e.grayTextWeak}}>
35
- {ae("network.avgLatency")}
36
- </I>
37
- </S>
1
+ import X,{useCallback as de,useMemo as J,useRef as Oe}from"react";import{FlatList as $e,Platform as qe,Pressable as Ne,ScrollView as He,Text as R,TextInput as Ae,View as C}from"react-native";import{useInspector as De}from"./InspectorContext";import O from"../TouchableScale";import Ce from"../AnimatedEntrance";import Me from"../DomainHeader";import Ee from"../LogCard";import We from"../EmptyState";import Ge from"../EndOfListFooter";import Qe from"./NetworkFilterModal";import b from"../../styles";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import{METHOD_COLORS as Se}from"../../constants";import{useTranslation as _e}from"../../i18n";import{SearchIcon as Ue,ClearIcon as Ke,TrashIcon as Xe,SortArrowIcon as Je,FilterIcon as Te,ChevronIcon as Ye,CheckIcon as Ze,CircleCheckIcon as Co,CircleXIcon as So,LayersIcon as To,ClockIcon as Vo,RequestIcon as Io,ResponseIcon as Ro,AtomIcon as Fo}from"../NetworkIcons";const Lo=X.memo(()=>{const{groupedData:Y,loadMoreSection:Z,search:F,setSearch:M,setSearchScope:xe,quickFilter:G,setQuickFilter:j,handleDelete:Ve,selectedLogs:E,sortOrder:Q,setSortOrder:v,statusFilters:x,setStatusFilters:q,methodFilters:V,setMethodFilters:N,filteredLogs:$,logs:H,toggleSectionFilter:ee,toggleSectionCollapse:oe,minStart:te,totalRange:re,newLogIds:le,toggleSelect:ie,setSelected:se}=De(),{t:_}=_e(),Ie=Oe(null),[Re,U]=X.useState(!1),[ae,ne]=X.useState(!1),ke=J(()=>({statusCodes:x.size>0?new Set(x):new Set(["all"]),methods:V.size>0?new Set(V):new Set(["all"]),latency:"all",protocol:"all",sortBy:Q==="newest"?"time_desc":"time_asc"}),[x,V,Q]),Fe=de(o=>{o.statusCodes.has("all")||o.statusCodes.size===0?q(new Set):q(new Set(o.statusCodes)),o.methods.has("all")||o.methods.size===0?N(new Set):N(new Set([...o.methods].map(z=>z))),o.sortBy==="time_asc"?v("oldest"):v("newest")},[q,N,v]),L=J(()=>{let o=0,z=0,T=0,I=0,A=0,W=0;return H.forEach(S=>{const P=typeof S.status=="number"?S.status:parseInt(String(S.status),10);S.status===0||S.status==null||!isNaN(P)&&P>=400?o++:!isNaN(P)&&P>=200&&P<400&&z++,(S.duration||0)>=500&&T++;const B=(S.method||"").toUpperCase();B==="POST"&&I++,B==="GET"&&A++;const K=(S.url||"").toLowerCase(),D=(S.client||"").toLowerCase();(K.includes("graphql")||D.includes("graphql")||D.includes("apollo"))&&W++}),{all:H.length,errors:o,success:z,slow:T,post:I,get:A,graphql:W}},[H]),Le=J(()=>[{id:"all",label:"All",count:L.all,color:e.purple},{id:"errors",label:"Errors",count:L.errors,color:e.errorColor},{id:"success",label:"2xx OK",count:L.success,color:e.greenColor},{id:"slow",label:"Slow >500ms",count:L.slow,color:e.warningIconGold},{id:"POST",label:"POST",count:L.post,color:Se.POST||"#3B82F6"},{id:"GET",label:"GET",count:L.get,color:Se.GET||"#10B981"},{id:"graphql",label:"GraphQL",count:L.graphql,color:e.graphqlPink}],[L]),Be=de(({item:o,index:z})=>{if(o.type==="header")return<Ce index={z}distance={8}>
2
+ <Me pageName={o.pageName}color={o.color}stats={o.stats}activeFilters={o.activeFilters}onToggleFilter={ee}isCollapsed={o.isCollapsed}onToggleCollapse={oe}isFirst={o.isFirst}timestamp={o.timestamp}/>
3
+ </Ce>;if(o.type==="loadMore"){const{pageName:W,color:S,remainingCount:P,totalCount:B,loadedCount:K,loadMoreStep:D,hasMore:Pe}=o;return<C style={[b.treeNodeRow,b.treeNodeRowLast]}>
4
+ <C style={b.treeLines}>
5
+ <C style={[b.modernTreeLine,{borderColor:S},b.modernTreeLineLast]}/>
6
+ </C>
7
+ <C style={b.treeCardWrapper}>
8
+ {Pe?<O onPress={()=>Z(W,50)}hitSlop={6}style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:9,paddingHorizontal:12,marginVertical:3,marginRight:2,borderRadius:10,backgroundColor:`${S}14`,borderWidth:1.5,borderColor:`${S}40`,shadowColor:S,shadowOffset:{width:0,height:1.5},shadowOpacity:.1,shadowRadius:3,elevation:2}}>
9
+ <C style={{flexDirection:"row",alignItems:"center",gap:8}}>
10
+ <C style={{width:22,height:22,borderRadius:11,backgroundColor:S,alignItems:"center",justifyContent:"center",shadowColor:S,shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:2,elevation:1}}>
11
+ <Ye color={e.white}size={9}direction="down"/>
12
+ </C>
13
+ <C>
14
+ <R style={{fontFamily:k.interBold,fontSize:12,color:S}}>
15
+ {_("footer.loadMoreRequests",{count:D,defaultValue:`Load ${D} More Requests`})}
16
+ </R>
17
+ <R style={{fontFamily:k.interRegular,fontSize:9.5,color:e.grayTextWeak,marginTop:1}}>
18
+ Showing {K} of {B} requests
19
+ </R>
20
+ </C>
21
+ </C>
38
22
 
39
- <S style={{width:1,height:11,backgroundColor:e.dividerColor}}/>
40
-
41
-
42
- <S style={{flexDirection:"row",alignItems:"center",gap:4}}>
43
- <I style={{fontFamily:B.interBold,fontSize:10.5,color:e.primaryBlack}}>
44
- {v.p95}ms
45
- </I>
46
- <I style={{fontFamily:B.interRegular,fontSize:10,color:e.grayTextWeak}}>
47
- P95
48
- </I>
49
- </S>
50
- </S>}
23
+ <C style={{flexDirection:"row",alignItems:"center",backgroundColor:`${S}25`,paddingHorizontal:8,paddingVertical:4,borderRadius:8,borderWidth:1,borderColor:`${S}40`,gap:3}}>
24
+ <R style={{fontFamily:k.interBold,fontSize:10.5,color:S}}>
25
+ +{P}
26
+ </R>
27
+ <R style={{fontFamily:k.interRegular,fontSize:9,color:S}}>
28
+ more
29
+ </R>
30
+ </C>
31
+ </O>:<C style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:7,paddingHorizontal:11,marginVertical:3,marginRight:2,borderRadius:9,backgroundColor:`${S}0A`,borderWidth:1,borderColor:`${S}25`}}>
32
+ <C style={{flexDirection:"row",alignItems:"center",gap:7}}>
33
+ <C style={{width:17,height:17,borderRadius:8.5,backgroundColor:`${S}25`,alignItems:"center",justifyContent:"center"}}>
34
+ <Ze color={S}size={8}/>
35
+ </C>
36
+ <R style={{fontFamily:k.interMedium,fontSize:11,color:e.grayTextStrong}}>
37
+ {_("footer.allLoaded",{count:B,defaultValue:`All ${B} requests loaded`})}
38
+ </R>
39
+ </C>
51
40
 
41
+ <C style={{backgroundColor:`${S}18`,paddingHorizontal:7,paddingVertical:2,borderRadius:6}}>
42
+ <R style={{fontFamily:k.interBold,fontSize:9.5,color:S}}>
43
+ {B}/{B}
44
+ </R>
45
+ </C>
46
+ </C>}
47
+ </C>
48
+ </C>}const{log:T,isLast:I,color:A}=o;return<Ce index={z}distance={8}style={[b.treeNodeRow,I&&b.treeNodeRowLast]}>
49
+ <C style={b.treeLines}>
50
+ <C style={[b.modernTreeLine,{borderColor:A},I&&b.modernTreeLineLast]}/>
51
+ {!I&&<C style={[b.modernTreeBranch,{borderColor:A}]}/>}
52
+ </C>
53
+ <C style={b.treeCardWrapper}>
54
+ <Ee item={T}isSelected={E.has(T.id)}onToggleSelect={ie}onPress={()=>{se(T)}}timelineMinStart={te}timelineTotalRange={re}isNew={le.has(T.id)}searchStr={F}/>
55
+ </C>
56
+ </Ce>},[te,re,le,E,ie,F,ee,oe,Z,se,_]);return<C style={{flex:1}}>
57
+ <C style={{marginTop:6}}>
52
58
 
53
- <S style={w.toolbarRow}>
54
- <S style={[w.searchContainer,ie&&{borderColor:e.purple,borderWidth:1.5}]}>
55
- <Ke color={ie?e.purple:e.grayTextWeak}size={15}/>
56
- <Ae placeholder="Search URL, status, method, headers, body..."placeholderTextColor={e.grayTextWeak}value={L}onChangeText={q}onFocus={()=>ne(!0)}onBlur={()=>ne(!1)}style={w.searchInput}autoCorrect={!1}autoCapitalize="none"/>
57
-
58
- {L.length>0&&<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
59
- <S style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
60
- <I style={{color:e.purple,fontSize:9.5,fontFamily:B.interBold}}>
61
- {M.length}
62
- </I>
63
- </S>
64
- <Ee onPress={()=>q("")}hitSlop={10}style={w.clearBtn}>
65
- <Xe color={e.grayTextWeak}size={13}/>
66
- </Ee>
67
- </S>}
68
- </S>
59
+ <C style={b.toolbarRow}>
60
+ <C style={[b.searchContainer,ae&&{borderColor:e.purple,borderWidth:1.5}]}>
61
+ <Ue color={ae?e.purple:e.grayTextWeak}size={15}/>
62
+ <Ae placeholder="Search URL, status, method, headers, body..."placeholderTextColor={e.grayTextWeak}value={F}onChangeText={M}onFocus={()=>ne(!0)}onBlur={()=>ne(!1)}style={b.searchInput}autoCorrect={!1}autoCapitalize="none"/>
69
63
 
70
- <S style={w.toolbarRight}>
71
- <D style={[w.toolbarBtn,K&&{borderColor:`${e.darkOrange}50`,backgroundColor:`${e.darkOrange}18`}]}onPress={()=>Ie(o=>!o)}hitSlop={6}>
72
- <To isPaused={K}color={K?e.darkOrange:e.grayTextStrong}size={16}/>
73
- </D>
64
+ {F.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
65
+ <C style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
66
+ <R style={{color:e.purple,fontSize:9.5,fontFamily:k.interBold}}>
67
+ {$.length}
68
+ </R>
69
+ </C>
70
+ <Ne onPress={()=>M("")}hitSlop={10}style={b.clearBtn}>
71
+ <Ke color={e.grayTextWeak}size={13}/>
72
+ </Ne>
73
+ </C>}
74
+ </C>
74
75
 
75
- <D style={[w.toolbarBtn,{borderColor:`${e.errorColor}38`,backgroundColor:`${e.errorColor}0F`}]}onPress={ke}hitSlop={6}>
76
- <Je color={e.errorColor}size={15}/>
77
- {W.size>0&&<S style={w.trashBadge}>
78
- <I style={w.trashBadgeText}>
79
- {W.size}
80
- </I>
81
- </S>}
82
- </D>
76
+ <C style={b.toolbarRight}>
77
+ <O style={[b.toolbarBtn,{borderColor:`${e.errorColor}38`,backgroundColor:`${e.errorColor}0F`}]}onPress={Ve}hitSlop={6}>
78
+ <Xe color={e.errorColor}size={15}/>
79
+ {E.size>0&&<C style={b.trashBadge}>
80
+ <R style={b.trashBadgeText}>
81
+ {E.size}
82
+ </R>
83
+ </C>}
84
+ </O>
83
85
 
84
- <D style={w.toolbarBtn}onPress={()=>$(o=>o==="newest"?"oldest":"newest")}hitSlop={10}>
85
- <Ye direction={j==="newest"?"down":"up"}color={e.grayTextStrong}size={18}/>
86
- </D>
86
+ <O style={b.toolbarBtn}onPress={()=>v(o=>o==="newest"?"oldest":"newest")}hitSlop={10}>
87
+ <Je direction={Q==="newest"?"down":"up"}color={e.grayTextStrong}size={18}/>
88
+ </O>
87
89
 
88
- <D style={[w.toolbarBtn,(T.size>0||x.size>0)&&{borderColor:e.purple,backgroundColor:`${e.purple}15`}]}onPress={()=>X(!0)}hitSlop={6}>
89
- <Ce color={T.size>0||x.size>0?e.purple:e.grayTextStrong}size={16}/>
90
- {(T.size>0||x.size>0)&&<S style={w.activeFilterDot}/>}
91
- </D>
92
- </S>
93
- </S>
90
+ <O style={[b.toolbarBtn,(x.size>0||V.size>0)&&{borderColor:e.purple,backgroundColor:`${e.purple}15`}]}onPress={()=>U(!0)}hitSlop={6}>
91
+ <Te color={x.size>0||V.size>0?e.purple:e.grayTextStrong}size={16}/>
92
+ {(x.size>0||V.size>0)&&<C style={b.activeFilterDot}/>}
93
+ </O>
94
+ </C>
95
+ </C>
94
96
 
95
97
 
96
- <S style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
98
+ <C style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
97
99
  <He horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
98
- {Pe.map(o=>{const C=_===o.id,b=o.color||e.purple,z=C?e.white:b;return<D key={o.id}onPress={()=>{U(C?"all":o.id)}}>
99
- <S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:C?b:`${b}12`,borderWidth:1,borderColor:C?b:`${b}30`,gap:5}}>
100
- {o.id==="all"&&<Co size={11}color={z}/>}
101
- {o.id==="errors"&&<So size={11}color={z}/>}
102
- {o.id==="success"&&<Ze size={11}color={z}/>}
103
- {o.id==="slow"&&<Te size={11}color={z}/>}
104
- {o.id==="POST"&&<Io size={11}color={z}/>}
105
- {o.id==="GET"&&<Fo size={11}color={z}/>}
106
- {o.id==="graphql"&&<Ro size={11}color={z}/>}
107
- <I style={{fontFamily:B.interBold,fontSize:10.5,color:C?e.white:e.primaryBlack}}>
100
+ {Le.map(o=>{const z=G===o.id,T=o.color||e.purple,I=z?e.white:T;return<O key={o.id}onPress={()=>{j(z?"all":o.id)}}>
101
+ <C style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:z?T:`${T}12`,borderWidth:1,borderColor:z?T:`${T}30`,gap:5}}>
102
+ {o.id==="all"&&<To size={11}color={I}/>}
103
+ {o.id==="errors"&&<So size={11}color={I}/>}
104
+ {o.id==="success"&&<Co size={11}color={I}/>}
105
+ {o.id==="slow"&&<Vo size={11}color={I}/>}
106
+ {o.id==="POST"&&<Io size={11}color={I}/>}
107
+ {o.id==="GET"&&<Ro size={11}color={I}/>}
108
+ {o.id==="graphql"&&<Fo size={11}color={I}/>}
109
+ <R style={{fontFamily:k.interBold,fontSize:10.5,color:z?e.white:e.primaryBlack}}>
108
110
  {o.label}
109
- </I>
110
- <S style={{backgroundColor:C?"rgba(255,255,255,0.25)":`${b}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8}}>
111
- <I style={{fontFamily:B.interBold,fontSize:9,color:C?e.white:b}}>
111
+ </R>
112
+ <C style={{backgroundColor:z?"rgba(255,255,255,0.25)":`${T}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8}}>
113
+ <R style={{fontFamily:k.interBold,fontSize:9,color:z?e.white:T}}>
112
114
  {o.count}
113
- </I>
114
- </S>
115
- </S>
116
- </D>})}
115
+ </R>
116
+ </C>
117
+ </C>
118
+ </O>})}
117
119
  </He>
118
120
 
119
- <D onPress={()=>X(!0)}style={{flexShrink:0}}>
120
- <S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:4.5,borderRadius:8,backgroundColor:T.size>0||x.size>0?`${e.purple}20`:e.grayBackground,borderWidth:1,borderColor:T.size>0||x.size>0?e.purple:e.grayBorderSecondary,gap:5,shadowColor:e.black,shadowOpacity:.04,shadowRadius:2,shadowOffset:{width:0,height:1},elevation:1}}>
121
- <Ce size={11}color={T.size>0||x.size>0?e.purple:e.grayText}/>
122
- <I style={{fontFamily:B.interBold,fontSize:10.5,color:T.size>0||x.size>0?e.purple:e.grayText}}>
121
+ <O onPress={()=>U(!0)}style={{flexShrink:0}}>
122
+ <C style={{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:4.5,borderRadius:8,backgroundColor:x.size>0||V.size>0?`${e.purple}20`:e.grayBackground,borderWidth:1,borderColor:x.size>0||V.size>0?e.purple:e.grayBorderSecondary,gap:5,shadowColor:e.black,shadowOpacity:.04,shadowRadius:2,shadowOffset:{width:0,height:1},elevation:1}}>
123
+ <Te size={11}color={x.size>0||V.size>0?e.purple:e.grayText}/>
124
+ <R style={{fontFamily:k.interBold,fontSize:10.5,color:x.size>0||V.size>0?e.purple:e.grayText}}>
123
125
  More Filters
124
- </I>
125
- {(T.size>0||x.size>0)&&<S style={{backgroundColor:e.purple,paddingHorizontal:4.5,paddingVertical:1,borderRadius:6}}>
126
- <I style={{fontFamily:B.interBold,fontSize:8.5,color:e.white}}>
127
- {T.size+x.size}
128
- </I>
129
- </S>}
130
- </S>
131
- </D>
132
- </S>
126
+ </R>
127
+ {(x.size>0||V.size>0)&&<C style={{backgroundColor:e.purple,paddingHorizontal:4.5,paddingVertical:1,borderRadius:6}}>
128
+ <R style={{fontFamily:k.interBold,fontSize:8.5,color:e.white}}>
129
+ {x.size+V.size}
130
+ </R>
131
+ </C>}
132
+ </C>
133
+ </O>
134
+ </C>
133
135
 
134
136
 
135
- {(_!=="all"||L.trim().length>0||T.size>0||x.size>0||M.length!==P.length)&&<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginHorizontal:12,marginBottom:8,paddingHorizontal:10,paddingVertical:5.5,backgroundColor:`${e.purple}10`,borderRadius:8,borderWidth:1,borderColor:`${e.purple}25`}}>
136
- <I style={{fontFamily:B.interMedium,fontSize:10.5,color:e.purple}}>
137
- Showing {M.length} of {P.length} requests
138
- </I>
139
- <D onPress={()=>{q(""),U("all"),H(new Set),A(new Set)}}>
140
- <I style={{fontFamily:B.interBold,fontSize:10.5,color:e.errorColor}}>
137
+ {(G!=="all"||F.trim().length>0||x.size>0||V.size>0||$.length!==H.length)&&<C style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginHorizontal:12,marginBottom:8,paddingHorizontal:10,paddingVertical:5.5,backgroundColor:`${e.purple}10`,borderRadius:8,borderWidth:1,borderColor:`${e.purple}25`}}>
138
+ <R style={{fontFamily:k.interMedium,fontSize:10.5,color:e.purple}}>
139
+ Showing {$.length} of {H.length} requests
140
+ </R>
141
+ <O onPress={()=>{M(""),j("all"),q(new Set),N(new Set)}}>
142
+ <R style={{fontFamily:k.interBold,fontSize:10.5,color:e.errorColor}}>
141
143
  Clear All Filters
142
- </I>
143
- </D>
144
- </S>}
145
- </S>
144
+ </R>
145
+ </O>
146
+ </C>}
147
+ </C>
146
148
 
147
- <Ne ref={Fe}data={Y}keyExtractor={o=>o?.id?.toString()}renderItem={Le}initialNumToRender={12}maxToRenderPerBatch={8}windowSize={5}removeClippedSubviews={De.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<Ge isSearch={L.length>0||T.size>0||x.size>0||_!=="all"}searchQuery={L}customTitle={L.length>0?"No matching API requests":"No network activity"}onClearSearch={()=>{q(""),H(new Set),A(new Set),U("all"),xe("all")}}/>}ListFooterComponent={Y.length>0?<Qe count={M.length}label="requests"/>:null}contentContainerStyle={[w.listContent,M.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
149
+ <$e ref={Ie}data={Y}keyExtractor={o=>o?.id?.toString()}renderItem={Be}initialNumToRender={15}maxToRenderPerBatch={10}windowSize={9}removeClippedSubviews={qe.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<We isSearch={F.length>0||x.size>0||V.size>0||G!=="all"}searchQuery={F}customTitle={F.length>0?"No matching API requests":"No network activity"}onClearSearch={()=>{M(""),q(new Set),N(new Set),j("all"),xe("all")}}/>}ListFooterComponent={Y.length>0?<Ge count={$.length}totalCount={$.length}label="requests"/>:null}contentContainerStyle={[b.listContent,$.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
148
150
 
149
151
 
150
- <_e visible={Re}onClose={()=>X(!1)}filters={Be}onApply={Ve}searchQuery={L}/>
151
- </S>});export default Bo;
152
+ <Qe visible={Re}onClose={()=>U(!1)}filters={ke}onApply={Fe}searchQuery={F}/>
153
+ </C>});export default Lo;
@@ -1,78 +1,78 @@
1
- import{useEffect as J,useRef as O,useState as Q}from"react";import{Animated as r,Linking as H,Modal as X,Platform as I,StyleSheet as z,Text as C,TouchableOpacity as P,View as S}from"react-native";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as T}from"../../styles/AppFonts";import M from"../TouchableScale";import{loadSettings as x,saveSettings as B}from"../../helpers/settingsStore";import{trackTelemetryEvent as V}from"../../helpers/telemetry";import{StarIcon as N,CloseWhite as Z,CheckIcon as St,GitHubIcon as Ct,NpmIcon as Tt}from"../NetworkIcons";const xt=7200*60*1e3,Bt="https://github.com/vengatmacuser/react-native-inapp-inspector",kt="https://www.npmjs.com/package/react-native-inapp-inspector";export const NpmStarPrompt=()=>{const[L,E]=Q(!1),_=O(new r.Value(200)).current,A=O(new r.Value(0)).current,D=O(new r.Value(1)).current;J(()=>{let o=!0;async function Y(){try{const k=await x();if(k.starPromptActioned)return;const F=Date.now(),q=k.starPromptFirstSeen||F;k.starPromptFirstSeen||await B({...k,starPromptFirstSeen:F});const K=k.starPromptLastShown||q;F-K>=xt&&Math.random()<.65&&o&&setTimeout(()=>{o&&G()},1800)}catch{}}return Y(),()=>{o=!1}},[]);const G=async()=>{E(!0);try{const o=await x();await B({...o,starPromptLastShown:Date.now()}),V("npm_star_prompt_shown",{trigger:"5_day_interval",platform:I.OS})}catch{}r.parallel([r.spring(_,{toValue:0,friction:8,tension:50,useNativeDriver:!0}),r.timing(A,{toValue:1,duration:250,useNativeDriver:!0})]).start(),r.loop(r.sequence([r.timing(D,{toValue:1.15,duration:900,useNativeDriver:!0}),r.timing(D,{toValue:1,duration:900,useNativeDriver:!0})])).start()},R=o=>{r.parallel([r.timing(A,{toValue:0,duration:180,useNativeDriver:!0}),r.timing(_,{toValue:200,duration:180,useNativeDriver:!0})]).start(()=>{E(!1),o&&o()})},W=async()=>{try{const o=await x();await B({...o,starPromptActioned:!0}),V("npm_star_prompt_action",{action:"starred",platform:I.OS})}catch{}R(()=>{H.openURL(Bt).catch(()=>{H.openURL(kt).catch(()=>{})})})},U=async()=>{try{const o=await x();await B({...o,starPromptActioned:!0}),V("npm_star_prompt_action",{action:"already_starred",platform:I.OS})}catch{}R()},v=async()=>{try{const o=await x();await B({...o,starPromptLastShown:Date.now()}),V("npm_star_prompt_action",{action:"remind_later",platform:I.OS})}catch{}R()},$=async()=>{try{const o=await x();await B({...o,starPromptActioned:!0}),V("npm_star_prompt_action",{action:"dont_ask_again",platform:I.OS})}catch{}R()};return L?<X transparent visible={L}animationType="none"onRequestClose={v}>
2
- <r.View style={[t.backdrop,{opacity:A}]}>
3
- <P style={z.absoluteFill}activeOpacity={1}onPress={v}/>
1
+ import{useEffect as K,useRef as z,useState as J}from"react";import{Animated as r,Linking as j,Modal as Q,Platform as I,StyleSheet as F,Text as T,TouchableOpacity as P,View as S}from"react-native";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as x}from"../../styles/AppFonts";import E from"../TouchableScale";import{loadSettings as C,saveSettings as B}from"../../helpers/settingsStore";import{trackTelemetryEvent as R}from"../../helpers/telemetry";import{StarIcon as M,CloseWhite as X,CheckIcon as Z,GitHubIcon as St,NpmIcon as Tt}from"../NetworkIcons";const xt=7200*60*1e3,Ct="https://github.com/vengatmacuser/react-native-inapp-inspector",Bt="https://www.npmjs.com/package/react-native-inapp-inspector";export const NpmStarPrompt=()=>{const[L,H]=J(!1),_=z(new r.Value(200)).current,A=z(new r.Value(0)).current,O=z(new r.Value(1)).current;K(()=>{let o=!0;async function $(){try{const k=await C();if(k.starPromptActioned)return;const D=Date.now(),Y=k.starPromptFirstSeen||D;k.starPromptFirstSeen||await B({...k,starPromptFirstSeen:D});const q=k.starPromptLastShown||Y;D-q>=xt&&Math.random()<.65&&o&&setTimeout(()=>{o&&N()},1800)}catch{}}return $(),()=>{o=!1}},[]);const N=async()=>{H(!0);try{const o=await C();await B({...o,starPromptLastShown:Date.now()}),R("npm_star_prompt_shown",{trigger:"5_day_interval",platform:I.OS})}catch{}r.parallel([r.spring(_,{toValue:0,friction:8,tension:50,useNativeDriver:!0}),r.timing(A,{toValue:1,duration:250,useNativeDriver:!0})]).start(),r.loop(r.sequence([r.timing(O,{toValue:1.15,duration:900,useNativeDriver:!0}),r.timing(O,{toValue:1,duration:900,useNativeDriver:!0})])).start()},V=o=>{r.parallel([r.timing(A,{toValue:0,duration:180,useNativeDriver:!0}),r.timing(_,{toValue:200,duration:180,useNativeDriver:!0})]).start(()=>{H(!1),o&&o()})},G=async()=>{try{const o=await C();await B({...o,starPromptActioned:!0}),R("npm_star_prompt_action",{action:"starred",platform:I.OS})}catch{}V(()=>{j.openURL(Ct).catch(()=>{j.openURL(Bt).catch(()=>{})})})},W=async()=>{try{const o=await C();await B({...o,starPromptActioned:!0}),R("npm_star_prompt_action",{action:"already_starred",platform:I.OS})}catch{}V()},v=async()=>{try{const o=await C();await B({...o,starPromptLastShown:Date.now()}),R("npm_star_prompt_action",{action:"remind_later",platform:I.OS})}catch{}V()},U=async()=>{try{const o=await C();await B({...o,starPromptActioned:!0}),R("npm_star_prompt_action",{action:"dont_ask_again",platform:I.OS})}catch{}V()};return L?<Q transparent visible={L}animationType="none"onRequestClose={v}>
2
+ <r.View style={[e.backdrop,{opacity:A}]}>
3
+ <P style={F.absoluteFill}activeOpacity={1}onPress={v}/>
4
4
 
5
- <r.View style={[t.cardContainer,{transform:[{translateY:_}]}]}>
5
+ <r.View style={[e.cardContainer,{transform:[{translateY:_}]}]}>
6
6
 
7
- <S style={t.headerIconWrapper}>
8
- <r.View style={[t.iconGlow,{transform:[{scale:D}]}]}/>
9
- <S style={t.iconCircle}>
10
- <N size={26}color="#F59E0B"/>
7
+ <S style={e.headerIconWrapper}>
8
+ <r.View style={[e.iconGlow,{transform:[{scale:O}]}]}/>
9
+ <S style={e.iconCircle}>
10
+ <M size={26}color={t.amber500}/>
11
11
  </S>
12
12
  </S>
13
13
 
14
14
 
15
- <P onPress={v}hitSlop={{top:10,bottom:10,left:10,right:10}}style={t.closeBtn}>
16
- <Z size={12}color={e.grayText}/>
15
+ <P onPress={v}hitSlop={{top:10,bottom:10,left:10,right:10}}style={e.closeBtn}>
16
+ <X size={12}color={t.grayText}/>
17
17
  </P>
18
18
 
19
19
 
20
- <S style={t.pillBadge}>
21
- <C style={t.pillBadgeText}>SUPPORT OPEN SOURCE</C>
20
+ <S style={e.pillBadge}>
21
+ <T style={e.pillBadgeText}>SUPPORT OPEN SOURCE</T>
22
22
  </S>
23
23
 
24
24
 
25
- <C style={t.title}>Enjoying In-App Inspector?</C>
26
- <C style={t.description}>
25
+ <T style={e.title}>Enjoying In-App Inspector?</T>
26
+ <T style={e.description}>
27
27
  If this debugging tool saves you time, please consider giving us a
28
28
  star on GitHub & npm. Your support helps us build more features!
29
- </C>
29
+ </T>
30
30
 
31
31
 
32
- <S style={t.metricsBar}>
33
- <S style={t.metricItem}>
34
- <Ct size={13}color={e.grayText}/>
35
- <C style={t.metricText}>GitHub Star</C>
32
+ <S style={e.metricsBar}>
33
+ <S style={e.metricItem}>
34
+ <St size={13}color={t.grayText}/>
35
+ <T style={e.metricText}>GitHub Star</T>
36
36
  </S>
37
- <S style={t.metricDot}/>
38
- <S style={t.metricItem}>
39
- <Tt size={13}color="#CB3837"/>
40
- <C style={t.metricText}>npm Package</C>
37
+ <S style={e.metricDot}/>
38
+ <S style={e.metricItem}>
39
+ <Tt size={13}color={t.npmRed}/>
40
+ <T style={e.metricText}>npm Package</T>
41
41
  </S>
42
- <S style={t.metricDot}/>
43
- <S style={t.metricItem}>
44
- <C style={t.metricText}>100% Free</C>
42
+ <S style={e.metricDot}/>
43
+ <S style={e.metricItem}>
44
+ <T style={e.metricText}>100% Free</T>
45
45
  </S>
46
46
  </S>
47
47
 
48
48
 
49
- <M accessible={!0}accessibilityRole="button"accessibilityLabel="Star on GitHub"onPress={W}style={t.primaryButton}>
50
- <S style={t.primaryButtonContent}>
51
- <N size={16}color={e.white}/>
52
- <C style={t.primaryButtonText}>Star on GitHub & npm</C>
49
+ <E accessible={!0}accessibilityRole="button"accessibilityLabel="Star on GitHub"onPress={G}style={e.primaryButton}>
50
+ <S style={e.primaryButtonContent}>
51
+ <M size={16}color={t.white}/>
52
+ <T style={e.primaryButtonText}>Star on GitHub & npm</T>
53
53
  </S>
54
- </M>
54
+ </E>
55
55
 
56
56
 
57
- <M accessible={!0}accessibilityRole="button"accessibilityLabel="I already starred"onPress={U}style={t.secondaryButton}>
58
- <S style={t.secondaryButtonContent}>
59
- <St size={13}color={e.purple}/>
60
- <C style={t.secondaryButtonText}>I Already Starred</C>
57
+ <E accessible={!0}accessibilityRole="button"accessibilityLabel="I already starred"onPress={W}style={e.secondaryButton}>
58
+ <S style={e.secondaryButtonContent}>
59
+ <Z size={13}color={t.purple}/>
60
+ <T style={e.secondaryButtonText}>I Already Starred</T>
61
61
  </S>
62
- </M>
62
+ </E>
63
63
 
64
64
 
65
- <S style={t.footerRow}>
65
+ <S style={e.footerRow}>
66
66
  <P onPress={v}hitSlop={{top:8,bottom:8,left:8,right:8}}>
67
- <C style={t.footerLinkText}>Remind Me Later</C>
67
+ <T style={e.footerLinkText}>Remind Me Later</T>
68
68
  </P>
69
69
 
70
- <S style={t.footerSeparator}/>
70
+ <S style={e.footerSeparator}/>
71
71
 
72
- <P onPress={$}hitSlop={{top:8,bottom:8,left:8,right:8}}>
73
- <C style={t.footerLinkTextMuted}>Don't Ask Again</C>
72
+ <P onPress={U}hitSlop={{top:8,bottom:8,left:8,right:8}}>
73
+ <T style={e.footerLinkTextMuted}>Don't Ask Again</T>
74
74
  </P>
75
75
  </S>
76
76
  </r.View>
77
77
  </r.View>
78
- </X>:null};const t=z.create({backdrop:{...z.absoluteFillObject,backgroundColor:"rgba(15, 23, 42, 0.65)",justifyContent:"center",alignItems:"center",paddingHorizontal:20,zIndex:99999},cardContainer:{width:"100%",maxWidth:380,backgroundColor:e.white,borderRadius:22,padding:22,alignItems:"center",shadowColor:e.black,shadowOffset:{width:0,height:8},shadowOpacity:.22,shadowRadius:20,elevation:12,borderWidth:1.5,borderColor:`${e.purple}25`},headerIconWrapper:{position:"relative",alignItems:"center",justifyContent:"center",marginBottom:12},iconGlow:{position:"absolute",width:68,height:68,borderRadius:34,backgroundColor:"#F59E0B22"},iconCircle:{width:54,height:54,borderRadius:27,backgroundColor:"#FEF3C7",borderWidth:2,borderColor:"#FDE68A",alignItems:"center",justifyContent:"center"},closeBtn:{position:"absolute",top:14,right:14,width:28,height:28,borderRadius:14,backgroundColor:e.grayBackground,alignItems:"center",justifyContent:"center"},pillBadge:{backgroundColor:`${e.purple}14`,paddingHorizontal:9,paddingVertical:3,borderRadius:10,marginBottom:8},pillBadgeText:{fontFamily:T.interBold,fontSize:9.5,color:e.purple,letterSpacing:.6},title:{fontFamily:T.interBold,fontSize:18,lineHeight:23,color:e.primaryBlack,textAlign:"center",marginBottom:6},description:{fontFamily:T.interRegular,fontSize:12.5,lineHeight:18,color:e.grayText,textAlign:"center",marginBottom:14,paddingHorizontal:8},metricsBar:{flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:e.grayBackground,paddingVertical:7,paddingHorizontal:14,borderRadius:10,marginBottom:16,gap:8},metricItem:{flexDirection:"row",alignItems:"center",gap:4},metricText:{fontFamily:T.interMedium,fontSize:11,color:e.primaryBlack},metricDot:{width:3.5,height:3.5,borderRadius:2,backgroundColor:e.dividerColor},primaryButton:{width:"100%",backgroundColor:e.purple,borderRadius:12,paddingVertical:12,alignItems:"center",justifyContent:"center",marginBottom:8,shadowColor:e.purple,shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8,elevation:4},primaryButtonContent:{flexDirection:"row",alignItems:"center",gap:7},primaryButtonText:{fontFamily:T.interBold,fontSize:14,color:e.white},secondaryButton:{width:"100%",backgroundColor:`${e.purple}10`,borderWidth:1,borderColor:`${e.purple}30`,borderRadius:12,paddingVertical:10,alignItems:"center",justifyContent:"center",marginBottom:14},secondaryButtonContent:{flexDirection:"row",alignItems:"center",gap:6},secondaryButtonText:{fontFamily:T.interBold,fontSize:13,color:e.purple},footerRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12},footerLinkText:{fontFamily:T.interMedium,fontSize:11.5,color:e.grayText},footerSeparator:{width:1,height:12,backgroundColor:e.dividerColor},footerLinkTextMuted:{fontFamily:T.interRegular,fontSize:11.5,color:e.grayTextWeak}});export default NpmStarPrompt;
78
+ </Q>:null};const e=F.create({backdrop:{...F.absoluteFillObject,backgroundColor:"rgba(15, 23, 42, 0.65)",justifyContent:"center",alignItems:"center",paddingHorizontal:20,zIndex:99999},cardContainer:{width:"100%",maxWidth:380,backgroundColor:t.white,borderRadius:22,padding:22,alignItems:"center",shadowColor:t.black,shadowOffset:{width:0,height:8},shadowOpacity:.22,shadowRadius:20,elevation:12,borderWidth:1.5,borderColor:`${t.purple}25`},headerIconWrapper:{position:"relative",alignItems:"center",justifyContent:"center",marginBottom:12},iconGlow:{position:"absolute",width:68,height:68,borderRadius:34,backgroundColor:`${t.amber500}22`},iconCircle:{width:54,height:54,borderRadius:27,backgroundColor:t.amber100,borderWidth:2,borderColor:t.amber200,alignItems:"center",justifyContent:"center"},closeBtn:{position:"absolute",top:14,right:14,width:28,height:28,borderRadius:14,backgroundColor:t.grayBackground,alignItems:"center",justifyContent:"center"},pillBadge:{backgroundColor:`${t.purple}14`,paddingHorizontal:9,paddingVertical:3,borderRadius:10,marginBottom:8},pillBadgeText:{fontFamily:x.interBold,fontSize:9.5,color:t.purple,letterSpacing:.6},title:{fontFamily:x.interBold,fontSize:18,lineHeight:23,color:t.primaryBlack,textAlign:"center",marginBottom:6},description:{fontFamily:x.interRegular,fontSize:12.5,lineHeight:18,color:t.grayText,textAlign:"center",marginBottom:14,paddingHorizontal:8},metricsBar:{flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:t.grayBackground,paddingVertical:7,paddingHorizontal:14,borderRadius:10,marginBottom:16,gap:8},metricItem:{flexDirection:"row",alignItems:"center",gap:4},metricText:{fontFamily:x.interMedium,fontSize:11,color:t.primaryBlack},metricDot:{width:3.5,height:3.5,borderRadius:2,backgroundColor:t.dividerColor},primaryButton:{width:"100%",backgroundColor:t.purple,borderRadius:12,paddingVertical:12,alignItems:"center",justifyContent:"center",marginBottom:8,shadowColor:t.purple,shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8,elevation:4},primaryButtonContent:{flexDirection:"row",alignItems:"center",gap:7},primaryButtonText:{fontFamily:x.interBold,fontSize:14,color:t.white},secondaryButton:{width:"100%",backgroundColor:`${t.purple}10`,borderWidth:1,borderColor:`${t.purple}30`,borderRadius:12,paddingVertical:10,alignItems:"center",justifyContent:"center",marginBottom:14},secondaryButtonContent:{flexDirection:"row",alignItems:"center",gap:6},secondaryButtonText:{fontFamily:x.interBold,fontSize:13,color:t.purple},footerRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12},footerLinkText:{fontFamily:x.interMedium,fontSize:11.5,color:t.grayText},footerSeparator:{width:1,height:12,backgroundColor:t.dividerColor},footerLinkTextMuted:{fontFamily:x.interRegular,fontSize:11.5,color:t.grayTextWeak}});export default NpmStarPrompt;
@@ -1,56 +1,55 @@
1
- import{useState as E,useEffect as J,useRef as V}from"react";import{Animated as i,Linking as K,StyleSheet as Q,Text as B,TouchableOpacity as N,View as F}from"react-native";import S,{Path as C}from"react-native-svg";import{useInspector as X}from"./InspectorContext";import{LIB_VERSION as Z}from"../../constants";import{NpmIcon as $}from"../NetworkIcons";import{copyToClipboard as tt}from"../../helpers";import{showToast as et}from"../../helpers/toast";import{AppFonts as ot}from"../../styles/AppFonts";const Ct=({size:e=13,color:o="#94A3B8"})=><S width={e}height={e}viewBox="0 0 24 24"fill="none">
2
- <C d="M18 6L6 18M6 6l12 12"stroke={o}strokeWidth="2.4"strokeLinecap="round"strokeLinejoin="round"/>
3
- </S>,Ft=({size:e=11,color:o="#94A3B8"})=><S width={e}height={e}viewBox="0 0 24 24"fill="none">
4
- <C 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={o}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
5
- <C 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={o}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
6
- </S>,Bt=({size:e=11,color:o="#10B981"})=><S width={e}height={e}viewBox="0 0 24 24"fill="none">
7
- <C d="M20 6L9 17l-5-5"stroke={o}strokeWidth="2.4"strokeLinecap="round"strokeLinejoin="round"/>
8
- </S>,Tt=({size:e=11,color:o="#FFFFFF"})=><S width={e}height={e}viewBox="0 0 24 24"fill="none">
9
- <C d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"stroke={o}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
10
- <C d="M15 3h6v6"stroke={o}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
11
- <C d="M10 14L21 3"stroke={o}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
12
- </S>,P=7e3;export const NpmUpdateToast=()=>{const{updateAvailable:e,latestNpmVersion:o,showUpdateToast:L}=X(),[_,H]=E(!1),[U,j]=E(!1),[R,M]=E(!1),A=V(new i.Value(60)).current,O=V(new i.Value(0)).current,D=V(new i.Value(1)).current,W=V(null);J(()=>(L&&e&&o&&!_&&(j(!0),i.parallel([i.spring(A,{toValue:0,friction:8,tension:40,useNativeDriver:!0}),i.timing(O,{toValue:1,duration:250,useNativeDriver:!0})]).start(),D.setValue(1),i.timing(D,{toValue:0,duration:P,useNativeDriver:!1}).start(),W.current=setTimeout(()=>{I()},P)),()=>{W.current&&clearTimeout(W.current)}),[L,e,o,_]);const I=()=>{i.parallel([i.timing(O,{toValue:0,duration:180,useNativeDriver:!0}),i.timing(A,{toValue:60,duration:180,useNativeDriver:!0})]).start(()=>{j(!1),H(!0)})},Y=()=>{tt("npm install react-native-inapp-inspector@latest","Install Command"),M(!0),et("Copied npm install command!"),setTimeout(()=>{M(!1)},2e3)},q=()=>{K.openURL("https://www.npmjs.com/package/react-native-inapp-inspector").catch(()=>{}),I()};if(typeof __DEV__>"u"||!__DEV__||!L||!U||!e||!o)return null;const G=D.interpolate({inputRange:[0,1],outputRange:["0%","100%"]});return<i.View style={[t.container,{opacity:O,transform:[{translateY:A}]}]}>
13
- <F style={t.contentRow}>
1
+ import{useState as N,useEffect as G,useRef as R}from"react";import{Animated as r,Linking as J,StyleSheet as K,Text as S,TouchableOpacity as P,View as T}from"react-native";import B,{Path as C}from"react-native-svg";import{useInspector as Q}from"./InspectorContext";import{LIB_VERSION as X}from"../../constants";import{NpmIcon as Z}from"../NetworkIcons";import{copyToClipboard as ee}from"../../helpers";import{showToast as te}from"../../helpers/toast";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as oe}from"../../styles/AppFonts";import{useTranslation as ie}from"../../i18n";const Ce=({size:t=13,color:i=e.slate400})=><B width={t}height={t}viewBox="0 0 24 24"fill="none">
2
+ <C d="M18 6L6 18M6 6l12 12"stroke={i}strokeWidth="2.4"strokeLinecap="round"strokeLinejoin="round"/>
3
+ </B>,Ve=({size:t=11,color:i=e.slate400})=><B width={t}height={t}viewBox="0 0 24 24"fill="none">
4
+ <C 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={i}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
5
+ <C 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={i}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
6
+ </B>,Te=({size:t=11,color:i=e.greenColor})=><B width={t}height={t}viewBox="0 0 24 24"fill="none">
7
+ <C d="M20 6L9 17l-5-5"stroke={i}strokeWidth="2.4"strokeLinecap="round"strokeLinejoin="round"/>
8
+ </B>,Se=({size:t=11,color:i=e.white})=><B width={t}height={t}viewBox="0 0 24 24"fill="none">
9
+ <C d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"stroke={i}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
10
+ <C d="M15 3h6v6"stroke={i}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
11
+ <C d="M10 14L21 3"stroke={i}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
12
+ </B>,H=7e3;export const NpmUpdateToast=()=>{const{t}=ie(),{updateAvailable:i,latestNpmVersion:V,showUpdateToast:O}=Q(),[_,U]=N(!1),[F,j]=N(!1),[W,E]=N(!1),I=R(new r.Value(60)).current,D=R(new r.Value(0)).current,z=R(new r.Value(1)).current,A=R(null);G(()=>(O&&i&&V&&!_&&(j(!0),r.parallel([r.spring(I,{toValue:0,friction:8,tension:40,useNativeDriver:!0}),r.timing(D,{toValue:1,duration:250,useNativeDriver:!0})]).start(),z.setValue(1),r.timing(z,{toValue:0,duration:H,useNativeDriver:!1}).start(),A.current=setTimeout(()=>{M()},H)),()=>{A.current&&clearTimeout(A.current)}),[O,i,V,_]);const M=()=>{r.parallel([r.timing(D,{toValue:0,duration:180,useNativeDriver:!0}),r.timing(I,{toValue:60,duration:180,useNativeDriver:!0})]).start(()=>{j(!1),U(!0)})},$=()=>{ee("npm install react-native-inapp-inspector@latest","Install Command"),E(!0),te("Copied npm install command!"),setTimeout(()=>{E(!1)},2e3)},Y=()=>{J.openURL("https://www.npmjs.com/package/react-native-inapp-inspector").catch(()=>{}),M()};if(typeof __DEV__>"u"||!__DEV__||!O||!F||!i||!V)return null;const q=z.interpolate({inputRange:[0,1],outputRange:["0%","100%"]});return<r.View style={[o.container,{opacity:D,transform:[{translateY:I}]}]}>
13
+ <T style={o.contentRow}>
14
14
 
15
- <F style={t.npmIconContainer}>
16
- <$ size={15}color="#CB3837"/>
17
- </F>
15
+ <T style={o.npmIconContainer}>
16
+ <Z size={15}color={e.npmRed}/>
17
+ </T>
18
18
 
19
-
20
- <F style={t.textContainer}>
21
- <F style={t.titleRow}>
22
- <B style={t.titleText}>Update Available</B>
23
- <F style={t.versionPill}>
24
- <B style={t.versionPillText}>v{o}</B>
25
- </F>
26
- </F>
27
- <B style={t.subtitleText}numberOfLines={1}>
28
- Installed: v{Z} • New version is ready
29
- </B>
30
- </F>
19
+ <T style={o.textContainer}>
20
+ <T style={o.titleRow}>
21
+ <S style={o.titleText}>{t("header.newVersionAvailable","Update Available")}</S>
22
+ <T style={o.versionPill}>
23
+ <S style={o.versionPillText}>v{V}</S>
24
+ </T>
25
+ </T>
26
+ <S style={o.subtitleText}>
27
+ {t("header.updateAvailable",{latestVersion:V,currentVersion:X,defaultValue:`react-native-inapp-inspector v${V} is available on NPM.`})}
28
+ </S>
29
+ </T>
31
30
 
32
31
 
33
- <N style={t.copyButton}onPress={Y}hitSlop={6}activeOpacity={.75}>
34
- {R?<Bt size={11}color="#10B981"/>:<Ft size={11}color="#94A3B8"/>}
35
- <B style={[t.copyButtonText,R&&{color:"#10B981"}]}>
36
- {R?"Copied":"Copy"}
37
- </B>
38
- </N>
32
+ <P style={o.copyButton}onPress={$}activeOpacity={.7}hitSlop={{top:8,bottom:8,left:4,right:4}}>
33
+ {W?<Te size={11}color={e.greenColor}/>:<Ve size={11}color={e.slate400}/>}
34
+ <S style={[o.copyButtonText,W&&{color:e.greenColor}]}>
35
+ {W?t("common.copied","Copied"):t("header.copyCommand","Copy")}
36
+ </S>
37
+ </P>
39
38
 
40
39
 
41
- <N style={t.actionButton}onPress={q}activeOpacity={.8}>
42
- <B style={t.actionButtonText}>View</B>
43
- <Tt size={10}color="#FFFFFF"/>
44
- </N>
40
+ <P style={o.actionButton}onPress={Y}activeOpacity={.8}hitSlop={{top:8,bottom:8,left:4,right:4}}>
41
+ <S style={o.actionButtonText}>{t("header.viewNpm","View")}</S>
42
+ <Se size={10}color={e.white}/>
43
+ </P>
45
44
 
46
45
 
47
- <N style={t.closeButton}onPress={I}hitSlop={8}activeOpacity={.7}>
48
- <Ct size={12}color="#94A3B8"/>
49
- </N>
50
- </F>
46
+ <P style={o.closeButton}onPress={M}activeOpacity={.7}hitSlop={{top:10,bottom:10,left:10,right:10}}>
47
+ <Ce size={12}color={e.slate400}/>
48
+ </P>
49
+ </T>
51
50
 
52
51
 
53
- <F style={t.progressBarTrack}>
54
- <i.View style={[t.progressBarFill,{width:G}]}/>
55
- </F>
56
- </i.View>};const T={fontFamily:ot.interRegular},t=Q.create({container:{position:"absolute",bottom:24,left:14,right:14,backgroundColor:"#0F172A",borderRadius:16,borderWidth:1,borderColor:"#334155",shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.4,shadowRadius:24,elevation:24,overflow:"hidden",zIndex:99999},contentRow:{flexDirection:"row",alignItems:"center",paddingVertical:11,paddingHorizontal:12,gap:8},npmIconContainer:{width:32,height:32,borderRadius:9,backgroundColor:"#FFFFFF",justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:"#E2E8F0",flexShrink:0,shadowColor:"#000000",shadowOffset:{width:0,height:1},shadowOpacity:.15,shadowRadius:2,elevation:2},textContainer:{flex:1,minWidth:0},titleRow:{flexDirection:"row",alignItems:"center",gap:5},titleText:{fontSize:12.5,fontWeight:"700",color:"#F8FAFC",letterSpacing:-.2,...T},versionPill:{backgroundColor:"#7C3AED33",paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:5,borderWidth:1,borderColor:"#8B5CF680"},versionPillText:{fontSize:10,fontWeight:"700",color:"#C4B5FD",...T},subtitleText:{fontSize:10.5,color:"#94A3B8",marginTop:1,...T},copyButton:{flexDirection:"row",alignItems:"center",gap:3.5,backgroundColor:"#1E293B",paddingVertical:5.5,paddingHorizontal:8,borderRadius:7,borderWidth:1,borderColor:"#334155",flexShrink:0},copyButtonText:{fontSize:10.5,fontWeight:"600",color:"#94A3B8",...T},actionButton:{flexDirection:"row",alignItems:"center",gap:3.5,backgroundColor:"#7C3AED",paddingVertical:5.5,paddingHorizontal:9,borderRadius:7,flexShrink:0,shadowColor:"#7C3AED",shadowOffset:{width:0,height:2},shadowOpacity:.35,shadowRadius:4,elevation:3},actionButtonText:{fontSize:11,fontWeight:"700",color:"#FFFFFF",...T},closeButton:{width:22,height:22,borderRadius:11,backgroundColor:"#1E293B",justifyContent:"center",alignItems:"center",flexShrink:0},progressBarTrack:{height:2.5,width:"100%",backgroundColor:"#1E293B"},progressBarFill:{height:"100%",backgroundColor:"#8B5CF6"}});export default NpmUpdateToast;
52
+ <T style={o.progressBarTrack}>
53
+ <r.View style={[o.progressBarFill,{width:q}]}/>
54
+ </T>
55
+ </r.View>};const L={fontFamily:oe.interRegular},o=K.create({container:{position:"absolute",bottom:24,left:14,right:14,backgroundColor:e.slate900,borderRadius:16,borderWidth:1,borderColor:e.slate700,shadowColor:e.black,shadowOffset:{width:0,height:12},shadowOpacity:.4,shadowRadius:24,elevation:24,overflow:"hidden",zIndex:99999},contentRow:{flexDirection:"row",alignItems:"center",paddingVertical:11,paddingHorizontal:12,gap:8},npmIconContainer:{width:32,height:32,borderRadius:9,backgroundColor:e.white,justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:e.slate200,flexShrink:0,shadowColor:e.black,shadowOffset:{width:0,height:1},shadowOpacity:.15,shadowRadius:2,elevation:2},textContainer:{flex:1,minWidth:0},titleRow:{flexDirection:"row",alignItems:"center",gap:5},titleText:{fontSize:12.5,fontWeight:"700",color:e.slate50,letterSpacing:-.2,...L},versionPill:{backgroundColor:`${e.offerPurple}33`,paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:5,borderWidth:1,borderColor:`${e.violet500}80`},versionPillText:{fontSize:10,fontWeight:"700",color:e.purpleLightMuted,...L},subtitleText:{fontSize:10.5,color:e.slate400,marginTop:1,...L},copyButton:{flexDirection:"row",alignItems:"center",gap:3.5,backgroundColor:e.slate800,paddingVertical:5.5,paddingHorizontal:8,borderRadius:7,borderWidth:1,borderColor:e.slate700,flexShrink:0},copyButtonText:{fontSize:10.5,fontWeight:"600",color:e.slate400,...L},actionButton:{flexDirection:"row",alignItems:"center",gap:3.5,backgroundColor:e.offerPurple,paddingVertical:5.5,paddingHorizontal:9,borderRadius:7,flexShrink:0,shadowColor:e.offerPurple,shadowOffset:{width:0,height:2},shadowOpacity:.35,shadowRadius:4,elevation:3},actionButtonText:{fontSize:11,fontWeight:"700",color:e.white,...L},closeButton:{width:22,height:22,borderRadius:11,backgroundColor:e.slate800,justifyContent:"center",alignItems:"center",flexShrink:0},progressBarTrack:{height:2.5,width:"100%",backgroundColor:e.slate800},progressBarFill:{height:"100%",backgroundColor:e.violet500}});export default NpmUpdateToast;