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,416 @@
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
+ const react_1 = __importDefault(require("react"));
40
+ const react_native_1 = require("react-native");
41
+ const react_native_svg_1 = __importStar(require("react-native-svg"));
42
+ const AppColors_1 = require("../styles/AppColors");
43
+ const AppFonts_1 = require("../styles/AppFonts");
44
+ const BAR_HEIGHT = 24;
45
+ const PADDING_Y = 12;
46
+ const AnalyticsGraph = ({ event, accentColor }) => {
47
+ const params = event.params || {};
48
+ // 1. Check for E-commerce items array
49
+ const itemsArray = Array.isArray(params.items) ? params.items : null;
50
+ const filteredItems = itemsArray?.filter((item) => typeof item.price === 'number') || [];
51
+ // 2. Discover root-level numeric fields (exclude ids)
52
+ const rootNumericKeys = [];
53
+ Object.entries(params).forEach(([k, v]) => {
54
+ if (typeof v === 'number' &&
55
+ !k.toLowerCase().includes('id') &&
56
+ !k.toLowerCase().includes('timestamp')) {
57
+ rootNumericKeys.push({ key: k, value: v });
58
+ }
59
+ });
60
+ // 3. Discover dates (YYYY-MM-DD format commonly used in booking/flights)
61
+ const dateKeys = [];
62
+ Object.entries(params).forEach(([k, v]) => {
63
+ if (typeof v === 'string' &&
64
+ v.length >= 10 &&
65
+ /^\d{4}-\d{2}-\d{2}/.test(v)) {
66
+ const d = new Date(v);
67
+ if (!isNaN(d.getTime())) {
68
+ dateKeys.push({ key: k, date: d });
69
+ }
70
+ }
71
+ });
72
+ // 4. Calculate parameter types
73
+ const paramTypes = { string: 0, number: 0, boolean: 0, object: 0 };
74
+ const strings = [];
75
+ Object.entries(params).forEach(([k, v]) => {
76
+ const t = typeof v;
77
+ if (t === 'string') {
78
+ paramTypes.string++;
79
+ strings.push({ label: k, value: v.length });
80
+ }
81
+ else if (t === 'number') {
82
+ paramTypes.number++;
83
+ }
84
+ else if (t === 'boolean') {
85
+ paramTypes.boolean++;
86
+ }
87
+ else if (t === 'object' && v !== null) {
88
+ paramTypes.object++;
89
+ }
90
+ });
91
+ const typeData = [
92
+ { label: 'Strings', value: paramTypes.string, color: AppColors_1.AppColors.purple },
93
+ { label: 'Numbers', value: paramTypes.number, color: AppColors_1.AppColors.skyBlue },
94
+ { label: 'Booleans', value: paramTypes.boolean, color: '#F59E0B' }, // Amber
95
+ { label: 'Objects', value: paramTypes.object, color: AppColors_1.AppColors.greenColor },
96
+ ].filter(d => d.value > 0);
97
+ strings.sort((a, b) => b.value - a.value);
98
+ const topStrings = strings.slice(0, 5);
99
+ const hasItemsChart = filteredItems.length > 0;
100
+ const hasRootNumericChart = rootNumericKeys.length > 0;
101
+ const hasDatesChart = dateKeys.length > 0;
102
+ const hasStringsChart = topStrings.length > 0;
103
+ const hasTypeData = typeData.length > 0;
104
+ const screenWidth = react_native_1.Dimensions.get('window').width - 60; // Padding adjustments
105
+ const rightMargin = 40; // Space for labels at the end of the bar
106
+ const maxBarWidth = screenWidth - rightMargin;
107
+ return (<react_native_1.View style={graphStyles.container}>
108
+ <react_native_1.Text style={graphStyles.headerTitle}>Data Visualization</react_native_1.Text>
109
+
110
+ {hasTypeData && (<react_native_1.View style={graphStyles.chartBlock}>
111
+ <react_native_1.Text style={graphStyles.chartTitle}>Data Types Breakdown</react_native_1.Text>
112
+ <DonutChart data={typeData}/>
113
+ </react_native_1.View>)}
114
+
115
+ {hasStringsChart && (<react_native_1.View style={graphStyles.chartBlock}>
116
+ <react_native_1.Text style={graphStyles.chartTitle}>Highest Payload Strings</react_native_1.Text>
117
+ <BarChart data={topStrings} accentColor={AppColors_1.AppColors.purple} maxBarWidth={maxBarWidth} isGradient/>
118
+ </react_native_1.View>)}
119
+
120
+ {hasRootNumericChart && (<react_native_1.View style={graphStyles.chartBlock}>
121
+ <react_native_1.Text style={graphStyles.chartTitle}>Top-Level Metrics</react_native_1.Text>
122
+ <GaugeChart data={rootNumericKeys.map(d => ({ label: d.key, value: d.value }))} accentColor={accentColor}/>
123
+ </react_native_1.View>)}
124
+
125
+ {hasDatesChart && (<react_native_1.View style={graphStyles.chartBlock}>
126
+ <react_native_1.Text style={graphStyles.chartTitle}>Important Dates</react_native_1.Text>
127
+ <CalendarChart data={dateKeys.map(d => ({ label: d.key, date: d.date }))} accentColor={accentColor}/>
128
+ </react_native_1.View>)}
129
+
130
+ {hasItemsChart && (<react_native_1.View style={graphStyles.chartBlock}>
131
+ <react_native_1.Text style={graphStyles.chartTitle}>Item Prices</react_native_1.Text>
132
+ <BarChart data={filteredItems.map((item, i) => ({
133
+ label: item.item_name || item.item_id || `Item ${i + 1}`,
134
+ value: item.price,
135
+ }))} accentColor={AppColors_1.AppColors.successGreen || '#22C55E'} maxBarWidth={maxBarWidth} isGradient={false}/>
136
+ </react_native_1.View>)}
137
+ </react_native_1.View>);
138
+ };
139
+ // --- Donut Chart Helpers ---
140
+ const polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
141
+ const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0;
142
+ return {
143
+ x: centerX + radius * Math.cos(angleInRadians),
144
+ y: centerY + radius * Math.sin(angleInRadians),
145
+ };
146
+ };
147
+ const getPiePath = (x, y, radius, innerRadius, startAngle, endAngle) => {
148
+ const start = polarToCartesian(x, y, radius, endAngle);
149
+ const end = polarToCartesian(x, y, radius, startAngle);
150
+ const startInner = polarToCartesian(x, y, innerRadius, endAngle);
151
+ const endInner = polarToCartesian(x, y, innerRadius, startAngle);
152
+ const largeArcFlag = endAngle - startAngle <= 180 ? '0' : '1';
153
+ return `
154
+ M ${start.x} ${start.y}
155
+ A ${radius} ${radius} 0 ${largeArcFlag} 0 ${end.x} ${end.y}
156
+ L ${endInner.x} ${endInner.y}
157
+ A ${innerRadius} ${innerRadius} 0 ${largeArcFlag} 1 ${startInner.x} ${startInner.y}
158
+ Z
159
+ `;
160
+ };
161
+ const DonutChart = ({ data, }) => {
162
+ const total = data.reduce((sum, d) => sum + d.value, 0);
163
+ if (total === 0)
164
+ return null;
165
+ let currentAngle = 0;
166
+ const radius = 50;
167
+ const innerRadius = 30;
168
+ const center = 60;
169
+ return (<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center' }}>
170
+ <react_native_svg_1.default width="120" height="120" viewBox="0 0 120 120">
171
+ {data.map((d, i) => {
172
+ if (d.value === 0)
173
+ return null;
174
+ const angle = (d.value / total) * 360;
175
+ const startAngle = currentAngle;
176
+ const endAngle = currentAngle + angle;
177
+ currentAngle += angle;
178
+ if (angle === 360) {
179
+ return (<react_1.default.Fragment key={i}>
180
+ <react_native_svg_1.Circle cx={center} cy={center} r={radius} fill={d.color}/>
181
+ <react_native_svg_1.Circle cx={center} cy={center} r={innerRadius} fill={AppColors_1.AppColors.primaryLight}/>
182
+ </react_1.default.Fragment>);
183
+ }
184
+ const path = getPiePath(center, center, radius, innerRadius, startAngle, endAngle);
185
+ return <react_native_svg_1.Path key={i} d={path} fill={d.color}/>;
186
+ })}
187
+ </react_native_svg_1.default>
188
+ <react_native_1.View style={{ marginLeft: 16, flex: 1, gap: 6 }}>
189
+ {data.map((d, i) => {
190
+ if (d.value === 0)
191
+ return null;
192
+ return (<react_native_1.View key={i} style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
193
+ <react_native_1.View style={{
194
+ width: 10,
195
+ height: 10,
196
+ borderRadius: 5,
197
+ backgroundColor: d.color,
198
+ }}/>
199
+ <react_native_1.Text style={{
200
+ fontFamily: AppFonts_1.AppFonts.interMedium,
201
+ fontSize: 11,
202
+ color: AppColors_1.AppColors.grayTextStrong,
203
+ }}>
204
+ {d.label} ({d.value})
205
+ </react_native_1.Text>
206
+ </react_native_1.View>);
207
+ })}
208
+ </react_native_1.View>
209
+ </react_native_1.View>);
210
+ };
211
+ const GaugeChart = ({ data, accentColor, }) => {
212
+ const maxVal = Math.max(...data.map(d => Math.abs(d.value)), 1);
213
+ const radius = 26;
214
+ const stroke = 5;
215
+ const circumference = 2 * Math.PI * radius;
216
+ return (<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
217
+ gap: 16,
218
+ paddingRight: 16,
219
+ paddingTop: 6,
220
+ paddingBottom: 6,
221
+ }}>
222
+ {data.map((d, i) => {
223
+ const fillPct = Math.min(Math.abs(d.value) / maxVal, 1);
224
+ const strokeDashoffset = Math.max(circumference - fillPct * circumference, 0.001); // avoid exact 0
225
+ return (<react_native_1.View key={d.label} style={{ alignItems: 'center', width: 70 }}>
226
+ <react_native_svg_1.default width="60" height="60" viewBox="0 0 60 60">
227
+ <react_native_svg_1.Circle cx="30" cy="30" r={radius} stroke="#F3F4F6" strokeWidth={stroke} fill="none"/>
228
+ <react_native_svg_1.Circle cx="30" cy="30" r={radius} stroke={accentColor} strokeWidth={stroke} fill="none" strokeLinecap="round" strokeDasharray={circumference} strokeDashoffset={strokeDashoffset} rotation="-90" origin="30, 30"/>
229
+ </react_native_svg_1.default>
230
+ <react_native_1.View style={{
231
+ position: 'absolute',
232
+ top: 20,
233
+ height: 20,
234
+ width: 60,
235
+ justifyContent: 'center',
236
+ alignItems: 'center',
237
+ }}>
238
+ <react_native_1.Text style={{
239
+ fontFamily: AppFonts_1.AppFonts.interBold,
240
+ fontSize: 13,
241
+ color: AppColors_1.AppColors.primaryBlack,
242
+ textAlign: 'center',
243
+ }}>
244
+ {d.value >= 1000 ? (d.value / 1000).toFixed(1) + 'k' : d.value}
245
+ </react_native_1.Text>
246
+ </react_native_1.View>
247
+ <react_native_1.Text style={{
248
+ fontFamily: AppFonts_1.AppFonts.interMedium,
249
+ fontSize: 10,
250
+ color: AppColors_1.AppColors.grayTextWeak,
251
+ marginTop: 6,
252
+ textAlign: 'center',
253
+ }} numberOfLines={1}>
254
+ {d.label}
255
+ </react_native_1.Text>
256
+ </react_native_1.View>);
257
+ })}
258
+ </react_native_1.ScrollView>);
259
+ };
260
+ const CalendarChart = ({ data, accentColor, }) => {
261
+ const months = [
262
+ 'Jan',
263
+ 'Feb',
264
+ 'Mar',
265
+ 'Apr',
266
+ 'May',
267
+ 'Jun',
268
+ 'Jul',
269
+ 'Aug',
270
+ 'Sep',
271
+ 'Oct',
272
+ 'Nov',
273
+ 'Dec',
274
+ ];
275
+ return (<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
276
+ gap: 16,
277
+ paddingRight: 16,
278
+ paddingTop: 6,
279
+ paddingBottom: 6,
280
+ }}>
281
+ {data.map((d, i) => {
282
+ const monthText = months[d.date.getMonth()];
283
+ const dayText = d.date.getDate();
284
+ const yearText = d.date.getFullYear();
285
+ return (<react_native_1.View key={d.label + i} style={{ width: 70, alignItems: 'center' }}>
286
+ <react_native_1.View style={{
287
+ width: 58,
288
+ height: 62,
289
+ backgroundColor: '#FFFFFF',
290
+ borderRadius: 8,
291
+ borderWidth: 1,
292
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
293
+ overflow: 'hidden',
294
+ shadowColor: '#000',
295
+ shadowOpacity: 0.05,
296
+ shadowRadius: 4,
297
+ shadowOffset: { width: 0, height: 2 },
298
+ elevation: 2,
299
+ }}>
300
+ {/* Calendar Header with Accent Color */}
301
+ <react_native_1.View style={{
302
+ backgroundColor: accentColor,
303
+ height: 18,
304
+ justifyContent: 'center',
305
+ alignItems: 'center',
306
+ }}>
307
+ <react_native_1.Text style={{
308
+ fontFamily: AppFonts_1.AppFonts.interBold,
309
+ fontSize: 9,
310
+ color: '#FFF',
311
+ textTransform: 'uppercase',
312
+ letterSpacing: 0.5,
313
+ }}>
314
+ {monthText} {yearText}
315
+ </react_native_1.Text>
316
+ </react_native_1.View>
317
+ {/* Calendar Body */}
318
+ <react_native_1.View style={{
319
+ flex: 1,
320
+ justifyContent: 'center',
321
+ alignItems: 'center',
322
+ backgroundColor: '#FAFAFA',
323
+ }}>
324
+ <react_native_1.Text style={{
325
+ fontFamily: AppFonts_1.AppFonts.interBold,
326
+ fontSize: 24,
327
+ color: AppColors_1.AppColors.primaryBlack,
328
+ }}>
329
+ {dayText}
330
+ </react_native_1.Text>
331
+ </react_native_1.View>
332
+ </react_native_1.View>
333
+
334
+ <react_native_1.Text style={{
335
+ fontFamily: AppFonts_1.AppFonts.interMedium,
336
+ fontSize: 10,
337
+ color: AppColors_1.AppColors.grayTextWeak,
338
+ marginTop: 8,
339
+ textAlign: 'center',
340
+ }} numberOfLines={2}>
341
+ {d.label.replace(/_/g, ' ')}
342
+ </react_native_1.Text>
343
+ </react_native_1.View>);
344
+ })}
345
+ </react_native_1.ScrollView>);
346
+ };
347
+ const BarChart = ({ data, accentColor, maxBarWidth, isGradient = false, }) => {
348
+ const maxVal = Math.max(...data.map(d => d.value), 1);
349
+ const chartHeight = data.length * (BAR_HEIGHT + PADDING_Y) + 10;
350
+ return (<react_native_1.View style={graphStyles.svgContainer}>
351
+ <react_native_svg_1.default width="100%" height={chartHeight}>
352
+ <react_native_svg_1.Defs>
353
+ <react_native_svg_1.LinearGradient id="barGrad" x1="0" y1="0" x2="1" y2="0">
354
+ <react_native_svg_1.Stop offset="0" stopColor={accentColor} stopOpacity="0.6"/>
355
+ <react_native_svg_1.Stop offset="1" stopColor={accentColor} stopOpacity="1"/>
356
+ </react_native_svg_1.LinearGradient>
357
+ </react_native_svg_1.Defs>
358
+ {data.map((d, i) => {
359
+ const y = i * (BAR_HEIGHT + PADDING_Y);
360
+ const barWidth = Math.max((d.value / maxVal) * maxBarWidth, 2);
361
+ return (<react_1.default.Fragment key={d.label}>
362
+ {/* Label above bar */}
363
+ <react_native_svg_1.Text x={0} y={y + 12} fill={AppColors_1.AppColors.grayTextStrong} fontSize="11" fontFamily={AppFonts_1.AppFonts.interMedium}>
364
+ {d.label}
365
+ </react_native_svg_1.Text>
366
+
367
+ {/* Background trace line */}
368
+ <react_native_svg_1.Line x1={0} y1={y + 24} x2={maxBarWidth} y2={y + 24} stroke={AppColors_1.AppColors.grayBorderSecondary} strokeDasharray="4"/>
369
+
370
+ {/* The actual Bar */}
371
+ <react_native_svg_1.Rect x={0} y={y + 16} width={barWidth} height={14} fill={isGradient ? 'url(#barGrad)' : accentColor} rx={4} opacity={0.85}/>
372
+
373
+ {/* Value Text at the end of the bar */}
374
+ <react_native_svg_1.Text x={barWidth + 6} y={y + 26} fill={AppColors_1.AppColors.primaryBlack} fontSize="11" fontFamily={AppFonts_1.AppFonts.interBold}>
375
+ {d.value}
376
+ </react_native_svg_1.Text>
377
+ </react_1.default.Fragment>);
378
+ })}
379
+ </react_native_svg_1.default>
380
+ </react_native_1.View>);
381
+ };
382
+ const graphStyles = react_native_1.StyleSheet.create({
383
+ container: {
384
+ backgroundColor: AppColors_1.AppColors.primaryLight,
385
+ borderWidth: 1,
386
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
387
+ borderRadius: 12,
388
+ marginBottom: 10,
389
+ padding: 14,
390
+ overflow: 'hidden',
391
+ },
392
+ headerTitle: {
393
+ fontFamily: AppFonts_1.AppFonts.interBold,
394
+ color: AppColors_1.AppColors.primaryBlack,
395
+ fontSize: 14,
396
+ marginBottom: 12,
397
+ borderBottomWidth: 1,
398
+ borderBottomColor: AppColors_1.AppColors.dividerColor,
399
+ paddingBottom: 8,
400
+ },
401
+ chartBlock: {
402
+ marginBottom: 16,
403
+ },
404
+ chartTitle: {
405
+ fontFamily: AppFonts_1.AppFonts.interMedium,
406
+ color: AppColors_1.AppColors.grayTextWeak,
407
+ fontSize: 12,
408
+ textTransform: 'uppercase',
409
+ letterSpacing: 0.5,
410
+ marginBottom: 8,
411
+ },
412
+ svgContainer: {
413
+ marginTop: 4,
414
+ },
415
+ });
416
+ exports.default = AnalyticsGraph;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface CodeSnippetProps {
3
+ code: string;
4
+ language: 'html' | 'css' | 'javascript';
5
+ search?: string;
6
+ }
7
+ declare const CodeSnippet: React.FC<CodeSnippetProps>;
8
+ export default CodeSnippet;