react-native-inapp-inspector 2.5.12 → 2.5.14

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 (392) hide show
  1. package/README.md +0 -8
  2. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  3. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  4. package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
  5. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  6. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  7. package/android/.gradle/8.9/gc.properties +0 -0
  8. package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
  9. package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
  10. package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
  11. package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
  12. package/android/.gradle/9.2.0/gc.properties +0 -0
  13. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  14. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  15. package/android/.gradle/vcs-1/gc.properties +0 -0
  16. package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
  17. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/results.bin +1 -0
  18. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/BuildConfig.dex +0 -0
  19. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView$iconView$1.dex +0 -0
  20. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView.dex +0 -0
  21. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NativeNetworkInspectorSpec.dex +0 -0
  22. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$Companion.dex +0 -0
  23. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$activityEventListener$1.dex +0 -0
  24. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$frameCallback$1.dex +0 -0
  25. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$62$$inlined$sortedByDescending$1.dex +0 -0
  26. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$shakeListener$1.dex +0 -0
  27. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.dex +0 -0
  28. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule.dex +0 -0
  29. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorPackage.dex +0 -0
  30. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  31. package/android/build/.transforms/c93e459e24d856bde563ebb048265732/results.bin +1 -0
  32. package/android/build/.transforms/c93e459e24d856bde563ebb048265732/transformed/classes/classes_dex/classes.dex +0 -0
  33. package/android/build/generated/source/buildConfig/debug/com/inappinspector/BuildConfig.java +10 -0
  34. package/android/build/generated/source/codegen/java/com/inappinspector/NativeNetworkInspectorSpec.java +176 -0
  35. package/android/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
  36. package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec-generated.cpp +236 -0
  37. package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec.h +31 -0
  38. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.cpp +22 -0
  39. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.h +24 -0
  40. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.cpp +16 -0
  41. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.h +17 -0
  42. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.cpp +19 -0
  43. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.h +18 -0
  44. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/RNInAppInspectorSpecJSI.h +337 -0
  45. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.cpp +17 -0
  46. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.h +23 -0
  47. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.cpp +16 -0
  48. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.h +20 -0
  49. package/android/build/generated/source/codegen/schema.json +1 -0
  50. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +19 -0
  51. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  52. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  53. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  54. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  55. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  56. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +1 -0
  57. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_inappinspector_file_paths.xml.flat +0 -0
  58. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -0
  59. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  60. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  61. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  62. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  63. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  64. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/BuildConfig.class +0 -0
  65. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
  66. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +3 -0
  67. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +28 -0
  68. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +19 -0
  69. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  70. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  71. package/android/build/intermediates/packaged_res/debug/packageDebugResources/xml/inappinspector_file_paths.xml +7 -0
  72. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  73. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/BuildConfig.class +0 -0
  74. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
  75. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
  76. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
  77. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
  78. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$activityEventListener$1.class +0 -0
  79. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
  80. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$62$$inlined$sortedByDescending$1.class +0 -0
  81. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
  82. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.class +0 -0
  83. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule.class +0 -0
  84. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorPackage.class +0 -0
  85. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  86. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +2 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  155. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  156. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  157. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  158. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  159. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  160. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  161. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  162. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  163. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  164. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  165. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  166. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  167. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  168. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  169. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  170. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  171. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  172. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  173. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  174. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  175. package/android/build/outputs/logs/manifest-merger-debug-report.txt +35 -0
  176. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  177. package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  178. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
  179. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
  180. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
  181. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$activityEventListener$1.class +0 -0
  182. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
  183. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$62$$inlined$sortedByDescending$1.class +0 -0
  184. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
  185. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.class +0 -0
  186. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule.class +0 -0
  187. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorPackage.class +0 -0
  188. package/android/src/main/AndroidManifest.xml +11 -0
  189. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +492 -45
  190. package/android/src/main/res/xml/inappinspector_file_paths.xml +7 -0
  191. package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +47 -49
  192. package/dist/commonjs/components/Inspector/BoxModelVisualizer.d.ts +8 -0
  193. package/dist/commonjs/components/Inspector/BoxModelVisualizer.js +76 -0
  194. package/dist/commonjs/components/Inspector/ConsoleExportModal.js +51 -51
  195. package/dist/commonjs/components/Inspector/ConsoleTab.js +7 -7
  196. package/dist/commonjs/components/Inspector/CrashTab.js +17 -17
  197. package/dist/commonjs/components/Inspector/DebuggingTab.js +37 -37
  198. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +2 -2
  199. package/dist/commonjs/components/Inspector/FabLauncher.js +4 -4
  200. package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +2 -2
  201. package/dist/commonjs/components/Inspector/InspectorHeader.js +36 -36
  202. package/dist/commonjs/components/Inspector/MainScreen.js +38 -75
  203. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +10 -10
  204. package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +1 -0
  205. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +222 -222
  206. package/dist/commonjs/components/Inspector/NetworkExportModal.d.ts +10 -0
  207. package/dist/commonjs/components/Inspector/NetworkExportModal.js +333 -0
  208. package/dist/commonjs/components/Inspector/NetworkTab.js +60 -53
  209. package/dist/commonjs/components/Inspector/NpmStarPrompt.js +11 -12
  210. package/dist/commonjs/components/Inspector/ReduxDetail.js +17 -19
  211. package/dist/commonjs/components/Inspector/ReduxTab.js +5 -5
  212. package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
  213. package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +17 -16
  214. package/dist/commonjs/components/Inspector/SettingsPanel.js +43 -47
  215. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
  216. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +34 -3
  217. package/dist/commonjs/components/Inspector/SocketCard.js +2 -2
  218. package/dist/commonjs/components/Inspector/SupportPage.js +5 -5
  219. package/dist/commonjs/components/Inspector/TabBar.js +9 -15
  220. package/dist/commonjs/components/Inspector/UiA11yAuditPanel.d.ts +7 -0
  221. package/dist/commonjs/components/Inspector/UiA11yAuditPanel.js +97 -0
  222. package/dist/commonjs/components/Inspector/UiInspectorDetail.d.ts +2 -0
  223. package/dist/commonjs/components/Inspector/UiInspectorDetail.js +485 -0
  224. package/dist/commonjs/components/Inspector/UiInspectorOverlay.d.ts +2 -0
  225. package/dist/commonjs/components/Inspector/UiInspectorOverlay.js +199 -0
  226. package/dist/commonjs/components/Inspector/UiInspectorTab.d.ts +2 -0
  227. package/dist/commonjs/components/Inspector/UiInspectorTab.js +117 -0
  228. package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.d.ts +10 -0
  229. package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.js +148 -0
  230. package/dist/commonjs/components/Inspector/index.d.ts +28 -0
  231. package/dist/commonjs/components/Inspector/index.js +1 -0
  232. package/dist/commonjs/components/LogCard.js +12 -10
  233. package/dist/commonjs/components/SkeletonPlaceholder.d.ts +3 -0
  234. package/dist/commonjs/components/SkeletonPlaceholder.js +34 -3
  235. package/dist/commonjs/constants/index.js +1 -1
  236. package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
  237. package/dist/commonjs/constants/telemetryConfig.js +1 -1
  238. package/dist/commonjs/constants/version.d.ts +1 -1
  239. package/dist/commonjs/constants/version.js +1 -1
  240. package/dist/commonjs/customHooks/crashHandler.d.ts +1 -1
  241. package/dist/commonjs/customHooks/crashHandler.js +6 -6
  242. package/dist/commonjs/customHooks/uiInspectorManager.d.ts +22 -0
  243. package/dist/commonjs/customHooks/uiInspectorManager.js +1 -0
  244. package/dist/commonjs/helpers/index.js +1 -3
  245. package/dist/commonjs/helpers/remoteConfig.js +1 -1
  246. package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -0
  247. package/dist/commonjs/helpers/searchQueryParser.js +7 -5
  248. package/dist/commonjs/helpers/shareFormatter.d.ts +16 -0
  249. package/dist/commonjs/helpers/shareFormatter.js +16 -9
  250. package/dist/commonjs/helpers/uiInspectorEngine.d.ts +62 -0
  251. package/dist/commonjs/helpers/uiInspectorEngine.js +19 -0
  252. package/dist/commonjs/i18n/locales/ar.json +1 -1
  253. package/dist/commonjs/i18n/locales/bn.json +1 -1
  254. package/dist/commonjs/i18n/locales/de.json +1 -1
  255. package/dist/commonjs/i18n/locales/en.json +1 -1
  256. package/dist/commonjs/i18n/locales/es.json +1 -1
  257. package/dist/commonjs/i18n/locales/fr.json +1 -1
  258. package/dist/commonjs/i18n/locales/gu.json +1 -1
  259. package/dist/commonjs/i18n/locales/hi.json +1 -1
  260. package/dist/commonjs/i18n/locales/id.json +1 -1
  261. package/dist/commonjs/i18n/locales/it.json +1 -1
  262. package/dist/commonjs/i18n/locales/ja.json +1 -1
  263. package/dist/commonjs/i18n/locales/kn.json +1 -1
  264. package/dist/commonjs/i18n/locales/ko.json +1 -1
  265. package/dist/commonjs/i18n/locales/ml.json +1 -1
  266. package/dist/commonjs/i18n/locales/mr.json +1 -1
  267. package/dist/commonjs/i18n/locales/nl.json +1 -1
  268. package/dist/commonjs/i18n/locales/pa.json +1 -1
  269. package/dist/commonjs/i18n/locales/pl.json +1 -1
  270. package/dist/commonjs/i18n/locales/pt.json +1 -1
  271. package/dist/commonjs/i18n/locales/ru.json +1 -1
  272. package/dist/commonjs/i18n/locales/ta.json +1 -1
  273. package/dist/commonjs/i18n/locales/te.json +1 -1
  274. package/dist/commonjs/i18n/locales/tr.json +1 -1
  275. package/dist/commonjs/i18n/locales/vi.json +1 -1
  276. package/dist/commonjs/i18n/locales/zh.json +1 -1
  277. package/dist/commonjs/index.d.ts +4 -2
  278. package/dist/commonjs/index.js +3 -3
  279. package/dist/commonjs/native/NativeInspector.d.ts +4 -0
  280. package/dist/commonjs/native/NativeInspector.js +1 -1
  281. package/dist/commonjs/native/NativeNetworkInspector.d.ts +4 -0
  282. package/dist/commonjs/styles/AppFonts.d.ts +4 -0
  283. package/dist/commonjs/styles/AppFonts.js +1 -1
  284. package/dist/commonjs/styles/index.d.ts +2 -0
  285. package/dist/commonjs/styles/index.js +1 -1
  286. package/dist/commonjs/types/editor.d.ts +31 -0
  287. package/dist/commonjs/types/enums.d.ts +0 -2
  288. package/dist/commonjs/types/enums.js +1 -1
  289. package/dist/commonjs/types/interfaces.d.ts +1 -1
  290. package/dist/esm/components/Inspector/AnalyticsFilterModal.js +73 -75
  291. package/dist/esm/components/Inspector/BoxModelVisualizer.d.ts +8 -0
  292. package/dist/esm/components/Inspector/BoxModelVisualizer.js +76 -0
  293. package/dist/esm/components/Inspector/ConsoleExportModal.js +67 -67
  294. package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
  295. package/dist/esm/components/Inspector/CrashTab.js +58 -58
  296. package/dist/esm/components/Inspector/DebuggingTab.js +105 -105
  297. package/dist/esm/components/Inspector/DeviceInfoTab.js +2 -2
  298. package/dist/esm/components/Inspector/FabLauncher.js +50 -50
  299. package/dist/esm/components/Inspector/FloatingCaptureWidget.js +23 -23
  300. package/dist/esm/components/Inspector/InspectorHeader.js +64 -64
  301. package/dist/esm/components/Inspector/MainScreen.js +87 -124
  302. package/dist/esm/components/Inspector/MediaGalleryTab.js +151 -151
  303. package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +1 -0
  304. package/dist/esm/components/Inspector/MediaPreviewModal.js +468 -468
  305. package/dist/esm/components/Inspector/NetworkExportModal.d.ts +10 -0
  306. package/dist/esm/components/Inspector/NetworkExportModal.js +333 -0
  307. package/dist/esm/components/Inspector/NetworkTab.js +143 -136
  308. package/dist/esm/components/Inspector/NpmStarPrompt.js +32 -33
  309. package/dist/esm/components/Inspector/ReduxDetail.js +54 -56
  310. package/dist/esm/components/Inspector/ReduxTab.js +9 -9
  311. package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
  312. package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +23 -22
  313. package/dist/esm/components/Inspector/SettingsPanel.js +109 -113
  314. package/dist/esm/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
  315. package/dist/esm/components/Inspector/SkeletonPlaceholder.js +42 -11
  316. package/dist/esm/components/Inspector/SocketCard.js +13 -13
  317. package/dist/esm/components/Inspector/SupportPage.js +5 -5
  318. package/dist/esm/components/Inspector/TabBar.js +35 -41
  319. package/dist/esm/components/Inspector/UiA11yAuditPanel.d.ts +7 -0
  320. package/dist/esm/components/Inspector/UiA11yAuditPanel.js +97 -0
  321. package/dist/esm/components/Inspector/UiInspectorDetail.d.ts +2 -0
  322. package/dist/esm/components/Inspector/UiInspectorDetail.js +422 -0
  323. package/dist/esm/components/Inspector/UiInspectorOverlay.d.ts +2 -0
  324. package/dist/esm/components/Inspector/UiInspectorOverlay.js +138 -0
  325. package/dist/esm/components/Inspector/UiInspectorTab.d.ts +2 -0
  326. package/dist/esm/components/Inspector/UiInspectorTab.js +117 -0
  327. package/dist/esm/components/Inspector/UiLiveStyleTweaker.d.ts +10 -0
  328. package/dist/esm/components/Inspector/UiLiveStyleTweaker.js +148 -0
  329. package/dist/esm/components/Inspector/index.d.ts +28 -0
  330. package/dist/esm/components/Inspector/index.js +1 -0
  331. package/dist/esm/components/LogCard.js +24 -22
  332. package/dist/esm/components/SkeletonPlaceholder.d.ts +3 -0
  333. package/dist/esm/components/SkeletonPlaceholder.js +42 -11
  334. package/dist/esm/constants/index.js +1 -1
  335. package/dist/esm/constants/telemetryConfig.d.ts +3 -3
  336. package/dist/esm/constants/telemetryConfig.js +1 -1
  337. package/dist/esm/constants/version.d.ts +1 -1
  338. package/dist/esm/constants/version.js +1 -1
  339. package/dist/esm/customHooks/crashHandler.d.ts +1 -1
  340. package/dist/esm/customHooks/crashHandler.js +6 -6
  341. package/dist/esm/customHooks/uiInspectorManager.d.ts +22 -0
  342. package/dist/esm/customHooks/uiInspectorManager.js +1 -0
  343. package/dist/esm/helpers/index.js +4 -6
  344. package/dist/esm/helpers/remoteConfig.js +1 -1
  345. package/dist/esm/helpers/searchQueryParser.d.ts +1 -0
  346. package/dist/esm/helpers/searchQueryParser.js +7 -5
  347. package/dist/esm/helpers/shareFormatter.d.ts +16 -0
  348. package/dist/esm/helpers/shareFormatter.js +20 -13
  349. package/dist/esm/helpers/uiInspectorEngine.d.ts +48 -0
  350. package/dist/esm/helpers/uiInspectorEngine.js +19 -0
  351. package/dist/esm/i18n/locales/ar.json +1 -1
  352. package/dist/esm/i18n/locales/bn.json +1 -1
  353. package/dist/esm/i18n/locales/de.json +1 -1
  354. package/dist/esm/i18n/locales/en.json +1 -1
  355. package/dist/esm/i18n/locales/es.json +1 -1
  356. package/dist/esm/i18n/locales/fr.json +1 -1
  357. package/dist/esm/i18n/locales/gu.json +1 -1
  358. package/dist/esm/i18n/locales/hi.json +1 -1
  359. package/dist/esm/i18n/locales/id.json +1 -1
  360. package/dist/esm/i18n/locales/it.json +1 -1
  361. package/dist/esm/i18n/locales/ja.json +1 -1
  362. package/dist/esm/i18n/locales/kn.json +1 -1
  363. package/dist/esm/i18n/locales/ko.json +1 -1
  364. package/dist/esm/i18n/locales/ml.json +1 -1
  365. package/dist/esm/i18n/locales/mr.json +1 -1
  366. package/dist/esm/i18n/locales/nl.json +1 -1
  367. package/dist/esm/i18n/locales/pa.json +1 -1
  368. package/dist/esm/i18n/locales/pl.json +1 -1
  369. package/dist/esm/i18n/locales/pt.json +1 -1
  370. package/dist/esm/i18n/locales/ru.json +1 -1
  371. package/dist/esm/i18n/locales/ta.json +1 -1
  372. package/dist/esm/i18n/locales/te.json +1 -1
  373. package/dist/esm/i18n/locales/tr.json +1 -1
  374. package/dist/esm/i18n/locales/vi.json +1 -1
  375. package/dist/esm/i18n/locales/zh.json +1 -1
  376. package/dist/esm/index.d.ts +4 -2
  377. package/dist/esm/index.js +8 -8
  378. package/dist/esm/native/NativeInspector.d.ts +4 -0
  379. package/dist/esm/native/NativeInspector.js +1 -1
  380. package/dist/esm/native/NativeNetworkInspector.d.ts +4 -0
  381. package/dist/esm/styles/AppFonts.d.ts +4 -0
  382. package/dist/esm/styles/AppFonts.js +1 -1
  383. package/dist/esm/styles/index.d.ts +2 -0
  384. package/dist/esm/styles/index.js +1 -1
  385. package/dist/esm/types/editor.d.ts +31 -0
  386. package/dist/esm/types/enums.d.ts +0 -2
  387. package/dist/esm/types/enums.js +1 -1
  388. package/dist/esm/types/interfaces.d.ts +1 -1
  389. package/ios/NetworkInspectorModule.mm +597 -336
  390. package/package.json +1 -1
  391. package/src/native/NativeInspector.ts +67 -0
  392. package/src/native/NativeNetworkInspector.ts +4 -0
@@ -1,7 +1,7 @@
1
- import{LogBox as D,NativeModules as M,TurboModuleRegistry as U,NativeEventEmitter as P,Platform as x,AppState as J,Dimensions as z}from"react-native";import{CrashExportFormat as V,CrashType as f}from"../types/enums";import{addLogFromCrash as G}from"./consoleLogger";import{showNativeFloatingButton as W,setNativeFloatingButtonBadge as Y}from"../native/NativeInspector";import{t as s}from"../i18n";export{V as CrashExportFormat};export const DEFAULT_CRASH_IGNORED_TYPES={js:!0,native:!1,render:!0,promise:!1,custom:!1};let k=[],T=!1,N=0,L="",p=[],g=[];const F=50;let C=100;const Z=Date.now();let _=!1,b={...DEFAULT_CRASH_IGNORED_TYPES},w="fatal_only",B=!0;export const setCrashIgnoredTypesConfig=e=>{b={...b,...e}},getCrashIgnoredTypesConfig=()=>({...b}),setCrashModalTriggerPolicyConfig=e=>{w=e},getCrashModalTriggerPolicyConfig=()=>w,setCrashThrottleDuplicatesConfig=e=>{B=e},applyCrashPolicyPreset=e=>{switch(e){case"max_shield":b={js:!1,native:!1,render:!1,promise:!1,custom:!1};break;case"silent":b={js:!0,native:!0,render:!0,promise:!0,custom:!0};break;default:b={...DEFAULT_CRASH_IGNORED_TYPES};break}return{...b}},setCrashModuleEnabled=e=>{_=e},getCrashModuleEnabled=()=>_,setMaxCrashLogsLimit=e=>{C=Math.max(10,e),p.length>C&&(p=p.slice(0,C))},getMaxCrashLogsLimit=()=>C,pruneCrashRecords=e=>{const r=e!==void 0?Math.max(0,e):Math.floor(p.length/2),n=p.length-r;return n>0&&(p=p.slice(0,r)),g.length>20&&(g=g.slice(0,20)),Math.max(0,n)},addCrashBreadcrumb=(e,r,n)=>{if(_)try{const o={type:e,message:r,timestamp:Date.now(),data:n};g.unshift(o),g.length>F&&(g=g.slice(0,F))}catch{}},recordNavigationBreadcrumb=(e,r)=>{addCrashBreadcrumb("navigation",s("crash.breadcrumbNavigation",{from:e||"/",to:r||"/"}),{from:e,to:r})},recordNetworkBreadcrumb=(e,r,n,o)=>{const t=n!=null?` [${n}]`:"",a=o!=null?` (${Math.round(o)}ms)`:"";addCrashBreadcrumb("network",`${r.toUpperCase()} ${e}${t}${a}`,{url:e,method:r,status:n,duration:o})},recordReduxBreadcrumb=(e,r)=>{addCrashBreadcrumb("redux",s("crash.breadcrumbAction",{actionType:e}),{type:e,payloadSummary:typeof r=="object"&&r!==null?Object.keys(r):typeof r})},recordUserActionBreadcrumb=(e,r)=>{addCrashBreadcrumb("user",e,r)},clearCrashBreadcrumbs=()=>{g=[]},getCrashBreadcrumbs=()=>[...g],parseCrashStackTrace=e=>{if(!e||typeof e!="string")return[];const r=e.split(`
2
- `),n=[];for(const o of r){const t=o.trim();if(!t||t.includes("crashHandler.ts")||t.includes("handleInterceptedCrash")||t.includes("addLogFromCrash")||t.includes("setupGlobalCrashHandler"))continue;const a=t.match(/^([^@]+)@(.*):(\d+):(\d+)$/);if(a){const[,c,i,h,$]=a,y=i.split("?")[0].split("/").pop()||i,S=!i.includes("node_modules")&&!i.includes("react-native")&&!i.includes("react-dom")&&!i.includes("hermes")&&!i.includes("internal");n.push({method:c.trim(),file:y,lineNumber:parseInt(h,10),column:parseInt($,10),raw:t,isAppCode:S});continue}const u=t.match(/^at\s+(.+)\s+\((.+):(\d+):(\d+)\)$/);if(u){const[,c,i,h,$]=u,y=i.split("?")[0].split("/").pop()||i,S=!i.includes("node_modules")&&!i.includes("react-native")&&!i.includes("react-dom")&&!i.includes("internal");n.push({method:c.trim(),file:y,lineNumber:parseInt(h,10),column:parseInt($,10),raw:t,isAppCode:S});continue}const d=t.match(/^at\s+(.+):(\d+):(\d+)$/);if(d){const[,c,i,h]=d,$=c.split("?")[0].split("/").pop()||c,y=!c.includes("node_modules")&&!c.includes("react-native");n.push({method:"<anonymous>",file:$,lineNumber:parseInt(i,10),column:parseInt(h,10),raw:t,isAppCode:y});continue}const m=t.match(/^at\s+([a-zA-Z0-9_$.]+)\(([a-zA-Z0-9_$]+\.java):(\d+)\)$/);if(m){const[,c,i,h]=m,$=!c.startsWith("com.facebook.react")&&!c.startsWith("android.");n.push({method:c,file:i,lineNumber:parseInt(h,10),column:0,raw:t,isAppCode:$});continue}const l=t.match(/^\d+\s+([^\s]+)\s+(0x[0-9a-fA-F]+)\s+(.+)$/);if(l){const[,c,,i]=l,h=!c.startsWith("lib")&&!c.startsWith("Core")&&!c.startsWith("React");n.push({method:i,file:c,lineNumber:0,column:0,raw:t,isAppCode:h});continue}n.push({method:t.startsWith("at ")?t.slice(3):t,file:"runtime",lineNumber:0,column:0,raw:t,isAppCode:!1})}return n};const q=()=>{try{const e=globalThis.performance;if(e&&e.memory)return{usedJSHeapSize:Math.round(e.memory.usedJSHeapSize/(1024*1024)),totalJSHeapSize:Math.round(e.memory.totalJSHeapSize/(1024*1024))}}catch{}},K=()=>{try{const e=z.get("window");return`${Math.round(e.width)}x${Math.round(e.height)} (${e.scale}x)`}catch{return s("crash.unknown")}};export const computeCrashFingerprint=e=>{const r=e.type||"js",n=e.name||"Error",o=e.parsedStack&&e.parsedStack.length>0?e.parsedStack[0]:null,t=o?`${o.file}:${o.lineNumber}`:"unknown";return`${r}_${n}_${t}`},getCrashRecords=()=>[...p],clearCrashRecords=()=>{p=[],emitCrashEvent({error:null,message:"__CLEARED__",timestamp:Date.now()})},subscribeCrashEvents=e=>(k.push(e),()=>{k=k.filter(r=>r!==e)}),emitCrashEvent=e=>{if(e.message!=="__CLEARED__"){const r=Date.now();if(r-N<250)return;N=r}k.forEach(r=>{try{r(e)}catch{}})},handleInterceptedCrash=(e,r,n=!1,o,t)=>{try{const a=e instanceof Error||typeof e=="object"&&e!==null?e:new Error(String(e||s("crash.runtimeException"))),u=a.message||(typeof e=="string"?e:s("crash.runtimeException"));let d="";typeof r=="string"?d=r:Array.isArray(r)?d=r.map(E=>`at ${E.methodName||"<anonymous>"} (${E.file||"unknown"}:${E.lineNumber||0}:${E.column||0})`).join(`
3
- `):d=a.stack||new Error().stack||"";let m=o||f.Js;const l=u.toLowerCase();if(o||(l.includes("native")||l.includes("sigsegv")||l.includes("nsrange")||l.includes("nullpointerexception")||l.includes("fatal signal")?m=f.Native:l.includes("promise")||l.includes("unhandled rejection")||l.includes("unhandledrejection")?m=f.Promise:l.includes("render")||l.includes("errorboundary")||t?m=f.Render:m=f.Js),!!b[m])return{id:`crash_ignored_${Date.now()}`,isFatal:n,type:m,message:u,timestamp:Date.now(),dateStr:new Date().toLocaleDateString(),timeStr:new Date().toLocaleTimeString()};const i=new Date,h=i.toLocaleDateString(),$=i.toLocaleTimeString(),y=parseCrashStackTrace(d),S=`${m}_${u}_${d.slice(0,80)}`,R=Date.now();if(B&&S===L&&R-N<500)return p.length>0&&(p[0].duplicateCount=(p[0].duplicateCount||1)+1),p[0];L=S,N=R;const j=G(a,`[${n?s("crash.logFatalCrash"):s("crash.logUnhandledError")}] ${u}`,d,n),A=typeof globalThis.HermesInternal<"u",H=typeof globalThis.nativeFabricUIManager<"u",I={id:`crash_${Date.now()}_${Math.random().toString(36).substr(2,6)}`,error:a,isFatal:n,type:m,message:u,name:a.name||(n?s("crash.errorNameFatal"):s("crash.errorNameUnhandled")),stack:d,parsedStack:y,componentStack:t||void 0,timestamp:Date.now(),dateStr:h,timeStr:$,deviceInfo:{platform:x.OS,osVersion:String(x.Version),rnVersion:x.constants?.reactNativeVersion?`${x.constants.reactNativeVersion.major}.${x.constants.reactNativeVersion.minor}.${x.constants.reactNativeVersion.patch}`:s("crash.unknown"),isHermes:A,isFabric:H,appState:J.currentState||"active"},memoryInfo:q(),breadcrumbs:[...g],logId:j?.id};p.unshift(I),p.length>C&&(p=p.slice(0,C));let v=!1;w==="all_errors"?v=!0:w==="fatal_only"?v=n||m===f.Native:w==="silent_tab_only"&&(v=!1),emitCrashEvent({error:a,isFatal:n,message:`[${n?s("crash.logFatalCrash"):s("crash.logUnhandledError")}] ${u}`,stack:d,timestamp:Date.now(),logId:j?.id,crashRecord:I,shouldShowModal:v});try{W(),Y(!0)}catch{}return I}catch{return{id:`crash_${Date.now()}`,isFatal:!0,type:f.Js,message:String(e||s("crash.unknownException")),timestamp:Date.now(),dateStr:new Date().toLocaleDateString(),timeStr:new Date().toLocaleTimeString()}}},recordCustomCrash=(e,r)=>handleInterceptedCrash(e,typeof e=="object"?e.stack:void 0,r?.isFatal??!1,r?.type||f.Custom,r?.componentStack),triggerGlobalCrashScreen=e=>{emitCrashEvent({error:e.error||new Error(e.message),isFatal:!0,message:e.message,stack:e.stack,timestamp:e.timestamp||Date.now(),logId:e.logId,crashRecord:e})},simulateTestCrash=(e=f.Js,r,n,o=!0)=>{const t=new Error(r||X(e));return handleInterceptedCrash(e===f.Native?t.message:t,n||t.stack,o,e,e===f.Render?Q():void 0)};const X=e=>{switch(e){case"native":return s("crash.simNativeMessage");case"promise":return s("crash.simPromiseMessage");case"render":return s("crash.simRenderMessage");default:return s("crash.simJsMessage")}},Q=()=>{try{const e=new Error;if(e.stack)return e.stack.split(`
1
+ import{LogBox as D,NativeModules as M,TurboModuleRegistry as U,NativeEventEmitter as P,Platform as x,AppState as J,Dimensions as z}from"react-native";import{CrashExportFormat as V,CrashType as h}from"../types/enums";import{addLogFromCrash as G}from"./consoleLogger";import{showNativeFloatingButton as W,setNativeFloatingButtonBadge as Y}from"../native/NativeInspector";import{t as s}from"../i18n";export{V as CrashExportFormat};export const DEFAULT_CRASH_IGNORED_TYPES={js:!0,native:!1,render:!0,promise:!1,custom:!1};let k=[],T=!1,N=0,L="",p=[],g=[];const F=50;let C=100;const Z=Date.now();let _=!1,b={...DEFAULT_CRASH_IGNORED_TYPES},v="fatal_only",B=!0;export const setCrashIgnoredTypesConfig=e=>{b={...b,...e}},getCrashIgnoredTypesConfig=()=>({...b}),setCrashModalTriggerPolicyConfig=e=>{v=e},getCrashModalTriggerPolicyConfig=()=>v,setCrashThrottleDuplicatesConfig=e=>{B=e},applyCrashPolicyPreset=e=>{switch(e){case"max_shield":b={js:!1,native:!1,render:!1,promise:!1,custom:!1};break;case"silent":b={js:!0,native:!0,render:!0,promise:!0,custom:!0};break;default:b={...DEFAULT_CRASH_IGNORED_TYPES};break}return{...b}},setCrashModuleEnabled=e=>{_=e},getCrashModuleEnabled=()=>_,setMaxCrashLogsLimit=e=>{C=Math.max(10,e),p.length>C&&(p=p.slice(0,C))},getMaxCrashLogsLimit=()=>C,pruneCrashRecords=e=>{const r=e!==void 0?Math.max(0,e):Math.floor(p.length/2),n=p.length-r;return n>0&&(p=p.slice(0,r)),g.length>20&&(g=g.slice(0,20)),Math.max(0,n)},addCrashBreadcrumb=(e,r,n)=>{if(_)try{const o={type:e,message:r,timestamp:Date.now(),data:n};g.unshift(o),g.length>F&&(g=g.slice(0,F))}catch{}},recordNavigationBreadcrumb=(e,r)=>{addCrashBreadcrumb("navigation",s("crash.breadcrumbNavigation",{from:e||"/",to:r||"/"}),{from:e,to:r})},recordNetworkBreadcrumb=(e,r,n,o)=>{const t=n!=null?` [${n}]`:"",c=o!=null?` (${Math.round(o)}ms)`:"";addCrashBreadcrumb("network",`${r.toUpperCase()} ${e}${t}${c}`,{url:e,method:r,status:n,duration:o})},recordReduxBreadcrumb=(e,r)=>{addCrashBreadcrumb("redux",s("crash.breadcrumbAction",{actionType:e}),{type:e,payloadSummary:typeof r=="object"&&r!==null?Object.keys(r):typeof r})},recordUserActionBreadcrumb=(e,r)=>{addCrashBreadcrumb("user",e,r)},clearCrashBreadcrumbs=()=>{g=[]},getCrashBreadcrumbs=()=>[...g],parseCrashStackTrace=e=>{if(!e||typeof e!="string")return[];const r=e.split(`
2
+ `),n=[];for(const o of r){const t=o.trim();if(!t||t.includes("crashHandler.ts")||t.includes("handleInterceptedCrash")||t.includes("addLogFromCrash")||t.includes("setupGlobalCrashHandler"))continue;const c=t.match(/^([^@]+)@(.*):(\d+):(\d+)$/);if(c){const[,a,i,d,$]=c,y=i.split("?")[0].split("/").pop()||i,S=!i.includes("node_modules")&&!i.includes("react-native")&&!i.includes("react-dom")&&!i.includes("hermes")&&!i.includes("internal");n.push({method:a.trim(),file:y,lineNumber:parseInt(d,10),column:parseInt($,10),raw:t,isAppCode:S});continue}const l=t.match(/^at\s+(.+)\s+\((.+):(\d+):(\d+)\)$/);if(l){const[,a,i,d,$]=l,y=i.split("?")[0].split("/").pop()||i,S=!i.includes("node_modules")&&!i.includes("react-native")&&!i.includes("react-dom")&&!i.includes("internal");n.push({method:a.trim(),file:y,lineNumber:parseInt(d,10),column:parseInt($,10),raw:t,isAppCode:S});continue}const f=t.match(/^at\s+(.+):(\d+):(\d+)$/);if(f){const[,a,i,d]=f,$=a.split("?")[0].split("/").pop()||a,y=!a.includes("node_modules")&&!a.includes("react-native");n.push({method:"<anonymous>",file:$,lineNumber:parseInt(i,10),column:parseInt(d,10),raw:t,isAppCode:y});continue}const m=t.match(/^at\s+([a-zA-Z0-9_$.]+)\(([a-zA-Z0-9_$]+\.java):(\d+)\)$/);if(m){const[,a,i,d]=m,$=!a.startsWith("com.facebook.react")&&!a.startsWith("android.");n.push({method:a,file:i,lineNumber:parseInt(d,10),column:0,raw:t,isAppCode:$});continue}const u=t.match(/^\d+\s+([^\s]+)\s+(0x[0-9a-fA-F]+)\s+(.+)$/);if(u){const[,a,,i]=u,d=!a.startsWith("lib")&&!a.startsWith("Core")&&!a.startsWith("React");n.push({method:i,file:a,lineNumber:0,column:0,raw:t,isAppCode:d});continue}n.push({method:t.startsWith("at ")?t.slice(3):t,file:"runtime",lineNumber:0,column:0,raw:t,isAppCode:!1})}return n};const q=()=>{try{const e=globalThis.performance;if(e&&e.memory)return{usedJSHeapSize:Math.round(e.memory.usedJSHeapSize/(1024*1024)),totalJSHeapSize:Math.round(e.memory.totalJSHeapSize/(1024*1024))}}catch{}},K=()=>{try{const e=z.get("window");return`${Math.round(e.width)}x${Math.round(e.height)} (${e.scale}x)`}catch{return s("crash.unknown")}};export const computeCrashFingerprint=e=>{const r=e.type||"js",n=e.name||"Error",o=e.parsedStack&&e.parsedStack.length>0?e.parsedStack[0]:null,t=o?`${o.file}:${o.lineNumber}`:"unknown";return`${r}_${n}_${t}`},getCrashRecords=()=>[...p],clearCrashRecords=()=>{p=[],emitCrashEvent({error:null,message:"__CLEARED__",timestamp:Date.now()})},subscribeCrashEvents=e=>(k.push(e),()=>{k=k.filter(r=>r!==e)}),emitCrashEvent=e=>{if(e.message!=="__CLEARED__"){const r=Date.now();if(r-N<250)return;N=r}k.forEach(r=>{try{r(e)}catch{}})},handleInterceptedCrash=(e,r,n=!1,o,t,c=!1)=>{try{const l=e instanceof Error||typeof e=="object"&&e!==null?e:new Error(String(e||s("crash.runtimeException"))),f=l.message||(typeof e=="string"?e:s("crash.runtimeException"));let m="";typeof r=="string"?m=r:Array.isArray(r)?m=r.map(w=>`at ${w.methodName||"<anonymous>"} (${w.file||"unknown"}:${w.lineNumber||0}:${w.column||0})`).join(`
3
+ `):m=l.stack||new Error().stack||"";let u=o||h.Js;const a=f.toLowerCase();if(o||(a.includes("native")||a.includes("sigsegv")||a.includes("nsrange")||a.includes("nullpointerexception")||a.includes("fatal signal")?u=h.Native:a.includes("promise")||a.includes("unhandled rejection")||a.includes("unhandledrejection")?u=h.Promise:a.includes("render")||a.includes("errorboundary")||t?u=h.Render:u=h.Js),!c&&!!b[u])return{id:`crash_ignored_${Date.now()}`,isFatal:n,type:u,message:f,timestamp:Date.now(),dateStr:new Date().toLocaleDateString(),timeStr:new Date().toLocaleTimeString()};const i=new Date,d=i.toLocaleDateString(),$=i.toLocaleTimeString(),y=parseCrashStackTrace(m),S=`${u}_${f}_${m.slice(0,80)}`,R=Date.now();if(B&&S===L&&R-N<500)return p.length>0&&(p[0].duplicateCount=(p[0].duplicateCount||1)+1),p[0];L=S,N=R;const j=G(l,`[${n?s("crash.logFatalCrash"):s("crash.logUnhandledError")}] ${f}`,m,n),A=typeof globalThis.HermesInternal<"u",H=typeof globalThis.nativeFabricUIManager<"u",I={id:`crash_${Date.now()}_${Math.random().toString(36).substr(2,6)}`,error:l,isFatal:n,type:u,message:f,name:l.name||(n?s("crash.errorNameFatal"):s("crash.errorNameUnhandled")),stack:m,parsedStack:y,componentStack:t||void 0,timestamp:Date.now(),dateStr:d,timeStr:$,deviceInfo:{platform:x.OS,osVersion:String(x.Version),rnVersion:x.constants?.reactNativeVersion?`${x.constants.reactNativeVersion.major}.${x.constants.reactNativeVersion.minor}.${x.constants.reactNativeVersion.patch}`:s("crash.unknown"),isHermes:A,isFabric:H,appState:J.currentState||"active"},memoryInfo:q(),breadcrumbs:[...g],logId:j?.id};p.unshift(I),p.length>C&&(p=p.slice(0,C));let E=!1;v==="all_errors"?E=!0:v==="fatal_only"?E=n||u===h.Native:v==="silent_tab_only"&&(E=!1),emitCrashEvent({error:l,isFatal:n,message:`[${n?s("crash.logFatalCrash"):s("crash.logUnhandledError")}] ${f}`,stack:m,timestamp:Date.now(),logId:j?.id,crashRecord:I,shouldShowModal:E});try{W(),Y(!0)}catch{}return I}catch{return{id:`crash_${Date.now()}`,isFatal:!0,type:h.Js,message:String(e||s("crash.unknownException")),timestamp:Date.now(),dateStr:new Date().toLocaleDateString(),timeStr:new Date().toLocaleTimeString()}}},recordCustomCrash=(e,r)=>handleInterceptedCrash(e,typeof e=="object"?e.stack:void 0,r?.isFatal??!1,r?.type||h.Custom,r?.componentStack),triggerGlobalCrashScreen=e=>{emitCrashEvent({error:e.error||new Error(e.message),isFatal:!0,message:e.message,stack:e.stack,timestamp:e.timestamp||Date.now(),logId:e.logId,crashRecord:e})},simulateTestCrash=(e=h.Js,r,n,o=!0)=>{const t=new Error(r||X(e));return handleInterceptedCrash(e===h.Native?t.message:t,n||t.stack,o,e,e===h.Render?Q():void 0,!0)};const X=e=>{switch(e){case"native":return s("crash.simNativeMessage");case"promise":return s("crash.simPromiseMessage");case"render":return s("crash.simRenderMessage");default:return s("crash.simJsMessage")}},Q=()=>{try{const e=new Error;if(e.stack)return e.stack.split(`
4
4
  `).slice(1,6).map(r=>` ${r.trim()}`).join(`
5
- `)}catch{}};export const exportCrashReport=(e,r="text")=>{if(r==="json")return JSON.stringify(e,null,2);const n=Math.round((e.timestamp-Z)/1e3);if(r==="markdown"){const t=[];return t.push(`## ${s("crash.mdReportTitle",{name:e.name||"Error"})}`),t.push(`> **${e.message}**`),t.push(""),t.push(`- **${s("crash.reportType")}** \`${e.type.toUpperCase()}\``),t.push(`- **${s("crash.reportFatal")}** \`${e.isFatal?s("crash.mdSeverityFatal"):s("crash.mdSeverityHandled")}\``),t.push(`- **${s("crash.reportTimestamp")}** ${e.dateStr} ${e.timeStr}`),t.push(`- **${s("crash.reportUptime")}** ${n}s`),t.push(`- **${s("crash.reportPlatform")}** ${e.deviceInfo?.platform?.toUpperCase()} (v${e.deviceInfo?.osVersion})`),t.push(`- **${s("crash.reportReactNative")}** v${e.deviceInfo?.rnVersion||"N/A"}`),t.push(`- **${s("crash.jsEngine")}** ${e.deviceInfo?.isHermes?s("crash.hermesEngine"):s("crash.jsc")}`),t.push(`- **${s("crash.reportArchitecture")}** ${e.deviceInfo?.isFabric?s("crash.reportFabricNew"):s("crash.reportPaperLegacy")}`),e.memoryInfo&&t.push(`- **${s("crash.reportJsMemory")}** ${e.memoryInfo.usedJSHeapSize} MB / ${e.memoryInfo.totalJSHeapSize} MB`),t.push(""),t.push(`### ${s("crash.mdStackTrace")}`),t.push("```"),t.push(e.stack||s("crash.reportNoStackTrace")),t.push("```"),e.componentStack&&(t.push(""),t.push(`### ${s("crash.mdComponentHierarchy")}`),t.push("```"),t.push(e.componentStack),t.push("```")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(""),t.push(`### ${s("crash.mdRecentBreadcrumbs")}`),e.breadcrumbs.forEach(a=>{const u=new Date(a.timestamp).toLocaleTimeString();t.push(`- \`[${u}]\` **[${a.type.toUpperCase()}]** ${a.message}`)})),t.join(`
6
- `)}const o=[];return o.push("===================================================="),o.push(` ${s("crash.reportTitle")} `),o.push("===================================================="),o.push(`${s("crash.reportErrorName")} ${e.name||"Error"}`),o.push(`${s("crash.reportMessage")} ${e.message}`),o.push(`${s("crash.reportType")} ${e.type.toUpperCase()}`),o.push(`${s("crash.reportFatal")} ${e.isFatal?s("crash.reportFatalYes"):s("crash.reportFatalNo")}`),o.push(`${s("crash.reportTimestamp")} ${e.dateStr} ${e.timeStr} (${e.timestamp})`),o.push(`${s("crash.reportUptime")} ${s("crash.reportUptimeValue",{seconds:n})}`),o.push(`${s("crash.reportPlatform")} ${e.deviceInfo?.platform?.toUpperCase()} (v${e.deviceInfo?.osVersion})`),o.push(`${s("crash.reportReactNative")} ${e.deviceInfo?.rnVersion||"N/A"}`),o.push(`${s("crash.reportHermes")} ${e.deviceInfo?.isHermes?s("crash.reportEnabled"):s("crash.reportDisabled")}`),o.push(`${s("crash.reportArchitecture")} ${e.deviceInfo?.isFabric?s("crash.reportFabricNew"):s("crash.reportPaperLegacy")}`),o.push(`${s("crash.reportScreenSize")} ${K()}`),o.push(`${s("crash.reportAppState")} ${e.deviceInfo?.appState||"active"}`),e.memoryInfo&&o.push(`${s("crash.reportJsMemory")} ${e.memoryInfo.usedJSHeapSize} MB / ${e.memoryInfo.totalJSHeapSize} MB`),o.push("----------------------------------------------------"),o.push(`${s("crash.reportStackTrace")}`),o.push(e.stack||s("crash.reportNoStackTrace")),e.componentStack&&(o.push("----------------------------------------------------"),o.push(`${s("crash.reportComponentHierarchy")}`),o.push(e.componentStack)),e.breadcrumbs&&e.breadcrumbs.length>0&&(o.push("----------------------------------------------------"),o.push(`${s("crash.reportRecentBreadcrumbs")}`),e.breadcrumbs.forEach(t=>{const a=new Date(t.timestamp).toLocaleTimeString();o.push(` [${a}] [${t.type.toUpperCase()}] ${t.message}`)})),o.push("===================================================="),o.join(`
7
- `)},setupGlobalCrashHandler=()=>{if(!T){T=!0;try{D&&typeof D.ignoreAllLogs=="function"&&D.ignoreAllLogs(!0)}catch{}try{const e=require("react-native/Libraries/LogBox/Data/LogBoxData");e&&typeof e.setDisabled=="function"&&e.setDisabled(!0)}catch{}try{const e=M?.NetworkInspectorModule;e&&(typeof e.enableNativeCrashProtection=="function"&&e.enableNativeCrashProtection(),new P(e).addListener("onNativeCrash",n=>{const t=`[${(n?.platform||x.OS).toUpperCase()} ${s("crash.nativeCrashTitle")}] ${n?.message||s("crash.nativeUncaughtException")}`,a=n?.stack||"";handleInterceptedCrash(t,a,!0,"native")}))}catch{}try{const e=U||globalThis.__turboModuleProxy,r=M?.ExceptionsManager||(e?.get?e.get("ExceptionsManager"):null);if(r){r.reportFatalException=(o,t,a)=>{handleInterceptedCrash(o,t,!0,"native");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.reportSoftException=(o,t,a)=>{handleInterceptedCrash(o,t,!1,"js");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.reportException=o=>{const t=o?.message||o?.title||s("crash.nativeException"),a=o?.stack||o?.rawStack;handleInterceptedCrash(t,a,o?.isFatal??!0,"js");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.updateExceptionMessage=()=>{};try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}}const n=M?.RedBox||M?.RCTRedBox||(e?.get?e.get("RedBox")||e.get("RCTRedBox"):null);n&&(typeof n.showErrorMessage=="function"&&(n.showErrorMessage=()=>{}),typeof n.showUserError=="function"&&(n.showUserError=()=>{}),typeof n.dismiss=="function"&&n.dismiss())}catch{}try{const r=globalThis.ErrorUtils;r&&(typeof r.setGlobalHandler=="function"&&r.setGlobalHandler((n,o)=>{handleInterceptedCrash(n,n?.stack,o??!1,"js")}),typeof r.reportFatalError=="function"&&(r.reportFatalError=n=>{handleInterceptedCrash(n,n?.stack,!0,"js")}),typeof r.reportError=="function"&&(r.reportError=n=>{handleInterceptedCrash(n,n?.stack,!1,"js")}))}catch{}try{const e=globalThis,r=n=>{try{const o=n?.reason||n?.detail?.reason||n,t=o?.stack||(n?.stack??new Error().stack);handleInterceptedCrash(o,t,!1,"promise")}catch{}};typeof e.addEventListener=="function"&&e.addEventListener("unhandledrejection",r),typeof e.onunhandledrejection<"u"&&(e.onunhandledrejection=r)}catch{}}};
5
+ `)}catch{}};export const exportCrashReport=(e,r="text")=>{if(r==="json")return JSON.stringify(e,null,2);const n=Math.round((e.timestamp-Z)/1e3);if(r==="markdown"){const t=[];return t.push(`## ${s("crash.mdReportTitle",{name:e.name||"Error"})}`),t.push(`> **${e.message}**`),t.push(""),t.push(`- **${s("crash.reportType")}** \`${e.type.toUpperCase()}\``),t.push(`- **${s("crash.reportFatal")}** \`${e.isFatal?s("crash.mdSeverityFatal"):s("crash.mdSeverityHandled")}\``),t.push(`- **${s("crash.reportTimestamp")}** ${e.dateStr} ${e.timeStr}`),t.push(`- **${s("crash.reportUptime")}** ${n}s`),t.push(`- **${s("crash.reportPlatform")}** ${e.deviceInfo?.platform?.toUpperCase()} (v${e.deviceInfo?.osVersion})`),t.push(`- **${s("crash.reportReactNative")}** v${e.deviceInfo?.rnVersion||"N/A"}`),t.push(`- **${s("crash.jsEngine")}** ${e.deviceInfo?.isHermes?s("crash.hermesEngine"):s("crash.jsc")}`),t.push(`- **${s("crash.reportArchitecture")}** ${e.deviceInfo?.isFabric?s("crash.reportFabricNew"):s("crash.reportPaperLegacy")}`),e.memoryInfo&&t.push(`- **${s("crash.reportJsMemory")}** ${e.memoryInfo.usedJSHeapSize} MB / ${e.memoryInfo.totalJSHeapSize} MB`),t.push(""),t.push(`### ${s("crash.mdStackTrace")}`),t.push("```"),t.push(e.stack||s("crash.reportNoStackTrace")),t.push("```"),e.componentStack&&(t.push(""),t.push(`### ${s("crash.mdComponentHierarchy")}`),t.push("```"),t.push(e.componentStack),t.push("```")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(""),t.push(`### ${s("crash.mdRecentBreadcrumbs")}`),e.breadcrumbs.forEach(c=>{const l=new Date(c.timestamp).toLocaleTimeString();t.push(`- \`[${l}]\` **[${c.type.toUpperCase()}]** ${c.message}`)})),t.join(`
6
+ `)}const o=[];return o.push("===================================================="),o.push(` ${s("crash.reportTitle")} `),o.push("===================================================="),o.push(`${s("crash.reportErrorName")} ${e.name||"Error"}`),o.push(`${s("crash.reportMessage")} ${e.message}`),o.push(`${s("crash.reportType")} ${e.type.toUpperCase()}`),o.push(`${s("crash.reportFatal")} ${e.isFatal?s("crash.reportFatalYes"):s("crash.reportFatalNo")}`),o.push(`${s("crash.reportTimestamp")} ${e.dateStr} ${e.timeStr} (${e.timestamp})`),o.push(`${s("crash.reportUptime")} ${s("crash.reportUptimeValue",{seconds:n})}`),o.push(`${s("crash.reportPlatform")} ${e.deviceInfo?.platform?.toUpperCase()} (v${e.deviceInfo?.osVersion})`),o.push(`${s("crash.reportReactNative")} ${e.deviceInfo?.rnVersion||"N/A"}`),o.push(`${s("crash.reportHermes")} ${e.deviceInfo?.isHermes?s("crash.reportEnabled"):s("crash.reportDisabled")}`),o.push(`${s("crash.reportArchitecture")} ${e.deviceInfo?.isFabric?s("crash.reportFabricNew"):s("crash.reportPaperLegacy")}`),o.push(`${s("crash.reportScreenSize")} ${K()}`),o.push(`${s("crash.reportAppState")} ${e.deviceInfo?.appState||"active"}`),e.memoryInfo&&o.push(`${s("crash.reportJsMemory")} ${e.memoryInfo.usedJSHeapSize} MB / ${e.memoryInfo.totalJSHeapSize} MB`),o.push("----------------------------------------------------"),o.push(`${s("crash.reportStackTrace")}`),o.push(e.stack||s("crash.reportNoStackTrace")),e.componentStack&&(o.push("----------------------------------------------------"),o.push(`${s("crash.reportComponentHierarchy")}`),o.push(e.componentStack)),e.breadcrumbs&&e.breadcrumbs.length>0&&(o.push("----------------------------------------------------"),o.push(`${s("crash.reportRecentBreadcrumbs")}`),e.breadcrumbs.forEach(t=>{const c=new Date(t.timestamp).toLocaleTimeString();o.push(` [${c}] [${t.type.toUpperCase()}] ${t.message}`)})),o.push("===================================================="),o.join(`
7
+ `)},setupGlobalCrashHandler=()=>{if(!T){T=!0;try{D&&typeof D.ignoreAllLogs=="function"&&D.ignoreAllLogs(!0)}catch{}try{const e=require("react-native/Libraries/LogBox/Data/LogBoxData");e&&typeof e.setDisabled=="function"&&e.setDisabled(!0)}catch{}try{const e=M?.NetworkInspectorModule;e&&(typeof e.enableNativeCrashProtection=="function"&&e.enableNativeCrashProtection(),new P(e).addListener("onNativeCrash",n=>{const t=`[${(n?.platform||x.OS).toUpperCase()} ${s("crash.nativeCrashTitle")}] ${n?.message||s("crash.nativeUncaughtException")}`,c=n?.stack||"";handleInterceptedCrash(t,c,!0,"native")}))}catch{}try{const e=U||globalThis.__turboModuleProxy,r=M?.ExceptionsManager||(e?.get?e.get("ExceptionsManager"):null);if(r){r.reportFatalException=(o,t,c)=>{handleInterceptedCrash(o,t,!0,"native");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.reportSoftException=(o,t,c)=>{handleInterceptedCrash(o,t,!1,"js");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.reportException=o=>{const t=o?.message||o?.title||s("crash.nativeException"),c=o?.stack||o?.rawStack;handleInterceptedCrash(t,c,o?.isFatal??!0,"js");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.updateExceptionMessage=()=>{};try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}}const n=M?.RedBox||M?.RCTRedBox||(e?.get?e.get("RedBox")||e.get("RCTRedBox"):null);n&&(typeof n.showErrorMessage=="function"&&(n.showErrorMessage=()=>{}),typeof n.showUserError=="function"&&(n.showUserError=()=>{}),typeof n.dismiss=="function"&&n.dismiss())}catch{}try{const r=globalThis.ErrorUtils;r&&(typeof r.setGlobalHandler=="function"&&r.setGlobalHandler((n,o)=>{handleInterceptedCrash(n,n?.stack,o??!1,"js")}),typeof r.reportFatalError=="function"&&(r.reportFatalError=n=>{handleInterceptedCrash(n,n?.stack,!0,"js")}),typeof r.reportError=="function"&&(r.reportError=n=>{handleInterceptedCrash(n,n?.stack,!1,"js")}))}catch{}try{const e=globalThis,r=n=>{try{const o=n?.reason||n?.detail?.reason||n,t=o?.stack||(n?.stack??new Error().stack);handleInterceptedCrash(o,t,!1,"promise")}catch{}};typeof e.addEventListener=="function"&&e.addEventListener("unhandledrejection",r),typeof e.onunhandledrejection<"u"&&(e.onunhandledrejection=r)}catch{}}};
@@ -0,0 +1,22 @@
1
+ import { InspectedElementInfo, UiInspectorSubTab } from '../types';
2
+ type UiInspectorListener = (state: UiInspectorState) => void;
3
+ export interface UiInspectorState {
4
+ isInspectModeActive: boolean;
5
+ selectedElement: InspectedElementInfo | null;
6
+ activeSubTab: UiInspectorSubTab;
7
+ showAlignmentGrid: boolean;
8
+ showDistanceGuides: boolean;
9
+ history: InspectedElementInfo[];
10
+ tweakedStyles: Record<string, any>;
11
+ }
12
+ export declare function subscribeUiInspectorState(listener: UiInspectorListener): () => void;
13
+ export declare function getUiInspectorState(): UiInspectorState;
14
+ export declare function setInspectModeActive(active: boolean): void;
15
+ export declare function setSelectedUiElement(element: InspectedElementInfo | null): void;
16
+ export declare function setUiInspectorSubTab(subTab: UiInspectorSubTab): void;
17
+ export declare function toggleAlignmentGrid(show?: boolean): void;
18
+ export declare function toggleDistanceGuides(show?: boolean): void;
19
+ export declare function applyLiveStyleOverride(key: string, value: any): void;
20
+ export declare function resetLiveStyleOverrides(): void;
21
+ export declare function clearUiInspectorHistory(): void;
22
+ export {};
@@ -0,0 +1 @@
1
+ let e={isInspectModeActive:!1,selectedElement:null,activeSubTab:"styles",showAlignmentGrid:!1,showDistanceGuides:!0,history:[],tweakedStyles:{}};const i=new Set;function s(){const t={...e,history:[...e.history],tweakedStyles:{...e.tweakedStyles}};i.forEach(n=>{try{n(t)}catch(o){console.warn("[UIInspector] Listener notification error:",o)}})}export function subscribeUiInspectorState(t){return i.add(t),t(e),()=>{i.delete(t)}}export function getUiInspectorState(){return e}export function setInspectModeActive(t){e.isInspectModeActive=t,s()}export function setSelectedUiElement(t){e.selectedElement=t,t?(e.tweakedStyles={...t.tweakedStyles},e.history.some(n=>n.id===t.id)||(e.history=[t,...e.history.slice(0,19)])):e.tweakedStyles={},s()}export function setUiInspectorSubTab(t){e.activeSubTab=t,s()}export function toggleAlignmentGrid(t){e.showAlignmentGrid=typeof t=="boolean"?t:!e.showAlignmentGrid,s()}export function toggleDistanceGuides(t){e.showDistanceGuides=typeof t=="boolean"?t:!e.showDistanceGuides,s()}export function applyLiveStyleOverride(t,n){e.tweakedStyles={...e.tweakedStyles,[t]:n},e.selectedElement&&(e.selectedElement={...e.selectedElement,tweakedStyles:{...e.tweakedStyles},flattenedStyles:{...e.selectedElement.originalStyles,...e.tweakedStyles}}),s()}export function resetLiveStyleOverrides(){e.tweakedStyles={},e.selectedElement&&(e.selectedElement={...e.selectedElement,tweakedStyles:{},flattenedStyles:{...e.selectedElement.originalStyles}}),s()}export function clearUiInspectorHistory(){e.history=[],s()}
@@ -1,10 +1,8 @@
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+=` \\
1
+ import{Platform as b,ToastAndroid as y,Alert as P,NativeModules as u,Linking as x}from"react-native";import N 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 T}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<T?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 N?.setString=="function"?N.setString(r):typeof N?.default?.setString=="function"&&N.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{b.OS==="android"&&y?.show&&y.show(t?`${t} copied to clipboard`:"Copied to clipboard",y.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{b.OS==="android"&&y?.show&&y.show(`${t} copied to clipboard`,y.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
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!
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);N.setString(n);const r=s=>{t?t(s):w(s)},o="postman://";try{if(await x.canOpenURL(o))try{await x.openURL(o),r("Opened Postman (cURL copied to clipboard)");return}catch{}}catch{}r("cURL copied! Ready to paste into Postman")},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=b.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?
4
4
 
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(`
5
+ ${t}`,[{text:"Cancel",style:"cancel"},{text:"Open",onPress:()=>{x.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
6
  `);return r.length>t?{text:r.slice(0,t).join(`
9
7
  `)+`
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};
8
+ ...`,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 A=n.indexOf("@"),B=n.substring(0,A).trim(),L=n.substring(A+1).trim();n=B?`${B} (${L})`:L}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 S=f.match(/\.([a-z0-9]+)$/i),m=S?S[1].toLowerCase():"",g=m==="tsx"||m==="jsx"||m==="ts"||m==="js"?m:"other",$=s==="native"||l==="native",v=l.includes("InternalBytecode")||l.includes("metro-runtime")||l.includes("regenerator-runtime")||o==="tryCallOne"||o==="asyncGeneratorStep"||o==="_next"||o==="next"&&$,O=l.includes("node_modules")||l.includes("react-native/Libraries")||l.includes("react-native-inapp-inspector")&&!l.includes("/example/"),I=!$&&!v&&!O&&(g==="tsx"||g==="jsx"||g==="ts"||g==="js"||!f.includes(".bundle")&&f!=="Unknown"),R=I?"app":O?"dependency":$?"native":"runtime",U=v||$||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}`,S=`vscode-insiders://file/${a.replace(/^\/+/,"")}${s}${i}`;x.openURL(l).catch(()=>{x.openURL(f).catch(()=>{x.openURL(S).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};
@@ -1 +1 @@
1
- const d=["apis","logs","perf","analytics","redux","storage","device","crash","debugging","media","socket"];let u=null;export function getFirebaseRemoteConfig(e){if(e&&typeof e=="object")return u=e,e;if(u)return u;try{const n=require("@react-native-firebase/remote-config"),t=typeof n.default=="function"?n.default():typeof n=="function"?n():n;return u=t,t}catch{return null}}export function isFirebaseRemoteConfigAvailable(e){return!!getFirebaseRemoteConfig(e)}function l(e){if(e!=null){if(typeof e=="boolean")return e;if(typeof e=="number")return e!==0;if(typeof e=="string"){const n=e.trim().toLowerCase();if(n==="true"||n==="1"||n==="enabled"||n==="on")return!0;if(n==="false"||n==="0"||n==="disabled"||n==="off")return!1;try{return JSON.parse(e)}catch{return}}if(typeof e.asBoolean=="function")return e.asBoolean();if(typeof e.asString=="function"){const n=e.asString(),t=n.trim().toLowerCase();if(t==="true"||t==="1"||t==="enabled"||t==="on")return!0;if(t==="false"||t==="0"||t==="disabled"||t==="off")return!1;try{return JSON.parse(n)}catch{return}}}}export async function fetchRemoteConfigSettings(e,n=8e3){const t=getFirebaseRemoteConfig(e);if(!t)return null;try{const y=(async()=>{typeof t.fetchAndActivate=="function"?await t.fetchAndActivate():(typeof t.fetch=="function"&&await t.fetch(),typeof t.activate=="function"&&await t.activate())})(),_=new Promise((o,r)=>setTimeout(()=>r(new Error("Remote Config fetch timeout")),n));await Promise.race([y,_]).catch(()=>{});const s=o=>{if(typeof t.getValue=="function")try{return t.getValue(o)}catch{return}return t[o]},f={},i={},b=["inspector_modules","inapp_inspector_modules","react_native_inapp_inspector_modules"];for(const o of b){const r=s(o),c=l(r);if(c&&typeof c=="object")for(const a of d)typeof c[a]=="boolean"&&(i[a]=c[a])}for(const o of d){const r=[`inspector_module_${o}`,`inapp_inspector_${o}`,`inspector_${o}`,`inapp_inspector_module_${o}`,`rn_inspector_${o}`];for(const c of r){const a=s(c),p=l(a);if(typeof p=="boolean"){i[o]=p;break}}}Object.keys(i).length>0&&(i.apis===void 0&&(i.apis=!0),f.modules=i);const g=["inspector_capture_widget_enabled","inapp_inspector_capture_widget","inspector_floating_capture_enabled"];for(const o of g){const r=l(s(o));if(typeof r=="boolean"){f.captureWidgetEnabled=r;break}}const m=["inspector_enabled","inapp_inspector_enabled"];for(const o of m){const r=l(s(o));if(typeof r=="boolean"){f.enabled=r;break}}return Object.keys(f).length>0?f:null}catch{return null}}export async function fetchRemoteConfigModuleStatus(e,n=8e3){return(await fetchRemoteConfigSettings(e,n))?.modules||null}
1
+ const d=["apis","logs","perf","analytics","redux","storage","device","crash","media","socket"];let u=null;export function getFirebaseRemoteConfig(e){if(e&&typeof e=="object")return u=e,e;if(u)return u;try{const n=require("@react-native-firebase/remote-config"),t=typeof n.default=="function"?n.default():typeof n=="function"?n():n;return u=t,t}catch{return null}}export function isFirebaseRemoteConfigAvailable(e){return!!getFirebaseRemoteConfig(e)}function l(e){if(e!=null){if(typeof e=="boolean")return e;if(typeof e=="number")return e!==0;if(typeof e=="string"){const n=e.trim().toLowerCase();if(n==="true"||n==="1"||n==="enabled"||n==="on")return!0;if(n==="false"||n==="0"||n==="disabled"||n==="off")return!1;try{return JSON.parse(e)}catch{return}}if(typeof e.asBoolean=="function")return e.asBoolean();if(typeof e.asString=="function"){const n=e.asString(),t=n.trim().toLowerCase();if(t==="true"||t==="1"||t==="enabled"||t==="on")return!0;if(t==="false"||t==="0"||t==="disabled"||t==="off")return!1;try{return JSON.parse(n)}catch{return}}}}export async function fetchRemoteConfigSettings(e,n=8e3){const t=getFirebaseRemoteConfig(e);if(!t)return null;try{const y=(async()=>{typeof t.fetchAndActivate=="function"?await t.fetchAndActivate():(typeof t.fetch=="function"&&await t.fetch(),typeof t.activate=="function"&&await t.activate())})(),_=new Promise((o,r)=>setTimeout(()=>r(new Error("Remote Config fetch timeout")),n));await Promise.race([y,_]).catch(()=>{});const s=o=>{if(typeof t.getValue=="function")try{return t.getValue(o)}catch{return}return t[o]},f={},i={},b=["inspector_modules","inapp_inspector_modules","react_native_inapp_inspector_modules"];for(const o of b){const r=s(o),c=l(r);if(c&&typeof c=="object")for(const a of d)typeof c[a]=="boolean"&&(i[a]=c[a])}for(const o of d){const r=[`inspector_module_${o}`,`inapp_inspector_${o}`,`inspector_${o}`,`inapp_inspector_module_${o}`,`rn_inspector_${o}`];for(const c of r){const a=s(c),p=l(a);if(typeof p=="boolean"){i[o]=p;break}}}Object.keys(i).length>0&&(i.apis===void 0&&(i.apis=!0),f.modules=i);const m=["inspector_capture_widget_enabled","inapp_inspector_capture_widget","inspector_floating_capture_enabled"];for(const o of m){const r=l(s(o));if(typeof r=="boolean"){f.captureWidgetEnabled=r;break}}const g=["inspector_enabled","inapp_inspector_enabled"];for(const o of g){const r=l(s(o));if(typeof r=="boolean"){f.enabled=r;break}}return Object.keys(f).length>0?f:null}catch{return null}}export async function fetchRemoteConfigModuleStatus(e,n=8e3){return(await fetchRemoteConfigSettings(e,n))?.modules||null}
@@ -5,3 +5,4 @@ export interface SearchQueryOptions {
5
5
  isCaseSensitive?: boolean;
6
6
  }
7
7
  export declare function matchNetworkLogQuery(log: NetworkLog, searchQuery: string, routePath?: string, options?: SearchQueryOptions): boolean;
8
+ export declare function scoreNetworkLogQuery(log: NetworkLog, searchQuery: string, routePath?: string, options?: SearchQueryOptions): number;
@@ -1,5 +1,7 @@
1
- import{markSearchFilterUsed as N}from"./telemetry";const W=new Set(["via","nel","report-to","reporting-endpoints","cf-ray","cf-cache-status","alt-svc","server","etag","date","x-powered-by","x-request-id","x-content-type-options","accept-ranges","transfer-encoding","connection","keep-alive"]);function I(s){const u=[],w=/[^\s"']+|"([^"]*)"|'([^']*)'/g;let i;for(;(i=w.exec(s))!==null;)i[1]!=null?u.push(i[1]):i[2]!=null?u.push(i[2]):i[0]&&u.push(i[0]);return u}export function matchNetworkLogQuery(s,u,w,i){if(!u||u.trim().length===0)return!0;N();const R=!!i?.isCaseSensitive,L=!!i?.isRegex,x=i?.scope||"all",H=s.method||"",y=s.url||"",d=s.status!=null?String(s.status):"pending",o=typeof s.status=="number"?s.status:s.status!=null?parseInt(String(s.status),10):null,$=s.client||"",j=s.caller||"",b=w||s?.routeInfo?.path||"",k=n=>{if(n==null)return"";if(typeof n=="string")return n;try{return JSON.stringify(n)}catch{return""}},m=k(s.request),C=k(s.response),p=(n,l=!1)=>{if(!n||typeof n!="object")return"";const r=Object.entries(n);return l?r.map(([t,f])=>`${t}: ${f}`).join(`
2
- `):r.filter(([t])=>!W.has(t.toLowerCase())).map(([t,f])=>`${t}: ${f}`).join(`
3
- `)},v=p(s.requestHeaders,x==="headers"),q=p(s.responseHeaders,x==="headers"),h=(n=>{switch(n){case"url":return y;case"reqBody":return m;case"resBody":return C;case"headers":return`${v}
4
- ${q}`;default:return[y,H,d,b,$,j,m,C,v,q].join(" ")}})(x),c=(n,l)=>{if(L)try{return new RegExp(l,R?"":"i").test(n)}catch{}return R?n.includes(l):n.toLowerCase().includes(l.toLowerCase())},B=I(u);return B.length===0?!0:B.every(n=>{let l=!1,r=n;if(r.length>1&&(r.startsWith("-")||r.startsWith("!"))&&(l=!0,r=r.slice(1)),!r)return!0;let t=!1;const f=r.indexOf(":");if(f>0){const e=r.slice(0,f).toLowerCase(),a=r.slice(f+1);if(e==="url"||e==="u"||e==="path")t=c(y,a);else if(e==="method"||e==="m")t=c(H,a);else if(e==="status"||e==="s")if(a==="error"||a==="failed"||a==="err")t=s.status===0||o!==null&&o>=400;else if(a==="success"||a==="ok")t=o!==null&&o>=200&&o<300;else if(a.endsWith("xx")){const S=a[0];t=d.startsWith(S)}else t=d.includes(a);else if(e==="header"||e==="h"){const S=`${p(s.requestHeaders,!0)}
5
- ${p(s.responseHeaders,!0)}`;t=c(S,a)}else e==="body"||e==="b"?t=c(m,a)||c(C,a):e==="client"||e==="c"?t=c($,a):e==="page"||e==="p"?t=c(b,a):t=c(h,r)}else{const e=r.toLowerCase();e==="error"||e==="failed"||e==="err"||e==="fail"?t=s.status===0||o!==null&&o>=400||c(h,r):e==="success"||e==="ok"||e==="2xx"?t=o!==null&&o>=200&&o<300||c(h,r):/^[1-5]xx$/.test(e)?t=d.startsWith(e[0]):t=c(h,r)}return l?!t:t})}
1
+ import{markSearchFilterUsed as _}from"./telemetry";const A=new Set(["via","nel","report-to","reporting-endpoints","cf-ray","cf-cache-status","alt-svc","server","etag","date","x-powered-by","x-request-id","x-content-type-options","accept-ranges","transfer-encoding","connection","keep-alive"]);function J(t){const h=[],B=/[^\s"']+|"([^"]*)"|'([^']*)'/g;let p;for(;(p=B.exec(t))!==null;)p[1]!=null?h.push(p[1]):p[2]!=null?h.push(p[2]):p[0]&&h.push(p[0]);return h}export function matchNetworkLogQuery(t,h,B,p){if(!h||h.trim().length===0)return!0;_();const I=!!p?.isCaseSensitive,P=!!p?.isRegex,v=p?.scope||"all",x=t.method||"",O=t.url||"",R=t.status!=null?String(t.status):"pending",m=typeof t.status=="number"?t.status:t.status!=null?parseInt(String(t.status),10):null,N=t.client||"",q=t.caller||"",W=B||t?.routeInfo?.path||"",H=o=>{if(o==null)return"";if(typeof o=="string")return o;try{return JSON.stringify(o)}catch{return""}},$=H(t.request),j=H(t.response),b=(o,w=!1)=>{if(!o||typeof o!="object")return"";const c=Object.entries(o);return w?c.map(([s,y])=>`${s}: ${y}`).join(`
2
+ `):c.filter(([s])=>!A.has(s.toLowerCase())).map(([s,y])=>`${s}: ${y}`).join(`
3
+ `)},L=b(t.requestHeaders,v==="headers"),g=b(t.responseHeaders,v==="headers"),u=(o=>{switch(o){case"url":return O;case"reqBody":return $;case"resBody":return j;case"headers":return`${L}
4
+ ${g}`;default:return[O,x,R,W,N,q,$,j,L,g].join(" ")}})(v),r=(o,w)=>{if(P)try{return new RegExp(w,I?"":"i").test(o)}catch{}return I?o.includes(w):o.toLowerCase().includes(w.toLowerCase())},S=J(h);return S.length===0?!0:S.every(o=>{let w=!1,c=o;if(c.length>1&&(c.startsWith("-")||c.startsWith("!"))&&(w=!0,c=c.slice(1)),!c)return!0;let s=!1;const y=c.indexOf(":");if(y>0){const n=c.slice(0,y).toLowerCase(),f=c.slice(y+1);if(n==="url"||n==="u"||n==="path")s=r(O,f);else if(n==="method"||n==="m")s=r(x,f);else if(n==="status"||n==="s")if(f==="error"||f==="failed"||f==="err")s=t.status===0||m!==null&&m>=400;else if(f==="success"||f==="ok")s=m!==null&&m>=200&&m<300;else if(f.endsWith("xx")){const k=f[0];s=R.startsWith(k)}else s=R.includes(f);else if(n==="header"||n==="h"){const k=`${b(t.requestHeaders,!0)}
5
+ ${b(t.responseHeaders,!0)}`;s=r(k,f)}else n==="body"||n==="b"?s=r($,f)||r(j,f):n==="client"||n==="c"?s=r(N,f):n==="page"||n==="p"?s=r(W,f):s=r(u,c)}else{const n=c.toLowerCase();n==="error"||n==="failed"||n==="err"||n==="fail"?s=t.status===0||m!==null&&m>=400||r(u,c):n==="success"||n==="ok"||n==="2xx"?s=m!==null&&m>=200&&m<300||r(u,c):/^[1-5]xx$/.test(n)?s=R.startsWith(n[0]):s=r(u,c)}return w?!s:s})}export function scoreNetworkLogQuery(t,h,B,p){if(!h||h.trim().length===0)return 0;const I=!!p?.isCaseSensitive,P=p?.scope||"all",v=(t.method||"").trim(),x=(t.url||"").trim(),O=t.status!=null?String(t.status):"pending",R=t.client||"",m=t.caller||"",N=B||t?.routeInfo?.path||"";let q=x,W="",H="";try{const l=x.indexOf("?"),i=l>=0?x.slice(0,l):x;W=l>=0?x.slice(l+1):"";const C=i.indexOf("://"),a=C>=0?i.slice(C+3):i,d=a.indexOf("/");q=d>=0?a.slice(d):a;const T=q.split("/").filter(Boolean);H=T[T.length-1]||""}catch{q=x,H=x}const $=l=>{if(l==null)return"";if(typeof l=="string")return l;try{return JSON.stringify(l)}catch{return""}},j=$(t.request),b=$(t.response),L=(l,i=!1)=>{if(!l||typeof l!="object")return"";const C=Object.entries(l);return i?C.map(([a,d])=>`${a}: ${d}`).join(`
6
+ `):C.filter(([a])=>!A.has(a.toLowerCase())).map(([a,d])=>`${a}: ${d}`).join(`
7
+ `)},g=L(t.requestHeaders,P==="headers"),M=L(t.responseHeaders,P==="headers"),u=l=>I?l:l.toLowerCase(),r=u(h.trim()),S=u(H),o=u(q),w=u(x),c=u(v),s=u(O),y=u(N),n=u(R),f=u(m),k=u(W),E=u(g),U=u(M),z=u(j),F=u(b);let e=0;return S===r?e+=500:S.startsWith(r)?e+=350:S.includes(r)&&(e+=250),o===r?e+=400:o.includes(r)&&(e+=180),w.includes(r)&&(e+=120),c===r&&(e+=100),s===r&&(e+=90),y.includes(r)&&(e+=80),k.includes(r)&&(e+=60),E.includes(r)&&(e+=40),z.includes(r)&&(e+=30),U.includes(r)&&(e+=20),F.includes(r)&&(e+=5),J(h).forEach(l=>{if(!l||l.startsWith("-")||l.startsWith("!"))return;const i=u(l),C=i.indexOf(":");if(C>0){const a=i.slice(0,C),d=i.slice(C+1);a==="url"||a==="u"||a==="path"?o.includes(d)?e+=150:w.includes(d)&&(e+=100):a==="method"||a==="m"?c===d&&(e+=150):a==="status"||a==="s"?s.includes(d)&&(e+=150):a==="body"||a==="b"?(z.includes(d)&&(e+=80),F.includes(d)&&(e+=40)):(a==="header"||a==="h")&&(E.includes(d)||U.includes(d))&&(e+=80);return}S===i?e+=150:S.startsWith(i)?e+=100:S.includes(i)&&(e+=70),o.includes(i)?e+=40:w.includes(i)&&(e+=25),c===i&&(e+=50),s===i&&(e+=40),y.includes(i)&&(e+=30),(n.includes(i)||f.includes(i))&&(e+=20),E.includes(i)&&(e+=15),z.includes(i)&&(e+=10),U.includes(i)&&(e+=8),F.includes(i)&&(e+=2)}),e}
@@ -28,3 +28,19 @@ export declare function generateConsoleLogsFilename(format?: ConsoleLogExportFor
28
28
  export declare function formatConsoleLogsExport(logs: ConsoleLog[], format?: ConsoleLogExportFormat, options?: ConsoleLogExportOptions): string;
29
29
  export declare function estimateConsoleLogsExportSize(logs: ConsoleLog[], format?: ConsoleLogExportFormat, options?: ConsoleLogExportOptions): number;
30
30
  export declare function shareConsoleLogs(logs: ConsoleLog[], format?: ConsoleLogExportFormat, options?: ConsoleLogExportOptions, customTitle?: string): Promise<void>;
31
+ export type NetworkLogExportFormat = 'txt' | 'log' | 'json' | 'curl';
32
+ export interface NetworkLogExportOptions {
33
+ includeRequestHeaders?: boolean;
34
+ includeRequestBody?: boolean;
35
+ includeResponseHeaders?: boolean;
36
+ includeResponseBody?: boolean;
37
+ includeCurlCommand?: boolean;
38
+ includeTimestamps?: boolean;
39
+ includeAppInfo?: boolean;
40
+ ignorePattern?: string;
41
+ }
42
+ export declare const DEFAULT_NETWORK_EXPORT_OPTIONS: NetworkLogExportOptions;
43
+ export declare function generateNetworkLogsFilename(format?: NetworkLogExportFormat): string;
44
+ export declare function formatNetworkLogsExport(logs: NetworkLog[], format?: NetworkLogExportFormat, options?: NetworkLogExportOptions): string;
45
+ export declare function estimateNetworkLogsExportSize(logs: NetworkLog[], format?: NetworkLogExportFormat, options?: NetworkLogExportOptions): number;
46
+ export declare function shareNetworkLogs(logs: NetworkLog[], format?: NetworkLogExportFormat, options?: NetworkLogExportOptions, customTitle?: string): Promise<void>;
@@ -1,15 +1,22 @@
1
- import{Alert as b,Share as x}from"react-native";import{formatDateTime as c,getCurlCommand as P}from"./index";function r(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}export function formatApiReport(e){const n=(e.method||"GET").toUpperCase(),t=e.status===0?"Failed / Network Error":e.status!=null?`${e.status} ${e.status===200?"OK":""}`.trim():"Pending",i=e.duration!=null?`${e.duration}ms`:"N/A",o=c(e.startTime||Date.now()),s=P(e),a=["\u{1F680} API INSPECTION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Method: ${n}`,`\u{1F4CA} Status: ${t}`,`\u23F1\uFE0F Duration: ${i}`,`\u{1F552} Time: ${o}`];return e.client&&a.push(`\u{1F50C} Client: ${e.client.toUpperCase()}`),a.push(`\u{1F310} URL: ${e.url||"N/A"}`),a.push(""),e.requestHeaders&&Object.keys(e.requestHeaders).length>0&&(a.push("\u{1F4CB} Request Headers:"),a.push(r(e.requestHeaders)),a.push("")),e.request!=null&&e.request!==""&&(a.push("\u{1F4DD} Request Body:"),a.push(r(e.request)),a.push("")),e.responseHeaders&&Object.keys(e.responseHeaders).length>0&&(a.push("\u{1F4D1} Response Headers:"),a.push(r(e.responseHeaders)),a.push("")),e.response!=null&&e.response!==""&&(a.push("\u{1F4E5} Response Data:"),a.push(r(e.response)),a.push("")),s&&(a.push("\u{1F4BB} cURL Command:"),a.push(s),a.push("")),a.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),a.push("Generated by React Native InApp Inspector"),a.join(`
2
- `)}export function formatPushReport(e){const n=c(e.timestamp||Date.now()),t=(e.source||"push").toUpperCase(),i=(e.appState||"unknown").toUpperCase(),o=(e.action||"received").toUpperCase(),s=["\u{1F514} PUSH NOTIFICATION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Title: ${e.title||"(No Title)"}`,`\u{1F4DD} Body: ${e.body||"(No Body)"}`,`\u{1F3E2} Source: ${t}${e.domain?` (${e.domain})`:""}`,`\u{1F194} Message ID: ${e.id||"N/A"}`,`\u{1F4F1} App State: ${i}`,`\u{1F3AF} Action: ${o}`,`\u{1F552} Time: ${n}`];return e.subtitle&&s.push(`\u{1F4D1} Subtitle: ${e.subtitle}`),e.channelId&&s.push(`\u{1F3F7}\uFE0F Channel: ${e.channelId}`),e.priority&&s.push(`\u26A1 Priority: ${e.priority}`),e.badge!=null&&s.push(`\u{1F522} Badge: ${e.badge}`),e.sound&&s.push(`\u{1F50A} Sound: ${e.sound}`),e.imageUrl&&s.push(`\u{1F5BC}\uFE0F Image: ${e.imageUrl}`),s.push(""),e.data&&Object.keys(e.data).length>0&&(s.push("\u{1F4E6} Custom Data Payload:"),s.push(r(e.data)),s.push("")),e.customDomainAttributes&&Object.keys(e.customDomainAttributes).length>0&&(s.push("\u{1F3E2} Domain Attributes:"),s.push(r(e.customDomainAttributes)),s.push("")),e.rawPayload!=null&&(s.push("\u2699\uFE0F Raw Payload:"),s.push(r(e.rawPayload)),s.push("")),s.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),s.push("Generated by React Native InApp Inspector"),s.join(`
3
- `)}export function formatCrashReport(e){const n=`${e.dateStr||""} ${e.timeStr||""}`.trim()||c(e.timestamp),t=["\u{1F4A5} CRASH REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u26A0\uFE0F Error: ${e.name||"Error"}: ${e.message||"Unknown error"}`,`\u{1F6A8} Fatal: ${e.isFatal?"YES (Fatal)":"NO (Caught)"}`,`\u{1F3F7}\uFE0F Type: ${(e.type||"js").toUpperCase()}`,`\u{1F552} Time: ${n}`];return e.deviceInfo&&t.push(`\u{1F4F1} Platform: ${e.deviceInfo.platform||"N/A"} (OS: ${e.deviceInfo.osVersion||"N/A"}, RN: ${e.deviceInfo.rnVersion||"N/A"})`),e.memoryInfo?.usedJSHeapSize&&t.push(`\u{1F4BE} Used Heap: ${Math.round(e.memoryInfo.usedJSHeapSize/(1024*1024))} MB`),t.push(""),e.stack&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack),t.push("")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(`\u{1F43E} Breadcrumbs (${e.breadcrumbs.length}):`),e.breadcrumbs.slice(-10).forEach(i=>{t.push(` \u2022 [${i.type}] ${i.message} (${c(i.timestamp)})`)}),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
4
- `)}export function formatAnalyticsReport(e){const n=c(e.timestamp),t=["\u{1F4CA} ANALYTICS EVENT REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Event Name: ${e.name||"Unknown"}`,`\u{1F3E2} Source: ${(e.source||"manual").toUpperCase()}`,`\u{1F552} Timestamp: ${n}`];return e.screenName&&t.push(`\u{1F4F1} Screen Name: ${e.screenName}`),e.userId&&t.push(`\u{1F464} User ID: ${e.userId}`),e.trackingId&&t.push(`\u{1F194} Tracking ID: ${e.trackingId}`),t.push(""),e.params&&Object.keys(e.params).length>0&&(t.push("\u{1F4E6} Event Parameters:"),t.push(r(e.params)),t.push("")),e.userProperties&&Object.keys(e.userProperties).length>0&&(t.push("\u{1F464} User Properties:"),t.push(r(e.userProperties)),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
5
- `)}export function formatReduxReport(e){const n=typeof e.timestamp=="number"?c(e.timestamp):e.timestamp,t=["\u{1F504} REDUX ACTION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Action Type: ${e.type||"UNKNOWN"}`,`\u{1F552} Timestamp: ${n}`];return e.caller&&t.push(`\u{1F4CD} Caller: ${e.caller}`),e.originType&&t.push(`\u2699\uFE0F Origin: ${e.originType}`),e.affectedSlices&&e.affectedSlices.length>0&&t.push(`\u{1F370} Slices: ${e.affectedSlices.join(", ")}`),t.push(""),t.push("\u{1F4E6} Action Payload:"),t.push(r(e.payload)),t.push(""),e.prevState!==void 0&&(t.push("\u23EE\uFE0F Previous State:"),t.push(r(e.prevState)),t.push("")),e.nextState!==void 0&&(t.push("\u23ED\uFE0F Next State:"),t.push(r(e.nextState)),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
6
- `)}export function formatLogReport(e){const n=c(e.timestamp),t=["\u{1F4DC} CONSOLE LOG REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Level: ${(e.type||"info").toUpperCase()}`,`\u{1F552} Timestamp: ${n}`,`\u{1F4AC} Message: ${e.message||""}`];return e.caller&&t.push(`\u{1F4CD} Caller: ${e.caller}`),t.push(""),e.rawArgs&&e.rawArgs.length>0&&(t.push("\u{1F4E6} Arguments:"),t.push(r(e.rawArgs)),t.push("")),(e.stack||e.errorStack)&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack||e.errorStack||""),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
7
- `)}async function m(e,n){try{await x.share({title:e,message:n},{dialogTitle:e})}catch(t){t?.message!=="User did not share"&&b.alert("Share Error",t?.message||"Failed to open share sheet")}}export async function shareApiReport(e){const n=formatApiReport(e),t=`API: ${e.method||"GET"} ${e.url?.substring(0,40)||""}`;await m(t,n)}export async function sharePushReport(e){const n=formatPushReport(e),t=`Push: ${e.title||e.id||"Notification"}`;await m(t,n)}export async function shareCrashReport(e){const n=formatCrashReport(e),t=`Crash: ${e.name||e.message||"Error"}`;await m(t,n)}export async function shareAnalyticsReport(e){const n=formatAnalyticsReport(e),t=`Analytics: ${e.name||"Event"}`;await m(t,n)}export async function shareReduxReport(e){const n=formatReduxReport(e),t=`Redux: ${e.type||"Action"}`;await m(t,n)}export async function shareLogReport(e){const n=formatLogReport(e),t=`Log: ${(e.type||"info").toUpperCase()} - ${e.message?.substring(0,30)||""}`;await m(t,n)}export function formatSocketReport(e){const n=(e.client||"websocket").toUpperCase(),t=(e.status||"open").toUpperCase(),i=e.duration!=null?`${e.duration}ms`:"Active / Open",o=c(e.startTime||Date.now()),s=["\u{1F50C} WEBSOCKET / SOCKET.IO REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4E1} Client: ${n}`,`\u{1F310} URL: ${e.url||"N/A"}`,`\u26A1 Status: ${t}`,`\u23F1\uFE0F Connected: ${o}`,`\u23F3 Duration: ${i}`,`\u{1F4E6} Total Frames: ${e.frames?.length||0} (${e.sentCount||0} sent, ${e.receivedCount||0} recvd)`,`\u{1F4CA} Data Size: ${(e.totalBytesSent||0)+(e.totalBytesReceived||0)} bytes`];return e.protocols&&s.push(`\u{1F4DC} Protocols: ${Array.isArray(e.protocols)?e.protocols.join(", "):e.protocols}`),e.closeCode!=null&&s.push(`\u{1F6D1} Close Code: ${e.closeCode} (${e.closeReason||"N/A"})`),e.error&&s.push(`\u274C Error: ${e.error}`),e.caller&&s.push(`\u{1F4CD} Caller: ${e.caller}`),e.query&&Object.keys(e.query).length>0&&(s.push(""),s.push("\u{1F50D} Query Parameters:"),s.push(r(e.query))),e.frames&&e.frames.length>0&&(s.push(""),s.push("\u{1F4AC} Recent Message Frames:"),e.frames.slice(-10).forEach((a,$)=>{const g=a.direction==="send"?"\u2B06\uFE0F SEND":"\u2B07\uFE0F RECV",f=a.eventName?` [${a.eventName}]`:"";s.push(`--- Frame #${$+1} (${g}${f}, ${a.type}, ${a.size||0}B) ---`),s.push(r(a.data))})),s.push(""),s.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),s.push("Generated by React Native InApp Inspector"),s.join(`
8
- `)}export async function shareSocketReport(e){const n=formatSocketReport(e),t=`Socket: ${e.client?.toUpperCase()||"WS"} ${e.url?.substring(0,35)||""}`;await m(t,n)}export const DEFAULT_CONSOLE_EXPORT_OPTIONS={includeStackTrace:!1,includeArguments:!1,includeCaller:!1,includeTimestamps:!1,includeAppInfo:!1,includeDuplicates:!1,ignorePattern:""};export function generateConsoleLogsFilename(e="txt"){const n=new Date,t=String(n.getDate()).padStart(2,"0"),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getFullYear()).slice(-2),s=Math.random().toString(36).substring(2,8).padEnd(6,"0");return`log_${t}${i}${o}_${s}.${e==="log"?"log":"txt"}`}export function formatConsoleLogsExport(e,n="txt",t=DEFAULT_CONSOLE_EXPORT_OPTIONS){if(!e||e.length===0)return"No console logs to export.";const{includeStackTrace:i=!1,includeArguments:o=!1,includeCaller:s=!1,includeTimestamps:a=!1,includeAppInfo:$=!1,includeDuplicates:g=!1,ignorePattern:f=""}=t;let C=e;if(f&&f.trim().length>0)try{const p=new RegExp(f.trim(),"i");C=e.filter(l=>{const S=l.message||"",d=l.rawArgs?r(l.rawArgs):"",y=l.caller||"";return!p.test(S)&&!p.test(d)&&!p.test(y)})}catch{}if(C.length===0)return"No console logs to export (all filtered out).";const R=new Date().toLocaleString(),h="********************************************************************************",A=[];$&&A.push(`/${h}`,` * \u{1F4DC} CONSOLE LOGS EXPORT (${n.toUpperCase()})`,` * \u{1F552} Exported At: ${R}`,` * \u{1F4CA} Total Logs: ${e.length}`," * \u2699\uFE0F Generator: React Native InApp Inspector",` ${h}/`,"");const N=e.map((p,l)=>{const S=l+1,d=c(p.timestamp),y=(p.type||"info").toUpperCase(),O=g&&p.duplicateCount&&p.duplicateCount>1?` [DUPLICATES: \xD7${p.duplicateCount}]`:"",u=[`/${h}`,` * \u{1F4CC} LOG #${S} Starts [${y}]${a?` - ${d}`:""}${O}`,` ${h}/`];if(s&&p.caller&&u.push(`\u{1F4CD} Caller: ${p.caller}`),a&&u.push(`\u{1F552} Time: ${d}`),u.push(`\u{1F3F7}\uFE0F Level: ${y}`),p.sourceMethod&&p.sourceMethod!==p.type&&u.push(`\u2699\uFE0F Method: console.${p.sourceMethod}()`),u.push(""),u.push("\u{1F4AC} Message:"),u.push(p.message||"(Empty message)"),o&&p.rawArgs&&p.rawArgs.length>0&&(u.push(""),u.push("\u{1F4E6} Arguments / Data:"),u.push(r(p.rawArgs))),i&&(p.stack||p.errorStack)){u.push(""),u.push("\u{1F4DC} Stack Trace & Frames:");const E=(p.stack||p.errorStack||"").split(`
9
- `).map(I=>` ${I}`).join(`
10
- `);u.push(E)}return u.push(""),u.push(`/${h}`),u.push(` * \u{1F3C1} LOG #${S} Ends`),u.push(` ${h}/`),u.join(`
1
+ import{Alert as L,Share as b}from"react-native";import{writeNativeExportFile as D,shareNativeFile as k}from"../native/NativeInspector";import{formatDateTime as S,getCurlCommand as w}from"./index";function m(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}export function formatApiReport(e){const n=(e.method||"GET").toUpperCase(),t=e.status===0?"Failed / Network Error":e.status!=null?`${e.status} ${e.status===200?"OK":""}`.trim():"Pending",r=e.duration!=null?`${e.duration}ms`:"N/A",p=S(e.startTime||Date.now()),s=w(e),o=["\u{1F680} API INSPECTION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Method: ${n}`,`\u{1F4CA} Status: ${t}`,`\u23F1\uFE0F Duration: ${r}`,`\u{1F552} Time: ${p}`];return e.client&&o.push(`\u{1F50C} Client: ${e.client.toUpperCase()}`),o.push(`\u{1F310} URL: ${e.url||"N/A"}`),o.push(""),e.requestHeaders&&Object.keys(e.requestHeaders).length>0&&(o.push("\u{1F4CB} Request Headers:"),o.push(m(e.requestHeaders)),o.push("")),e.request!=null&&e.request!==""&&(o.push("\u{1F4DD} Request Body:"),o.push(m(e.request)),o.push("")),e.responseHeaders&&Object.keys(e.responseHeaders).length>0&&(o.push("\u{1F4D1} Response Headers:"),o.push(m(e.responseHeaders)),o.push("")),e.response!=null&&e.response!==""&&(o.push("\u{1F4E5} Response Data:"),o.push(m(e.response)),o.push("")),s&&(o.push("\u{1F4BB} cURL Command:"),o.push(s),o.push("")),o.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),o.push("Generated by React Native InApp Inspector"),o.join(`
2
+ `)}export function formatPushReport(e){const n=S(e.timestamp||Date.now()),t=(e.source||"push").toUpperCase(),r=(e.appState||"unknown").toUpperCase(),p=(e.action||"received").toUpperCase(),s=["\u{1F514} PUSH NOTIFICATION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Title: ${e.title||"(No Title)"}`,`\u{1F4DD} Body: ${e.body||"(No Body)"}`,`\u{1F3E2} Source: ${t}${e.domain?` (${e.domain})`:""}`,`\u{1F194} Message ID: ${e.id||"N/A"}`,`\u{1F4F1} App State: ${r}`,`\u{1F3AF} Action: ${p}`,`\u{1F552} Time: ${n}`];return e.subtitle&&s.push(`\u{1F4D1} Subtitle: ${e.subtitle}`),e.channelId&&s.push(`\u{1F3F7}\uFE0F Channel: ${e.channelId}`),e.priority&&s.push(`\u26A1 Priority: ${e.priority}`),e.badge!=null&&s.push(`\u{1F522} Badge: ${e.badge}`),e.sound&&s.push(`\u{1F50A} Sound: ${e.sound}`),e.imageUrl&&s.push(`\u{1F5BC}\uFE0F Image: ${e.imageUrl}`),s.push(""),e.data&&Object.keys(e.data).length>0&&(s.push("\u{1F4E6} Custom Data Payload:"),s.push(m(e.data)),s.push("")),e.customDomainAttributes&&Object.keys(e.customDomainAttributes).length>0&&(s.push("\u{1F3E2} Domain Attributes:"),s.push(m(e.customDomainAttributes)),s.push("")),e.rawPayload!=null&&(s.push("\u2699\uFE0F Raw Payload:"),s.push(m(e.rawPayload)),s.push("")),s.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),s.push("Generated by React Native InApp Inspector"),s.join(`
3
+ `)}export function formatCrashReport(e){const n=`${e.dateStr||""} ${e.timeStr||""}`.trim()||S(e.timestamp),t=["\u{1F4A5} CRASH REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u26A0\uFE0F Error: ${e.name||"Error"}: ${e.message||"Unknown error"}`,`\u{1F6A8} Fatal: ${e.isFatal?"YES (Fatal)":"NO (Caught)"}`,`\u{1F3F7}\uFE0F Type: ${(e.type||"js").toUpperCase()}`,`\u{1F552} Time: ${n}`];return e.deviceInfo&&t.push(`\u{1F4F1} Platform: ${e.deviceInfo.platform||"N/A"} (OS: ${e.deviceInfo.osVersion||"N/A"}, RN: ${e.deviceInfo.rnVersion||"N/A"})`),e.memoryInfo?.usedJSHeapSize&&t.push(`\u{1F4BE} Used Heap: ${Math.round(e.memoryInfo.usedJSHeapSize/(1024*1024))} MB`),t.push(""),e.stack&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack),t.push("")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(`\u{1F43E} Breadcrumbs (${e.breadcrumbs.length}):`),e.breadcrumbs.slice(-10).forEach(r=>{t.push(` \u2022 [${r.type}] ${r.message} (${S(r.timestamp)})`)}),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
4
+ `)}export function formatAnalyticsReport(e){const n=S(e.timestamp),t=["\u{1F4CA} ANALYTICS EVENT REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Event Name: ${e.name||"Unknown"}`,`\u{1F3E2} Source: ${(e.source||"manual").toUpperCase()}`,`\u{1F552} Timestamp: ${n}`];return e.screenName&&t.push(`\u{1F4F1} Screen Name: ${e.screenName}`),e.userId&&t.push(`\u{1F464} User ID: ${e.userId}`),e.trackingId&&t.push(`\u{1F194} Tracking ID: ${e.trackingId}`),t.push(""),e.params&&Object.keys(e.params).length>0&&(t.push("\u{1F4E6} Event Parameters:"),t.push(m(e.params)),t.push("")),e.userProperties&&Object.keys(e.userProperties).length>0&&(t.push("\u{1F464} User Properties:"),t.push(m(e.userProperties)),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
5
+ `)}export function formatReduxReport(e){const n=typeof e.timestamp=="number"?S(e.timestamp):e.timestamp,t=["\u{1F504} REDUX ACTION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Action Type: ${e.type||"UNKNOWN"}`,`\u{1F552} Timestamp: ${n}`];return e.caller&&t.push(`\u{1F4CD} Caller: ${e.caller}`),e.originType&&t.push(`\u2699\uFE0F Origin: ${e.originType}`),e.affectedSlices&&e.affectedSlices.length>0&&t.push(`\u{1F370} Slices: ${e.affectedSlices.join(", ")}`),t.push(""),t.push("\u{1F4E6} Action Payload:"),t.push(m(e.payload)),t.push(""),e.prevState!==void 0&&(t.push("\u23EE\uFE0F Previous State:"),t.push(m(e.prevState)),t.push("")),e.nextState!==void 0&&(t.push("\u23ED\uFE0F Next State:"),t.push(m(e.nextState)),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
6
+ `)}export function formatLogReport(e){const n=S(e.timestamp),t=["\u{1F4DC} CONSOLE LOG REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Level: ${(e.type||"info").toUpperCase()}`,`\u{1F552} Timestamp: ${n}`,`\u{1F4AC} Message: ${e.message||""}`];return e.caller&&t.push(`\u{1F4CD} Caller: ${e.caller}`),t.push(""),e.rawArgs&&e.rawArgs.length>0&&(t.push("\u{1F4E6} Arguments:"),t.push(m(e.rawArgs)),t.push("")),(e.stack||e.errorStack)&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack||e.errorStack||""),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
7
+ `)}async function y(e,n,t){try{const r=t||`export_${Date.now()}.txt`,p=await D(r,n);if(p){const s=r.endsWith(".json")?"application/json":(r.endsWith(".log")||r.endsWith(".txt"),"text/plain");if(await k(p,s,e))return}await b.share({title:e,message:n,url:p||void 0},{dialogTitle:e,subject:e})}catch(r){r?.message!=="User did not share"&&L.alert("Share Error",r?.message||"Failed to open share sheet")}}export async function shareApiReport(e){const n=formatApiReport(e),t=`api_${e.id??Date.now()}.txt`,r=`API: ${e.method||"GET"} ${e.url?.substring(0,40)||""}`;await y(r,n,t)}export async function sharePushReport(e){const n=formatPushReport(e),t=`push_${e.id??Date.now()}.txt`,r=`Push: ${e.title||e.id||"Notification"}`;await y(r,n,t)}export async function shareCrashReport(e){const n=formatCrashReport(e),t=`crash_${e.timestamp??Date.now()}.txt`,r=`Crash: ${e.name||e.message||"Error"}`;await y(r,n,t)}export async function shareAnalyticsReport(e){const n=formatAnalyticsReport(e),t=`analytics_${e.id??Date.now()}.txt`,r=`Analytics: ${e.name||"Event"}`;await y(r,n,t)}export async function shareReduxReport(e){const n=formatReduxReport(e),t=`redux_${e.id??Date.now()}.txt`,r=`Redux: ${e.type||"Action"}`;await y(r,n,t)}export async function shareLogReport(e){const n=formatLogReport(e),t=`log_${e.id??Date.now()}.txt`,r=`Log: ${(e.type||"info").toUpperCase()} - ${e.message?.substring(0,30)||""}`;await y(r,n,t)}export function formatSocketReport(e){const n=(e.client||"websocket").toUpperCase(),t=(e.status||"open").toUpperCase(),r=e.duration!=null?`${e.duration}ms`:"Active / Open",p=S(e.startTime||Date.now()),s=["\u{1F50C} WEBSOCKET / SOCKET.IO REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4E1} Client: ${n}`,`\u{1F310} URL: ${e.url||"N/A"}`,`\u26A1 Status: ${t}`,`\u23F1\uFE0F Connected: ${p}`,`\u23F3 Duration: ${r}`,`\u{1F4E6} Total Frames: ${e.frames?.length||0} (${e.sentCount||0} sent, ${e.receivedCount||0} recvd)`,`\u{1F4CA} Data Size: ${(e.totalBytesSent||0)+(e.totalBytesReceived||0)} bytes`];return e.protocols&&s.push(`\u{1F4DC} Protocols: ${Array.isArray(e.protocols)?e.protocols.join(", "):e.protocols}`),e.closeCode!=null&&s.push(`\u{1F6D1} Close Code: ${e.closeCode} (${e.closeReason||"N/A"})`),e.error&&s.push(`\u274C Error: ${e.error}`),e.caller&&s.push(`\u{1F4CD} Caller: ${e.caller}`),e.query&&Object.keys(e.query).length>0&&(s.push(""),s.push("\u{1F50D} Query Parameters:"),s.push(m(e.query))),e.frames&&e.frames.length>0&&(s.push(""),s.push("\u{1F4AC} Recent Message Frames:"),e.frames.slice(-10).forEach((o,C)=>{const T=o.direction==="send"?"\u2B06\uFE0F SEND":"\u2B07\uFE0F RECV",R=o.eventName?` [${o.eventName}]`:"";s.push(`--- Frame #${C+1} (${T}${R}, ${o.type}, ${o.size||0}B) ---`),s.push(m(o.data))})),s.push(""),s.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),s.push("Generated by React Native InApp Inspector"),s.join(`
8
+ `)}export async function shareSocketReport(e){const n=formatSocketReport(e),t=`socket_${e.id??Date.now()}.txt`,r=`Socket: ${e.client?.toUpperCase()||"WS"} ${e.url?.substring(0,35)||""}`;await y(r,n,t)}export const DEFAULT_CONSOLE_EXPORT_OPTIONS={includeStackTrace:!0,includeArguments:!0,includeCaller:!0,includeTimestamps:!0,includeAppInfo:!0,includeDuplicates:!1,ignorePattern:""};export function generateConsoleLogsFilename(e="txt"){const n=new Date,t=String(n.getDate()).padStart(2,"0"),r=String(n.getMonth()+1).padStart(2,"0"),p=String(n.getFullYear()).slice(-2),s=Math.random().toString(36).substring(2,8).padEnd(6,"0");return`log_${t}${r}${p}_${s}.${e==="log"?"log":"txt"}`}export function formatConsoleLogsExport(e,n="txt",t=DEFAULT_CONSOLE_EXPORT_OPTIONS){if(!e||e.length===0)return"No console logs to export.";const{includeStackTrace:r=!0,includeArguments:p=!0,includeCaller:s=!0,includeTimestamps:o=!0,includeAppInfo:C=!0,includeDuplicates:T=!1,ignorePattern:R=""}=t;let x=e;if(R&&R.trim().length>0)try{const c=new RegExp(R.trim(),"i");x=e.filter(a=>{const u=a.message||"",d=a.rawArgs?m(a.rawArgs):"",l=a.caller||"";return!c.test(u)&&!c.test(d)&&!c.test(l)})}catch{}if(x.length===0)return"No console logs to export (all filtered out).";const P=new Date().toLocaleString(),$="********************************************************************************",f=[];C&&f.push(`/${$}`,` * \u{1F4DC} CONSOLE LOGS EXPORT (${n.toUpperCase()})`,` * \u{1F552} Exported At: ${P}`,` * \u{1F4CA} Total Logs: ${e.length}`," * \u2699\uFE0F Generator: React Native InApp Inspector",` ${$}/`,"");const O=e.map((c,a)=>{const u=a+1,d=S(c.timestamp),l=(c.type||"info").toUpperCase(),g=T&&c.duplicateCount&&c.duplicateCount>1?` [DUPLICATES: \xD7${c.duplicateCount}]`:"",h=[`/${$}`,` * \u{1F4CC} LOG #${u} Starts [${l}]${o?` - ${d}`:""}${g}`,` ${$}/`];if(s&&c.caller&&h.push(`\u{1F4CD} Caller: ${c.caller}`),o&&h.push(`\u{1F552} Time: ${d}`),h.push(`\u{1F3F7}\uFE0F Level: ${l}`),c.sourceMethod&&c.sourceMethod!==c.type&&h.push(`\u2699\uFE0F Method: console.${c.sourceMethod}()`),h.push(""),h.push("\u{1F4AC} Message:"),h.push(c.message||"(Empty message)"),p&&c.rawArgs&&c.rawArgs.length>0&&(h.push(""),h.push("\u{1F4E6} Arguments / Data:"),h.push(m(c.rawArgs))),r&&(c.stack||c.errorStack)){h.push(""),h.push("\u{1F4DC} Stack Trace & Frames:");const A=(c.stack||c.errorStack||"").split(`
9
+ `).map(i=>` ${i}`).join(`
10
+ `);h.push(A)}return h.push(""),h.push(`/${$}`),h.push(` * \u{1F3C1} LOG #${u} Ends`),h.push(` ${$}/`),h.join(`
11
11
  `)}).join(`
12
12
 
13
- `),T=$?["",`/${h}`," * \u{1F3C1} END OF CONSOLE LOGS EXPORT",` ${h}/`].join(`
14
- `):"";return`${A.join(`
15
- `)}${N}${T}`}export function estimateConsoleLogsExportSize(e,n="txt",t=DEFAULT_CONSOLE_EXPORT_OPTIONS){if(!e||e.length===0)return 0;const i=Math.min(e.length,20),o=e.slice(0,i),a=formatConsoleLogsExport(o,n,t).length/i;return Math.round(a*e.length)}export async function shareConsoleLogs(e,n="txt",t=DEFAULT_CONSOLE_EXPORT_OPTIONS,i){const o=formatConsoleLogsExport(e,n,t),s=generateConsoleLogsFilename(n);await m(i||s,o)}
13
+ `),I=C?["",`/${$}`," * \u{1F3C1} END OF CONSOLE LOGS EXPORT",` ${$}/`].join(`
14
+ `):"";return`${f.join(`
15
+ `)}${O}${I}`}export function estimateConsoleLogsExportSize(e,n="txt",t=DEFAULT_CONSOLE_EXPORT_OPTIONS){if(!e||e.length===0)return 0;const r=Math.min(e.length,20),p=e.slice(0,r),o=formatConsoleLogsExport(p,n,t).length/r;return Math.round(o*e.length)}export async function shareConsoleLogs(e,n="txt",t=DEFAULT_CONSOLE_EXPORT_OPTIONS,r){const p=formatConsoleLogsExport(e,n,t),s=generateConsoleLogsFilename(n);await y(r||s,p,s)}export const DEFAULT_NETWORK_EXPORT_OPTIONS={includeRequestHeaders:!0,includeRequestBody:!0,includeResponseHeaders:!0,includeResponseBody:!0,includeCurlCommand:!0,includeTimestamps:!0,includeAppInfo:!0,ignorePattern:""};export function generateNetworkLogsFilename(e="txt"){const n=new Date,t=String(n.getDate()).padStart(2,"0"),r=String(n.getMonth()+1).padStart(2,"0"),p=String(n.getFullYear()).slice(-2),s=Math.random().toString(36).substring(2,8).padEnd(6,"0");return`api_${t}${r}${p}_${s}.${e==="log"?"log":"txt"}`}export function formatNetworkLogsExport(e,n="txt",t=DEFAULT_NETWORK_EXPORT_OPTIONS){if(!e||e.length===0)return"No API requests to export.";const{includeRequestHeaders:r=!0,includeRequestBody:p=!0,includeResponseHeaders:s=!0,includeResponseBody:o=!0,includeCurlCommand:C=!0,includeTimestamps:T=!0,includeAppInfo:R=!0,ignorePattern:x=""}=t;let N=e;if(x&&x.trim().length>0)try{const a=new RegExp(x.trim(),"i");N=e.filter(u=>{const d=u.url||"",l=u.method||"",g=u.client||"",h=u.request?m(u.request):"",A=u.response?m(u.response):"",i=u.requestHeaders?m(u.requestHeaders):"",E=u.responseHeaders?m(u.responseHeaders):"";return!a.test(d)&&!a.test(l)&&!a.test(g)&&!a.test(h)&&!a.test(A)&&!a.test(i)&&!a.test(E)})}catch{}if(N.length===0)return"No API requests to export (all filtered out).";const $=new Date().toLocaleString(),f="********************************************************************************";if(n==="json"){const a=N.map((u,d)=>{const l={index:d+1,id:u.id,url:u.url,method:(u.method||"GET").toUpperCase(),status:u.status,duration:u.duration,startTime:u.startTime,client:u.client};return r&&u.requestHeaders&&(l.requestHeaders=u.requestHeaders),p&&u.request!=null&&(l.request=u.request),s&&u.responseHeaders&&(l.responseHeaders=u.responseHeaders),o&&u.response!=null&&(l.response=u.response),C&&(l.curl=w(u)),l});return JSON.stringify(a,null,2)}if(n==="curl"){const a=["#!/usr/bin/env bash","# ============================================================================== ","# \u{1F680} API Network Logs - cURL Script Export",`# \u{1F552} Exported At: ${$}`,`# \u{1F4CA} Total Commands: ${N.length}`,"# \u2699\uFE0F Generator: React Native InApp Inspector",`# ==============================================================================
16
+ `];return N.forEach((u,d)=>{const l=d+1,g=(u.method||"GET").toUpperCase(),h=u.status===0?"Failed / Error":u.status!=null?String(u.status):"Pending",A=u.duration!=null?`${u.duration}ms`:"N/A",i=S(u.startTime||Date.now());a.push(`# Request #${l}: [${g}] ${u.url||"N/A"} (Status: ${h}, ${A}, ${i})`);const E=w(u);E?a.push(E):a.push(`curl -X ${g} "${u.url||""}"`),a.push("")}),a.join(`
17
+ `)}const O=[];R&&O.push(`/${f}`,` * \u{1F680} API NETWORK LOGS EXPORT (${n.toUpperCase()})`,` * \u{1F552} Exported At: ${$}`,` * \u{1F4CA} Total Requests: ${N.length}`," * \u2699\uFE0F Generator: React Native InApp Inspector",` ${f}/`,"");const I=N.map((a,u)=>{const d=u+1,l=S(a.startTime||Date.now()),g=(a.method||"GET").toUpperCase(),h=a.status===0?"Failed / Network Error":a.status!=null?`${a.status} ${a.status===200?"OK":""}`.trim():"Pending",A=a.duration!=null?`${a.duration}ms`:"N/A",i=[`/${f}`,` * \u{1F4CC} REQUEST #${d} Starts [${g}] [${h}] [${A}]${T?` - ${l}`:""}`,` ${f}/`];if(i.push(`\u{1F310} URL: ${a.url||"N/A"}`),i.push(`\u{1F4CC} Method: ${g}`),i.push(`\u{1F4CA} Status: ${h}`),i.push(`\u23F1\uFE0F Duration: ${A}`),T&&i.push(`\u{1F552} Time: ${l}`),a.client&&i.push(`\u{1F50C} Client: ${a.client.toUpperCase()}`),r&&a.requestHeaders&&Object.keys(a.requestHeaders).length>0&&(i.push(""),i.push("\u{1F4CB} Request Headers:"),i.push(m(a.requestHeaders))),p&&a.request!=null&&a.request!==""&&(i.push(""),i.push("\u{1F4DD} Request Body:"),i.push(m(a.request))),s&&a.responseHeaders&&Object.keys(a.responseHeaders).length>0&&(i.push(""),i.push("\u{1F4D1} Response Headers:"),i.push(m(a.responseHeaders))),o&&a.response!=null&&a.response!==""&&(i.push(""),i.push("\u{1F4E5} Response Data:"),i.push(m(a.response))),C){const E=w(a);E&&(i.push(""),i.push("\u{1F4BB} cURL Command:"),i.push(E))}return i.push(""),i.push(`/${f}`),i.push(` * \u{1F3C1} REQUEST #${d} Ends`),i.push(` ${f}/`),i.join(`
18
+ `)}).join(`
19
+
20
+ `),c=R?["",`/${f}`," * \u{1F3C1} END OF API NETWORK LOGS EXPORT",` ${f}/`].join(`
21
+ `):"";return`${O.join(`
22
+ `)}${I}${c}`}export function estimateNetworkLogsExportSize(e,n="txt",t=DEFAULT_NETWORK_EXPORT_OPTIONS){if(!e||e.length===0)return 0;const r=Math.min(e.length,10),p=e.slice(0,r),o=formatNetworkLogsExport(p,n,t).length/r;return Math.round(o*e.length)}export async function shareNetworkLogs(e,n="txt",t=DEFAULT_NETWORK_EXPORT_OPTIONS,r){const p=formatNetworkLogsExport(e,n,t),s=generateNetworkLogsFilename(n);await y(r||s,p,s)}
@@ -0,0 +1,48 @@
1
+ import { A11yAuditResult, BoxModelMetrics, HierarchyBreadcrumbItem, InspectedElementInfo } from '../types';
2
+ export declare function getCleanComponentName(type: any): string;
3
+ export declare function buildHierarchyFromFiber(fiber: any): HierarchyBreadcrumbItem[];
4
+ export declare function getDynamicInspectorDataForPoint(locationX: number, locationY: number, inspectedViewRef?: any): Promise<InspectedElementInfo | null>;
5
+ export declare function extractBoxModel(flattenedStyle?: Record<string, any>, layout?: {
6
+ width: number;
7
+ height: number;
8
+ }): BoxModelMetrics;
9
+ export declare function categorizeStyles(flattened?: Record<string, any>): {
10
+ layout: Record<string, any>;
11
+ dimensions: Record<string, any>;
12
+ position: Record<string, any>;
13
+ spacing: Record<string, any>;
14
+ typography: Record<string, any>;
15
+ appearance: Record<string, any>;
16
+ borders: Record<string, any>;
17
+ transforms: Record<string, any>;
18
+ other: Record<string, any>;
19
+ };
20
+ export declare function calculateContrastRatio(textColor?: string, bgColor?: string): {
21
+ ratio: any;
22
+ score: "N/A";
23
+ } | {
24
+ ratio: number;
25
+ score: "AAA" | "AA" | "Fail";
26
+ };
27
+ export declare function auditAccessibility(props?: Record<string, any>, layout?: {
28
+ width: number;
29
+ height: number;
30
+ }, styles?: Record<string, any>): A11yAuditResult;
31
+ export declare function generateJsxSnippet(componentName: string, props?: Record<string, any>, styles?: Record<string, any>): string;
32
+ export declare function generateFullJsxSegmentSnippet(componentName: string, props?: Record<string, any>, styles?: Record<string, any>): {
33
+ code: string;
34
+ sourceFile?: string;
35
+ sourceLocation?: string;
36
+ lineNumber?: number;
37
+ columnNumber?: number;
38
+ };
39
+ export declare function generateStyleSheetSnippet(componentName: string, styles?: Record<string, any>): string;
40
+ export declare function generateCssSnippet(componentName: string, styles?: Record<string, any>): string;
41
+ export declare function createInspectedElement(componentName: string, props: Record<string, any>, layout: {
42
+ x: number;
43
+ y: number;
44
+ width: number;
45
+ height: number;
46
+ pageX: number;
47
+ pageY: number;
48
+ }, hierarchy?: HierarchyBreadcrumbItem[], nativeTag?: number, snapshotUri?: string, snapshotBase64?: string): InspectedElementInfo;
@@ -0,0 +1,19 @@
1
+ import{StyleSheet as S,Platform as j}from"react-native";export function getCleanComponentName(e){if(!e)return"Unknown";if(typeof e=="string")return e==="RCTView"||e==="AndroidHorizontalScrollView"?"View":e==="RCTText"||e==="RCTRawText"||e==="RCTVirtualText"?"Text":e==="RCTImageView"||e==="RCTCxxImageView"?"Image":e==="RCTScrollView"?"ScrollView":e==="RCTModalHostView"?"Modal":e==="RCTSafeAreaView"?"SafeAreaView":e.replace(/^RCT/,"").replace(/^Android/,"");if(typeof e=="function")return e.displayName||e.name||"Component";if(typeof e=="object"){if(e.$$typeof?.toString().includes("memo")&&e.type)return`Memo(${getCleanComponentName(e.type)})`;if(e.$$typeof?.toString().includes("forward_ref")&&(e.render||e.type))return e.displayName||`ForwardRef(${getCleanComponentName(e.render||e.type)})`;if(e.displayName)return e.displayName;if(e.name)return e.name}return"Component"}function I(e){if(!e)return!0;const t=e.toLowerCase();return t.includes("provider")||t.includes("consumer")||t.includes("context")||t==="errorboundary"||t==="moduleerrorboundary"||t.includes("inspector")||t==="anonymous"}export function buildHierarchyFromFiber(e){const t=[];let o=e,a=0;for(;o&&a<25;){if(o.type){const r=getCleanComponentName(o.type),s=typeof o.type=="string",c=o.memoizedProps||{},n=c.style?S.flatten(c.style):void 0;(!I(r)||t.length===0)&&t.unshift({id:`breadcrumb_${a}_${r}`,displayName:r,componentName:r,depth:a,isHostComponent:s,props:c,styles:n})}o=o.return,a++}return t}export function getDynamicInspectorDataForPoint(e,t,o){return new Promise(a=>{let r=!1;const s=setTimeout(()=>{if(!r){r=!0;const n=O(e,t);a(n)}},120),c=n=>{if(!r&&n&&(n.frame||n.hierarchy&&n.hierarchy.length>0)){r=!0,clearTimeout(s);const{frame:l,props:i,hierarchy:p,selectedIndex:d,touchedViewTag:f,closestInstance:u}=n,g=[];Array.isArray(p)&&p.forEach((h,_)=>{const N=h?.type||h,m=h?.name||getCleanComponentName(N)||`View_${_}`;let y={};try{if(typeof h.getInspectorData=="function"){const H=h.getInspectorData();H?.props&&(y=H.props)}else h.props?y=h.props:h.memoizedProps&&(y=h.memoizedProps)}catch{}const R=y?.style||typeof h.getInspectorData=="function"&&h.getInspectorData()?.props?.style,A=R?S.flatten(R):void 0;g.push({id:`crumb_${_}_${m}`,displayName:getCleanComponentName(m),componentName:m,depth:_,isHostComponent:typeof m=="string"&&(m.startsWith("RCT")||m==="View"||m==="Text"||m==="Image"),props:y,styles:A})});const b=d!=null&&g[d]?g[d]:g[g.length-1],x=b?.componentName||(u?getCleanComponentName(u.type):"View"),$=getCleanComponentName(x),w=i&&Object.keys(i).length>0?i:b?.props||{},L=w.style?S.flatten(w.style):b?.styles||{},C={x:l?.left??e,y:l?.top??t,width:l?.width??0,height:l?.height??0,pageX:l?.left??e,pageY:l?.top??t},T=createInspectedElement($,w,C,g.length>0?g:void 0,f);a(T)}};try{const n=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__||typeof window<"u"&&window.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n&&n.renderers){const l=Array.from(n.renderers.values());let i=!1,p=o||null;if(!p&&n._fiberRoots)try{for(const d of n._fiberRoots.values())if(d&&d.size>0){const f=Array.from(d.values())[0];if(f?.containerInfo){p=f.containerInfo;break}}}catch{}for(const d of l){const f=d?.rendererConfig?.getInspectorDataForViewAtPoint;if(typeof f=="function")try{f(p,e,t,u=>(c(u),!0)),i=!0}catch{}}if(!i){clearTimeout(s),r=!0;const d=O(e,t);a(d)}}else{clearTimeout(s),r=!0;const l=O(e,t);a(l)}}catch{clearTimeout(s),r=!0;const n=O(e,t);a(n)}})}function O(e,t){try{const o=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__||typeof window<"u"&&window.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!o||!o._fiberRoots)return null;let a=null;for(const d of o._fiberRoots.values())if(d&&d.size>0){const f=Array.from(d.values())[0];if(f?.current){a=f.current;break}}if(!a)return null;const r=[];let s=a,c=0;for(;s&&c<30;){if(s.type){const d=getCleanComponentName(s.type),f=typeof s.type=="string",u=s.memoizedProps||s.pendingProps||{},g=u.style?S.flatten(u.style):void 0;I(d)||r.push({id:`fiber_crumb_${c}_${d}`,displayName:d,componentName:d,depth:c,isHostComponent:f,props:u,styles:g})}s=s.child,c++}if(r.length===0)return null;const n=r[r.length-1],l=n.props||{},i=n.styles||{},p={x:i.left??e,y:i.top??t,width:i.width??120,height:i.height??44,pageX:i.left??e,pageY:i.top??t};return createInspectedElement(n.componentName,l,p,r)}catch{return null}}export function extractBoxModel(e={},t={width:0,height:0}){const o=(y,R=0)=>{const A=typeof y=="number"?y:parseFloat(y);return isNaN(A)?R:A},a=o(e.margin,0),r=o(e.marginVertical,a),s=o(e.marginHorizontal,a),c=o(e.marginTop,r),n=o(e.marginBottom,r),l=o(e.marginLeft,s),i=o(e.marginRight,s),p=o(e.padding,0),d=o(e.paddingVertical,p),f=o(e.paddingHorizontal,p),u=o(e.paddingTop,d),g=o(e.paddingBottom,d),b=o(e.paddingLeft,f),x=o(e.paddingRight,f),$=o(e.borderWidth,0),w=o(e.borderTopWidth,$),L=o(e.borderBottomWidth,$),C=o(e.borderLeftWidth,$),T=o(e.borderRightWidth,$),h=t.width||o(e.width,0),_=t.height||o(e.height,0),N=Math.max(0,h-(b+x+C+T)),m=Math.max(0,_-(u+g+w+L));return{margin:{top:c,right:i,bottom:n,left:l},border:{top:w,right:T,bottom:L,left:C},padding:{top:u,right:x,bottom:g,left:b},content:{width:Math.round(N*10)/10,height:Math.round(m*10)/10}}}export function categorizeStyles(e={}){const t={layout:{},dimensions:{},position:{},spacing:{},typography:{},appearance:{},borders:{},transforms:{},other:{}},o=new Set(["flex","flexDirection","justifyContent","alignItems","alignSelf","alignContent","flexWrap","flexGrow","flexShrink","flexBasis","gap","rowGap","columnGap"]),a=new Set(["width","height","minWidth","maxWidth","minHeight","maxHeight","aspectRatio"]),r=new Set(["position","top","bottom","left","right","start","end","zIndex"]),s=new Set(["padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical","paddingStart","paddingEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","marginStart","marginEnd"]),c=new Set(["color","fontSize","fontWeight","fontFamily","fontStyle","lineHeight","letterSpacing","textAlign","textAlignVertical","textDecorationLine","textDecorationStyle","textDecorationColor","textTransform","includeFontPadding"]),n=new Set(["backgroundColor","opacity","overflow","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","backfaceVisibility"]),l=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderStyle"]);for(const[i,p]of Object.entries(e))p!==void 0&&(o.has(i)?t.layout[i]=p:a.has(i)?t.dimensions[i]=p:r.has(i)?t.position[i]=p:s.has(i)?t.spacing[i]=p:c.has(i)?t.typography[i]=p:n.has(i)?t.appearance[i]=p:l.has(i)?t.borders[i]=p:i==="transform"?t.transforms[i]=p:t.other[i]=p);return t}function v(e){const t=e.replace("#","");if(t.length<6)return .5;const o=parseInt(t.substring(0,2),16)/255,a=parseInt(t.substring(2,4),16)/255,r=parseInt(t.substring(4,6),16)/255,s=[o,a,r].map(c=>c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4));return .2126*s[0]+.7152*s[1]+.0722*s[2]}export function calculateContrastRatio(e,t){if(!e||!t||!e.startsWith("#")||!t.startsWith("#"))return{ratio:void 0,score:"N/A"};const o=v(e),a=v(t),r=Math.max(o,a),s=Math.min(o,a),c=(r+.05)/(s+.05),n=Math.round(c*100)/100;let l="Fail";return n>=7?l="AAA":n>=4.5&&(l="AA"),{ratio:n,score:l}}export function auditAccessibility(e={},t={width:0,height:0},o={}){const a=j.OS==="android",r=a?48:44,s=typeof e.onPress=="function"||typeof e.onLongPress=="function"||e.accessible===!0,c=t.width||o.width||0,n=t.height||o.height||0,l=[];let i=!0;s&&(c>0||n>0)&&(c<r||n<r)&&(i=!1,l.push(`Touch target is ${Math.round(c)}\xD7${Math.round(n)}pt. Recommended min is ${r}\xD7${r}pt for ${a?"Android Material Design":"Apple iOS HIG"}.`));const p=!!(e.accessibilityLabel||e["aria-label"]||e.accessibilityTitle);s&&!p&&!e.children&&typeof e.children!="string"&&l.push("Interactive element is missing an accessibilityLabel / aria-label.");const d=o.color,f=o.backgroundColor,u=calculateContrastRatio(d,f);return u.score==="Fail"&&u.ratio!==void 0&&l.push(`Contrast ratio is ${u.ratio}:1 (below WCAG AA minimum 4.5:1).`),{hasValidTouchTarget:i,touchTargetWidth:c,touchTargetHeight:n,recommendedMinSize:r,contrastRatio:u.ratio,contrastScore:u.score,textColor:d,backgroundColor:f,hasAccessibilityLabel:p,accessibilityRole:e.accessibilityRole||e.role,accessibilityHint:e.accessibilityHint,issues:l}}export function generateJsxSnippet(e,t={},o={}){return generateFullJsxSegmentSnippet(e,t,o).code}function D(e,t){return typeof t=="string"?`${e}="${t}"`:typeof t=="boolean"?t?e:`${e}={false}`:typeof t=="number"?`${e}={${t}}`:typeof t=="function"?`${e}={() => {}}`:typeof t=="object"&&t!==null?`${e}={${JSON.stringify(t)}}`:`${e}={${String(t)}}`}function V(e,t=1){if(e==null)return"";const o=" ".repeat(t);if(typeof e=="string"||typeof e=="number")return`${o}${e}`;if(Array.isArray(e))return e.map(a=>V(a,t)).filter(Boolean).join(`
2
+ `);if(typeof e=="object"&&e.type){const a=typeof e.type=="string"?e.type:e.type.displayName||e.type.name||"Component",r=e.props||{},s=[];for(const[n,l]of Object.entries(r))n==="children"||n==="__source"||n==="__self"||n==="_source"||s.push(D(n,l));const c=s.length?" "+s.join(" "):"";if(r.children){const n=V(r.children,t+1);return`${o}<${a}${c}>
3
+ ${n}
4
+ ${o}</${a}>`}return`${o}<${a}${c} />`}return""}export function generateFullJsxSegmentSnippet(e,t={},o={}){const a=t.__source||t._source,r=a?.fileName,s=a?.lineNumber,c=a?.columnNumber,n=r?r.replace(/^.*[\\/]/,""):void 0,l=n&&s?`${n}:${s}${c?`:${c}`:""}`:void 0,i=[];for(const[f,u]of Object.entries(t))f==="children"||f==="style"||f==="key"||f==="__source"||f==="__self"||f==="_source"||i.push(D(f,u));Object.keys(o).length>0&&i.push(`style={styles.${e.toLowerCase()||"container"}}`);const p=V(t.children,1);let d="";return i.length<=1&&!p?d=`<${e}${i.length?" "+i.join(" "):""} />`:p?d=`<${e}${i.length?`
5
+ `+i.join(`
6
+ `):""}>
7
+ ${p}
8
+ </${e}>`:d=`<${e}
9
+ ${i.join(`
10
+ `)}
11
+ />`,{code:d,sourceFile:r,sourceLocation:l,lineNumber:s,columnNumber:c}}export function generateStyleSheetSnippet(e,t={}){const o=" ",a=[];for(const[s,c]of Object.entries(t)){if(c===void 0)continue;const n=typeof c=="string"?`'${c}'`:typeof c=="object"?JSON.stringify(c):String(c);a.push(`${o}${s}: ${n},`)}const r=a.length>0?`{
12
+ ${a.join(`
13
+ `)}
14
+ }`:"{}";return`const styles = StyleSheet.create({
15
+ ${e.toLowerCase()}Container: ${r},
16
+ });`}export function generateCssSnippet(e,t={}){const o=[];for(const[r,s]of Object.entries(t)){if(s===void 0)continue;const c=r.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),n=typeof s=="number"?`${s}px`:String(s);o.push(` ${c}: ${n};`)}const a=o.length>0?`{
17
+ ${o.join(`
18
+ `)}
19
+ }`:"{}";return`.${e.toLowerCase()}-element ${a}`}export function createInspectedElement(e,t={},o,a=[],r,s,c){const n=t.style?S.flatten(t.style)||{}:{},l={...n},i=extractBoxModel(l,o),p=auditAccessibility(t,o,l);return{id:`elem_${Date.now()}_${Math.random().toString(36).substring(2,6)}`,componentName:e,displayName:e,hierarchy:a.length>0?a:[{id:"root_app",displayName:"App",componentName:"App",depth:0,isHostComponent:!1},{id:"inspected_node",displayName:e,componentName:e,depth:1,isHostComponent:!0,props:t,styles:l}],props:t,originalStyles:n,flattenedStyles:l,tweakedStyles:{},layout:o,boxModel:i,a11y:p,nativeTag:r,snapshotUri:s,snapshotBase64:c,timestamp:Date.now()}}