react-native-inapp-inspector 2.5.11 → 2.5.12

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 (333) hide show
  1. package/README.ar.md +0 -8
  2. package/README.de.md +0 -8
  3. package/README.es.md +0 -8
  4. package/README.fr.md +0 -8
  5. package/README.hi.md +0 -8
  6. package/README.ja.md +0 -8
  7. package/README.ko.md +0 -8
  8. package/README.md +54 -26
  9. package/README.pt-BR.md +0 -8
  10. package/README.ru.md +0 -8
  11. package/README.zh-CN.md +0 -8
  12. package/dist/commonjs/components/ConsoleLogCard.js +32 -26
  13. package/dist/commonjs/components/Inspector/AboutModal.js +1 -4
  14. package/dist/commonjs/components/Inspector/ConsoleTab.js +19 -14
  15. package/dist/commonjs/components/Inspector/InspectorHeader.js +6 -6
  16. package/dist/commonjs/components/Inspector/MainScreen.js +9 -6
  17. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +187 -90
  18. package/dist/commonjs/components/Inspector/NetworkDetail.js +11 -8
  19. package/dist/commonjs/components/Inspector/NetworkTab.js +31 -32
  20. package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +2 -0
  21. package/dist/commonjs/components/Inspector/PerformanceTab.js +652 -0
  22. package/dist/commonjs/components/Inspector/SettingsPanel.js +256 -249
  23. package/dist/commonjs/components/Inspector/TabBar.js +17 -16
  24. package/dist/commonjs/components/LogCard.js +11 -8
  25. package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
  26. package/dist/commonjs/components/NetworkIcons.js +35 -3
  27. package/dist/commonjs/constants/index.d.ts +1 -0
  28. package/dist/commonjs/constants/index.js +1 -1
  29. package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
  30. package/dist/commonjs/constants/telemetryConfig.js +1 -1
  31. package/dist/commonjs/constants/version.d.ts +1 -1
  32. package/dist/commonjs/constants/version.js +1 -1
  33. package/dist/commonjs/helpers/index.d.ts +3 -0
  34. package/dist/commonjs/helpers/index.js +8 -6
  35. package/dist/commonjs/helpers/performanceSampler.d.ts +88 -0
  36. package/dist/commonjs/helpers/performanceSampler.js +1 -0
  37. package/dist/commonjs/helpers/remoteConfig.d.ts +0 -2
  38. package/dist/commonjs/helpers/remoteConfig.js +1 -1
  39. package/dist/commonjs/i18n/locales/ar.json +1 -1
  40. package/dist/commonjs/i18n/locales/bn.json +1 -1
  41. package/dist/commonjs/i18n/locales/de.json +1 -1
  42. package/dist/commonjs/i18n/locales/en.json +1 -1
  43. package/dist/commonjs/i18n/locales/es.json +1 -1
  44. package/dist/commonjs/i18n/locales/fr.json +1 -1
  45. package/dist/commonjs/i18n/locales/gu.json +1 -1
  46. package/dist/commonjs/i18n/locales/hi.json +1 -1
  47. package/dist/commonjs/i18n/locales/id.json +1 -1
  48. package/dist/commonjs/i18n/locales/it.json +1 -1
  49. package/dist/commonjs/i18n/locales/ja.json +1 -1
  50. package/dist/commonjs/i18n/locales/kn.json +1 -1
  51. package/dist/commonjs/i18n/locales/ko.json +1 -1
  52. package/dist/commonjs/i18n/locales/ml.json +1 -1
  53. package/dist/commonjs/i18n/locales/mr.json +1 -1
  54. package/dist/commonjs/i18n/locales/nl.json +1 -1
  55. package/dist/commonjs/i18n/locales/pa.json +1 -1
  56. package/dist/commonjs/i18n/locales/pl.json +1 -1
  57. package/dist/commonjs/i18n/locales/pt.json +1 -1
  58. package/dist/commonjs/i18n/locales/ru.json +1 -1
  59. package/dist/commonjs/i18n/locales/ta.json +1 -1
  60. package/dist/commonjs/i18n/locales/te.json +1 -1
  61. package/dist/commonjs/i18n/locales/tr.json +1 -1
  62. package/dist/commonjs/i18n/locales/vi.json +1 -1
  63. package/dist/commonjs/i18n/locales/zh.json +1 -1
  64. package/dist/commonjs/index.d.ts +3 -3
  65. package/dist/commonjs/index.js +3 -3
  66. package/dist/commonjs/styles/index.js +1 -1
  67. package/dist/commonjs/types/enums.d.ts +1 -0
  68. package/dist/commonjs/types/enums.js +1 -1
  69. package/dist/commonjs/types/interfaces.d.ts +8 -0
  70. package/dist/esm/components/ConsoleLogCard.js +67 -61
  71. package/dist/esm/components/Inspector/AboutModal.js +14 -17
  72. package/dist/esm/components/Inspector/ConsoleTab.js +33 -28
  73. package/dist/esm/components/Inspector/InspectorHeader.js +6 -6
  74. package/dist/esm/components/Inspector/MainScreen.js +61 -58
  75. package/dist/esm/components/Inspector/MediaGalleryTab.js +254 -157
  76. package/dist/esm/components/Inspector/NetworkDetail.js +62 -59
  77. package/dist/esm/components/Inspector/NetworkTab.js +101 -102
  78. package/dist/esm/components/Inspector/PerformanceTab.d.ts +2 -0
  79. package/dist/esm/components/Inspector/PerformanceTab.js +652 -0
  80. package/dist/esm/components/Inspector/SettingsPanel.js +299 -292
  81. package/dist/esm/components/Inspector/TabBar.js +4 -3
  82. package/dist/esm/components/LogCard.js +37 -34
  83. package/dist/esm/components/NetworkIcons.d.ts +6 -0
  84. package/dist/esm/components/NetworkIcons.js +32 -0
  85. package/dist/esm/constants/index.d.ts +1 -0
  86. package/dist/esm/constants/index.js +1 -1
  87. package/dist/esm/constants/telemetryConfig.d.ts +3 -3
  88. package/dist/esm/constants/telemetryConfig.js +1 -1
  89. package/dist/esm/constants/version.d.ts +1 -1
  90. package/dist/esm/constants/version.js +1 -1
  91. package/dist/esm/helpers/index.d.ts +3 -0
  92. package/dist/esm/helpers/index.js +8 -6
  93. package/dist/esm/helpers/performanceSampler.d.ts +88 -0
  94. package/dist/esm/helpers/performanceSampler.js +1 -0
  95. package/dist/esm/helpers/remoteConfig.d.ts +0 -2
  96. package/dist/esm/helpers/remoteConfig.js +1 -1
  97. package/dist/esm/i18n/locales/ar.json +1 -1
  98. package/dist/esm/i18n/locales/bn.json +1 -1
  99. package/dist/esm/i18n/locales/de.json +1 -1
  100. package/dist/esm/i18n/locales/en.json +1 -1
  101. package/dist/esm/i18n/locales/es.json +1 -1
  102. package/dist/esm/i18n/locales/fr.json +1 -1
  103. package/dist/esm/i18n/locales/gu.json +1 -1
  104. package/dist/esm/i18n/locales/hi.json +1 -1
  105. package/dist/esm/i18n/locales/id.json +1 -1
  106. package/dist/esm/i18n/locales/it.json +1 -1
  107. package/dist/esm/i18n/locales/ja.json +1 -1
  108. package/dist/esm/i18n/locales/kn.json +1 -1
  109. package/dist/esm/i18n/locales/ko.json +1 -1
  110. package/dist/esm/i18n/locales/ml.json +1 -1
  111. package/dist/esm/i18n/locales/mr.json +1 -1
  112. package/dist/esm/i18n/locales/nl.json +1 -1
  113. package/dist/esm/i18n/locales/pa.json +1 -1
  114. package/dist/esm/i18n/locales/pl.json +1 -1
  115. package/dist/esm/i18n/locales/pt.json +1 -1
  116. package/dist/esm/i18n/locales/ru.json +1 -1
  117. package/dist/esm/i18n/locales/ta.json +1 -1
  118. package/dist/esm/i18n/locales/te.json +1 -1
  119. package/dist/esm/i18n/locales/tr.json +1 -1
  120. package/dist/esm/i18n/locales/vi.json +1 -1
  121. package/dist/esm/i18n/locales/zh.json +1 -1
  122. package/dist/esm/index.d.ts +3 -3
  123. package/dist/esm/index.js +8 -8
  124. package/dist/esm/styles/index.js +1 -1
  125. package/dist/esm/types/enums.d.ts +1 -0
  126. package/dist/esm/types/enums.js +1 -1
  127. package/dist/esm/types/interfaces.d.ts +8 -0
  128. package/package.json +24 -1
  129. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  130. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  131. package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
  132. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  133. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  134. package/android/.gradle/8.9/gc.properties +0 -0
  135. package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
  136. package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
  137. package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
  138. package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
  139. package/android/.gradle/9.2.0/gc.properties +0 -0
  140. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  141. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  142. package/android/.gradle/vcs-1/gc.properties +0 -0
  143. package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
  144. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/results.bin +0 -1
  145. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/BuildConfig.dex +0 -0
  146. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView$iconView$1.dex +0 -0
  147. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView.dex +0 -0
  148. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NativeNetworkInspectorSpec.dex +0 -0
  149. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$Companion.dex +0 -0
  150. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$activityEventListener$1.dex +0 -0
  151. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$frameCallback$1.dex +0 -0
  152. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$57$$inlined$sortedByDescending$1.dex +0 -0
  153. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$shakeListener$1.dex +0 -0
  154. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.dex +0 -0
  155. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule.dex +0 -0
  156. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorPackage.dex +0 -0
  157. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  158. package/android/build/.transforms/c93e459e24d856bde563ebb048265732/results.bin +0 -1
  159. package/android/build/.transforms/c93e459e24d856bde563ebb048265732/transformed/classes/classes_dex/classes.dex +0 -0
  160. package/android/build/generated/source/buildConfig/debug/com/inappinspector/BuildConfig.java +0 -10
  161. package/android/build/generated/source/codegen/java/com/inappinspector/NativeNetworkInspectorSpec.java +0 -160
  162. package/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
  163. package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec-generated.cpp +0 -212
  164. package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec.h +0 -31
  165. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.cpp +0 -22
  166. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.h +0 -24
  167. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.cpp +0 -16
  168. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.h +0 -17
  169. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.cpp +0 -19
  170. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.h +0 -18
  171. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/RNInAppInspectorSpecJSI.h +0 -300
  172. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.cpp +0 -17
  173. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.h +0 -23
  174. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.cpp +0 -16
  175. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.h +0 -20
  176. package/android/build/generated/source/codegen/schema.json +0 -1
  177. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
  178. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
  179. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
  180. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  181. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  182. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  183. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  184. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
  185. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  186. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  187. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  188. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
  189. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  190. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/BuildConfig.class +0 -0
  191. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
  192. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
  193. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
  194. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
  195. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
  196. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
  197. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  198. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/BuildConfig.class +0 -0
  199. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
  200. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
  201. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
  202. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
  203. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$activityEventListener$1.class +0 -0
  204. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
  205. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$57$$inlined$sortedByDescending$1.class +0 -0
  206. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
  207. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.class +0 -0
  208. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule.class +0 -0
  209. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorPackage.class +0 -0
  210. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  211. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
  212. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  213. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  214. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  215. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  216. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  217. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  218. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  219. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  220. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  221. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  222. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  223. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  224. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  225. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  226. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  227. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  228. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  229. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  230. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  231. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  232. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  233. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  234. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  235. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  236. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  237. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  238. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  239. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  240. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  241. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  242. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  243. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  244. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  245. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  246. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  247. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  248. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  249. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  250. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  251. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  252. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  253. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  254. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  255. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  256. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  257. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  258. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  259. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  260. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  261. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  262. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  263. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  264. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  265. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  266. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  267. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  268. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  269. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  270. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  271. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  272. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  273. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  274. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  275. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  276. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  277. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  278. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  279. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  280. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  281. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  282. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  283. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  284. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  285. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  286. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  287. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  288. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  289. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  290. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  291. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  292. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  293. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  294. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  295. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  296. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  297. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  298. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  299. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  300. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -17
  301. package/android/build/reports/problems/problems-report.html +0 -659
  302. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  303. package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  304. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
  305. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
  306. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
  307. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$activityEventListener$1.class +0 -0
  308. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
  309. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$57$$inlined$sortedByDescending$1.class +0 -0
  310. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
  311. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.class +0 -0
  312. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule.class +0 -0
  313. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorPackage.class +0 -0
  314. package/dist/commonjs/a11y.d.ts +0 -2
  315. package/dist/commonjs/a11y.js +0 -1
  316. package/dist/commonjs/components/Inspector/A11yTab.d.ts +0 -2
  317. package/dist/commonjs/components/Inspector/A11yTab.js +0 -268
  318. package/dist/commonjs/components/Inspector/DeveloperSponsorCard.d.ts +0 -9
  319. package/dist/commonjs/components/Inspector/DeveloperSponsorCard.js +0 -52
  320. package/dist/commonjs/customHooks/a11yAdapter.d.ts +0 -11
  321. package/dist/commonjs/customHooks/a11yAdapter.js +0 -1
  322. package/dist/commonjs/helpers/sponsorService.d.ts +0 -20
  323. package/dist/commonjs/helpers/sponsorService.js +0 -1
  324. package/dist/esm/a11y.d.ts +0 -2
  325. package/dist/esm/a11y.js +0 -1
  326. package/dist/esm/components/Inspector/A11yTab.d.ts +0 -2
  327. package/dist/esm/components/Inspector/A11yTab.js +0 -268
  328. package/dist/esm/components/Inspector/DeveloperSponsorCard.d.ts +0 -9
  329. package/dist/esm/components/Inspector/DeveloperSponsorCard.js +0 -52
  330. package/dist/esm/customHooks/a11yAdapter.d.ts +0 -11
  331. package/dist/esm/customHooks/a11yAdapter.js +0 -1
  332. package/dist/esm/helpers/sponsorService.d.ts +0 -20
  333. package/dist/esm/helpers/sponsorService.js +0 -1
@@ -1,4 +1,4 @@
1
- import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollView as Ce,Text as P,TouchableOpacity as U,View as C}from"react-native";import{useInspector as ke}from"./InspectorContext";import{useTranslation as we}from"../../i18n";import v from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as T}from"../../styles/AppFonts";import G from"../TouchableScale";import{SignalIcon as Se,TerminalIcon as Ie,AnalyticsIcon as Re,ReduxIcon as Te,CrashIcon as Be,BellIcon as Pe,SmartphoneIcon as Le,DatabaseIcon as Ae,QrCodeIcon as Ve,ScreencastIcon as Oe,ChevronIcon as Q,WebsocketIcon as De}from"../NetworkIcons";import{isReduxConnected as Ee}from"../../customHooks/reduxLogger";import{isAnalyticsConnected as He}from"../../customHooks/analyticsLogger";import{isLocalDebugEnvironment as We}from"../../helpers";const n={themeColor:o.brandPurple,bgInactive:`${o.brandPurple}0D`,borderInactive:`${o.brandPurple}2B`,iconInactive:o.brandPurple,idBadgeBg:`${o.brandPurple}1C`,idBadgeBorder:`${o.brandPurple}3D`,idBadgeText:o.brandPurple},q={apis:n,logs:n,analytics:n,redux:n,storage:n,device:n,crash:n,push:n,socket:n,debugging:n,media:n},$e=ce.memo(()=>{const{t:J}=we(),{activeTab:w,switchActiveTab:L,tabVisibility:B,logs:A,consoleLogs:V,analyticsEvents:K,crashRecords:O,pushRecords:D,socketRecords:E,unreadPushCount:N,unreadSocketCount:X,lastReadApisCount:Y,lastReadLogsCount:Z,lastReadCrashesCount:ee,lastReadSocketCount:oe,mediaCount:H}=ke(),te=Ee(),ie=He(),k=w==="media",x=(B?.media??!0)&&(H>0||k||__DEV__),W=_(null),[z,re]=F(!1),[$,ne]=F(!0),j=_(0),le=e=>{const{contentOffset:t,layoutMeasurement:i,contentSize:r}=e.nativeEvent,S=t.x;j.current=S;const I=S>8,R=S<r.width-i.width-8;z!==I&&re(I),$!==R&&ne(R)},M=e=>{W.current?.scrollTo({x:Math.max(0,j.current+e),animated:!0})};return<C style={[v.tabBarContainer,{flexDirection:"row",alignItems:"center",paddingHorizontal:0}]}>
1
+ import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollView as Ce,Text as P,TouchableOpacity as U,View as C}from"react-native";import{useInspector as ke}from"./InspectorContext";import{useTranslation as we}from"../../i18n";import v from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as T}from"../../styles/AppFonts";import G from"../TouchableScale";import{SignalIcon as Se,TerminalIcon as Ie,AnalyticsIcon as Re,ReduxIcon as Te,CrashIcon as Be,BellIcon as Pe,SmartphoneIcon as Le,DatabaseIcon as Ae,QrCodeIcon as Ve,ScreencastIcon as Oe,ChevronIcon as Q,WebsocketIcon as De,SpeedometerIcon as Ee}from"../NetworkIcons";import{isReduxConnected as He}from"../../customHooks/reduxLogger";import{isAnalyticsConnected as We}from"../../customHooks/analyticsLogger";import{isLocalDebugEnvironment as $e}from"../../helpers";const n={themeColor:o.brandPurple,bgInactive:`${o.brandPurple}0D`,borderInactive:`${o.brandPurple}2B`,iconInactive:o.brandPurple,idBadgeBg:`${o.brandPurple}1C`,idBadgeBorder:`${o.brandPurple}3D`,idBadgeText:o.brandPurple},q={apis:n,logs:n,perf:n,analytics:n,redux:n,storage:n,device:n,crash:n,push:n,socket:n,debugging:n,media:n},je=ce.memo(()=>{const{t:J}=we(),{activeTab:w,switchActiveTab:L,tabVisibility:B,logs:A,consoleLogs:V,analyticsEvents:K,crashRecords:O,pushRecords:D,socketRecords:E,unreadPushCount:N,unreadSocketCount:X,lastReadApisCount:Y,lastReadLogsCount:Z,lastReadCrashesCount:ee,lastReadSocketCount:oe,mediaCount:H}=ke(),te=He(),ie=We(),k=w==="media",x=(B?.media??!0)&&(H>0||k||__DEV__),W=_(null),[z,re]=F(!1),[$,ne]=F(!0),j=_(0),le=e=>{const{contentOffset:t,layoutMeasurement:i,contentSize:r}=e.nativeEvent,S=t.x;j.current=S;const I=S>8,R=S<r.width-i.width-8;z!==I&&re(I),$!==R&&ne(R)},M=e=>{W.current?.scrollTo({x:Math.max(0,j.current+e),animated:!0})};return<C style={[v.tabBarContainer,{flexDirection:"row",alignItems:"center",paddingHorizontal:0}]}>
2
2
 
3
3
  {z&&<U onPress={()=>M(-160)}hitSlop={{top:6,bottom:6,left:6,right:6}}activeOpacity={.7}style={{paddingLeft:6,paddingRight:2,justifyContent:"center",alignItems:"center"}}>
4
4
  <C style={{width:22,height:22,borderRadius:11,backgroundColor:o.grayBorderSecondary,alignItems:"center",justifyContent:"center"}}>
@@ -8,10 +8,11 @@ import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollVie
8
8
 
9
9
 
10
10
  <Ce testID="inspector.tab.scrollview"ref={W}horizontal showsHorizontalScrollIndicator={!1}onScroll={le}scrollEventThrottle={16}style={{flex:1}}contentContainerStyle={{paddingLeft:z?4:12,paddingRight:x?6:12}}>
11
- {[{id:1,key:"apis",label:"APIs",count:A.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:V.length,icon:"logs"},{id:3,key:"analytics",label:"Analytics",count:K.length,icon:"analytics"},{id:4,key:"redux",label:"Redux",count:0,icon:"redux"},{id:5,key:"storage",label:"Storage",count:0,icon:"storage"},{id:6,key:"device",label:"Device",count:0,icon:"device"},{id:7,key:"crash",label:"Crash",count:O?.length||0,icon:"crash"},{id:8,key:"push",label:"Push",count:D?.length||0,icon:"push"},{id:9,key:"socket",label:"WebSocket",count:E?.length||0,icon:"socket"},{id:10,key:"debugging",label:"Debugging",count:0,icon:"debugging"}].filter(e=>e.key==="debugging"?de.OS==="android"&&We()&&!!B?.debugging:!(!B?.[e.key]||e.key==="redux"&&!te||e.key==="analytics"&&!ie)).map(e=>{const t=w===e.key,i=q[e.key]||q.apis,r=t?o.white:i.iconInactive,S=e.count>99?"99+":String(e.count),I=w!=="apis"&&A.length>Y,R=w!=="logs"&&V.length>Z,se=w!=="crash"&&(O?.length||0)>(ee||0),ae=w!=="socket"&&((E?.length||0)>(oe||0)||X>0);return<G key={e.key}testID={`inspector.tab.${e.key}`}onPress={()=>{L(e.key)}}style={[v.contentTabButton,{backgroundColor:t?i.themeColor:i.bgInactive,borderColor:t?i.themeColor:i.borderInactive},t&&{shadowColor:i.themeColor,shadowOffset:{width:0,height:2},shadowOpacity:.28,shadowRadius:3.5,elevation:3}]}>
11
+ {[{id:1,key:"apis",label:"APIs",count:A.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:V.length,icon:"logs"},{id:3,key:"perf",label:"Perf / FPS",count:0,icon:"perf"},{id:4,key:"analytics",label:"Analytics",count:K.length,icon:"analytics"},{id:5,key:"redux",label:"Redux",count:0,icon:"redux"},{id:6,key:"storage",label:"Storage",count:0,icon:"storage"},{id:7,key:"device",label:"Device",count:0,icon:"device"},{id:8,key:"crash",label:"Crash",count:O?.length||0,icon:"crash"},{id:9,key:"push",label:"Push",count:D?.length||0,icon:"push"},{id:10,key:"socket",label:"WebSocket",count:E?.length||0,icon:"socket"},{id:11,key:"debugging",label:"Debugging",count:0,icon:"debugging"}].filter(e=>e.key==="debugging"?de.OS==="android"&&$e()&&!!B?.debugging:!(!B?.[e.key]||e.key==="redux"&&!te||e.key==="analytics"&&!ie)).map(e=>{const t=w===e.key,i=q[e.key]||q.apis,r=t?o.white:i.iconInactive,S=e.count>99?"99+":String(e.count),I=w!=="apis"&&A.length>Y,R=w!=="logs"&&V.length>Z,se=w!=="crash"&&(O?.length||0)>(ee||0),ae=w!=="socket"&&((E?.length||0)>(oe||0)||X>0);return<G key={e.key}testID={`inspector.tab.${e.key}`}onPress={()=>{L(e.key)}}style={[v.contentTabButton,{backgroundColor:t?i.themeColor:i.bgInactive,borderColor:t?i.themeColor:i.borderInactive},t&&{shadowColor:i.themeColor,shadowOffset:{width:0,height:2},shadowOpacity:.28,shadowRadius:3.5,elevation:3}]}>
12
12
  <C style={{flexDirection:"row",alignItems:"center",gap:6}}>
13
13
  {e.icon==="apis"&&<Se color={r}size={14}/>}
14
14
  {e.icon==="logs"&&<Ie color={r}size={14}/>}
15
+ {e.icon==="perf"&&<Ee color={r}size={14}/>}
15
16
  {e.icon==="analytics"&&<Re color={r}size={14}/>}
16
17
  {e.icon==="redux"&&<Te color={r}size={14}/>}
17
18
  {e.icon==="storage"&&<Ae color={r}size={14}/>}
@@ -54,4 +55,4 @@ import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollVie
54
55
  </C>
55
56
  </G>
56
57
  </C>}
57
- </C>});export default $e;
58
+ </C>});export default je;
@@ -1,33 +1,33 @@
1
- import te,{useEffect as oe,useRef as ne,useMemo as le}from"react";import{Alert as v,Animated as W,Linking as ie,View as C,Pressable as E,Text as T,StyleSheet as A}from"react-native";import Ce,{Path as Te}from"react-native-svg";import{AppColors as e}from"../styles/AppColors";import{METHOD_COLORS as U}from"../constants";import{getStatusColor as Se,getDurationColor as Be,formatDateTime as Re,getSize as He,getPath as Ve,getBaseUrl as ze}from"../helpers";import{CalendarIcon as Ie,ClockIcon as N,SizeIcon as Le,CircleCheckIcon as $e,CircleAlertIcon as De,CircleXIcon as Oe,RepeatIcon as We,ForwardChevronIcon as Fe,GlobeIcon as Pe}from"./NetworkIcons";import{AppFonts as S}from"../styles/AppFonts";import G from"./HighlightText";import Me from"./TouchableScale";import{useTranslation as ve}from"../i18n";function Ee({item:r,onPress:B,timelineMinStart:Ue,timelineTotalRange:qe,isNew:L,isSelected:F,onToggleSelect:J,searchStr:P,testID:K}){const{t:R}=ve(),j=U[r.method]??U.ALL,V=le(()=>{try{const o=new URL(r.url),O=o.host,M=o.pathname+(o.search?o.search:""),re=o.protocol==="https:";return{host:O,path:M||"/",isHttps:re}}catch{const o=r.url.toLowerCase().startsWith("https:"),O=Ve(r.url);return{host:ze(r.url).replace(/^https?:\/\//,""),path:O||r.url,isHttps:o}}},[r.url]),Q=o=>{o?.stopPropagation?.(),v.alert(R("common.openInBrowser")||"Open in Browser",`${R("common.openInBrowserPrompt")||"Are you sure you want to open this URL in your external browser?"}
1
+ import re,{useEffect as ne,useRef as le,useMemo as ae}from"react";import{Alert as E,Animated as D,Linking as ie,View as C,Pressable as F,Text as T,StyleSheet as U}from"react-native";import Ce,{Path as Te}from"react-native-svg";import{AppColors as e}from"../styles/AppColors";import{METHOD_COLORS as A}from"../constants";import{getStatusColor as Se,getDurationColor as Be,formatDateTime as Re,getSize as He,getPath as Ve,getBaseUrl as ze,openWithPostman as q}from"../helpers";import{CalendarIcon as Ie,ClockIcon as N,SizeIcon as Le,CircleCheckIcon as Pe,CircleAlertIcon as $e,CircleXIcon as Oe,RepeatIcon as De,ForwardChevronIcon as Fe,GlobeIcon as We,PostmanIcon as Me}from"./NetworkIcons";import{AppFonts as S}from"../styles/AppFonts";import G from"./HighlightText";import Ee from"./TouchableScale";import{useTranslation as Ue}from"../i18n";function Ae({item:o,onPress:B,timelineMinStart:Ne,timelineTotalRange:Ge,isNew:L,isSelected:W,onToggleSelect:J,searchStr:j,testID:K}){const{t:R}=Ue(),M=A[o.method]??A.ALL,V=ae(()=>{try{const r=new URL(o.url),O=r.host,v=r.pathname+(r.search?r.search:""),te=r.protocol==="https:";return{host:O,path:v||"/",isHttps:te}}catch{const r=o.url.toLowerCase().startsWith("https:"),O=Ve(o.url);return{host:ze(o.url).replace(/^https?:\/\//,""),path:O||o.url,isHttps:r}}},[o.url]),Q=r=>{r?.stopPropagation?.(),E.alert(R("common.openInBrowser")||"Open URL",`${R("common.openInBrowserPrompt")||"Choose how you want to open or inspect this URL:"}
2
2
 
3
- ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.open")||"Open",onPress:()=>{ie.openURL(r.url).catch(()=>{v.alert(R("common.error")||"Error",R("common.cannotOpenUrl")||"Could not open URL")})}}])},H=r.status===0||r.status!=null&&r.status>=400,z=r.status==null,$=Se(r.status),I=Be(r.duration),X=z?e.darkOrange:H?e.errorColor:e.greenColor,D=ne(new W.Value(L?.35:0)).current;oe(()=>{L&&W.timing(D,{toValue:0,duration:1200,useNativeDriver:!0}).start()},[L,D]);const _=()=>{if(z)return"...";if(r.status===0||r.status==null)return R("network.statusFailed")||"FAILED";const o=typeof r.status=="number"?r.status:parseInt(String(r.status||0),10);return o===200?"200 OK":o===201?"201 Created":o===204?"204 No Content":o===304?"304 Not Modified":o===400?"400 Bad Req":o===401?"401 Unauth":o===403?"403 Forbidden":o===404?"404 Not Found":o===500?"500 Error":String(r.status)},Y=()=>{if(z)return<N color={e.darkOrange}size={10}/>;const o=typeof r.status=="number"?r.status:parseInt(String(r.status||0),10);return o>=200&&o<300?<$e color={e.greenColor}size={10}/>:o>=300&&o<400?<We color={e.amber700}size={10}/>:o>=400&&o<500?<De color={e.darkOrange}size={10}/>:<Oe color={e.errorColor}size={10}/>},Z=Re(r.startTime),ee=r.url.split("?")[0].toLowerCase().endsWith(".json");return<C style={t.container}>
4
- <Me testID={K}onPress={B}style={[t.card,{borderLeftWidth:3.5,borderLeftColor:X,backgroundColor:H?e.errorCardBg:e.white}]}>
3
+ ${o.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:"Open in Postman",onPress:()=>q(o)},{text:R("common.open")||"Browser",onPress:()=>{ie.openURL(o.url).catch(()=>{E.alert(R("common.error")||"Error",R("common.cannotOpenUrl")||"Could not open URL")})}}])},X=r=>{r?.stopPropagation?.(),q(o)},H=o.status===0||o.status!=null&&o.status>=400,z=o.status==null,P=Se(o.status),I=Be(o.duration),_=z?e.darkOrange:H?e.errorColor:e.greenColor,$=le(new D.Value(L?.35:0)).current;ne(()=>{L&&D.timing($,{toValue:0,duration:1200,useNativeDriver:!0}).start()},[L,$]);const Y=()=>{if(z)return"...";if(o.status===0||o.status==null)return R("network.statusFailed")||"FAILED";const r=typeof o.status=="number"?o.status:parseInt(String(o.status||0),10);return r===200?"200 OK":r===201?"201 Created":r===204?"204 No Content":r===304?"304 Not Modified":r===400?"400 Bad Req":r===401?"401 Unauth":r===403?"403 Forbidden":r===404?"404 Not Found":r===500?"500 Error":String(o.status)},Z=()=>{if(z)return<N color={e.darkOrange}size={10}/>;const r=typeof o.status=="number"?o.status:parseInt(String(o.status||0),10);return r>=200&&r<300?<Pe color={e.greenColor}size={10}/>:r>=300&&r<400?<De color={e.amber700}size={10}/>:r>=400&&r<500?<$e color={e.darkOrange}size={10}/>:<Oe color={e.errorColor}size={10}/>},ee=Re(o.startTime),oe=o.url.split("?")[0].toLowerCase().endsWith(".json");return<C style={t.container}>
4
+ <Ee testID={K}onPress={B}style={[t.card,{borderLeftWidth:3.5,borderLeftColor:_,backgroundColor:H?e.errorCardBg:e.white}]}>
5
5
  <C style={t.cardBody}>
6
6
 
7
7
  <C style={t.cardHeaderRow}>
8
8
  <C style={t.cardHeaderLeft}>
9
- <E onPress={()=>J(r.id)}hitSlop={12}style={[t.smallCheckbox,F&&t.smallCheckboxChecked]}>
10
- {F&&<Ce width={9}height={9}viewBox="0 0 24 24"fill="none">
9
+ <F onPress={()=>J(o.id)}hitSlop={12}style={[t.smallCheckbox,W&&t.smallCheckboxChecked]}>
10
+ {W&&<Ce width={9}height={9}viewBox="0 0 24 24"fill="none">
11
11
  <Te d="M20 6L9 17l-5-5"stroke={e.white}strokeWidth="4"strokeLinecap="round"strokeLinejoin="round"/>
12
12
  </Ce>}
13
- </E>
13
+ </F>
14
14
 
15
- <T style={t.serialNumber}>#{r.id+1}</T>
15
+ <T style={t.serialNumber}>#{o.id+1}</T>
16
16
 
17
- <C style={[t.methodBadge,{backgroundColor:j}]}>
17
+ <C style={[t.methodBadge,{backgroundColor:M}]}>
18
18
  <T style={t.methodBadgeText}>
19
- {r.method}
19
+ {o.method}
20
20
  </T>
21
21
  </C>
22
22
 
23
- {r.client&&<C style={[t.chip,{backgroundColor:r.client==="axios"?`${e.purple}14`:r.client==="apollo"||r.client==="graphql"?`${e.pink500}14`:r.client==="xhr"?`${e.amber500}14`:`${e.sky500}14`,borderColor:r.client==="axios"?`${e.purple}30`:r.client==="apollo"||r.client==="graphql"?`${e.pink500}30`:r.client==="xhr"?`${e.amber500}30`:`${e.sky500}30`}]}>
24
- <T style={[t.chipText,{color:r.client==="axios"?e.purple:r.client==="apollo"||r.client==="graphql"?e.pink500:r.client==="xhr"?e.amber700:e.sky600}]}>
25
- {r.client.toUpperCase()}
23
+ {o.client&&<C style={[t.chip,{backgroundColor:o.client==="axios"?`${e.purple}14`:o.client==="apollo"||o.client==="graphql"?`${e.pink500}14`:o.client==="xhr"?`${e.amber500}14`:`${e.sky500}14`,borderColor:o.client==="axios"?`${e.purple}30`:o.client==="apollo"||o.client==="graphql"?`${e.pink500}30`:o.client==="xhr"?`${e.amber500}30`:`${e.sky500}30`}]}>
24
+ <T style={[t.chipText,{color:o.client==="axios"?e.purple:o.client==="apollo"||o.client==="graphql"?e.pink500:o.client==="xhr"?e.amber700:e.sky600}]}>
25
+ {o.client.toUpperCase()}
26
26
  </T>
27
27
  </C>}
28
28
 
29
29
 
30
- {(r.url.toLowerCase().includes("graphql")||r.client==="apollo"||r.client==="graphql")&&<C style={[t.chip,{backgroundColor:e.roseBg,borderColor:e.roseBorder}]}>
30
+ {(o.url.toLowerCase().includes("graphql")||o.client==="apollo"||o.client==="graphql")&&<C style={[t.chip,{backgroundColor:e.roseBg,borderColor:e.roseBorder}]}>
31
31
  <T style={[t.chipText,{color:e.pink600}]}>
32
32
  GQL
33
33
  </T>
@@ -35,15 +35,18 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
35
35
  </C>
36
36
 
37
37
  <C style={t.cardHeaderRight}>
38
- <C style={[t.statusPill,{backgroundColor:H?`${e.errorColor}14`:z?`${e.darkOrange}14`:`${$}14`,borderColor:H?`${e.errorColor}33`:z?`${e.darkOrange}33`:`${$}33`}]}>
39
- {Y()}
40
- <T style={[t.statusPillText,{color:H?e.errorColor:z?e.darkOrange:$}]}>
41
- {_()}
38
+ <C style={[t.statusPill,{backgroundColor:H?`${e.errorColor}14`:z?`${e.darkOrange}14`:`${P}14`,borderColor:H?`${e.errorColor}33`:z?`${e.darkOrange}33`:`${P}33`}]}>
39
+ {Z()}
40
+ <T style={[t.statusPillText,{color:H?e.errorColor:z?e.darkOrange:P}]}>
41
+ {Y()}
42
42
  </T>
43
43
  </C>
44
- <E onPress={Q}hitSlop={8}style={t.globeBtn}accessibilityRole="button"accessibilityLabel="Open in Browser">
45
- <Pe color={e.grayTextWeak}size={12}/>
46
- </E>
44
+ <F onPress={Q}hitSlop={8}style={t.globeBtn}accessibilityRole="button"accessibilityLabel="Open in Browser">
45
+ <We color={e.grayTextWeak}size={12}/>
46
+ </F>
47
+ <F onPress={X}hitSlop={8}style={[t.globeBtn,{backgroundColor:"rgba(255, 108, 55, 0.12)",borderColor:"rgba(255, 108, 55, 0.28)"}]}accessibilityRole="button"accessibilityLabel="Open with Postman">
48
+ <Me color="#FF6C37"size={11}/>
49
+ </F>
47
50
  <Fe color={e.grayTextWeak}size={13}/>
48
51
  </C>
49
52
  </C>
@@ -58,21 +61,21 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
58
61
  {V.isHttps?"HTTPS":"HTTP"}
59
62
  </T>
60
63
  </C>
61
- <G text={V.host||r.url}search={P}style={t.hostText}highlightStyle={t.highlight}numberOfLines={1}ellipsizeMode="tail"/>
64
+ <G text={V.host||o.url}search={j}style={t.hostText}highlightStyle={t.highlight}numberOfLines={1}ellipsizeMode="tail"/>
62
65
  </C>
63
66
  <C style={t.urlBadgeRow}>
64
- {ee&&<C style={t.jsonBadge}>
67
+ {oe&&<C style={t.jsonBadge}>
65
68
  <T style={t.jsonBadgeText}>.json</T>
66
69
  </C>}
67
- {r.duplicateCount!=null&&r.duplicateCount>1&&<C style={t.dupBadge}>
68
- <T style={t.dupBadgeText}>×{r.duplicateCount}</T>
70
+ {o.duplicateCount!=null&&o.duplicateCount>1&&<C style={t.dupBadge}>
71
+ <T style={t.dupBadgeText}>×{o.duplicateCount}</T>
69
72
  </C>}
70
73
  </C>
71
74
  </C>
72
75
 
73
76
 
74
77
  <C style={t.slugRow}>
75
- <G text={V.path}search={P}style={t.pathText}highlightStyle={t.highlight}numberOfLines={1}ellipsizeMode="middle"/>
78
+ <G text={V.path}search={j}style={t.pathText}highlightStyle={t.highlight}numberOfLines={1}ellipsizeMode="middle"/>
76
79
  </C>
77
80
  </C>
78
81
 
@@ -81,22 +84,22 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
81
84
  <C style={t.footerLeft}>
82
85
  <C style={t.cardDateRow}>
83
86
  <Ie color={e.grayTextWeak}size={10}/>
84
- <T style={t.cardDateText}numberOfLines={1}>{Z}</T>
87
+ <T style={t.cardDateText}numberOfLines={1}>{ee}</T>
85
88
  </C>
86
89
  </C>
87
90
 
88
91
  <C style={t.footerRight}>
89
- {r.response!=null&&<C style={t.metaStatChip}>
92
+ {o.response!=null&&<C style={t.metaStatChip}>
90
93
  <Le color={e.purple}size={9}/>
91
94
  <T style={t.metaStatText}>
92
- {He(r.response)}
95
+ {He(o.response)}
93
96
  </T>
94
97
  </C>}
95
98
 
96
- {r.duration!=null&&!H&&<C style={[t.metaStatChip,{backgroundColor:`${I}12`,borderColor:`${I}2E`}]}>
99
+ {o.duration!=null&&!H&&<C style={[t.metaStatChip,{backgroundColor:`${I}12`,borderColor:`${I}2E`}]}>
97
100
  <N color={I}size={9}/>
98
101
  <T style={[t.metaStatText,{color:I}]}>
99
- {r.duration}ms
102
+ {o.duration}ms
100
103
  </T>
101
104
  </C>}
102
105
  </C>
@@ -104,10 +107,10 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
104
107
 
105
108
 
106
109
  <C style={t.waterfallContainer}>
107
- {typeof r.duration=="number"&&r.duration>0&&!H&&<C style={[t.waterfallBar,{width:`${Math.min(100,Math.max(6,r.duration/1200*100))}%`,backgroundColor:I}]}/>}
110
+ {typeof o.duration=="number"&&o.duration>0&&!H&&<C style={[t.waterfallBar,{width:`${Math.min(100,Math.max(6,o.duration/1200*100))}%`,backgroundColor:I}]}/>}
108
111
  </C>
109
112
  </C>
110
113
 
111
- {L&&<W.View pointerEvents="none"style={[A.absoluteFill,{backgroundColor:j,opacity:D}]}/>}
112
- </Me>
113
- </C>}const t=A.create({container:{paddingHorizontal:8,paddingVertical:4,height:126,justifyContent:"center"},card:{height:118,alignSelf:"stretch",borderRadius:10,overflow:"hidden",borderWidth:1,borderColor:e.dividerColor,shadowColor:e.shadowColorString},cardBody:{height:"100%",paddingHorizontal:8,paddingTop:8,paddingBottom:6,justifyContent:"space-between"},cardHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:22,minHeight:22,maxHeight:22},cardHeaderLeft:{flexDirection:"row",alignItems:"center",flex:1,marginRight:4,gap:4.5,minWidth:0,overflow:"hidden"},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},smallCheckbox:{width:15,height:15,borderRadius:4,borderWidth:1.5,borderColor:e.grayTextWeak,alignItems:"center",justifyContent:"center",backgroundColor:e.white},smallCheckboxChecked:{backgroundColor:e.purple,borderColor:e.purple},serialNumber:{fontFamily:S.interBold,color:e.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:e.white},chip:{paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4,borderWidth:1},chipText:{fontFamily:S.interBold,fontSize:9,lineHeight:12},statusPill:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:2,borderRadius:6,borderWidth:1,flexShrink:0},statusPillText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12},globeBtn:{padding:3,borderRadius:4,backgroundColor:`${e.grayTextWeak}12`,alignItems:"center",justifyContent:"center"},urlBox:{backgroundColor:e.grayBackground,borderRadius:7,borderWidth:1,borderColor:e.dividerColor,paddingHorizontal:7,paddingVertical:4.5,height:48,minHeight:48,maxHeight:48,justifyContent:"center",gap:2.5,overflow:"hidden"},urlMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:4,minHeight:16},hostRow:{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0},protoBadge:{paddingHorizontal:4,paddingVertical:1,borderRadius:3.5,borderWidth:1},protoBadgeText:{fontFamily:S.interBold,fontSize:8,lineHeight:10},hostText:{fontFamily:S.interBold,fontSize:11.5,lineHeight:15,color:e.primaryBlack,flex:1},urlBadgeRow:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},jsonBadge:{backgroundColor:`${e.darkOrange}14`,borderColor:`${e.darkOrange}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},jsonBadgeText:{fontFamily:S.interBold,fontSize:8.5,color:e.darkOrange},dupBadge:{backgroundColor:`${e.purple}14`,borderColor:`${e.purple}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},dupBadgeText:{fontFamily:S.interBold,fontSize:8.5,color:e.purple},slugRow:{flexDirection:"row",alignItems:"center",minHeight:15},pathText:{fontFamily:S.interMedium,fontSize:10.5,lineHeight:14,color:e.slate600||e.grayText,flex:1},highlight:{backgroundColor:e.yellowHighlight,color:e.primaryBlack,borderRadius:2},cardFooterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:18,minHeight:18,maxHeight:18,gap:4},footerLeft:{flexDirection:"row",alignItems:"center",gap:4.5,flex:1,minWidth:0,overflow:"hidden"},footerRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},cardDateRow:{flexDirection:"row",alignItems:"center",gap:3.5},cardDateText:{fontFamily:S.interRegular,fontSize:10,lineHeight:13,color:e.slate400},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.violetSoftBg,borderColor:e.violetSoftBorder,borderWidth:1,paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4},metaStatText:{fontFamily:S.interBold,color:e.violetSoftText,fontSize:9,lineHeight:12},waterfallContainer:{height:2.5,width:"100%",backgroundColor:e.graySurface,borderRadius:1.5,overflow:"hidden",marginTop:2},waterfallBar:{height:"100%",borderRadius:1.5}});function Ae(r,B){return r.item===B.item&&r.isSelected===B.isSelected&&r.isNew===B.isNew&&r.searchStr===B.searchStr&&r.timelineMinStart===B.timelineMinStart&&r.timelineTotalRange===B.timelineTotalRange&&r.onPress===B.onPress&&r.onToggleSelect===B.onToggleSelect}export default te.memo(Ee,Ae);
114
+ {L&&<D.View pointerEvents="none"style={[U.absoluteFill,{backgroundColor:M,opacity:$}]}/>}
115
+ </Ee>
116
+ </C>}const t=U.create({container:{paddingHorizontal:8,paddingVertical:4,height:126,justifyContent:"center"},card:{height:118,alignSelf:"stretch",borderRadius:10,overflow:"hidden",borderWidth:1,borderColor:e.dividerColor,shadowColor:e.shadowColorString},cardBody:{height:"100%",paddingHorizontal:8,paddingTop:8,paddingBottom:6,justifyContent:"space-between"},cardHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:22,minHeight:22,maxHeight:22},cardHeaderLeft:{flexDirection:"row",alignItems:"center",flex:1,marginRight:4,gap:4.5,minWidth:0,overflow:"hidden"},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},smallCheckbox:{width:15,height:15,borderRadius:4,borderWidth:1.5,borderColor:e.grayTextWeak,alignItems:"center",justifyContent:"center",backgroundColor:e.white},smallCheckboxChecked:{backgroundColor:e.purple,borderColor:e.purple},serialNumber:{fontFamily:S.interBold,color:e.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:e.white},chip:{paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4,borderWidth:1},chipText:{fontFamily:S.interBold,fontSize:9,lineHeight:12},statusPill:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:2,borderRadius:6,borderWidth:1,flexShrink:0},statusPillText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12},globeBtn:{padding:3,borderRadius:4,backgroundColor:`${e.grayTextWeak}12`,alignItems:"center",justifyContent:"center"},urlBox:{backgroundColor:e.grayBackground,borderRadius:7,borderWidth:1,borderColor:e.dividerColor,paddingHorizontal:7,paddingVertical:4.5,height:48,minHeight:48,maxHeight:48,justifyContent:"center",gap:2.5,overflow:"hidden"},urlMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:4,minHeight:16},hostRow:{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0},protoBadge:{paddingHorizontal:4,paddingVertical:1,borderRadius:3.5,borderWidth:1},protoBadgeText:{fontFamily:S.interBold,fontSize:8,lineHeight:10},hostText:{fontFamily:S.interBold,fontSize:11.5,lineHeight:15,color:e.primaryBlack,flex:1},urlBadgeRow:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},jsonBadge:{backgroundColor:`${e.darkOrange}14`,borderColor:`${e.darkOrange}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},jsonBadgeText:{fontFamily:S.interBold,fontSize:8.5,color:e.darkOrange},dupBadge:{backgroundColor:`${e.purple}14`,borderColor:`${e.purple}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},dupBadgeText:{fontFamily:S.interBold,fontSize:8.5,color:e.purple},slugRow:{flexDirection:"row",alignItems:"center",minHeight:15},pathText:{fontFamily:S.interMedium,fontSize:10.5,lineHeight:14,color:e.slate600||e.grayText,flex:1},highlight:{backgroundColor:e.yellowHighlight,color:e.primaryBlack,borderRadius:2},cardFooterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:18,minHeight:18,maxHeight:18,gap:4},footerLeft:{flexDirection:"row",alignItems:"center",gap:4.5,flex:1,minWidth:0,overflow:"hidden"},footerRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},cardDateRow:{flexDirection:"row",alignItems:"center",gap:3.5},cardDateText:{fontFamily:S.interRegular,fontSize:10,lineHeight:13,color:e.slate400},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.violetSoftBg,borderColor:e.violetSoftBorder,borderWidth:1,paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4},metaStatText:{fontFamily:S.interBold,color:e.violetSoftText,fontSize:9,lineHeight:12},waterfallContainer:{height:2.5,width:"100%",backgroundColor:e.graySurface,borderRadius:1.5,overflow:"hidden",marginTop:2},waterfallBar:{height:"100%",borderRadius:1.5}});function qe(o,B){return o.item===B.item&&o.isSelected===B.isSelected&&o.isNew===B.isNew&&o.searchStr===B.searchStr&&o.timelineMinStart===B.timelineMinStart&&o.timelineTotalRange===B.timelineTotalRange&&o.onPress===B.onPress&&o.onToggleSelect===B.onToggleSelect}export default re.memo(Ae,qe);
@@ -58,6 +58,7 @@ export declare const WipeIcon: ({ color, size }: IconProps) => React.JSX.Element
58
58
  export declare const LayersIcon: ({ color, size, }: IconProps) => React.JSX.Element;
59
59
  export declare const UserIcon: ({ color, size }: IconProps) => React.JSX.Element;
60
60
  export declare const InfoCircleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
61
+ export declare const PostmanIcon: ({ color, size, }: IconProps) => React.JSX.Element;
61
62
  export declare const WarningTriangleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
62
63
  export declare const ErrorCircleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
63
64
  export declare const TrendingUpIcon: ({ color, size, }: IconProps) => React.JSX.Element;
@@ -232,3 +233,8 @@ export declare const ArrowForwardIcon: ({ color, size }: IconProps) => React.JSX
232
233
  export declare const ScaleBalanceIcon: ({ color, size }: IconProps) => React.JSX.Element;
233
234
  export declare const VolumeMuteIcon: ({ color, size }: IconProps) => React.JSX.Element;
234
235
  export declare const ShieldBanIcon: ({ color, size }: IconProps) => React.JSX.Element;
236
+ export declare const SpeedometerIcon: ({ color, size }: IconProps) => React.JSX.Element;
237
+ export declare const CpuChipIcon: ({ color, size }: IconProps) => React.JSX.Element;
238
+ export declare const PulseGraphIcon: ({ color, size }: IconProps) => React.JSX.Element;
239
+ export declare const GaugeIcon: ({ color, size }: IconProps) => React.JSX.Element;
240
+ export declare const MemoryRamIcon: ({ color, size }: IconProps) => React.JSX.Element;
@@ -146,6 +146,8 @@ import"react";import W,{Circle as M,Ellipse as T,Line as S,Path as L,Polygon as
146
146
  </W>,InfoCircleIcon=({color:e=p.grayTextWeak,size:t=14})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
147
147
  <M cx="12"cy="12"r="9"stroke={e}strokeWidth="2"/>
148
148
  <L d="M12 16v-4M12 8.5h.01"stroke={e}strokeWidth="2.2"strokeLinecap="round"strokeLinejoin="round"/>
149
+ </W>,PostmanIcon=({color:e="#FF6C37",size:t=14})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
150
+ <L d="M21.5 2.5L10.5 13.5M21.5 2.5L14.5 21.5L10.5 13.5M21.5 2.5L2.5 9.5L10.5 13.5"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
149
151
  </W>,WarningTriangleIcon=({color:e=p.grayTextWeak,size:t=12})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
150
152
  <L d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
151
153
  <L d="M12 9v4M12 17h.01"stroke={e}strokeWidth="2"strokeLinecap="round"/>
@@ -767,4 +769,34 @@ import"react";import W,{Circle as M,Ellipse as T,Line as S,Path as L,Polygon as
767
769
  </W>,ShieldBanIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
768
770
  <L d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
769
771
  <S x1="4.5"y1="4.5"x2="19.5"y2="19.5"stroke={e}strokeWidth="2"strokeLinecap="round"/>
772
+ </W>,SpeedometerIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
773
+ <L d="M12 2a10 10 0 0 0-7.07 17.07L12 12l5.07-5.07"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
774
+ <L d="M2 12a10 10 0 1 0 20 0 10 10 0 0 0-20 0z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
775
+ <M cx="12"cy="12"r="2"fill={e}/>
776
+ </W>,CpuChipIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
777
+ <B x="4"y="4"width="16"height="16"rx="2"stroke={e}strokeWidth="2"/>
778
+ <B x="9"y="9"width="6"height="6"stroke={e}strokeWidth="1.5"/>
779
+ <S x1="9"y1="1"x2="9"y2="4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
780
+ <S x1="15"y1="1"x2="15"y2="4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
781
+ <S x1="9"y1="20"x2="9"y2="23"stroke={e}strokeWidth="2"strokeLinecap="round"/>
782
+ <S x1="15"y1="20"x2="15"y2="23"stroke={e}strokeWidth="2"strokeLinecap="round"/>
783
+ <S x1="20"y1="9"x2="23"y2="9"stroke={e}strokeWidth="2"strokeLinecap="round"/>
784
+ <S x1="20"y1="15"x2="23"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"/>
785
+ <S x1="1"y1="9"x2="4"y2="9"stroke={e}strokeWidth="2"strokeLinecap="round"/>
786
+ <S x1="1"y1="15"x2="4"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"/>
787
+ </W>,PulseGraphIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
788
+ <C points="22 12 18 12 15 21 9 3 6 12 2 12"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
789
+ </W>,GaugeIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
790
+ <L d="M3.34 17a10 10 0 1 1 17.32 0"stroke={e}strokeWidth="2"strokeLinecap="round"/>
791
+ <L d="M12 12l4-4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
792
+ <M cx="12"cy="12"r="2"fill={e}/>
793
+ </W>,MemoryRamIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
794
+ <B x="2"y="6"width="20"height="12"rx="2"stroke={e}strokeWidth="2"/>
795
+ <S x1="6"y1="18"x2="6"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
796
+ <S x1="10"y1="18"x2="10"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
797
+ <S x1="14"y1="18"x2="14"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
798
+ <S x1="18"y1="18"x2="18"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
799
+ <B x="5"y="9"width="3"height="5"fill={e}/>
800
+ <B x="10.5"y="9"width="3"height="5"fill={e}/>
801
+ <B x="16"y="9"width="3"height="5"fill={e}/>
770
802
  </W>;
@@ -4,4 +4,5 @@ export declare const METHOD_COLORS: Record<Method, string>;
4
4
  export declare const DOMAIN_COLORS: string[];
5
5
  export declare const DURATION_FAST_MS = 200;
6
6
  export declare const DURATION_SLOW_MS = 800;
7
+ export declare const DEFAULT_HIDDEN_URL_PATTERNS: string[];
7
8
  export { LIB_VERSION } from './version';
@@ -1 +1 @@
1
- import{AppColors as o}from"../styles/AppColors";export const STATUS_FILTERS=["ALL","2xx","200","3xx","4xx","400","404","5xx","500","Failed"],METHOD_COLORS={ALL:o.slate500,GET:o.emerald600,POST:o.blue600,PUT:o.amber600,PATCH:o.violet600,DELETE:o.red600,QUERY:o.sky600,OPTIONS:o.slate600,HEAD:o.cyan600},DOMAIN_COLORS=o.domainColors,DURATION_FAST_MS=200,DURATION_SLOW_MS=800;export{LIB_VERSION}from"./version";
1
+ import{AppColors as o}from"../styles/AppColors";export const STATUS_FILTERS=["ALL","2xx","200","3xx","4xx","400","404","5xx","500","Failed"],METHOD_COLORS={ALL:o.slate500,GET:o.emerald600,POST:o.blue600,PUT:o.amber600,PATCH:o.violet600,DELETE:o.red600,QUERY:o.sky600,OPTIONS:o.slate600,HEAD:o.cyan600},DOMAIN_COLORS=o.domainColors,DURATION_FAST_MS=200,DURATION_SLOW_MS=800,DEFAULT_HIDDEN_URL_PATTERNS=["https://google-analytics.com/g/collect","https://api.npmjs.org","https://api.github.com","https://registry.npmjs.org"];export{LIB_VERSION}from"./version";
@@ -1,3 +1,3 @@
1
- export declare const ENC_MID = "df8ace0290a695bd05986213";
2
- export declare const ENC_SEC = "db93cb0186b1f7bb0ba63a0d0a64997586849455ce37";
3
- export declare const TELEMETRY_SALT = "rn-inapp-inspector-telemetry-v1";
1
+ export declare const ENC_MID = "";
2
+ export declare const ENC_SEC = "";
3
+ export declare const TELEMETRY_SALT = "";
@@ -1 +1 @@
1
- export const ENC_MID="df8ace0290a695bd05986213",ENC_SEC="db93cb0186b1f7bb0ba63a0d0a64997586849455ce37",TELEMETRY_SALT="rn-inapp-inspector-telemetry-v1";
1
+ export const ENC_MID="",ENC_SEC="",TELEMETRY_SALT="";
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "2.5.11";
1
+ export declare const LIB_VERSION = "2.5.12";
@@ -1 +1 @@
1
- export const LIB_VERSION="2.5.11";
1
+ export const LIB_VERSION="2.5.12";
@@ -17,6 +17,8 @@ export declare const getPath: (url: string) => string;
17
17
  export declare const getBaseUrl: (url: string) => string;
18
18
  export declare const getCurlCommand: (log: NetworkLog) => string;
19
19
  export declare const getFetchCommand: (log: NetworkLog) => string;
20
+ export declare const getPostmanRequestJson: (log: NetworkLog) => string;
21
+ export declare const openWithPostman: (log: NetworkLog, toastFn?: (msg: string) => void) => Promise<void>;
20
22
  export declare const deduplicateLogs: (raw: NetworkLog[]) => NetworkLog[];
21
23
  export declare const escapeRegex: (str: string) => string;
22
24
  export declare const getNavigationInfo: (state: any, path?: string[]) => RouteInfo;
@@ -82,3 +84,4 @@ export interface RuntimeDiagnostics {
82
84
  totalAllocMb: number;
83
85
  }
84
86
  export declare const getRuntimeDiagnostics: () => RuntimeDiagnostics;
87
+ export declare const isUrlHidden: (url: string | undefined | null, patterns: string[] | undefined | null) => boolean;
@@ -1,8 +1,10 @@
1
- import{Platform as b,ToastAndroid as y,Alert as D,NativeModules as p,Linking as $}from"react-native";import S from"@react-native-clipboard/clipboard";import{showToast as M}from"./toast";import{copyMediaToClipboard as E}from"../native/NativeInspector";import{AppColors as a}from"../styles/AppColors";import{DOMAIN_COLORS as C,DURATION_FAST_MS as U,DURATION_SLOW_MS as P}from"../constants";export*from"./searchQueryParser";export*from"./memoryManager";export*from"./toast";export const isLocalDebugEnvironment=()=>{const t=typeof __DEV__<"u"&&!!__DEV__,e=p.SourceCode?.scriptURL||"",n=e.startsWith("http://")||e.startsWith("https://")||e.includes(":8081")||e.includes(":8082");return t||n},getDomainColor=t=>{if(!t)return C[0];let e=0;for(let n=0;n<t.length;n++)e=t.charCodeAt(n)+((e<<5)-e);return C[Math.abs(e)%C.length]},formatDateTime=t=>{const e=new Date(t),n=(h,l=2)=>String(h).padStart(l,"0"),r=n(e.getDate()),o=n(e.getMonth()+1),i=e.getFullYear(),s=n(e.getHours()),c=n(e.getMinutes()),u=n(e.getSeconds());return`${r}/${o}/${i} ${s}:${c}:${u}`},formatTimestamp=t=>{try{const e=new Date(t),n=e.getHours().toString().padStart(2,"0"),r=e.getMinutes().toString().padStart(2,"0"),o=e.getSeconds().toString().padStart(2,"0"),i=e.getMilliseconds().toString().padStart(3,"0");return`${n}:${r}:${o}.${i}`}catch{return"\u2014"}},getStatusColor=t=>!t||t===0?a.errorColor:t>=500?a.errorColor:t>=400?a.darkOrange:t>=300?a.warningIconGold:a.greenColor,getDurationColor=t=>t==null?a.grayTextWeak:t<U?a.greenColor:t<P?a.lightOrange:a.errorColor,getSize=t=>{try{const e=JSON.stringify(t)?.length??0;return e<1024?`${e} B`:`${(e/1024).toFixed(1)} KB`}catch{return"\u2014"}},formatBytes=t=>{if(t===0||!t||isNaN(t))return"0 B";const e=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(t)/Math.log(e));return`${parseFloat((t/Math.pow(e,r)).toFixed(1))} ${n[r]||"B"}`},formatByteSize=t=>!t||t<=0?"0 B":t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(2)} MB`,copyToClipboard=(t,e)=>{const n=typeof t=="function"?t():t;let r="";if(typeof n=="string")r=n;else try{r=JSON.stringify(n,null,2)}catch{r=String(n)}try{typeof S?.setString=="function"?S.setString(r):typeof S?.default?.setString=="function"&&S.default.setString(r)}catch(o){__DEV__&&console.warn("[NetworkInspector] Clipboard.setString failed:",o)}try{M(e?`${e} copied to clipboard`:"Copied to clipboard")}catch{}try{b.OS==="android"&&y?.show&&y.show(e?`${e} copied to clipboard`:"Copied to clipboard",y.SHORT)}catch{}},copyImageOrMediaToClipboard=async(t,e="Image")=>{if(!t)return;let n=!1;try{n=await E(t)}catch{n=!1}if(!n){copyToClipboard(t,e);return}try{M(`${e} copied to clipboard`)}catch{}try{b.OS==="android"&&y?.show&&y.show(`${e} copied to clipboard`,y.SHORT)}catch{}},getPath=t=>{try{const e=new URL(t);return e.pathname+(e.search?e.search:"")}catch{return t.replace(/^https?:\/\/[^/?#]+/,"")||"/"}},getBaseUrl=t=>{try{const e=new URL(t);return`${e.protocol}//${e.host}`}catch{const e=t.match(/^(https?:\/\/[^/]+)/);return e?e[1]:""}},getCurlCommand=t=>{let e=`curl -X ${t.method} "${t.url}"`;if(t.requestHeaders&&Object.entries(t.requestHeaders).forEach(([n,r])=>{e+=` \\
2
- -H "${n}: ${r}"`}),t.request&&t.method!=="GET"){const n=typeof t.request=="string"?t.request:JSON.stringify(t.request);e+=` \\
3
- -d '${n.replace(/'/g,"'\\''")}'`}return e},getFetchCommand=t=>{const e={method:t.method};return t.requestHeaders&&Object.keys(t.requestHeaders).length>0&&(e.headers=t.requestHeaders),t.request&&t.method!=="GET"&&(e.body=JSON.stringify(t.request)),`fetch("${t.url}", ${JSON.stringify(e,null,2)})`},deduplicateLogs=t=>{const e=new Map;return t.forEach(n=>{if(!e.has(n.id))e.set(n.id,n);else{const r=e.get(n.id);(r.status==null&&n.status!=null||(n.startTime??0)>=(r.startTime??0))&&e.set(n.id,n)}}),Array.from(e.values()).sort((n,r)=>r.id-n.id)},escapeRegex=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),getNavigationInfo=(t,e=[])=>{if(!t)return{path:e.length>0?e.join(" \u2794 "):"",params:null};if(t.name&&!t.routes)return{path:e.length>0?[...e,t.name].join(" \u2794 "):t.name,params:t.params||null};if(!t.routes||!Array.isArray(t.routes)||t.routes.length===0)return{path:e.length>0?e.join(" \u2794 "):"",params:null};const n=typeof t.index=="number"&&t.index>=0&&t.index<t.routes.length?t.index:0,r=t.routes[n];if(!r)return{path:e.length>0?e.join(" \u2794 "):"",params:null};const o=r.name?[...e,r.name]:e;return r?.state?getNavigationInfo(r.state,o):{path:o.length>0?o.join(" \u2794 "):r.name||"",params:r.params||null}},getLogPageName=(t,e)=>{const n=e||t?.routeInfo;if(n&&n.path&&n.path!=="Navigators"){const r=n.path.split(" \u2794 ").map(o=>o.trim()).filter(Boolean);return r.length>0?r[r.length-1]:n.path}if(t.caller&&t.caller!=="Unknown")try{const r=t.caller.match(/([^/\\]+)\.(tsx|jsx|ts|js)/i);if(r&&r[1]){const o=r[1];if(!["networklogger","fetch","axios","apiclient","request","http","index","nativeinspector","inappinspector","bundleanalyzer"].includes(o.toLowerCase()))return o}}catch{}if(t.url)try{const o=t.url.split("?")[0].split("#")[0].replace(/^https?:\/\//i,""),i=o.indexOf("/");if(i!==-1){const c=o.substring(i+1).split("/").filter(Boolean),u=["api","v1","v2","v3","v4","rest","graphql","json","data","service","app"],h=c.filter(l=>!u.includes(l.toLowerCase()));if(h.length>0){const l=h[0];return l.charAt(0).toUpperCase()+l.slice(1)}}const s=o.split("/")[0];if(s)return s}catch{}return"General"},flattenObject=(t,e="")=>{let n={};return typeof t=="object"&&t!==null?Array.isArray(t)?t.forEach((r,o)=>{Object.assign(n,flattenObject(r,e?`${e}[${o}]`:`[${o}]`))}):Object.keys(t).forEach(r=>{Object.assign(n,flattenObject(t[r],e?`${e}.${r}`:r))}):n[e||"root"]=t,n},getDiff=(t,e)=>{const n=flattenObject(t),r=flattenObject(e),o=[];return new Set([...Object.keys(n),...Object.keys(r)]).forEach(s=>{s in n?s in r?n[s]!==r[s]&&o.push({type:"changed",path:s,oldVal:n[s],newVal:r[s]}):o.push({type:"removed",path:s,oldVal:n[s]}):o.push({type:"added",path:s,newVal:r[s]})}),o.sort((s,c)=>s.path.localeCompare(c.path))},formatDisplayUrl=t=>t?t.startsWith("http://")||t.startsWith("https://")?t:`https://${t}`:"",getLocalizedFilePath=(t,e,n)=>t.replace("country-language",`${e?.toLowerCase()}-${n?.toLowerCase()}`),getLocalizedFilePathWithSlash=(t,e,n)=>t.replace("country/language",`${e?.toLowerCase()}/${n?.toLowerCase()}`),isAllValuesEmpty=t=>!t||typeof t!="object"?!0:Object.values(t).every(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0),formatDateTimeToAnalytics=t=>new Date(t)?.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),getBundleIdentifier=()=>{const t=p.RNDeviceInfo;if(t&&typeof t.bundleId=="string")return t.bundleId;if(t&&typeof t.getBundleId=="function")try{const o=t.getBundleId();if(typeof o=="string")return o}catch{}const e=p.ExponentConstants;if(e&&e.manifest){const o=e.manifest;if(o.ios&&o.ios.bundleIdentifier)return o.ios.bundleIdentifier;if(o.android&&o.android.package)return o.android.package}const n=p.ExpoApplication;if(n&&typeof n.applicationId=="string")return n.applicationId;const r=p.SourceCode;if(r&&typeof r.scriptURL=="string"){const o=r.scriptURL;if(o.includes("assets/"))try{const i=o.match(/assets\/([^/?#]+)/);if(i&&i[1])return i[1]}catch{}}return"org.reactjs.native.example"},getAppName=()=>{const t=p.PlatformConstants;t&&t.interfaceIdiom;const e=p.RNDeviceInfo;if(e&&typeof e.appName=="string")return e.appName;const n=p.NetworkInspectorModule;if(n&&typeof n.appName=="string"&&n.appName.length>0&&n.appName!=="App")return n.appName;const r=p.ExpoApplication;if(r&&typeof r.applicationName=="string")return r.applicationName;const o=p.ExponentConstants;if(o&&o.manifest){const c=o.manifest;if(c.name)return c.name}const i=p.AppInfo;if(i&&typeof i.appName=="string")return i.appName;const s=getBundleIdentifier();if(s&&s!=="org.reactjs.native.example"){const c=s.split("."),u=c[c.length-1];return u?u.charAt(0).toUpperCase()+u.slice(1):"App"}return"App"},getAppVersionAndBuild=()=>{let t="",e="";const n=p.NetworkInspectorModule;if(n&&(typeof n.appVersion=="string"&&n.appVersion.length>0&&(t=n.appVersion),typeof n.appBuild=="string"&&n.appBuild.length>0&&(e=n.appBuild)),!t||!e){const r=p.ExpoApplication;r&&(!t&&typeof r.nativeAppVersion=="string"&&(t=r.nativeAppVersion),!e&&typeof r.nativeBuildVersion=="string"&&(e=r.nativeBuildVersion))}if(!t||!e){const r=p.ExponentConstants;if(r){const o=r.manifest||r.expoConfig;o&&(!t&&o.version&&(t=String(o.version)),e||(o.ios?.buildNumber?e=String(o.ios.buildNumber):o.android?.versionCode&&(e=String(o.android.versionCode))))}}if(!t||!e){const r=p.RNDeviceInfo;if(r){if(!t){if(typeof r.appVersion=="string")t=r.appVersion;else if(typeof r.getVersion=="function")try{t=r.getVersion()}catch{}}if(!e){if(typeof r.buildNumber=="string")e=r.buildNumber;else if(typeof r.getBuildNumber=="function")try{e=r.getBuildNumber()}catch{}}}}if(!t||!e){const r=p.AppInfo;r&&(!t&&typeof r.versionName=="string"&&(t=r.versionName),!e&&typeof r.versionCode=="string"&&(e=r.versionCode))}if(!t){const r=b.constants||p.PlatformConstants;r&&r.Version&&typeof r.Version=="string"&&r.Version.includes(".")&&(t=r.Version)}return t||(t="1.0"),e||(e="1"),{version:t,build:e,formatted:`${t} (${e})`}},handleOpenExternalLink=t=>{if(!t)return;const e=formatDisplayUrl(t);D.alert("Open Link",`Do you want to open this link in your web browser?
1
+ import{Platform as S,ToastAndroid as x,Alert as P,NativeModules as u,Linking as y}from"react-native";import $ from"@react-native-clipboard/clipboard";import{showToast as w}from"./toast";import{copyMediaToClipboard as E}from"../native/NativeInspector";import{AppColors as c}from"../styles/AppColors";import{DOMAIN_COLORS as C,DURATION_FAST_MS as M,DURATION_SLOW_MS as D}from"../constants";export*from"./searchQueryParser";export*from"./memoryManager";export*from"./toast";export const isLocalDebugEnvironment=()=>{const e=typeof __DEV__<"u"&&!!__DEV__,t=u.SourceCode?.scriptURL||"",n=t.startsWith("http://")||t.startsWith("https://")||t.includes(":8081")||t.includes(":8082");return e||n},getDomainColor=e=>{if(!e)return C[0];let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return C[Math.abs(t)%C.length]},formatDateTime=e=>{const t=new Date(e),n=(d,l=2)=>String(d).padStart(l,"0"),r=n(t.getDate()),o=n(t.getMonth()+1),s=t.getFullYear(),i=n(t.getHours()),a=n(t.getMinutes()),p=n(t.getSeconds());return`${r}/${o}/${s} ${i}:${a}:${p}`},formatTimestamp=e=>{try{const t=new Date(e),n=t.getHours().toString().padStart(2,"0"),r=t.getMinutes().toString().padStart(2,"0"),o=t.getSeconds().toString().padStart(2,"0"),s=t.getMilliseconds().toString().padStart(3,"0");return`${n}:${r}:${o}.${s}`}catch{return"\u2014"}},getStatusColor=e=>!e||e===0?c.errorColor:e>=500?c.errorColor:e>=400?c.darkOrange:e>=300?c.warningIconGold:c.greenColor,getDurationColor=e=>e==null?c.grayTextWeak:e<M?c.greenColor:e<D?c.lightOrange:c.errorColor,getSize=e=>{try{const t=JSON.stringify(e)?.length??0;return t<1024?`${t} B`:`${(t/1024).toFixed(1)} KB`}catch{return"\u2014"}},formatBytes=e=>{if(e===0||!e||isNaN(e))return"0 B";const t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(1))} ${n[r]||"B"}`},formatByteSize=e=>!e||e<=0?"0 B":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`,copyToClipboard=(e,t)=>{const n=typeof e=="function"?e():e;let r="";if(typeof n=="string")r=n;else try{r=JSON.stringify(n,null,2)}catch{r=String(n)}try{typeof $?.setString=="function"?$.setString(r):typeof $?.default?.setString=="function"&&$.default.setString(r)}catch(o){__DEV__&&console.warn("[NetworkInspector] Clipboard.setString failed:",o)}try{w(t?`${t} copied to clipboard`:"Copied to clipboard")}catch{}try{S.OS==="android"&&x?.show&&x.show(t?`${t} copied to clipboard`:"Copied to clipboard",x.SHORT)}catch{}},copyImageOrMediaToClipboard=async(e,t="Image")=>{if(!e)return;let n=!1;try{n=await E(e)}catch{n=!1}if(!n){copyToClipboard(e,t);return}try{w(`${t} copied to clipboard`)}catch{}try{S.OS==="android"&&x?.show&&x.show(`${t} copied to clipboard`,x.SHORT)}catch{}},getPath=e=>{try{const t=new URL(e);return t.pathname+(t.search?t.search:"")}catch{return e.replace(/^https?:\/\/[^/?#]+/,"")||"/"}},getBaseUrl=e=>{try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{const t=e.match(/^(https?:\/\/[^/]+)/);return t?t[1]:""}},getCurlCommand=e=>{let t=`curl -X ${e.method} "${e.url}"`;if(e.requestHeaders&&Object.entries(e.requestHeaders).forEach(([n,r])=>{t+=` \\
2
+ -H "${n}: ${r}"`}),e.request&&e.method!=="GET"){const n=typeof e.request=="string"?e.request:JSON.stringify(e.request);t+=` \\
3
+ -d '${n.replace(/'/g,"'\\''")}'`}return t},getFetchCommand=e=>{const t={method:e.method};return e.requestHeaders&&Object.keys(e.requestHeaders).length>0&&(t.headers=e.requestHeaders),e.request&&e.method!=="GET"&&(t.body=JSON.stringify(e.request)),`fetch("${e.url}", ${JSON.stringify(t,null,2)})`},getPostmanRequestJson=e=>{let t;try{const s=new URL(e.url),i=s.hostname.split("."),a=s.pathname.replace(/^\//,"").split("/").filter(Boolean),p=[];s.searchParams.forEach((d,l)=>{p.push({key:l,value:d})}),t={raw:e.url,host:i,path:a,query:p.length>0?p:void 0}}catch{t={raw:e.url}}const n=[];e.requestHeaders&&typeof e.requestHeaders=="object"&&Object.entries(e.requestHeaders).forEach(([s,i])=>{n.push({key:s,value:String(i),type:"text"})});let r;if(e.request){const s=e.request;let i="";if(typeof s=="object")try{i=JSON.stringify(s,null,2)}catch{i=String(s)}else i=String(s);r={mode:"raw",raw:i,options:{raw:{language:"json"}}}}const o={info:{name:`${e.method} ${getPath(e.url)||e.url}`,schema:"https://schema.getpostman.com/json/collection/v2.1.0/collection.json",_exporter_id:"inapp-inspector"},item:[{name:`${e.method} ${getPath(e.url)||e.url}`,request:{method:e.method||"GET",header:n,body:r,url:t,description:"Captured by React Native In-App Inspector"},response:[]}]};return JSON.stringify(o,null,2)},openWithPostman=async(e,t)=>{const n=getCurlCommand(e);$.setString(n);const r="postman://";try{if(await y.canOpenURL(r)){await y.openURL(r),t?t("Opened Postman (cURL copied to clipboard)"):w("Opened Postman (cURL copied to clipboard)");return}}catch{}P.alert("Open with Postman",`cURL for "${e.method} ${getPath(e.url)||e.url}" copied to clipboard!
4
4
 
5
- ${e}`,[{text:"Cancel",style:"cancel"},{text:"Open",onPress:()=>{$.openURL(e).catch(()=>{})}}])},formatTimeShort=t=>{const e=new Date(t),n=String(e.getHours()).padStart(2,"0"),r=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0");return`${n}:${r}:${o}`},formatTime=t=>{const e=new Date(t),n=String(e.getHours()).padStart(2,"0"),r=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0"),i=String(e.getMilliseconds()).padStart(3,"0");return`${n}:${r}:${o}.${i}`},formatGap=t=>{if(t<1e3)return`+${t}ms`;const e=Math.round(t/1e3);if(e<60)return`+${e}s`;const n=Math.floor(e/60),r=e%60;return r>0?`+${n}m ${r}s`:`+${n}m`},getJsonContent=t=>{if(!t)return null;const e=[];for(let n=0;n<t.length;n++)(t[n]==="{"||t[n]==="[")&&e.push(n);for(const n of e){const r=t.substring(n).trim();try{const o=JSON.parse(r);if(o!==null&&typeof o=="object")return{header:t.substring(0,n).trim(),data:o}}catch{}}return null},getJsonPreviewText=(t,e=4)=>{try{const n=JSON.stringify(t,null,2),r=n.split(`
6
- `);return r.length>e?{text:r.slice(0,e).join(`
5
+ In Postman: Click "Import" > paste the cURL to load this request.`,[{text:"Done",style:"cancel"},{text:"Open Postman Web",onPress:()=>{y.openURL("https://web.postman.co/").catch(()=>{})}}])},deduplicateLogs=e=>{const t=new Map;return e.forEach(n=>{if(!t.has(n.id))t.set(n.id,n);else{const r=t.get(n.id);(r.status==null&&n.status!=null||(n.startTime??0)>=(r.startTime??0))&&t.set(n.id,n)}}),Array.from(t.values()).sort((n,r)=>r.id-n.id)},escapeRegex=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),getNavigationInfo=(e,t=[])=>{if(!e)return{path:t.length>0?t.join(" \u2794 "):"",params:null};if(e.name&&!e.routes)return{path:t.length>0?[...t,e.name].join(" \u2794 "):e.name,params:e.params||null};if(!e.routes||!Array.isArray(e.routes)||e.routes.length===0)return{path:t.length>0?t.join(" \u2794 "):"",params:null};const n=typeof e.index=="number"&&e.index>=0&&e.index<e.routes.length?e.index:0,r=e.routes[n];if(!r)return{path:t.length>0?t.join(" \u2794 "):"",params:null};const o=r.name?[...t,r.name]:t;return r?.state?getNavigationInfo(r.state,o):{path:o.length>0?o.join(" \u2794 "):r.name||"",params:r.params||null}},getLogPageName=(e,t)=>{const n=t||e?.routeInfo;if(n&&n.path&&n.path!=="Navigators"){const r=n.path.split(" \u2794 ").map(o=>o.trim()).filter(Boolean);return r.length>0?r[r.length-1]:n.path}if(e.caller&&e.caller!=="Unknown")try{const r=e.caller.match(/([^/\\]+)\.(tsx|jsx|ts|js)/i);if(r&&r[1]){const o=r[1];if(!["networklogger","fetch","axios","apiclient","request","http","index","nativeinspector","inappinspector","bundleanalyzer"].includes(o.toLowerCase()))return o}}catch{}if(e.url)try{const o=e.url.split("?")[0].split("#")[0].replace(/^https?:\/\//i,""),s=o.indexOf("/");if(s!==-1){const a=o.substring(s+1).split("/").filter(Boolean),p=["api","v1","v2","v3","v4","rest","graphql","json","data","service","app"],d=a.filter(l=>!p.includes(l.toLowerCase()));if(d.length>0){const l=d[0];return l.charAt(0).toUpperCase()+l.slice(1)}}const i=o.split("/")[0];if(i)return i}catch{}return"General"},flattenObject=(e,t="")=>{let n={};return typeof e=="object"&&e!==null?Array.isArray(e)?e.forEach((r,o)=>{Object.assign(n,flattenObject(r,t?`${t}[${o}]`:`[${o}]`))}):Object.keys(e).forEach(r=>{Object.assign(n,flattenObject(e[r],t?`${t}.${r}`:r))}):n[t||"root"]=e,n},getDiff=(e,t)=>{const n=flattenObject(e),r=flattenObject(t),o=[];return new Set([...Object.keys(n),...Object.keys(r)]).forEach(i=>{i in n?i in r?n[i]!==r[i]&&o.push({type:"changed",path:i,oldVal:n[i],newVal:r[i]}):o.push({type:"removed",path:i,oldVal:n[i]}):o.push({type:"added",path:i,newVal:r[i]})}),o.sort((i,a)=>i.path.localeCompare(a.path))},formatDisplayUrl=e=>e?e.startsWith("http://")||e.startsWith("https://")?e:`https://${e}`:"",getLocalizedFilePath=(e,t,n)=>e.replace("country-language",`${t?.toLowerCase()}-${n?.toLowerCase()}`),getLocalizedFilePathWithSlash=(e,t,n)=>e.replace("country/language",`${t?.toLowerCase()}/${n?.toLowerCase()}`),isAllValuesEmpty=e=>!e||typeof e!="object"?!0:Object.values(e).every(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0),formatDateTimeToAnalytics=e=>new Date(e)?.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),getBundleIdentifier=()=>{const e=u.RNDeviceInfo;if(e&&typeof e.bundleId=="string")return e.bundleId;if(e&&typeof e.getBundleId=="function")try{const o=e.getBundleId();if(typeof o=="string")return o}catch{}const t=u.ExponentConstants;if(t&&t.manifest){const o=t.manifest;if(o.ios&&o.ios.bundleIdentifier)return o.ios.bundleIdentifier;if(o.android&&o.android.package)return o.android.package}const n=u.ExpoApplication;if(n&&typeof n.applicationId=="string")return n.applicationId;const r=u.SourceCode;if(r&&typeof r.scriptURL=="string"){const o=r.scriptURL;if(o.includes("assets/"))try{const s=o.match(/assets\/([^/?#]+)/);if(s&&s[1])return s[1]}catch{}}return"org.reactjs.native.example"},getAppName=()=>{const e=u.PlatformConstants;e&&e.interfaceIdiom;const t=u.RNDeviceInfo;if(t&&typeof t.appName=="string")return t.appName;const n=u.NetworkInspectorModule;if(n&&typeof n.appName=="string"&&n.appName.length>0&&n.appName!=="App")return n.appName;const r=u.ExpoApplication;if(r&&typeof r.applicationName=="string")return r.applicationName;const o=u.ExponentConstants;if(o&&o.manifest){const a=o.manifest;if(a.name)return a.name}const s=u.AppInfo;if(s&&typeof s.appName=="string")return s.appName;const i=getBundleIdentifier();if(i&&i!=="org.reactjs.native.example"){const a=i.split("."),p=a[a.length-1];return p?p.charAt(0).toUpperCase()+p.slice(1):"App"}return"App"},getAppVersionAndBuild=()=>{let e="",t="";const n=u.NetworkInspectorModule;if(n&&(typeof n.appVersion=="string"&&n.appVersion.length>0&&(e=n.appVersion),typeof n.appBuild=="string"&&n.appBuild.length>0&&(t=n.appBuild)),!e||!t){const r=u.ExpoApplication;r&&(!e&&typeof r.nativeAppVersion=="string"&&(e=r.nativeAppVersion),!t&&typeof r.nativeBuildVersion=="string"&&(t=r.nativeBuildVersion))}if(!e||!t){const r=u.ExponentConstants;if(r){const o=r.manifest||r.expoConfig;o&&(!e&&o.version&&(e=String(o.version)),t||(o.ios?.buildNumber?t=String(o.ios.buildNumber):o.android?.versionCode&&(t=String(o.android.versionCode))))}}if(!e||!t){const r=u.RNDeviceInfo;if(r){if(!e){if(typeof r.appVersion=="string")e=r.appVersion;else if(typeof r.getVersion=="function")try{e=r.getVersion()}catch{}}if(!t){if(typeof r.buildNumber=="string")t=r.buildNumber;else if(typeof r.getBuildNumber=="function")try{t=r.getBuildNumber()}catch{}}}}if(!e||!t){const r=u.AppInfo;r&&(!e&&typeof r.versionName=="string"&&(e=r.versionName),!t&&typeof r.versionCode=="string"&&(t=r.versionCode))}if(!e){const r=S.constants||u.PlatformConstants;r&&r.Version&&typeof r.Version=="string"&&r.Version.includes(".")&&(e=r.Version)}return e||(e="1.0"),t||(t="1"),{version:e,build:t,formatted:`${e} (${t})`}},handleOpenExternalLink=e=>{if(!e)return;const t=formatDisplayUrl(e);P.alert("Open Link",`Do you want to open this link in your web browser?
6
+
7
+ ${t}`,[{text:"Cancel",style:"cancel"},{text:"Open",onPress:()=>{y.openURL(t).catch(()=>{})}}])},formatTimeShort=e=>{const t=new Date(e),n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0");return`${n}:${r}:${o}`},formatTime=e=>{const t=new Date(e),n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0"),s=String(t.getMilliseconds()).padStart(3,"0");return`${n}:${r}:${o}.${s}`},formatGap=e=>{if(e<1e3)return`+${e}ms`;const t=Math.round(e/1e3);if(t<60)return`+${t}s`;const n=Math.floor(t/60),r=t%60;return r>0?`+${n}m ${r}s`:`+${n}m`},getJsonContent=e=>{if(!e)return null;const t=[];for(let n=0;n<e.length;n++)(e[n]==="{"||e[n]==="[")&&t.push(n);for(const n of t){const r=e.substring(n).trim();try{const o=JSON.parse(r);if(o!==null&&typeof o=="object")return{header:e.substring(0,n).trim(),data:o}}catch{}}return null},getJsonPreviewText=(e,t=4)=>{try{const n=JSON.stringify(e,null,2),r=n.split(`
8
+ `);return r.length>t?{text:r.slice(0,t).join(`
7
9
  `)+`
8
- ...`,hasMore:!0}:{text:n,hasMore:!1}}catch{return{text:String(t),hasMore:!1}}},parseStackLine=(t,e=!1)=>{let n=t.trim().replace(/^at /,"");if(n.includes("@")){const A=n.indexOf("@"),B=n.substring(0,A).trim(),O=n.substring(A+1).trim();n=B?`${B} (${O})`:O}const r=n.match(/^(.*?)\s*\((.*?)\)$/);let o="<anonymous>",i=n;r&&(o=r[1].trim()||"<anonymous>",i=r[2].trim()),(o.startsWith("?anon_")||o==="?")&&(o="anonymous"),i=i.replace(/^address at /,"");const s=i.match(/^(.*?):(\d+):(\d+)$/);let c=i,u,h;s&&(c=s[1],u=s[2],h=s[3]);let l=c.replace(/[?&].*$/,"").replace(/[)]+$/,"").replace(/\/\/+$/,"");l=l.replace(/^(?:https?:\/\/[^\/]+\/|file:\/\/\/|webpack:\/\/\/?)/,"");let f=l.split("/").filter(Boolean).pop()||l;f=f.replace(/[?&].*$/,"").replace(/[)]+$/,""),(f.startsWith("&")||f.startsWith("?")||f.startsWith("platform=")||f.includes("platform=")||f.startsWith("dev=")||f.includes("dev="))&&(f="Unknown",l="Unknown");const x=f.match(/\.([a-z0-9]+)$/i),d=x?x[1].toLowerCase():"",g=d==="tsx"||d==="jsx"||d==="ts"||d==="js"?d:"other",N=i==="native"||l==="native",v=l.includes("InternalBytecode")||l.includes("metro-runtime")||l.includes("regenerator-runtime")||o==="tryCallOne"||o==="asyncGeneratorStep"||o==="_next"||o==="next"&&N,w=l.includes("node_modules")||l.includes("react-native/Libraries")||l.includes("react-native-inapp-inspector")&&!l.includes("/example/"),I=!N&&!v&&!w&&(g==="tsx"||g==="jsx"||g==="ts"||g==="js"||!f.includes(".bundle")&&f!=="Unknown"),_=I?"app":w?"dependency":N?"native":"runtime",L=v||N||o==="asyncGeneratorStep"||o==="_next";let m=l;m.includes("/example/")?m=m.substring(m.indexOf("/example/")+9):m.includes("/src/")?m=m.substring(m.indexOf("/src/")+1):m.includes("/node_modules/")&&(m=m.substring(m.indexOf("/node_modules/")+14));const T=u?`${f}:${u}${h?`:${h}`:""}`:f;return{raw:t,functionName:o,fileName:f,fullPath:m,rawFilePath:c,fileExt:g,frameType:_,isUserCode:I,isRuntimeNoise:L,lineNumber:u,columnNumber:h,isOrigin:e,copyableLocation:T}},getCleanCallerDisplay=t=>{if(!t||t==="Unknown"||t.trim()==="")return null;const e=t.trim();if(e.startsWith("&platform")||e.startsWith("?platform")||e.startsWith("&")||e.includes("&platform=")||e.includes("?platform=")){const i=e.match(/^(.*?)\s*[\(@]/);if(i&&i[1]&&!i[1].includes("&")&&!i[1].includes("platform")){const s=i[1].trim();if(s&&s!=="<anonymous>"&&s!=="anonymous"&&!s.startsWith("?anon_"))return{fileName:s,functionName:s,display:s}}return null}const n=parseStackLine(t,!0);if(!n)return null;if(n.fileName.includes(".bundle")||n.fileName.includes("platform=")||n.fileName.startsWith("&")||n.fileName.startsWith("?")||n.fileName==="index.bundle"||n.fileName==="bundle"||n.fileName==="Unknown")return n.functionName&&n.functionName!=="<anonymous>"&&n.functionName!=="anonymous"&&!n.functionName.startsWith("?")&&!n.functionName.startsWith("_callee")&&!n.functionName.includes("regeneratorRuntime")?{fileName:n.functionName,lineNumber:n.lineNumber,functionName:n.functionName,display:n.functionName}:null;const o=n.lineNumber?`${n.fileName}:${n.lineNumber}`:n.fileName;return{fileName:n.fileName,lineNumber:n.lineNumber,functionName:n.functionName,display:o}},openInVSCode=(t,e,n)=>{const r=e?Number(e):1,o=n?Number(n):1,i=e?`:${e}`:"",s=n?`:${n}`:"",c=t.replace(/^file:\/\//,"");let u=null;try{const d=p?.SourceCode?.scriptURL||p?.PlatformConstants?.serverHost||p?.DevSettings?.serverHost;if(typeof d=="string"&&d.length>0){const g=d.match(/^(https?:\/\/[^/]+)/);g?u=g[1]:!d.startsWith("http")&&d.includes(":")&&(u=`http://${d}`)}}catch{}Array.from(new Set([...u?[u]:[],"http://localhost:8081","http://127.0.0.1:8081","http://10.0.2.2:8081"])).forEach(d=>{try{fetch(`${d}/open-stack-frame`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:c,lineNumber:r,column:o})}).catch(()=>{})}catch{}});const l=`vscode://file/${c.replace(/^\/+/,"")}${i}${s}`,f=`cursor://file/${c.replace(/^\/+/,"")}${i}${s}`,x=`vscode-insiders://file/${c.replace(/^\/+/,"")}${i}${s}`;$.openURL(l).catch(()=>{$.openURL(f).catch(()=>{$.openURL(x).catch(()=>{copyToClipboard(`${c}${i}${s}`,"Location")})})})},ANALYTICS_EVENT_PALETTE=[a.googleBlue,a.googleGreen,a.googlePurple,a.googleTeal,a.googleRed,a.googleOrange,a.blue700,a.materialGreen],getEventColor=t=>{const e=typeof t=="string"?t:String(t||"");let n=0;for(let r=0;r<e.length;r++)n=n*31+e.charCodeAt(r)|0;return ANALYTICS_EVENT_PALETTE[Math.abs(n)%ANALYTICS_EVENT_PALETTE.length]};export{getEventCategory,registerGAPlugin}from"./gaAnalyticsRegistry";export const getCategoryColors=t=>{switch(t){case"page_view":case"Page View":return{bg:a.blueBg,border:a.blueBorder,text:a.blue800};case"ecommerce":case"Ecommerce":return{bg:a.greenBg,border:a.greenBorder,text:a.materialGreen};case"system":case"System":return{bg:a.greyBg,border:a.greyBorder,text:a.grey600};default:return{bg:a.purpleBg,border:a.purpleBorder,text:a.purpleText}}},getRuntimeDiagnostics=()=>{const t=typeof global.HermesInternal<"u",e=typeof global._v8runtime<"u",n=t?"hermes":e?"v8":"jsc",o=typeof global.nativeFabricUIManager<"u"||!!global.__turboModuleProxy?"fabric":"paper";let i=32.4,s=64;try{const c=global.HermesInternal?.getInstrumentedStats?.();c?.js_heap_size?(i=Number((c.js_heap_size/(1024*1024)).toFixed(1)),s=Number(((c.js_allocated_bytes||c.js_heap_size*1.6)/(1024*1024)).toFixed(1))):global.performance?.memory?.usedJSHeapSize&&(i=Number((global.performance.memory.usedJSHeapSize/(1024*1024)).toFixed(1)),s=Number((global.performance.memory.totalJSHeapSize/(1024*1024)).toFixed(1)))}catch{}return{engineType:n,archType:o,usedHeapMb:i,totalAllocMb:s}};
10
+ ...`,hasMore:!0}:{text:n,hasMore:!1}}catch{return{text:String(e),hasMore:!1}}},parseStackLine=(e,t=!1)=>{let n=e.trim().replace(/^at /,"");if(n.includes("@")){const L=n.indexOf("@"),A=n.substring(0,L).trim(),B=n.substring(L+1).trim();n=A?`${A} (${B})`:B}const r=n.match(/^(.*?)\s*\((.*?)\)$/);let o="<anonymous>",s=n;r&&(o=r[1].trim()||"<anonymous>",s=r[2].trim()),(o.startsWith("?anon_")||o==="?")&&(o="anonymous"),s=s.replace(/^address at /,"");const i=s.match(/^(.*?):(\d+):(\d+)$/);let a=s,p,d;i&&(a=i[1],p=i[2],d=i[3]);let l=a.replace(/[?&].*$/,"").replace(/[)]+$/,"").replace(/\/\/+$/,"");l=l.replace(/^(?:https?:\/\/[^\/]+\/|file:\/\/\/|webpack:\/\/\/?)/,"");let f=l.split("/").filter(Boolean).pop()||l;f=f.replace(/[?&].*$/,"").replace(/[)]+$/,""),(f.startsWith("&")||f.startsWith("?")||f.startsWith("platform=")||f.includes("platform=")||f.startsWith("dev=")||f.includes("dev="))&&(f="Unknown",l="Unknown");const b=f.match(/\.([a-z0-9]+)$/i),m=b?b[1].toLowerCase():"",g=m==="tsx"||m==="jsx"||m==="ts"||m==="js"?m:"other",N=s==="native"||l==="native",v=l.includes("InternalBytecode")||l.includes("metro-runtime")||l.includes("regenerator-runtime")||o==="tryCallOne"||o==="asyncGeneratorStep"||o==="_next"||o==="next"&&N,O=l.includes("node_modules")||l.includes("react-native/Libraries")||l.includes("react-native-inapp-inspector")&&!l.includes("/example/"),I=!N&&!v&&!O&&(g==="tsx"||g==="jsx"||g==="ts"||g==="js"||!f.includes(".bundle")&&f!=="Unknown"),R=I?"app":O?"dependency":N?"native":"runtime",U=v||N||o==="asyncGeneratorStep"||o==="_next";let h=l;h.includes("/example/")?h=h.substring(h.indexOf("/example/")+9):h.includes("/src/")?h=h.substring(h.indexOf("/src/")+1):h.includes("/node_modules/")&&(h=h.substring(h.indexOf("/node_modules/")+14));const _=p?`${f}:${p}${d?`:${d}`:""}`:f;return{raw:e,functionName:o,fileName:f,fullPath:h,rawFilePath:a,fileExt:g,frameType:R,isUserCode:I,isRuntimeNoise:U,lineNumber:p,columnNumber:d,isOrigin:t,copyableLocation:_}},getCleanCallerDisplay=e=>{if(!e||e==="Unknown"||e.trim()==="")return null;const t=e.trim();if(t.startsWith("&platform")||t.startsWith("?platform")||t.startsWith("&")||t.includes("&platform=")||t.includes("?platform=")){const s=t.match(/^(.*?)\s*[\(@]/);if(s&&s[1]&&!s[1].includes("&")&&!s[1].includes("platform")){const i=s[1].trim();if(i&&i!=="<anonymous>"&&i!=="anonymous"&&!i.startsWith("?anon_"))return{fileName:i,functionName:i,display:i}}return null}const n=parseStackLine(e,!0);if(!n)return null;if(n.fileName.includes(".bundle")||n.fileName.includes("platform=")||n.fileName.startsWith("&")||n.fileName.startsWith("?")||n.fileName==="index.bundle"||n.fileName==="bundle"||n.fileName==="Unknown")return n.functionName&&n.functionName!=="<anonymous>"&&n.functionName!=="anonymous"&&!n.functionName.startsWith("?")&&!n.functionName.startsWith("_callee")&&!n.functionName.includes("regeneratorRuntime")?{fileName:n.functionName,lineNumber:n.lineNumber,functionName:n.functionName,display:n.functionName}:null;const o=n.lineNumber?`${n.fileName}:${n.lineNumber}`:n.fileName;return{fileName:n.fileName,lineNumber:n.lineNumber,functionName:n.functionName,display:o}},openInVSCode=(e,t,n)=>{const r=t?Number(t):1,o=n?Number(n):1,s=t?`:${t}`:"",i=n?`:${n}`:"",a=e.replace(/^file:\/\//,"");let p=null;try{const m=u?.SourceCode?.scriptURL||u?.PlatformConstants?.serverHost||u?.DevSettings?.serverHost;if(typeof m=="string"&&m.length>0){const g=m.match(/^(https?:\/\/[^/]+)/);g?p=g[1]:!m.startsWith("http")&&m.includes(":")&&(p=`http://${m}`)}}catch{}Array.from(new Set([...p?[p]:[],"http://localhost:8081","http://127.0.0.1:8081","http://10.0.2.2:8081"])).forEach(m=>{try{fetch(`${m}/open-stack-frame`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:a,lineNumber:r,column:o})}).catch(()=>{})}catch{}});const l=`vscode://file/${a.replace(/^\/+/,"")}${s}${i}`,f=`cursor://file/${a.replace(/^\/+/,"")}${s}${i}`,b=`vscode-insiders://file/${a.replace(/^\/+/,"")}${s}${i}`;y.openURL(l).catch(()=>{y.openURL(f).catch(()=>{y.openURL(b).catch(()=>{copyToClipboard(`${a}${s}${i}`,"Location")})})})},ANALYTICS_EVENT_PALETTE=[c.googleBlue,c.googleGreen,c.googlePurple,c.googleTeal,c.googleRed,c.googleOrange,c.blue700,c.materialGreen],getEventColor=e=>{const t=typeof e=="string"?e:String(e||"");let n=0;for(let r=0;r<t.length;r++)n=n*31+t.charCodeAt(r)|0;return ANALYTICS_EVENT_PALETTE[Math.abs(n)%ANALYTICS_EVENT_PALETTE.length]};export{getEventCategory,registerGAPlugin}from"./gaAnalyticsRegistry";export const getCategoryColors=e=>{switch(e){case"page_view":case"Page View":return{bg:c.blueBg,border:c.blueBorder,text:c.blue800};case"ecommerce":case"Ecommerce":return{bg:c.greenBg,border:c.greenBorder,text:c.materialGreen};case"system":case"System":return{bg:c.greyBg,border:c.greyBorder,text:c.grey600};default:return{bg:c.purpleBg,border:c.purpleBorder,text:c.purpleText}}},getRuntimeDiagnostics=()=>{const e=typeof global.HermesInternal<"u",t=typeof global._v8runtime<"u",n=e?"hermes":t?"v8":"jsc",o=typeof global.nativeFabricUIManager<"u"||!!global.__turboModuleProxy?"fabric":"paper";let s=32.4,i=64;try{const a=global.HermesInternal?.getInstrumentedStats?.();a?.js_heap_size?(s=Number((a.js_heap_size/(1024*1024)).toFixed(1)),i=Number(((a.js_allocated_bytes||a.js_heap_size*1.6)/(1024*1024)).toFixed(1))):global.performance?.memory?.usedJSHeapSize&&(s=Number((global.performance.memory.usedJSHeapSize/(1024*1024)).toFixed(1)),i=Number((global.performance.memory.totalJSHeapSize/(1024*1024)).toFixed(1)))}catch{}return{engineType:n,archType:o,usedHeapMb:s,totalAllocMb:i}},isUrlHidden=(e,t)=>{if(!e||!t||t.length===0)return!1;const n=e.trim();if(!n)return!1;const r=n.toLowerCase();for(let o=0;o<t.length;o++){const s=t[o]?.trim();if(!s)continue;const i=s.toLowerCase();if(r.includes(i))return!0;const a=i.replace(/^https?:\/\//,""),p=r.replace(/^https?:\/\//,"");if(a&&p.includes(a))return!0;if(s.includes("*"))try{const d=s.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");if(new RegExp(d,"i").test(n))return!0}catch{}try{if(new RegExp(s,"i").test(n))return!0}catch{}}return!1};
@@ -0,0 +1,88 @@
1
+ export interface FrameSample {
2
+ timestamp: number;
3
+ durationMs: number;
4
+ fps: number;
5
+ isJank: boolean;
6
+ isFrozen: boolean;
7
+ }
8
+ export interface JankEvent {
9
+ id: string;
10
+ timestamp: number;
11
+ timeStr: string;
12
+ durationMs: number;
13
+ fps: number;
14
+ severity: 'moderate' | 'severe' | 'frozen';
15
+ }
16
+ export interface MemoryStats {
17
+ usedHeapMb: number;
18
+ totalAllocMb: number;
19
+ peakHeapMb: number;
20
+ engine: string;
21
+ isAvailable: boolean;
22
+ gcCount?: number;
23
+ gcTimeMs?: number;
24
+ }
25
+ export interface PercentileStats {
26
+ p50Ms: number;
27
+ p90Ms: number;
28
+ p95Ms: number;
29
+ p99Ms: number;
30
+ }
31
+ export interface BucketDistribution {
32
+ ultraSmoothCount: number;
33
+ smoothCount: number;
34
+ degradedCount: number;
35
+ stutteredCount: number;
36
+ frozenCount: number;
37
+ totalSamples: number;
38
+ }
39
+ export interface EngineDetails {
40
+ engineName: string;
41
+ isHermes: boolean;
42
+ isFabric: boolean;
43
+ isTurboModules: boolean;
44
+ architectureName: string;
45
+ gcCollections?: number;
46
+ gcCpuTimeMs?: number;
47
+ heapUsedMb: number;
48
+ heapTotalMb: number;
49
+ peakHeapMb: number;
50
+ }
51
+ export interface LivePerformanceData {
52
+ fps: number;
53
+ avgFps: number;
54
+ minFps: number;
55
+ maxFps: number;
56
+ frameDurationMs: number;
57
+ refreshRateHz: number;
58
+ jankCount: number;
59
+ frozenCount: number;
60
+ jankPercent: number;
61
+ apdexScore: number;
62
+ apdexStatus: 'EXCELLENT' | 'GOOD' | 'FAIR' | 'POOR';
63
+ satisfiedCount: number;
64
+ toleratingCount: number;
65
+ frustratedCount: number;
66
+ longTaskCount: number;
67
+ percentiles: PercentileStats;
68
+ budgetUsedPercent: number;
69
+ budgetHeadroomMs: number;
70
+ distribution: BucketDistribution;
71
+ engineDetails: EngineDetails;
72
+ jsEventLoopLagMs: number;
73
+ avgJsLagMs: number;
74
+ peakJsLagMs: number;
75
+ healthScore: number;
76
+ healthStatus: 'EXCELLENT' | 'GOOD' | 'FAIR' | 'POOR';
77
+ frameHistory: number[];
78
+ jsLagHistory: number[];
79
+ recentJanks: JankEvent[];
80
+ memory: MemoryStats;
81
+ sessionDurationSec: number;
82
+ isStressTesting: boolean;
83
+ runJsStressTest: (durationMs?: number) => void;
84
+ runRenderStressTest: () => void;
85
+ triggerGC: () => void;
86
+ resetStats: () => void;
87
+ }
88
+ export declare const usePerformanceMonitor: (active?: boolean) => LivePerformanceData;
@@ -0,0 +1 @@
1
+ import{useState as e,useEffect as z,useRef as a,useCallback as k,useMemo as xe}from"react";export const usePerformanceMonitor=(f=!0)=>{const H=a(0),I=a(0),x=a([]),C=a([]),S=a(0),R=a(0),N=a(0),v=a(0),E=a(0),B=a(0),O=a(0),U=a(0),A=a(0),P=a(0),M=a([]),_=a(null),y=a(null),$=a(null),V=a(null),h=k(()=>{const t=!!global.HermesInternal,i=!!global._v8runtime,n=typeof global.nativeFabricUIManager<"u"||!!global.__turboModuleProxy,s=`${t?"Hermes":i?"V8 Engine":"JavaScriptCore"} \u2022 ${n?"Fabric":"Paper"}`;let o=0,u=0,m=!1,g,J;try{const T=global.HermesInternal;if(T?.getInstrumentedStats){const r=T.getInstrumentedStats();if(r&&typeof r=="object"){const l=r.js_heap_size??r.heapSize??r["js.heap_size"]??r.js_allocated_bytes??0,j=r.js_allocated_bytes??r.allocatedBytes??r["js.allocated_bytes"]??r.totalAllocatedBytes??l;(l>0||j>0)&&(o=Number((l/(1024*1024)).toFixed(2)),u=Number((j/(1024*1024)).toFixed(2)),g=r.gc_num_collections??r.num_gc_collections??r["gc.num_collections"],J=r.gc_cpu_time??r.gc_time??r["gc.cpu_time"],m=!0)}}else if(global.performance?.memory?.usedJSHeapSize){const r=global.performance.memory;o=Number((r.usedJSHeapSize/(1024*1024)).toFixed(2)),u=Number((r.totalJSHeapSize/(1024*1024)).toFixed(2)),m=!0}}catch{}const L=v?.current||0,F=Math.max(L,o);return v&&(v.current=F),{usedHeapMb:o,totalAllocMb:u,peakHeapMb:F,engine:s,isAvailable:m,gcCount:g,gcTimeMs:J}},[]),[Ce,Q]=e(60),[Se,W]=e(60),[Re,Y]=e(60),[_e,Z]=e(60),[ye,q]=e(16.6),[Le,ut]=e(60),[Te,ee]=e(0),[ke,te]=e(0),[He,ne]=e(0),[b,re]=e(1),[Ie,se]=e(0),[Ne,oe]=e(0),[ve,ae]=e(0),[G,ce]=e(0),[Ae,Pe]=e({p50Ms:16.6,p90Ms:16.6,p95Ms:16.6,p99Ms:16.6}),[we,De]=e(100),[Je,je]=e(0),[ze,Ee]=e({ultraSmoothCount:0,smoothCount:0,degradedCount:0,stutteredCount:0,frozenCount:0,totalSamples:0}),[Be,ue]=e(0),[Oe,ie]=e(0),[Ue,le]=e(0),[$e,me]=e(()=>Array(45).fill(16.6)),[Ve,fe]=e(()=>Array(25).fill(0)),[qe,ge]=e([]),[Ge,w]=e(!1),[Xe,de]=e(0),[p,X]=e(()=>h()),Ke=xe(()=>{const t=!!global.HermesInternal,i=!!global._v8runtime,n=typeof global.nativeFabricUIManager<"u"||!!global.__turboModuleProxy,c=!!global.__turboModuleProxy;return{engineName:t?"Hermes":i?"V8 Engine":"JavaScriptCore",isHermes:t,isFabric:n,isTurboModules:c,architectureName:n?"Fabric (New Architecture)":"Paper (Legacy)",heapUsedMb:p.usedHeapMb,heapTotalMb:p.totalAllocMb,peakHeapMb:p.peakHeapMb,gcCollections:p.gcCount,gcCpuTimeMs:p.gcTimeMs}},[p]);z(()=>{if(!f)return;let t=!0,i=6;H.current=performance.now();const n=c=>{if(!t)return;if(i>0){H.current=c,i--,_.current=requestAnimationFrame(n);return}const s=c-H.current;if(H.current=c,s>0&&s<800){I.current++;const o=Math.min(60,Math.max(1,Math.round(1e3/Math.max(16,s)))),u=Number(s.toFixed(1));if(s<=18.5)E.current++;else if(s<=66.6){if(B.current++,A.current++,s>36){const m={id:`jank_${Date.now()}_${Math.random().toString(36).substring(2,6)}`,timestamp:Date.now(),timeStr:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),durationMs:u,fps:o,severity:"moderate"};M.current=[m,...M.current.slice(0,19)]}}else{O.current++,P.current++;const m={id:`jank_${Date.now()}_${Math.random().toString(36).substring(2,6)}`,timestamp:Date.now(),timeStr:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),durationMs:u,fps:o,severity:"frozen"};M.current=[m,...M.current.slice(0,19)]}x.current.push(u),x.current.length>45&&x.current.shift(),I.current===1?(S.current=o,R.current=o):(o<S.current&&o>=15&&(S.current=o),o>R.current&&(R.current=o))}_.current=requestAnimationFrame(n)};return _.current=requestAnimationFrame(n),()=>{t=!1,_.current&&cancelAnimationFrame(_.current)}},[f]),z(()=>{if(!f)return;const t=30;let i=performance.now()+t,n=5;const c=()=>{const s=performance.now(),o=s-i;if(i=s+t,n>0){n--,y.current=setTimeout(c,t);return}const u=Math.max(0,Number((o-8).toFixed(1)));u>N.current&&(N.current=u),u>=50&&U.current++,C.current.push(u),C.current.length>30&&C.current.shift(),y.current=setTimeout(c,t)};return y.current=setTimeout(c,t),()=>{y.current&&clearTimeout(y.current)}},[f]),z(()=>{if(!f)return;const i=setInterval(()=>{const n=x.current,c=C.current;if(n.length>0){const s=n[n.length-1]??16.6,u=n.reduce((d,K)=>d+K,0)/n.length,m=Math.min(60,Math.max(1,Math.round(1e3/Math.max(16,u)))),g=Math.min(60,Math.max(1,Math.round(1e3/Math.max(16,s))));Q(g),W(m),q(s),me([...n]),Y(S.current||g),Z(R.current||g);const J=Math.max(1,I.current),L=E.current,F=B.current,T=O.current,r=Number(((L+F/2)/Math.max(1,L+F+T)).toFixed(2));re(Math.max(0,Math.min(1,r))),se(L),oe(F),ae(T),ce(U.current);const l=[...n].sort((d,K)=>d-K),j=l[Math.floor(l.length*.5)]??16.6,nt=l[Math.floor(l.length*.9)]??16.6,rt=l[Math.floor(l.length*.95)]??16.6,st=l[Math.floor(l.length*.99)]??16.6;Pe({p50Ms:Number(j.toFixed(1)),p90Ms:Number(nt.toFixed(1)),p95Ms:Number(rt.toFixed(1)),p99Ms:Number(st.toFixed(1))});const ot=Math.min(250,Number((s/16.6*100).toFixed(0))),at=Number(Math.max(0,16.6-s).toFixed(1));De(ot),je(at);let pe=0,Me=0,he=0,be=0,Fe=0;for(const d of n)d<=16.6?pe++:d<=24?Me++:d<=34?he++:d<=66.6?be++:Fe++;Ee({ultraSmoothCount:pe,smoothCount:Me,degradedCount:he,stutteredCount:be,frozenCount:Fe,totalSamples:n.length});const ct=Number(((A.current+P.current)/J*100).toFixed(1));ne(ct),ee(A.current),te(P.current),ge([...M.current])}if(c.length>0){const s=c[c.length-1]??0,o=c.reduce((m,g)=>m+g,0),u=Number((o/c.length).toFixed(1));ue(s),ie(u),le(N.current),fe([...c])}},300);return()=>{clearInterval(i)}},[f]),z(()=>{if(f)return $.current=setInterval(()=>{X(h())},1500),V.current=setInterval(()=>{de(t=>t+1)},1e3),()=>{$.current&&clearInterval($.current),V.current&&clearInterval(V.current)}},[f,h]);const D=xe(()=>{const t=Math.round(b*100-Math.min(G*2,10));return Math.max(0,Math.min(100,t))},[b,G]),Qe=D>=88?"EXCELLENT":D>=72?"GOOD":D>=55?"FAIR":"POOR",We=b>=.94?"EXCELLENT":b>=.85?"GOOD":b>=.7?"FAIR":"POOR",Ye=k((t=120)=>{w(!0),setTimeout(()=>{const i=performance.now();for(;performance.now()-i<t;)Math.sqrt(Math.random()*1e6);w(!1)},50)},[]),Ze=k(()=>{w(!0);let t=0;const i=setInterval(()=>{t++,q(n=>Number((n+.1).toFixed(1))),t>25&&(clearInterval(i),w(!1))},16)},[]),et=k(()=>{try{const t=global.HermesInternal;t?.gc?t.gc():global.gc&&global.gc(),setTimeout(()=>{X(h())},200)}catch{}},[]),tt=k(()=>{I.current=0,E.current=0,B.current=0,O.current=0,U.current=0,A.current=0,P.current=0,S.current=0,R.current=0,N.current=0,v.current=0,x.current=[],C.current=[],M.current=[],Q(60),W(60),Y(60),Z(60),q(16.6),re(1),se(0),oe(0),ae(0),ce(0),ee(0),te(0),ne(0),ue(0),ie(0),le(0),me(Array(45).fill(16.6)),fe(Array(25).fill(0)),ge([]),de(0),X(h())},[h]);return{fps:Ce,avgFps:Se,minFps:Re,maxFps:_e,frameDurationMs:ye,refreshRateHz:Le,jankCount:Te,frozenCount:ke,jankPercent:He,apdexScore:b,apdexStatus:We,satisfiedCount:Ie,toleratingCount:Ne,frustratedCount:ve,longTaskCount:G,percentiles:Ae,budgetUsedPercent:we,budgetHeadroomMs:Je,distribution:ze,engineDetails:Ke,jsEventLoopLagMs:Be,avgJsLagMs:Oe,peakJsLagMs:Ue,healthScore:D,healthStatus:Qe,frameHistory:$e,jsLagHistory:Ve,recentJanks:qe,memory:p,sessionDurationSec:Xe,isStressTesting:Ge,runJsStressTest:Ye,runRenderStressTest:Ze,triggerGC:et,resetStats:tt}};