react-native-inapp-inspector 1.0.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 (291) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +97 -0
  3. package/dist/commonjs/components/AnalyticsDetail.d.ts +6 -0
  4. package/dist/commonjs/components/AnalyticsDetail.js +558 -0
  5. package/dist/commonjs/components/AnalyticsEventCard.d.ts +18 -0
  6. package/dist/commonjs/components/AnalyticsEventCard.js +327 -0
  7. package/dist/commonjs/components/AnalyticsGraph.d.ts +8 -0
  8. package/dist/commonjs/components/AnalyticsGraph.js +416 -0
  9. package/dist/commonjs/components/CodeSnippet.d.ts +8 -0
  10. package/dist/commonjs/components/CodeSnippet.js +427 -0
  11. package/dist/commonjs/components/ConsoleLogCard.d.ts +10 -0
  12. package/dist/commonjs/components/ConsoleLogCard.js +401 -0
  13. package/dist/commonjs/components/CopyButton.d.ts +4 -0
  14. package/dist/commonjs/components/CopyButton.js +69 -0
  15. package/dist/commonjs/components/DiffViewer.d.ts +7 -0
  16. package/dist/commonjs/components/DiffViewer.js +86 -0
  17. package/dist/commonjs/components/DomainHeader.d.ts +18 -0
  18. package/dist/commonjs/components/DomainHeader.js +136 -0
  19. package/dist/commonjs/components/EmptyState.d.ts +5 -0
  20. package/dist/commonjs/components/EmptyState.js +40 -0
  21. package/dist/commonjs/components/HeadersSection.d.ts +4 -0
  22. package/dist/commonjs/components/HeadersSection.js +155 -0
  23. package/dist/commonjs/components/HighlightText.d.ts +3 -0
  24. package/dist/commonjs/components/HighlightText.js +57 -0
  25. package/dist/commonjs/components/JsonViewer.d.ts +7 -0
  26. package/dist/commonjs/components/JsonViewer.js +19 -0
  27. package/dist/commonjs/components/LogCard.d.ts +4 -0
  28. package/dist/commonjs/components/LogCard.js +179 -0
  29. package/dist/commonjs/components/MetaAccordion.d.ts +4 -0
  30. package/dist/commonjs/components/MetaAccordion.js +113 -0
  31. package/dist/commonjs/components/MiniBarChart.d.ts +7 -0
  32. package/dist/commonjs/components/MiniBarChart.js +56 -0
  33. package/dist/commonjs/components/MiniLineChart.d.ts +6 -0
  34. package/dist/commonjs/components/MiniLineChart.js +58 -0
  35. package/dist/commonjs/components/NetworkIcons.d.ts +31 -0
  36. package/dist/commonjs/components/NetworkIcons.js +245 -0
  37. package/dist/commonjs/components/SectionHeader.d.ts +4 -0
  38. package/dist/commonjs/components/SectionHeader.js +87 -0
  39. package/dist/commonjs/components/SourcePageCard.d.ts +4 -0
  40. package/dist/commonjs/components/SourcePageCard.js +132 -0
  41. package/dist/commonjs/components/TouchableScale.d.ts +9 -0
  42. package/dist/commonjs/components/TouchableScale.js +44 -0
  43. package/dist/commonjs/components/TreeNode.d.ts +4 -0
  44. package/dist/commonjs/components/TreeNode.js +140 -0
  45. package/dist/commonjs/constants/index.d.ts +7 -0
  46. package/dist/commonjs/constants/index.js +35 -0
  47. package/dist/commonjs/customHooks/analyticsLogger.d.ts +21 -0
  48. package/dist/commonjs/customHooks/analyticsLogger.js +160 -0
  49. package/dist/commonjs/customHooks/consoleLogger.d.ts +5 -0
  50. package/dist/commonjs/customHooks/consoleLogger.js +141 -0
  51. package/dist/commonjs/customHooks/logFilters.d.ts +5 -0
  52. package/dist/commonjs/customHooks/logFilters.js +34 -0
  53. package/dist/commonjs/customHooks/networkLogger.d.ts +20 -0
  54. package/dist/commonjs/customHooks/networkLogger.js +272 -0
  55. package/dist/commonjs/customHooks/useAccordion.d.ts +17 -0
  56. package/dist/commonjs/customHooks/useAccordion.js +48 -0
  57. package/dist/commonjs/customHooks/webViewLogger.d.ts +22 -0
  58. package/dist/commonjs/customHooks/webViewLogger.js +412 -0
  59. package/dist/commonjs/helpers/index.d.ts +20 -0
  60. package/dist/commonjs/helpers/index.js +229 -0
  61. package/dist/commonjs/index.d.ts +7 -0
  62. package/dist/commonjs/index.js +2668 -0
  63. package/dist/commonjs/styles/AppColors.d.ts +27 -0
  64. package/dist/commonjs/styles/AppColors.js +30 -0
  65. package/dist/commonjs/styles/AppFonts.d.ts +7 -0
  66. package/dist/commonjs/styles/AppFonts.js +10 -0
  67. package/dist/commonjs/styles/index.d.ts +1488 -0
  68. package/dist/commonjs/styles/index.js +1357 -0
  69. package/dist/commonjs/types/index.d.ts +127 -0
  70. package/dist/commonjs/types/index.js +2 -0
  71. package/dist/esm/components/AnalyticsDetail.d.ts +6 -0
  72. package/dist/esm/components/AnalyticsDetail.js +520 -0
  73. package/dist/esm/components/AnalyticsEventCard.d.ts +18 -0
  74. package/dist/esm/components/AnalyticsEventCard.js +288 -0
  75. package/dist/esm/components/AnalyticsGraph.d.ts +8 -0
  76. package/dist/esm/components/AnalyticsGraph.js +378 -0
  77. package/dist/esm/components/CodeSnippet.d.ts +8 -0
  78. package/dist/esm/components/CodeSnippet.js +392 -0
  79. package/dist/esm/components/ConsoleLogCard.d.ts +10 -0
  80. package/dist/esm/components/ConsoleLogCard.js +362 -0
  81. package/dist/esm/components/CopyButton.d.ts +4 -0
  82. package/dist/esm/components/CopyButton.js +31 -0
  83. package/dist/esm/components/DiffViewer.d.ts +7 -0
  84. package/dist/esm/components/DiffViewer.js +48 -0
  85. package/dist/esm/components/DomainHeader.d.ts +18 -0
  86. package/dist/esm/components/DomainHeader.js +98 -0
  87. package/dist/esm/components/EmptyState.d.ts +5 -0
  88. package/dist/esm/components/EmptyState.js +35 -0
  89. package/dist/esm/components/HeadersSection.d.ts +4 -0
  90. package/dist/esm/components/HeadersSection.js +117 -0
  91. package/dist/esm/components/HighlightText.d.ts +3 -0
  92. package/dist/esm/components/HighlightText.js +52 -0
  93. package/dist/esm/components/JsonViewer.d.ts +7 -0
  94. package/dist/esm/components/JsonViewer.js +14 -0
  95. package/dist/esm/components/LogCard.d.ts +4 -0
  96. package/dist/esm/components/LogCard.js +141 -0
  97. package/dist/esm/components/MetaAccordion.d.ts +4 -0
  98. package/dist/esm/components/MetaAccordion.js +108 -0
  99. package/dist/esm/components/MiniBarChart.d.ts +7 -0
  100. package/dist/esm/components/MiniBarChart.js +18 -0
  101. package/dist/esm/components/MiniLineChart.d.ts +6 -0
  102. package/dist/esm/components/MiniLineChart.js +20 -0
  103. package/dist/esm/components/NetworkIcons.d.ts +31 -0
  104. package/dist/esm/components/NetworkIcons.js +176 -0
  105. package/dist/esm/components/SectionHeader.d.ts +4 -0
  106. package/dist/esm/components/SectionHeader.js +49 -0
  107. package/dist/esm/components/SourcePageCard.d.ts +4 -0
  108. package/dist/esm/components/SourcePageCard.js +94 -0
  109. package/dist/esm/components/TouchableScale.d.ts +9 -0
  110. package/dist/esm/components/TouchableScale.js +9 -0
  111. package/dist/esm/components/TreeNode.d.ts +4 -0
  112. package/dist/esm/components/TreeNode.js +102 -0
  113. package/dist/esm/constants/index.d.ts +7 -0
  114. package/dist/esm/constants/index.js +32 -0
  115. package/dist/esm/customHooks/analyticsLogger.d.ts +21 -0
  116. package/dist/esm/customHooks/analyticsLogger.js +152 -0
  117. package/dist/esm/customHooks/consoleLogger.d.ts +5 -0
  118. package/dist/esm/customHooks/consoleLogger.js +134 -0
  119. package/dist/esm/customHooks/logFilters.d.ts +5 -0
  120. package/dist/esm/customHooks/logFilters.js +31 -0
  121. package/dist/esm/customHooks/networkLogger.d.ts +20 -0
  122. package/dist/esm/customHooks/networkLogger.js +264 -0
  123. package/dist/esm/customHooks/useAccordion.d.ts +17 -0
  124. package/dist/esm/customHooks/useAccordion.js +46 -0
  125. package/dist/esm/customHooks/webViewLogger.d.ts +22 -0
  126. package/dist/esm/customHooks/webViewLogger.js +365 -0
  127. package/dist/esm/helpers/index.d.ts +20 -0
  128. package/dist/esm/helpers/index.js +207 -0
  129. package/dist/esm/index.d.ts +7 -0
  130. package/dist/esm/index.js +2611 -0
  131. package/dist/esm/styles/AppColors.d.ts +27 -0
  132. package/dist/esm/styles/AppColors.js +27 -0
  133. package/dist/esm/styles/AppFonts.d.ts +7 -0
  134. package/dist/esm/styles/AppFonts.js +7 -0
  135. package/dist/esm/styles/index.d.ts +1488 -0
  136. package/dist/esm/styles/index.js +1355 -0
  137. package/dist/esm/types/index.d.ts +127 -0
  138. package/dist/esm/types/index.js +1 -0
  139. package/fonts/Inter/Inter.ttc +0 -0
  140. package/fonts/Inter/InterVariable-Italic.ttf +0 -0
  141. package/fonts/Inter/InterVariable.ttf +0 -0
  142. package/fonts/Inter/LICENSE.txt +92 -0
  143. package/fonts/Inter/extras/otf/Inter-Black.otf +0 -0
  144. package/fonts/Inter/extras/otf/Inter-BlackItalic.otf +0 -0
  145. package/fonts/Inter/extras/otf/Inter-Bold.otf +0 -0
  146. package/fonts/Inter/extras/otf/Inter-BoldItalic.otf +0 -0
  147. package/fonts/Inter/extras/otf/Inter-ExtraBold.otf +0 -0
  148. package/fonts/Inter/extras/otf/Inter-ExtraBoldItalic.otf +0 -0
  149. package/fonts/Inter/extras/otf/Inter-ExtraLight.otf +0 -0
  150. package/fonts/Inter/extras/otf/Inter-ExtraLightItalic.otf +0 -0
  151. package/fonts/Inter/extras/otf/Inter-Italic.otf +0 -0
  152. package/fonts/Inter/extras/otf/Inter-Light.otf +0 -0
  153. package/fonts/Inter/extras/otf/Inter-LightItalic.otf +0 -0
  154. package/fonts/Inter/extras/otf/Inter-Medium.otf +0 -0
  155. package/fonts/Inter/extras/otf/Inter-MediumItalic.otf +0 -0
  156. package/fonts/Inter/extras/otf/Inter-Regular.otf +0 -0
  157. package/fonts/Inter/extras/otf/Inter-SemiBold.otf +0 -0
  158. package/fonts/Inter/extras/otf/Inter-SemiBoldItalic.otf +0 -0
  159. package/fonts/Inter/extras/otf/Inter-Thin.otf +0 -0
  160. package/fonts/Inter/extras/otf/Inter-ThinItalic.otf +0 -0
  161. package/fonts/Inter/extras/otf/InterDisplay-Black.otf +0 -0
  162. package/fonts/Inter/extras/otf/InterDisplay-BlackItalic.otf +0 -0
  163. package/fonts/Inter/extras/otf/InterDisplay-Bold.otf +0 -0
  164. package/fonts/Inter/extras/otf/InterDisplay-BoldItalic.otf +0 -0
  165. package/fonts/Inter/extras/otf/InterDisplay-ExtraBold.otf +0 -0
  166. package/fonts/Inter/extras/otf/InterDisplay-ExtraBoldItalic.otf +0 -0
  167. package/fonts/Inter/extras/otf/InterDisplay-ExtraLight.otf +0 -0
  168. package/fonts/Inter/extras/otf/InterDisplay-ExtraLightItalic.otf +0 -0
  169. package/fonts/Inter/extras/otf/InterDisplay-Italic.otf +0 -0
  170. package/fonts/Inter/extras/otf/InterDisplay-Light.otf +0 -0
  171. package/fonts/Inter/extras/otf/InterDisplay-LightItalic.otf +0 -0
  172. package/fonts/Inter/extras/otf/InterDisplay-Medium.otf +0 -0
  173. package/fonts/Inter/extras/otf/InterDisplay-MediumItalic.otf +0 -0
  174. package/fonts/Inter/extras/otf/InterDisplay-Regular.otf +0 -0
  175. package/fonts/Inter/extras/otf/InterDisplay-SemiBold.otf +0 -0
  176. package/fonts/Inter/extras/otf/InterDisplay-SemiBoldItalic.otf +0 -0
  177. package/fonts/Inter/extras/otf/InterDisplay-Thin.otf +0 -0
  178. package/fonts/Inter/extras/otf/InterDisplay-ThinItalic.otf +0 -0
  179. package/fonts/Inter/extras/ttf/Inter-Black.ttf +0 -0
  180. package/fonts/Inter/extras/ttf/Inter-BlackItalic.ttf +0 -0
  181. package/fonts/Inter/extras/ttf/Inter-Bold.ttf +0 -0
  182. package/fonts/Inter/extras/ttf/Inter-BoldItalic.ttf +0 -0
  183. package/fonts/Inter/extras/ttf/Inter-ExtraBold.ttf +0 -0
  184. package/fonts/Inter/extras/ttf/Inter-ExtraBoldItalic.ttf +0 -0
  185. package/fonts/Inter/extras/ttf/Inter-ExtraLight.ttf +0 -0
  186. package/fonts/Inter/extras/ttf/Inter-ExtraLightItalic.ttf +0 -0
  187. package/fonts/Inter/extras/ttf/Inter-Italic.ttf +0 -0
  188. package/fonts/Inter/extras/ttf/Inter-Light.ttf +0 -0
  189. package/fonts/Inter/extras/ttf/Inter-LightItalic.ttf +0 -0
  190. package/fonts/Inter/extras/ttf/Inter-Medium.ttf +0 -0
  191. package/fonts/Inter/extras/ttf/Inter-MediumItalic.ttf +0 -0
  192. package/fonts/Inter/extras/ttf/Inter-Regular.ttf +0 -0
  193. package/fonts/Inter/extras/ttf/Inter-SemiBold.ttf +0 -0
  194. package/fonts/Inter/extras/ttf/Inter-SemiBoldItalic.ttf +0 -0
  195. package/fonts/Inter/extras/ttf/Inter-Thin.ttf +0 -0
  196. package/fonts/Inter/extras/ttf/Inter-ThinItalic.ttf +0 -0
  197. package/fonts/Inter/extras/ttf/InterDisplay-Black.ttf +0 -0
  198. package/fonts/Inter/extras/ttf/InterDisplay-BlackItalic.ttf +0 -0
  199. package/fonts/Inter/extras/ttf/InterDisplay-Bold.ttf +0 -0
  200. package/fonts/Inter/extras/ttf/InterDisplay-BoldItalic.ttf +0 -0
  201. package/fonts/Inter/extras/ttf/InterDisplay-ExtraBold.ttf +0 -0
  202. package/fonts/Inter/extras/ttf/InterDisplay-ExtraBoldItalic.ttf +0 -0
  203. package/fonts/Inter/extras/ttf/InterDisplay-ExtraLight.ttf +0 -0
  204. package/fonts/Inter/extras/ttf/InterDisplay-ExtraLightItalic.ttf +0 -0
  205. package/fonts/Inter/extras/ttf/InterDisplay-Italic.ttf +0 -0
  206. package/fonts/Inter/extras/ttf/InterDisplay-Light.ttf +0 -0
  207. package/fonts/Inter/extras/ttf/InterDisplay-LightItalic.ttf +0 -0
  208. package/fonts/Inter/extras/ttf/InterDisplay-Medium.ttf +0 -0
  209. package/fonts/Inter/extras/ttf/InterDisplay-MediumItalic.ttf +0 -0
  210. package/fonts/Inter/extras/ttf/InterDisplay-Regular.ttf +0 -0
  211. package/fonts/Inter/extras/ttf/InterDisplay-SemiBold.ttf +0 -0
  212. package/fonts/Inter/extras/ttf/InterDisplay-SemiBoldItalic.ttf +0 -0
  213. package/fonts/Inter/extras/ttf/InterDisplay-Thin.ttf +0 -0
  214. package/fonts/Inter/extras/ttf/InterDisplay-ThinItalic.ttf +0 -0
  215. package/fonts/Inter/extras/woff-hinted/Inter-Black.woff2 +0 -0
  216. package/fonts/Inter/extras/woff-hinted/Inter-BlackItalic.woff2 +0 -0
  217. package/fonts/Inter/extras/woff-hinted/Inter-Bold.woff2 +0 -0
  218. package/fonts/Inter/extras/woff-hinted/Inter-BoldItalic.woff2 +0 -0
  219. package/fonts/Inter/extras/woff-hinted/Inter-ExtraBold.woff2 +0 -0
  220. package/fonts/Inter/extras/woff-hinted/Inter-ExtraBoldItalic.woff2 +0 -0
  221. package/fonts/Inter/extras/woff-hinted/Inter-ExtraLight.woff2 +0 -0
  222. package/fonts/Inter/extras/woff-hinted/Inter-ExtraLightItalic.woff2 +0 -0
  223. package/fonts/Inter/extras/woff-hinted/Inter-Italic.woff2 +0 -0
  224. package/fonts/Inter/extras/woff-hinted/Inter-Light.woff2 +0 -0
  225. package/fonts/Inter/extras/woff-hinted/Inter-LightItalic.woff2 +0 -0
  226. package/fonts/Inter/extras/woff-hinted/Inter-Medium.woff2 +0 -0
  227. package/fonts/Inter/extras/woff-hinted/Inter-MediumItalic.woff2 +0 -0
  228. package/fonts/Inter/extras/woff-hinted/Inter-Regular.woff2 +0 -0
  229. package/fonts/Inter/extras/woff-hinted/Inter-SemiBold.woff2 +0 -0
  230. package/fonts/Inter/extras/woff-hinted/Inter-SemiBoldItalic.woff2 +0 -0
  231. package/fonts/Inter/extras/woff-hinted/Inter-Thin.woff2 +0 -0
  232. package/fonts/Inter/extras/woff-hinted/Inter-ThinItalic.woff2 +0 -0
  233. package/fonts/Inter/extras/woff-hinted/InterDisplay-Black.woff2 +0 -0
  234. package/fonts/Inter/extras/woff-hinted/InterDisplay-BlackItalic.woff2 +0 -0
  235. package/fonts/Inter/extras/woff-hinted/InterDisplay-Bold.woff2 +0 -0
  236. package/fonts/Inter/extras/woff-hinted/InterDisplay-BoldItalic.woff2 +0 -0
  237. package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraBold.woff2 +0 -0
  238. package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraBoldItalic.woff2 +0 -0
  239. package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraLight.woff2 +0 -0
  240. package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraLightItalic.woff2 +0 -0
  241. package/fonts/Inter/extras/woff-hinted/InterDisplay-Italic.woff2 +0 -0
  242. package/fonts/Inter/extras/woff-hinted/InterDisplay-Light.woff2 +0 -0
  243. package/fonts/Inter/extras/woff-hinted/InterDisplay-LightItalic.woff2 +0 -0
  244. package/fonts/Inter/extras/woff-hinted/InterDisplay-Medium.woff2 +0 -0
  245. package/fonts/Inter/extras/woff-hinted/InterDisplay-MediumItalic.woff2 +0 -0
  246. package/fonts/Inter/extras/woff-hinted/InterDisplay-Regular.woff2 +0 -0
  247. package/fonts/Inter/extras/woff-hinted/InterDisplay-SemiBold.woff2 +0 -0
  248. package/fonts/Inter/extras/woff-hinted/InterDisplay-SemiBoldItalic.woff2 +0 -0
  249. package/fonts/Inter/extras/woff-hinted/InterDisplay-Thin.woff2 +0 -0
  250. package/fonts/Inter/extras/woff-hinted/InterDisplay-ThinItalic.woff2 +0 -0
  251. package/fonts/Inter/help.txt +165 -0
  252. package/fonts/Inter/web/Inter-Black.woff2 +0 -0
  253. package/fonts/Inter/web/Inter-BlackItalic.woff2 +0 -0
  254. package/fonts/Inter/web/Inter-Bold.woff2 +0 -0
  255. package/fonts/Inter/web/Inter-BoldItalic.woff2 +0 -0
  256. package/fonts/Inter/web/Inter-ExtraBold.woff2 +0 -0
  257. package/fonts/Inter/web/Inter-ExtraBoldItalic.woff2 +0 -0
  258. package/fonts/Inter/web/Inter-ExtraLight.woff2 +0 -0
  259. package/fonts/Inter/web/Inter-ExtraLightItalic.woff2 +0 -0
  260. package/fonts/Inter/web/Inter-Italic.woff2 +0 -0
  261. package/fonts/Inter/web/Inter-Light.woff2 +0 -0
  262. package/fonts/Inter/web/Inter-LightItalic.woff2 +0 -0
  263. package/fonts/Inter/web/Inter-Medium.woff2 +0 -0
  264. package/fonts/Inter/web/Inter-MediumItalic.woff2 +0 -0
  265. package/fonts/Inter/web/Inter-Regular.woff2 +0 -0
  266. package/fonts/Inter/web/Inter-SemiBold.woff2 +0 -0
  267. package/fonts/Inter/web/Inter-SemiBoldItalic.woff2 +0 -0
  268. package/fonts/Inter/web/Inter-Thin.woff2 +0 -0
  269. package/fonts/Inter/web/Inter-ThinItalic.woff2 +0 -0
  270. package/fonts/Inter/web/InterDisplay-Black.woff2 +0 -0
  271. package/fonts/Inter/web/InterDisplay-BlackItalic.woff2 +0 -0
  272. package/fonts/Inter/web/InterDisplay-Bold.woff2 +0 -0
  273. package/fonts/Inter/web/InterDisplay-BoldItalic.woff2 +0 -0
  274. package/fonts/Inter/web/InterDisplay-ExtraBold.woff2 +0 -0
  275. package/fonts/Inter/web/InterDisplay-ExtraBoldItalic.woff2 +0 -0
  276. package/fonts/Inter/web/InterDisplay-ExtraLight.woff2 +0 -0
  277. package/fonts/Inter/web/InterDisplay-ExtraLightItalic.woff2 +0 -0
  278. package/fonts/Inter/web/InterDisplay-Italic.woff2 +0 -0
  279. package/fonts/Inter/web/InterDisplay-Light.woff2 +0 -0
  280. package/fonts/Inter/web/InterDisplay-LightItalic.woff2 +0 -0
  281. package/fonts/Inter/web/InterDisplay-Medium.woff2 +0 -0
  282. package/fonts/Inter/web/InterDisplay-MediumItalic.woff2 +0 -0
  283. package/fonts/Inter/web/InterDisplay-Regular.woff2 +0 -0
  284. package/fonts/Inter/web/InterDisplay-SemiBold.woff2 +0 -0
  285. package/fonts/Inter/web/InterDisplay-SemiBoldItalic.woff2 +0 -0
  286. package/fonts/Inter/web/InterDisplay-Thin.woff2 +0 -0
  287. package/fonts/Inter/web/InterDisplay-ThinItalic.woff2 +0 -0
  288. package/fonts/Inter/web/InterVariable-Italic.woff2 +0 -0
  289. package/fonts/Inter/web/InterVariable.woff2 +0 -0
  290. package/fonts/Inter/web/inter.css +148 -0
  291. package/package.json +52 -0
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { AnalyticsEvent } from '../types';
3
+ export declare function getEventColor(name: string): string;
4
+ export interface AnalyticsEventCardProps {
5
+ event: AnalyticsEvent & {
6
+ count?: number;
7
+ };
8
+ onPress: () => void;
9
+ isNew?: boolean;
10
+ searchStr?: string;
11
+ isFirst: boolean;
12
+ isLast: boolean;
13
+ msSincePrev?: number;
14
+ showTimestamp?: boolean;
15
+ computedScreenName?: string;
16
+ }
17
+ declare const AnalyticsEventCard: React.NamedExoticComponent<AnalyticsEventCardProps>;
18
+ export default AnalyticsEventCard;
@@ -0,0 +1,327 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.getEventColor = getEventColor;
40
+ const react_1 = __importStar(require("react"));
41
+ const react_native_1 = require("react-native");
42
+ const AppColors_1 = require("../styles/AppColors");
43
+ const AppFonts_1 = require("../styles/AppFonts");
44
+ const HighlightText_1 = __importDefault(require("./HighlightText"));
45
+ const TouchableScale_1 = __importDefault(require("./TouchableScale"));
46
+ // ─── Palette (Google Analytics colours) ───────────────────────────────────────
47
+ const EVENT_PALETTE = [
48
+ '#4285F4', // blue
49
+ '#34A853', // green
50
+ '#9C27B0', // purple
51
+ '#00897B', // teal
52
+ '#E53935', // red
53
+ '#F57C00', // orange
54
+ '#1565C0', // dark blue
55
+ '#2E7D32', // dark green
56
+ ];
57
+ function getEventColor(name) {
58
+ let hash = 0;
59
+ for (let i = 0; i < name.length; i++) {
60
+ hash = (hash * 31 + name.charCodeAt(i)) | 0;
61
+ }
62
+ return EVENT_PALETTE[Math.abs(hash) % EVENT_PALETTE.length];
63
+ }
64
+ // ─── Helpers ──────────────────────────────────────────────────────────────────
65
+ function formatTime(ts) {
66
+ const d = new Date(ts);
67
+ const hh = String(d.getHours()).padStart(2, '0');
68
+ const mm = String(d.getMinutes()).padStart(2, '0');
69
+ const ss = String(d.getSeconds()).padStart(2, '0');
70
+ const ms = String(d.getMilliseconds()).padStart(3, '0');
71
+ return `${hh}:${mm}:${ss}.${ms}`;
72
+ }
73
+ function formatGap(ms) {
74
+ if (ms < 1000)
75
+ return `+${ms}ms`;
76
+ const s = Math.round(ms / 1000);
77
+ if (s < 60)
78
+ return `+${s}s`;
79
+ const m = Math.floor(s / 60);
80
+ const rem = s % 60;
81
+ return rem > 0 ? `+${m}m ${rem}s` : `+${m}m`;
82
+ }
83
+ // ─── Component ────────────────────────────────────────────────────────────────
84
+ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ event, onPress, isNew = false, searchStr = '', msSincePrev, computedScreenName, }) {
85
+ const color = getEventColor(event.name);
86
+ const paramCount = event.params ? Object.keys(event.params).length : 0;
87
+ const userPropCount = event.userProperties
88
+ ? Object.keys(event.userProperties).length
89
+ : 0;
90
+ // Flash animation for newly logged events
91
+ const flashOpacity = (0, react_1.useRef)(new react_native_1.Animated.Value(isNew ? 1 : 0)).current;
92
+ (0, react_1.useEffect)(() => {
93
+ if (isNew) {
94
+ react_native_1.Animated.timing(flashOpacity, {
95
+ toValue: 0,
96
+ duration: 1200,
97
+ useNativeDriver: true,
98
+ }).start();
99
+ }
100
+ }, [isNew]);
101
+ const showGap = msSincePrev != null && msSincePrev >= 2000;
102
+ return (<react_native_1.View style={cardStyles.container}>
103
+ {/* ── Gap Indicator ─────────────────────────────────────────────────── */}
104
+ {showGap && (<react_native_1.View style={cardStyles.gapContainer}>
105
+ <react_native_1.Text style={cardStyles.gapText}>{formatGap(msSincePrev)}</react_native_1.Text>
106
+ </react_native_1.View>)}
107
+
108
+ {/* ── Main Card ─────────────────────────────────────────────────────── */}
109
+ <TouchableScale_1.default onPress={onPress} style={cardStyles.modernCard}>
110
+ <react_native_1.Animated.View style={[
111
+ react_native_1.StyleSheet.absoluteFill,
112
+ {
113
+ backgroundColor: color,
114
+ opacity: flashOpacity.interpolate({
115
+ inputRange: [0, 1],
116
+ outputRange: [0, 0.08],
117
+ }),
118
+ },
119
+ ]}/>
120
+
121
+ {/* Top Row: Event Name & Timestamp */}
122
+ <react_native_1.View style={cardStyles.cardHeader}>
123
+ <react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
124
+ <react_native_1.View style={[
125
+ cardStyles.nameBadge,
126
+ { backgroundColor: `${color}1A`, borderColor: `${color}30` },
127
+ ]}>
128
+ <HighlightText_1.default text={event.name} search={searchStr} style={[cardStyles.eventName, { color: color }]} highlightStyle={cardStyles.highlight}/>
129
+ </react_native_1.View>
130
+
131
+ {event.count !== undefined ? (<react_native_1.View style={[
132
+ cardStyles.duplicateBadge,
133
+ event.count === 1 && {
134
+ backgroundColor: AppColors_1.AppColors.grayBackground,
135
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
136
+ },
137
+ ]}>
138
+ <react_native_1.Text style={[
139
+ cardStyles.duplicateText,
140
+ event.count === 1 && { color: AppColors_1.AppColors.grayTextStrong },
141
+ ]}>
142
+ {event.count}×{event.count > 1 ? ' Duplicate' : ''}
143
+ </react_native_1.Text>
144
+ </react_native_1.View>) : null}
145
+ </react_native_1.View>
146
+ <react_native_1.Text style={cardStyles.timestamp}>
147
+ {formatTime(event.timestamp)}
148
+ </react_native_1.Text>
149
+ </react_native_1.View>
150
+
151
+ {/* Bottom Row: Metadata Chips & Sparkline */}
152
+ <react_native_1.View style={cardStyles.cardBody}>
153
+ <react_native_1.View style={cardStyles.chipsRow}>
154
+ {computedScreenName ||
155
+ event.screenName ||
156
+ event.params?.firebase_screen ||
157
+ event.params?.screen_name ||
158
+ event.params?.firebase_screen_class ? (<react_native_1.View style={cardStyles.chip}>
159
+ <react_native_1.View style={[cardStyles.screenDot, { backgroundColor: color }]}/>
160
+ <react_native_1.Text style={cardStyles.chipText} numberOfLines={1}>
161
+ {computedScreenName ||
162
+ event.screenName ||
163
+ event.params?.firebase_screen ||
164
+ event.params?.screen_name ||
165
+ event.params?.firebase_screen_class}
166
+ </react_native_1.Text>
167
+ </react_native_1.View>) : null}
168
+
169
+ <react_native_1.View style={cardStyles.chip}>
170
+ <react_native_1.Text style={cardStyles.chipText}>
171
+ {'{} '} {paramCount} params
172
+ </react_native_1.Text>
173
+ </react_native_1.View>
174
+
175
+ {userPropCount > 0 && (<react_native_1.View style={cardStyles.chip}>
176
+ <react_native_1.Text style={cardStyles.chipText}>★ {userPropCount} props</react_native_1.Text>
177
+ </react_native_1.View>)}
178
+ </react_native_1.View>
179
+
180
+ {/* Inline Mini Graph for E-commerce Items */}
181
+ {(() => {
182
+ const items = event.params?.items;
183
+ if (!Array.isArray(items) || items.length === 0)
184
+ return null;
185
+ const prices = items
186
+ .map((item) => parseFloat(item.price || item.value))
187
+ .filter(p => !isNaN(p));
188
+ if (prices.length === 0)
189
+ return null;
190
+ const max = Math.max(...prices);
191
+ if (max === 0)
192
+ return null;
193
+ return (<react_native_1.View style={cardStyles.miniGraphWrapper}>
194
+ {prices.map((val, idx) => {
195
+ const hPct = (val / max) * 100;
196
+ return (<react_native_1.View key={idx} style={[
197
+ cardStyles.miniGraphBar,
198
+ {
199
+ height: `${Math.max(15, hPct)}%`,
200
+ backgroundColor: color,
201
+ },
202
+ ]}/>);
203
+ })}
204
+ </react_native_1.View>);
205
+ })()}
206
+ </react_native_1.View>
207
+ </TouchableScale_1.default>
208
+ </react_native_1.View>);
209
+ });
210
+ // ─── Styles ───────────────────────────────────────────────────────────────────
211
+ const cardStyles = react_native_1.StyleSheet.create({
212
+ container: {
213
+ paddingHorizontal: 16,
214
+ paddingVertical: 4,
215
+ },
216
+ gapContainer: {
217
+ alignItems: 'center',
218
+ marginVertical: 4,
219
+ },
220
+ gapText: {
221
+ fontFamily: AppFonts_1.AppFonts.interMedium,
222
+ fontSize: 10,
223
+ color: AppColors_1.AppColors.grayTextWeak,
224
+ letterSpacing: 0.5,
225
+ },
226
+ modernCard: {
227
+ backgroundColor: '#FFFFFF',
228
+ borderRadius: 8,
229
+ borderWidth: 1,
230
+ borderColor: '#EFEFEF',
231
+ padding: 12,
232
+ shadowColor: '#000',
233
+ shadowOpacity: 0.03,
234
+ shadowRadius: 3,
235
+ shadowOffset: { width: 0, height: 1 },
236
+ elevation: 1,
237
+ overflow: 'hidden',
238
+ },
239
+ cardHeader: {
240
+ flexDirection: 'row',
241
+ justifyContent: 'space-between',
242
+ alignItems: 'center',
243
+ marginBottom: 8,
244
+ },
245
+ nameBadge: {
246
+ paddingHorizontal: 8,
247
+ paddingVertical: 4,
248
+ borderRadius: 6,
249
+ borderWidth: 1,
250
+ },
251
+ eventName: {
252
+ fontFamily: AppFonts_1.AppFonts.interBold,
253
+ fontSize: 12,
254
+ letterSpacing: 0.2,
255
+ },
256
+ timestamp: {
257
+ fontFamily: AppFonts_1.AppFonts.interMedium,
258
+ fontSize: 11,
259
+ color: AppColors_1.AppColors.grayTextWeak,
260
+ },
261
+ highlight: {
262
+ backgroundColor: '#FFE44D',
263
+ color: AppColors_1.AppColors.primaryBlack,
264
+ borderRadius: 2,
265
+ },
266
+ cardBody: {
267
+ flexDirection: 'row',
268
+ alignItems: 'flex-end',
269
+ justifyContent: 'space-between',
270
+ },
271
+ chipsRow: {
272
+ flexDirection: 'row',
273
+ alignItems: 'center',
274
+ flexWrap: 'wrap',
275
+ gap: 8,
276
+ flex: 1,
277
+ },
278
+ chip: {
279
+ flexDirection: 'row',
280
+ alignItems: 'center',
281
+ backgroundColor: AppColors_1.AppColors.grayBackground,
282
+ paddingHorizontal: 6,
283
+ paddingVertical: 3,
284
+ borderRadius: 4,
285
+ borderWidth: 1,
286
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
287
+ },
288
+ chipText: {
289
+ fontFamily: AppFonts_1.AppFonts.interMedium,
290
+ fontSize: 10,
291
+ color: AppColors_1.AppColors.grayText,
292
+ },
293
+ screenDot: {
294
+ width: 6,
295
+ height: 6,
296
+ borderRadius: 3,
297
+ marginRight: 4,
298
+ },
299
+ duplicateBadge: {
300
+ backgroundColor: '#FFE4E6',
301
+ borderColor: '#FCC2D7',
302
+ borderWidth: 1,
303
+ paddingHorizontal: 6,
304
+ paddingVertical: 3,
305
+ borderRadius: 4,
306
+ },
307
+ duplicateText: {
308
+ fontFamily: AppFonts_1.AppFonts.interBold,
309
+ fontSize: 9,
310
+ color: '#E11D48',
311
+ textTransform: 'uppercase',
312
+ letterSpacing: 0.5,
313
+ },
314
+ miniGraphWrapper: {
315
+ flexDirection: 'row',
316
+ alignItems: 'flex-end',
317
+ height: 18,
318
+ gap: 2,
319
+ marginLeft: 12,
320
+ },
321
+ miniGraphBar: {
322
+ width: 4,
323
+ borderRadius: 2,
324
+ opacity: 0.7,
325
+ },
326
+ });
327
+ exports.default = AnalyticsEventCard;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { AnalyticsEvent } from '../types';
3
+ interface Props {
4
+ event: AnalyticsEvent;
5
+ accentColor: string;
6
+ }
7
+ declare const AnalyticsGraph: ({ event, accentColor }: Props) => React.JSX.Element;
8
+ export default AnalyticsGraph;