react-native-inapp-inspector 2.3.5 → 2.3.7

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 (226) hide show
  1. package/dist/commonjs/analytics.d.ts +0 -4
  2. package/dist/commonjs/analytics.js +0 -4
  3. package/dist/commonjs/bundle.d.ts +0 -4
  4. package/dist/commonjs/bundle.js +0 -4
  5. package/dist/commonjs/components/AnalyticsDetail.js +18 -27
  6. package/dist/commonjs/components/AnalyticsEventCard.js +9 -12
  7. package/dist/commonjs/components/AnalyticsGraph.js +10 -15
  8. package/dist/commonjs/components/AppHeaderLogo.js +0 -3
  9. package/dist/commonjs/components/BrandCircleIcon.js +15 -15
  10. package/dist/commonjs/components/BrandSquareIcon.js +20 -20
  11. package/dist/commonjs/components/CodeSnippet.js +6 -19
  12. package/dist/commonjs/components/ConsoleLogCard.js +0 -1
  13. package/dist/commonjs/components/CopyButton.js +0 -4
  14. package/dist/commonjs/components/DiffViewer.js +0 -2
  15. package/dist/commonjs/components/DomainHeader.js +0 -4
  16. package/dist/commonjs/components/EmptyState.js +0 -3
  17. package/dist/commonjs/components/ErrorBoundary.js +5 -10
  18. package/dist/commonjs/components/HeadersSection.js +0 -5
  19. package/dist/commonjs/components/HighlightText.js +1 -4
  20. package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +11 -26
  21. package/dist/commonjs/components/Inspector/AnalyticsTab.js +34 -40
  22. package/dist/commonjs/components/Inspector/BundleTab.js +56 -84
  23. package/dist/commonjs/components/Inspector/ConsoleTab.js +7 -7
  24. package/dist/commonjs/components/Inspector/CrashDetail.js +18 -20
  25. package/dist/commonjs/components/Inspector/CrashFilterModal.js +0 -1
  26. package/dist/commonjs/components/Inspector/CrashTab.js +11 -20
  27. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +12 -24
  28. package/dist/commonjs/components/Inspector/FabLauncher.js +1 -1
  29. package/dist/commonjs/components/Inspector/InspectorContext.js +0 -2
  30. package/dist/commonjs/components/Inspector/InspectorHeader.js +7 -8
  31. package/dist/commonjs/components/Inspector/LogDetail.js +27 -29
  32. package/dist/commonjs/components/Inspector/MainScreen.js +9 -10
  33. package/dist/commonjs/components/Inspector/NetworkDetail.js +10 -11
  34. package/dist/commonjs/components/Inspector/NetworkTab.js +14 -14
  35. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +6 -9
  36. package/dist/commonjs/components/Inspector/PerformanceTab.js +30 -43
  37. package/dist/commonjs/components/Inspector/ReduxDetail.js +18 -34
  38. package/dist/commonjs/components/Inspector/ReduxTab.js +11 -20
  39. package/dist/commonjs/components/Inspector/SettingsPanel.js +32 -36
  40. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +6 -6
  41. package/dist/commonjs/components/Inspector/StorageTab.js +14 -26
  42. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +5 -6
  43. package/dist/commonjs/components/JsonViewer.js +3 -10
  44. package/dist/commonjs/components/LogCard.js +7 -7
  45. package/dist/commonjs/components/MetaAccordion.js +1 -7
  46. package/dist/commonjs/components/NetworkIcons.js +12 -16
  47. package/dist/commonjs/components/SectionHeader.js +0 -4
  48. package/dist/commonjs/components/SkeletonPlaceholder.js +6 -6
  49. package/dist/commonjs/components/Slider.js +6 -6
  50. package/dist/commonjs/components/SourcePageCard.js +0 -4
  51. package/dist/commonjs/components/TreeNode.js +0 -4
  52. package/dist/commonjs/console.d.ts +0 -4
  53. package/dist/commonjs/console.js +0 -4
  54. package/dist/commonjs/constants/index.js +6 -9
  55. package/dist/commonjs/constants/telemetryConfig.d.ts +3 -0
  56. package/dist/commonjs/constants/telemetryConfig.js +6 -0
  57. package/dist/commonjs/constants/version.d.ts +1 -1
  58. package/dist/commonjs/constants/version.js +1 -3
  59. package/dist/commonjs/crash.d.ts +0 -4
  60. package/dist/commonjs/crash.js +0 -4
  61. package/dist/commonjs/customHooks/analyticsLogger.d.ts +0 -7
  62. package/dist/commonjs/customHooks/analyticsLogger.js +3 -59
  63. package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +0 -9
  64. package/dist/commonjs/customHooks/bundleAnalyzer.js +3 -86
  65. package/dist/commonjs/customHooks/consoleLogger.js +0 -16
  66. package/dist/commonjs/customHooks/crashHandler.d.ts +0 -28
  67. package/dist/commonjs/customHooks/crashHandler.js +0 -55
  68. package/dist/commonjs/customHooks/logFilters.d.ts +0 -4
  69. package/dist/commonjs/customHooks/logFilters.js +0 -11
  70. package/dist/commonjs/customHooks/networkLogger.js +2 -13
  71. package/dist/commonjs/customHooks/performanceTracker.d.ts +0 -27
  72. package/dist/commonjs/customHooks/performanceTracker.js +0 -31
  73. package/dist/commonjs/customHooks/reduxLogger.d.ts +0 -12
  74. package/dist/commonjs/customHooks/reduxLogger.js +0 -51
  75. package/dist/commonjs/customHooks/storageInspector.d.ts +0 -40
  76. package/dist/commonjs/customHooks/storageInspector.js +1 -56
  77. package/dist/commonjs/decorators/index.d.ts +0 -37
  78. package/dist/commonjs/decorators/index.js +0 -42
  79. package/dist/commonjs/helpers/gaAnalyticsRegistry.d.ts +0 -10
  80. package/dist/commonjs/helpers/gaAnalyticsRegistry.js +0 -26
  81. package/dist/commonjs/helpers/index.d.ts +0 -7
  82. package/dist/commonjs/helpers/index.js +1 -42
  83. package/dist/commonjs/helpers/memoryManager.d.ts +0 -11
  84. package/dist/commonjs/helpers/memoryManager.js +0 -13
  85. package/dist/commonjs/helpers/searchQueryParser.d.ts +0 -4
  86. package/dist/commonjs/helpers/searchQueryParser.js +0 -18
  87. package/dist/commonjs/helpers/settingsStore.js +0 -8
  88. package/dist/commonjs/helpers/telemetry.d.ts +2 -0
  89. package/dist/commonjs/helpers/telemetry.js +136 -0
  90. package/dist/commonjs/i18n/index.d.ts +0 -9
  91. package/dist/commonjs/i18n/index.js +0 -15
  92. package/dist/commonjs/index.js +15 -97
  93. package/dist/commonjs/native/NativeInspector.d.ts +0 -54
  94. package/dist/commonjs/native/NativeInspector.js +0 -56
  95. package/dist/commonjs/network.d.ts +0 -4
  96. package/dist/commonjs/network.js +0 -4
  97. package/dist/commonjs/performance.d.ts +0 -4
  98. package/dist/commonjs/performance.js +0 -4
  99. package/dist/commonjs/redux.d.ts +0 -4
  100. package/dist/commonjs/redux.js +0 -4
  101. package/dist/commonjs/storage.d.ts +0 -4
  102. package/dist/commonjs/storage.js +0 -4
  103. package/dist/commonjs/styles/AppColors.d.ts +0 -3
  104. package/dist/commonjs/styles/AppColors.js +15 -30
  105. package/dist/commonjs/styles/AppFonts.d.ts +0 -4
  106. package/dist/commonjs/styles/AppFonts.js +0 -4
  107. package/dist/commonjs/styles/common.js +0 -11
  108. package/dist/commonjs/styles/index.js +0 -8
  109. package/dist/commonjs/types/enums.js +0 -3
  110. package/dist/commonjs/types/interfaces.d.ts +3 -3
  111. package/dist/esm/analytics.d.ts +0 -4
  112. package/dist/esm/analytics.js +0 -4
  113. package/dist/esm/bundle.d.ts +0 -4
  114. package/dist/esm/bundle.js +0 -4
  115. package/dist/esm/components/AnalyticsDetail.js +18 -27
  116. package/dist/esm/components/AnalyticsEventCard.js +9 -12
  117. package/dist/esm/components/AnalyticsGraph.js +10 -15
  118. package/dist/esm/components/AppHeaderLogo.js +0 -3
  119. package/dist/esm/components/BrandCircleIcon.js +15 -15
  120. package/dist/esm/components/BrandSquareIcon.js +20 -20
  121. package/dist/esm/components/CodeSnippet.js +6 -19
  122. package/dist/esm/components/ConsoleLogCard.js +0 -1
  123. package/dist/esm/components/CopyButton.js +0 -4
  124. package/dist/esm/components/DiffViewer.js +0 -2
  125. package/dist/esm/components/DomainHeader.js +0 -4
  126. package/dist/esm/components/EmptyState.js +0 -3
  127. package/dist/esm/components/ErrorBoundary.js +5 -10
  128. package/dist/esm/components/HeadersSection.js +0 -5
  129. package/dist/esm/components/HighlightText.js +1 -4
  130. package/dist/esm/components/Inspector/AnalyticsFilterModal.js +11 -26
  131. package/dist/esm/components/Inspector/AnalyticsTab.js +34 -40
  132. package/dist/esm/components/Inspector/BundleTab.js +56 -84
  133. package/dist/esm/components/Inspector/ConsoleTab.js +7 -7
  134. package/dist/esm/components/Inspector/CrashDetail.js +18 -20
  135. package/dist/esm/components/Inspector/CrashFilterModal.js +0 -1
  136. package/dist/esm/components/Inspector/CrashTab.js +11 -20
  137. package/dist/esm/components/Inspector/DeviceInfoTab.js +12 -24
  138. package/dist/esm/components/Inspector/FabLauncher.js +1 -1
  139. package/dist/esm/components/Inspector/InspectorContext.js +0 -2
  140. package/dist/esm/components/Inspector/InspectorHeader.js +7 -8
  141. package/dist/esm/components/Inspector/LogDetail.js +27 -29
  142. package/dist/esm/components/Inspector/MainScreen.js +9 -10
  143. package/dist/esm/components/Inspector/NetworkDetail.js +10 -11
  144. package/dist/esm/components/Inspector/NetworkTab.js +14 -14
  145. package/dist/esm/components/Inspector/NpmUpdateToast.js +6 -9
  146. package/dist/esm/components/Inspector/PerformanceTab.js +30 -43
  147. package/dist/esm/components/Inspector/ReduxDetail.js +18 -34
  148. package/dist/esm/components/Inspector/ReduxTab.js +11 -20
  149. package/dist/esm/components/Inspector/SettingsPanel.js +32 -36
  150. package/dist/esm/components/Inspector/SkeletonPlaceholder.js +6 -6
  151. package/dist/esm/components/Inspector/StorageTab.js +14 -26
  152. package/dist/esm/components/Inspector/UpdateAvailableModal.js +5 -6
  153. package/dist/esm/components/JsonViewer.js +3 -10
  154. package/dist/esm/components/LogCard.js +7 -7
  155. package/dist/esm/components/MetaAccordion.js +1 -7
  156. package/dist/esm/components/NetworkIcons.js +12 -16
  157. package/dist/esm/components/SectionHeader.js +0 -4
  158. package/dist/esm/components/SkeletonPlaceholder.js +6 -6
  159. package/dist/esm/components/Slider.js +6 -6
  160. package/dist/esm/components/SourcePageCard.js +0 -4
  161. package/dist/esm/components/TreeNode.js +0 -4
  162. package/dist/esm/console.d.ts +0 -4
  163. package/dist/esm/console.js +0 -4
  164. package/dist/esm/constants/index.js +6 -9
  165. package/dist/esm/constants/telemetryConfig.d.ts +3 -0
  166. package/dist/esm/constants/telemetryConfig.js +3 -0
  167. package/dist/esm/constants/version.d.ts +1 -1
  168. package/dist/esm/constants/version.js +1 -3
  169. package/dist/esm/crash.d.ts +0 -4
  170. package/dist/esm/crash.js +0 -4
  171. package/dist/esm/customHooks/analyticsLogger.d.ts +0 -7
  172. package/dist/esm/customHooks/analyticsLogger.js +3 -59
  173. package/dist/esm/customHooks/bundleAnalyzer.d.ts +0 -9
  174. package/dist/esm/customHooks/bundleAnalyzer.js +3 -86
  175. package/dist/esm/customHooks/consoleLogger.js +0 -16
  176. package/dist/esm/customHooks/crashHandler.d.ts +0 -28
  177. package/dist/esm/customHooks/crashHandler.js +0 -55
  178. package/dist/esm/customHooks/logFilters.d.ts +0 -4
  179. package/dist/esm/customHooks/logFilters.js +0 -11
  180. package/dist/esm/customHooks/networkLogger.js +2 -13
  181. package/dist/esm/customHooks/performanceTracker.d.ts +0 -27
  182. package/dist/esm/customHooks/performanceTracker.js +0 -31
  183. package/dist/esm/customHooks/reduxLogger.d.ts +0 -12
  184. package/dist/esm/customHooks/reduxLogger.js +0 -51
  185. package/dist/esm/customHooks/storageInspector.d.ts +0 -40
  186. package/dist/esm/customHooks/storageInspector.js +1 -56
  187. package/dist/esm/decorators/index.d.ts +0 -37
  188. package/dist/esm/decorators/index.js +0 -42
  189. package/dist/esm/helpers/gaAnalyticsRegistry.d.ts +0 -10
  190. package/dist/esm/helpers/gaAnalyticsRegistry.js +0 -26
  191. package/dist/esm/helpers/index.d.ts +0 -7
  192. package/dist/esm/helpers/index.js +1 -42
  193. package/dist/esm/helpers/memoryManager.d.ts +0 -11
  194. package/dist/esm/helpers/memoryManager.js +0 -13
  195. package/dist/esm/helpers/searchQueryParser.d.ts +0 -4
  196. package/dist/esm/helpers/searchQueryParser.js +0 -18
  197. package/dist/esm/helpers/settingsStore.js +0 -8
  198. package/dist/esm/helpers/telemetry.d.ts +2 -0
  199. package/dist/esm/helpers/telemetry.js +132 -0
  200. package/dist/esm/i18n/index.d.ts +0 -9
  201. package/dist/esm/i18n/index.js +0 -15
  202. package/dist/esm/index.js +15 -97
  203. package/dist/esm/native/NativeInspector.d.ts +0 -54
  204. package/dist/esm/native/NativeInspector.js +0 -56
  205. package/dist/esm/network.d.ts +0 -4
  206. package/dist/esm/network.js +0 -4
  207. package/dist/esm/performance.d.ts +0 -4
  208. package/dist/esm/performance.js +0 -4
  209. package/dist/esm/redux.d.ts +0 -4
  210. package/dist/esm/redux.js +0 -4
  211. package/dist/esm/storage.d.ts +0 -4
  212. package/dist/esm/storage.js +0 -4
  213. package/dist/esm/styles/AppColors.d.ts +0 -3
  214. package/dist/esm/styles/AppColors.js +15 -30
  215. package/dist/esm/styles/AppFonts.d.ts +0 -4
  216. package/dist/esm/styles/AppFonts.js +0 -4
  217. package/dist/esm/styles/common.js +0 -11
  218. package/dist/esm/styles/index.js +0 -8
  219. package/dist/esm/types/enums.js +0 -3
  220. package/dist/esm/types/interfaces.d.ts +3 -3
  221. package/package.json +2 -2
  222. package/src/constants/telemetryConfig.ts +6 -0
  223. package/src/constants/version.ts +1 -1
  224. package/src/helpers/telemetry.ts +161 -0
  225. package/src/index.tsx +15 -1
  226. package/src/types/interfaces.ts +3 -0
@@ -21,9 +21,7 @@ exports.getRuntimeDiagnostics = exports.getCategoryColors = exports.registerGAPl
21
21
  const react_native_1 = require("react-native");
22
22
  const clipboard_1 = __importDefault(require("@react-native-clipboard/clipboard"));
23
23
  const toast_1 = require("./toast");
24
- // Stylesheet
25
24
  const AppColors_1 = require("../styles/AppColors");
26
- // Constants
27
25
  const constants_1 = require("../constants");
28
26
  __exportStar(require("./searchQueryParser"), exports);
29
27
  __exportStar(require("./memoryManager"), exports);
@@ -109,7 +107,6 @@ const copyToClipboard = (value, label) => {
109
107
  textToCopy = String(resolved);
110
108
  }
111
109
  }
112
- // Use @react-native-clipboard/clipboard npm package
113
110
  try {
114
111
  if (typeof clipboard_1.default?.setString === 'function') {
115
112
  clipboard_1.default.setString(textToCopy);
@@ -123,12 +120,10 @@ const copyToClipboard = (value, label) => {
123
120
  console.warn('[NetworkInspector] Clipboard.setString failed:', err);
124
121
  }
125
122
  }
126
- // Trigger floating in-app bottom toast notification
127
123
  try {
128
124
  (0, toast_1.showToast)(label ? `${label} copied to clipboard` : 'Copied to clipboard');
129
125
  }
130
126
  catch { }
131
- // Native Android Toast fallback
132
127
  try {
133
128
  if (react_native_1.Platform.OS === 'android' && react_native_1.ToastAndroid?.show) {
134
129
  react_native_1.ToastAndroid.show(label ? `${label} copied to clipboard` : 'Copied to clipboard', react_native_1.ToastAndroid.SHORT);
@@ -249,7 +244,6 @@ const getNavigationInfo = (state, path = []) => {
249
244
  };
250
245
  exports.getNavigationInfo = getNavigationInfo;
251
246
  const getLogPageName = (log, routeInfo) => {
252
- // 1. If routeInfo has a valid path, resolve the leaf screen name
253
247
  const effectiveRoute = routeInfo || log?.routeInfo;
254
248
  if (effectiveRoute &&
255
249
  effectiveRoute.path &&
@@ -259,11 +253,10 @@ const getLogPageName = (log, routeInfo) => {
259
253
  .map((s) => s.trim())
260
254
  .filter(Boolean);
261
255
  if (parts.length > 0) {
262
- return parts[parts.length - 1]; // Leaf screen name, e.g. "HomeScreen", "ProfileScreen"
256
+ return parts[parts.length - 1];
263
257
  }
264
258
  return effectiveRoute.path;
265
259
  }
266
- // 2. Extract screen / component name from log.caller stack trace
267
260
  if (log.caller && log.caller !== 'Unknown') {
268
261
  try {
269
262
  const match = log.caller.match(/([^/\\]+)\.(tsx|jsx|ts|js)/i);
@@ -288,7 +281,6 @@ const getLogPageName = (log, routeInfo) => {
288
281
  }
289
282
  catch (e) { }
290
283
  }
291
- // 3. Fallback to API resource / endpoint category from URL
292
284
  if (log.url) {
293
285
  try {
294
286
  const cleanUrl = log.url.split('?')[0].split('#')[0];
@@ -453,17 +445,13 @@ const getBundleIdentifier = () => {
453
445
  };
454
446
  exports.getBundleIdentifier = getBundleIdentifier;
455
447
  const getAppName = () => {
456
- // Try iOS via PlatformConstants
457
448
  const constants = react_native_1.NativeModules.PlatformConstants;
458
449
  if (constants && typeof constants.interfaceIdiom === 'string') {
459
- // Fallback: try to parse from SourceCode
460
450
  }
461
- // Try react-native-device-info
462
451
  const RNDeviceInfo = react_native_1.NativeModules.RNDeviceInfo;
463
452
  if (RNDeviceInfo && typeof RNDeviceInfo.appName === 'string') {
464
453
  return RNDeviceInfo.appName;
465
454
  }
466
- // Try Expo
467
455
  const ExpoApplication = react_native_1.NativeModules.ExpoApplication;
468
456
  if (ExpoApplication && typeof ExpoApplication.applicationName === 'string') {
469
457
  return ExpoApplication.applicationName;
@@ -474,17 +462,14 @@ const getAppName = () => {
474
462
  if (manifest.name)
475
463
  return manifest.name;
476
464
  }
477
- // Android: try to get from AndroidInfoModule
478
465
  const AppInfo = react_native_1.NativeModules.AppInfo;
479
466
  if (AppInfo && typeof AppInfo.appName === 'string') {
480
467
  return AppInfo.appName;
481
468
  }
482
- // Fallback: derive from bundle ID (last segment, cleaned up)
483
469
  const bundleId = (0, exports.getBundleIdentifier)();
484
470
  if (bundleId && bundleId !== 'org.reactjs.native.example') {
485
471
  const parts = bundleId.split('.');
486
472
  const last = parts[parts.length - 1];
487
- // Capitalize first letter
488
473
  return last ? last.charAt(0).toUpperCase() + last.slice(1) : 'App';
489
474
  }
490
475
  return 'App';
@@ -493,7 +478,6 @@ exports.getAppName = getAppName;
493
478
  const getAppVersionAndBuild = () => {
494
479
  let version = '';
495
480
  let build = '';
496
- // 1. Try ExpoApplication / ExponentConstants
497
481
  const ExpoApplication = react_native_1.NativeModules.ExpoApplication;
498
482
  if (ExpoApplication) {
499
483
  if (typeof ExpoApplication.nativeAppVersion === 'string') {
@@ -520,7 +504,6 @@ const getAppVersionAndBuild = () => {
520
504
  }
521
505
  }
522
506
  }
523
- // 2. Try react-native-device-info
524
507
  const RNDeviceInfo = react_native_1.NativeModules.RNDeviceInfo;
525
508
  if (RNDeviceInfo) {
526
509
  if (!version) {
@@ -546,7 +529,6 @@ const getAppVersionAndBuild = () => {
546
529
  }
547
530
  }
548
531
  }
549
- // 3. Try PlatformConstants / Platform.constants
550
532
  const constants = react_native_1.Platform.constants || react_native_1.NativeModules.PlatformConstants;
551
533
  if (constants) {
552
534
  if (!version &&
@@ -562,7 +544,6 @@ const getAppVersionAndBuild = () => {
562
544
  }
563
545
  }
564
546
  }
565
- // 4. Try Android AppInfo
566
547
  const AppInfo = react_native_1.NativeModules.AppInfo;
567
548
  if (AppInfo) {
568
549
  if (!version && typeof AppInfo.versionName === 'string') {
@@ -572,7 +553,6 @@ const getAppVersionAndBuild = () => {
572
553
  build = AppInfo.versionCode;
573
554
  }
574
555
  }
575
- // Fallbacks
576
556
  if (!version)
577
557
  version = '1.0.0';
578
558
  if (!build)
@@ -599,7 +579,6 @@ const handleOpenExternalLink = (url) => {
599
579
  ]);
600
580
  };
601
581
  exports.handleOpenExternalLink = handleOpenExternalLink;
602
- /** Formats a timestamp as HH:MM:SS (no milliseconds). */
603
582
  const formatTimeShort = (ts) => {
604
583
  const d = new Date(ts);
605
584
  const hh = String(d.getHours()).padStart(2, '0');
@@ -608,7 +587,6 @@ const formatTimeShort = (ts) => {
608
587
  return `${hh}:${mm}:${ss}`;
609
588
  };
610
589
  exports.formatTimeShort = formatTimeShort;
611
- /** Formats a timestamp as HH:MM:SS.mmm (with milliseconds). */
612
590
  const formatTime = (ts) => {
613
591
  const d = new Date(ts);
614
592
  const hh = String(d.getHours()).padStart(2, '0');
@@ -618,7 +596,6 @@ const formatTime = (ts) => {
618
596
  return `${hh}:${mm}:${ss}.${ms}`;
619
597
  };
620
598
  exports.formatTime = formatTime;
621
- /** Formats a relative gap like "+2s" / "+1m 5s" / "+350ms". */
622
599
  const formatGap = (ms) => {
623
600
  if (ms < 1000)
624
601
  return `+${ms}ms`;
@@ -630,7 +607,6 @@ const formatGap = (ms) => {
630
607
  return rem > 0 ? `+${m}m ${rem}s` : `+${m}m`;
631
608
  };
632
609
  exports.formatGap = formatGap;
633
- /** Finds the first JSON object/array embedded anywhere in a log message. */
634
610
  const getJsonContent = (message) => {
635
611
  if (!message)
636
612
  return null;
@@ -650,13 +626,11 @@ const getJsonContent = (message) => {
650
626
  }
651
627
  }
652
628
  catch (e) {
653
- // Ignore
654
629
  }
655
630
  }
656
631
  return null;
657
632
  };
658
633
  exports.getJsonContent = getJsonContent;
659
- /** Pretty-prints JSON data showing 3-4 lines with trailing "..." */
660
634
  const getJsonPreviewText = (data, maxLines = 4) => {
661
635
  try {
662
636
  const formatted = JSON.stringify(data, null, 2);
@@ -680,17 +654,14 @@ const getJsonPreviewText = (data, maxLines = 4) => {
680
654
  }
681
655
  };
682
656
  exports.getJsonPreviewText = getJsonPreviewText;
683
- /** Parses a stack trace line to extract function name, file name, extension (.tsx/.jsx/.ts), line, and column numbers */
684
657
  const parseStackLine = (rawLine, isOrigin = false) => {
685
658
  let line = rawLine.trim().replace(/^at /, '');
686
- // Format: func@file:line:col (JSC / Hermes format)
687
659
  if (line.includes('@')) {
688
660
  const atIndex = line.indexOf('@');
689
661
  const funcPart = line.substring(0, atIndex).trim();
690
662
  const pathPart = line.substring(atIndex + 1).trim();
691
663
  line = funcPart ? `${funcPart} (${pathPart})` : pathPart;
692
664
  }
693
- // Check for "func (path:line:col)" or "path:line:col"
694
665
  const parenMatch = line.match(/^(.*?)\s*\((.*?)\)$/);
695
666
  let functionName = '<anonymous>';
696
667
  let locationPart = line;
@@ -698,13 +669,10 @@ const parseStackLine = (rawLine, isOrigin = false) => {
698
669
  functionName = parenMatch[1].trim() || '<anonymous>';
699
670
  locationPart = parenMatch[2].trim();
700
671
  }
701
- // Clean Babel/Hermes artifacts in function names like ?anon_0_, _callee$, etc.
702
672
  if (functionName.startsWith('?anon_') || functionName === '?') {
703
673
  functionName = 'anonymous';
704
674
  }
705
- // Remove "address at " prefix if present in Hermes
706
675
  locationPart = locationPart.replace(/^address at /, '');
707
- // Extract file, line, and col from locationPart (e.g. "path/to/file.tsx:42:15" or "http://...:42:15")
708
676
  const locMatch = locationPart.match(/^(.*?):(\d+):(\d+)$/);
709
677
  let fullPath = locationPart;
710
678
  let lineNumber;
@@ -714,16 +682,13 @@ const parseStackLine = (rawLine, isOrigin = false) => {
714
682
  lineNumber = locMatch[2];
715
683
  columnNumber = locMatch[3];
716
684
  }
717
- // Clean file name (remove query strings, packager urls, and parent paths)
718
685
  let cleanPath = fullPath
719
686
  .split('?')[0]
720
687
  .split('&')[0]
721
688
  .replace(/[)]+$/, '')
722
689
  .replace(/\/\/+$/, '');
723
- // Remove protocol prefixes
724
690
  cleanPath = cleanPath.replace(/^(?:https?:\/\/[^\/]+\/|file:\/\/\/|webpack:\/\/\/?)/, '');
725
691
  const fileName = cleanPath.split('/').filter(Boolean).pop() || cleanPath;
726
- // Determine file extension (.tsx, .jsx, .ts, .js)
727
692
  const extMatch = fileName.match(/\.([a-z0-9]+)$/i);
728
693
  const ext = extMatch ? extMatch[1].toLowerCase() : '';
729
694
  const fileExt = ext === 'tsx' || ext === 'jsx' || ext === 'ts' || ext === 'js'
@@ -760,7 +725,6 @@ const parseStackLine = (rawLine, isOrigin = false) => {
760
725
  isNative ||
761
726
  functionName === 'asyncGeneratorStep' ||
762
727
  functionName === '_next';
763
- // Format clean relative project path
764
728
  let relativePath = cleanPath;
765
729
  if (relativePath.includes('/example/')) {
766
730
  relativePath = relativePath.substring(relativePath.indexOf('/example/') + 9);
@@ -791,14 +755,12 @@ const parseStackLine = (rawLine, isOrigin = false) => {
791
755
  };
792
756
  };
793
757
  exports.parseStackLine = parseStackLine;
794
- /** Opens a file and line number directly in VS Code / system editor */
795
758
  const openInVSCode = (filePath, lineNumber, columnNumber) => {
796
759
  const numLine = lineNumber ? Number(lineNumber) : 1;
797
760
  const numCol = columnNumber ? Number(columnNumber) : 1;
798
761
  const line = lineNumber ? `:${lineNumber}` : '';
799
762
  const col = columnNumber ? `:${columnNumber}` : '';
800
763
  const cleanPath = filePath.replace(/^file:\/\//, '');
801
- // 1. Notify Metro dev server on host to launch editor directly on local system
802
764
  let extractedOrigin = null;
803
765
  try {
804
766
  const scriptURL = react_native_1.NativeModules?.SourceCode?.scriptURL ||
@@ -835,21 +797,18 @@ const openInVSCode = (filePath, lineNumber, columnNumber) => {
835
797
  }
836
798
  catch { }
837
799
  });
838
- // 2. Also invoke native URL scheme handlers
839
800
  const vscodeUrl = `vscode://file/${cleanPath.replace(/^\/+/, '')}${line}${col}`;
840
801
  const cursorUrl = `cursor://file/${cleanPath.replace(/^\/+/, '')}${line}${col}`;
841
802
  const vscodeInsidersUrl = `vscode-insiders://file/${cleanPath.replace(/^\/+/, '')}${line}${col}`;
842
803
  react_native_1.Linking.openURL(vscodeUrl).catch(() => {
843
804
  react_native_1.Linking.openURL(cursorUrl).catch(() => {
844
805
  react_native_1.Linking.openURL(vscodeInsidersUrl).catch(() => {
845
- // Fallback: Copy to clipboard so user can jump immediately
846
806
  (0, exports.copyToClipboard)(`${cleanPath}${line}${col}`, 'Location');
847
807
  });
848
808
  });
849
809
  });
850
810
  };
851
811
  exports.openInVSCode = openInVSCode;
852
- // ─── Analytics Helpers ────────────────────────────────────────────────────────
853
812
  exports.ANALYTICS_EVENT_PALETTE = [
854
813
  AppColors_1.AppColors.googleBlue,
855
814
  AppColors_1.AppColors.googleGreen,
@@ -10,19 +10,8 @@ export interface MemoryPruneSummary {
10
10
  triggeredBy: 'memory-warning' | 'manual' | 'ram-threshold';
11
11
  }
12
12
  type MemoryWarningListener = (summary: MemoryPruneSummary) => void;
13
- /**
14
- * Prunes all in-memory log stores to prevent OOM / memory pressure.
15
- * Keeps targetRetentionPct (default: 50%) of existing logs.
16
- */
17
13
  export declare const pruneAllLogs: (triggeredBy?: MemoryPruneSummary["triggeredBy"], targetRetentionPct?: number) => MemoryPruneSummary;
18
- /**
19
- * Starts listening to OS memory pressure warnings via AppState 'memoryWarning'.
20
- * Automatically prunes logs and notifies subscribers when memory is constrained.
21
- */
22
14
  export declare const setupMemoryWarningHandler: () => (() => void);
23
- /**
24
- * Subscribes to memory prune events.
25
- */
26
15
  export declare const subscribeMemoryWarning: (listener: MemoryWarningListener) => (() => void);
27
16
  export declare const getLastPruneTimestamp: () => number;
28
17
  export declare const isMemoryHandlerActive: () => boolean;
@@ -13,10 +13,6 @@ const memoryListeners = new Set();
13
13
  let appStateSubscription = null;
14
14
  let isMemoryWarningHandlerActive = false;
15
15
  let lastPruneTimestamp = 0;
16
- /**
17
- * Prunes all in-memory log stores to prevent OOM / memory pressure.
18
- * Keeps targetRetentionPct (default: 50%) of existing logs.
19
- */
20
16
  const pruneAllLogs = (triggeredBy = 'manual', targetRetentionPct = 0.5) => {
21
17
  const targetPct = Math.max(0.1, Math.min(1.0, targetRetentionPct));
22
18
  const prunedNetwork = (0, networkLogger_1.pruneNetworkLogs)(undefined);
@@ -32,7 +28,6 @@ const pruneAllLogs = (triggeredBy = 'manual', targetRetentionPct = 0.5) => {
32
28
  prunedCrashes +
33
29
  prunedPerformance;
34
30
  lastPruneTimestamp = Date.now();
35
- // Trigger Hermes/V8 Garbage Collection if exposed
36
31
  if (typeof globalThis.gc === 'function') {
37
32
  try {
38
33
  globalThis.gc();
@@ -63,10 +58,6 @@ const pruneAllLogs = (triggeredBy = 'manual', targetRetentionPct = 0.5) => {
63
58
  return summary;
64
59
  };
65
60
  exports.pruneAllLogs = pruneAllLogs;
66
- /**
67
- * Starts listening to OS memory pressure warnings via AppState 'memoryWarning'.
68
- * Automatically prunes logs and notifies subscribers when memory is constrained.
69
- */
70
61
  const setupMemoryWarningHandler = () => {
71
62
  if (isMemoryWarningHandlerActive) {
72
63
  return () => { };
@@ -82,7 +73,6 @@ const setupMemoryWarningHandler = () => {
82
73
  });
83
74
  }
84
75
  catch (e) {
85
- // AppState memoryWarning might not be supported on all mock/test platforms
86
76
  }
87
77
  return () => {
88
78
  if (appStateSubscription) {
@@ -96,9 +86,6 @@ const setupMemoryWarningHandler = () => {
96
86
  };
97
87
  };
98
88
  exports.setupMemoryWarningHandler = setupMemoryWarningHandler;
99
- /**
100
- * Subscribes to memory prune events.
101
- */
102
89
  const subscribeMemoryWarning = (listener) => {
103
90
  memoryListeners.add(listener);
104
91
  return () => {
@@ -4,8 +4,4 @@ export interface SearchQueryOptions {
4
4
  isRegex?: boolean;
5
5
  isCaseSensitive?: boolean;
6
6
  }
7
- /**
8
- * Parses query strings like `method:POST is:error slow:>1s status:200 auth`
9
- * and checks whether a given NetworkLog matches all tokens against the specified scope.
10
- */
11
7
  export declare function matchNetworkLogQuery(log: NetworkLog, searchQuery: string, routePath?: string, options?: SearchQueryOptions): boolean;
@@ -1,14 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.matchNetworkLogQuery = matchNetworkLogQuery;
4
- /**
5
- * Parses query strings like `method:POST is:error slow:>1s status:200 auth`
6
- * and checks whether a given NetworkLog matches all tokens against the specified scope.
7
- */
8
4
  function matchNetworkLogQuery(log, searchQuery, routePath, options) {
9
5
  if (!searchQuery || searchQuery.trim().length === 0)
10
6
  return true;
11
- // Split tokens by spaces or commas while respecting quotes
12
7
  const rawTokens = searchQuery.trim().match(/(?:[^\s,"']+|"[^"]*"|'[^']*')+/g) || [];
13
8
  if (rawTokens.length === 0)
14
9
  return true;
@@ -43,7 +38,6 @@ function matchNetworkLogQuery(log, searchQuery, routePath, options) {
43
38
  ? JSON.stringify(log.responseHeaders)
44
39
  : '';
45
40
  const pathRaw = routePath || log?.routeInfo?.path || '';
46
- // Construct search corpus based on active scope
47
41
  const getScopedCorpus = (caseSens) => {
48
42
  let parts = [];
49
43
  if (scope === 'url') {
@@ -90,7 +84,6 @@ function matchNetworkLogQuery(log, searchQuery, routePath, options) {
90
84
  if (!token)
91
85
  continue;
92
86
  const lowerToken = token.toLowerCase();
93
- // 1. method:<VAL> or m:<VAL>
94
87
  if (lowerToken.startsWith('method:') || lowerToken.startsWith('m:')) {
95
88
  const targetMethod = lowerToken.replace(/^(method:|m:)/, '').trim();
96
89
  if (targetMethod.startsWith('!')) {
@@ -103,7 +96,6 @@ function matchNetworkLogQuery(log, searchQuery, routePath, options) {
103
96
  }
104
97
  continue;
105
98
  }
106
- // 2. status:<VAL> or s:<VAL>
107
99
  if (lowerToken.startsWith('status:') || lowerToken.startsWith('s:')) {
108
100
  const val = lowerToken.replace(/^(status:|s:)/, '').trim();
109
101
  if (val === 'pending' || val === 'loading') {
@@ -147,7 +139,6 @@ function matchNetworkLogQuery(log, searchQuery, routePath, options) {
147
139
  }
148
140
  continue;
149
141
  }
150
- // 3. is:<FLAG>
151
142
  if (lowerToken.startsWith('is:')) {
152
143
  const flag = lowerToken.slice(3).trim();
153
144
  if (flag === 'error' ||
@@ -205,7 +196,6 @@ function matchNetworkLogQuery(log, searchQuery, routePath, options) {
205
196
  }
206
197
  continue;
207
198
  }
208
- // 4. slow:<DURATION> or dur:<DURATION> or duration:<DURATION>
209
199
  if (lowerToken.startsWith('slow:') ||
210
200
  lowerToken.startsWith('dur:') ||
211
201
  lowerToken.startsWith('duration:')) {
@@ -250,21 +240,18 @@ function matchNetworkLogQuery(log, searchQuery, routePath, options) {
250
240
  }
251
241
  continue;
252
242
  }
253
- // 5. client:<CLIENT> or c:<CLIENT>
254
243
  if (lowerToken.startsWith('client:') || lowerToken.startsWith('c:')) {
255
244
  const targetClient = lowerToken.replace(/^(client:|c:)/, '').trim();
256
245
  if (!clientStr.includes(targetClient))
257
246
  return false;
258
247
  continue;
259
248
  }
260
- // 6. domain:<DOMAIN> or d:<DOMAIN>
261
249
  if (lowerToken.startsWith('domain:') || lowerToken.startsWith('d:')) {
262
250
  const targetDomain = lowerToken.replace(/^(domain:|d:)/, '').trim();
263
251
  if (!urlStr.includes(targetDomain))
264
252
  return false;
265
253
  continue;
266
254
  }
267
- // 7. path:<PATH> or p:<PATH> or page:<PAGE>
268
255
  if (lowerToken.startsWith('path:') ||
269
256
  lowerToken.startsWith('p:') ||
270
257
  lowerToken.startsWith('page:')) {
@@ -278,21 +265,18 @@ function matchNetworkLogQuery(log, searchQuery, routePath, options) {
278
265
  }
279
266
  continue;
280
267
  }
281
- // 8. req:<TERM> or body:<TERM>
282
268
  if (lowerToken.startsWith('req:') || lowerToken.startsWith('body:')) {
283
269
  const target = lowerToken.replace(/^(req:|body:)/, '').trim();
284
270
  if (!reqStr.includes(target))
285
271
  return false;
286
272
  continue;
287
273
  }
288
- // 9. res:<TERM>
289
274
  if (lowerToken.startsWith('res:')) {
290
275
  const target = lowerToken.slice(4).trim();
291
276
  if (!resStr.includes(target))
292
277
  return false;
293
278
  continue;
294
279
  }
295
- // 10. header:<TERM> or h:<TERM>
296
280
  if (lowerToken.startsWith('header:') || lowerToken.startsWith('h:')) {
297
281
  const target = lowerToken.replace(/^(header:|h:)/, '').trim();
298
282
  if (!reqHeadersStr.includes(target) && !resHeadersStr.includes(target)) {
@@ -300,7 +284,6 @@ function matchNetworkLogQuery(log, searchQuery, routePath, options) {
300
284
  }
301
285
  continue;
302
286
  }
303
- // 11. Generic Match (handles Regex, Case-sensitivity, and Scoped corpus)
304
287
  if (isRegex) {
305
288
  try {
306
289
  const re = new RegExp(token, isCaseSensitive ? '' : 'i');
@@ -316,7 +299,6 @@ function matchNetworkLogQuery(log, searchQuery, routePath, options) {
316
299
  else {
317
300
  const queryTerm = isCaseSensitive ? token : lowerToken;
318
301
  if (!targetCorpus.includes(queryTerm)) {
319
- // Special case: if user typed "error" / "failed", check error status
320
302
  if (queryTerm === 'error' ||
321
303
  queryTerm === 'failed' ||
322
304
  queryTerm === 'fail') {
@@ -1,8 +1,4 @@
1
1
  "use strict";
2
- // #5 — Persistence layer for the inspector's settings selections.
3
- //
4
- // Backed by iOS Settings (NSUserDefaults) for iOS, or custom storage if passed (e.g. AsyncStorage/MMKV).
5
- // Contains an in-memory fallback for Android or Jest test environments.
6
2
  Object.defineProperty(exports, "__esModule", { value: true });
7
3
  exports.isPersistentStorageAvailable = void 0;
8
4
  exports.setCustomStorage = setCustomStorage;
@@ -13,7 +9,6 @@ exports.getCustomStorage = getCustomStorage;
13
9
  exports.calculateRamBasedLimits = calculateRamBasedLimits;
14
10
  const react_native_1 = require("react-native");
15
11
  const NativeInspector_1 = require("../native/NativeInspector");
16
- // In-memory fallback (settings survive for the app session only).
17
12
  const memory = new Map();
18
13
  let customStorage = null;
19
14
  function setCustomStorage(storage) {
@@ -46,7 +41,6 @@ async function loadSettings() {
46
41
  }
47
42
  return raw && typeof raw === 'object' ? raw : {};
48
43
  }
49
- // In-memory fallback
50
44
  const raw = memory.get(SETTINGS_KEY);
51
45
  if (!raw)
52
46
  return {};
@@ -74,7 +68,6 @@ function saveSettings(settings) {
74
68
  memory.set(SETTINGS_KEY, raw);
75
69
  }
76
70
  catch {
77
- // ignore
78
71
  }
79
72
  }
80
73
  async function clearPersistedSettings() {
@@ -98,7 +91,6 @@ async function clearPersistedSettings() {
98
91
  memory.delete(SETTINGS_KEY);
99
92
  }
100
93
  catch {
101
- // ignore
102
94
  }
103
95
  }
104
96
  const isPersistentStorageAvailable = () => {
@@ -0,0 +1,2 @@
1
+ export declare function setTelemetryEnabled(enabled: boolean): void;
2
+ export declare function trackActiveTelemetryHeartbeat(telemetryEnabled?: boolean, environment?: string): Promise<void>;
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setTelemetryEnabled = setTelemetryEnabled;
4
+ exports.trackActiveTelemetryHeartbeat = trackActiveTelemetryHeartbeat;
5
+ const react_native_1 = require("react-native");
6
+ const version_1 = require("../constants/version");
7
+ const settingsStore_1 = require("./settingsStore");
8
+ const telemetryConfig_1 = require("../constants/telemetryConfig");
9
+ const PKG_NAME = 'react-native-inapp-inspector';
10
+ const KEY_MATERIAL = `${PKG_NAME}::${telemetryConfig_1.TELEMETRY_SALT}`;
11
+ function getKeystream(material, length) {
12
+ const stream = [];
13
+ let acc = 0x5a827999;
14
+ for (let i = 0; i < length; i++) {
15
+ const charCode = material.charCodeAt(i % material.length);
16
+ acc = ((acc * 31 + charCode * 17 + i * 13) ^ (acc >>> 7)) & 0xffffffff;
17
+ stream.push((acc >>> (i % 24)) & 0xff);
18
+ }
19
+ return stream;
20
+ }
21
+ function deobfuscate(hexStr) {
22
+ if (!hexStr)
23
+ return '';
24
+ const bytes = [];
25
+ for (let i = 0; i < hexStr.length; i += 2) {
26
+ bytes.push(parseInt(hexStr.substring(i, i + 2), 16));
27
+ }
28
+ const keystream = getKeystream(KEY_MATERIAL, bytes.length);
29
+ const out = [];
30
+ for (let i = 0; i < bytes.length; i++) {
31
+ const k = keystream[i];
32
+ const s = telemetryConfig_1.TELEMETRY_SALT.charCodeAt(i % telemetryConfig_1.TELEMETRY_SALT.length);
33
+ const dec = (bytes[i] ^ k ^ s) & 0xff;
34
+ out.push(String.fromCharCode(dec));
35
+ }
36
+ return out.join('');
37
+ }
38
+ let _cachedMid = null;
39
+ let _cachedSec = null;
40
+ function getCredentials() {
41
+ if (_cachedMid !== null && _cachedSec !== null) {
42
+ return { measurementId: _cachedMid, apiSecret: _cachedSec };
43
+ }
44
+ if (!telemetryConfig_1.ENC_MID || !telemetryConfig_1.ENC_SEC || !telemetryConfig_1.TELEMETRY_SALT) {
45
+ _cachedMid = '';
46
+ _cachedSec = '';
47
+ return { measurementId: '', apiSecret: '' };
48
+ }
49
+ try {
50
+ _cachedMid = deobfuscate(telemetryConfig_1.ENC_MID);
51
+ _cachedSec = deobfuscate(telemetryConfig_1.ENC_SEC);
52
+ }
53
+ catch {
54
+ _cachedMid = '';
55
+ _cachedSec = '';
56
+ }
57
+ return { measurementId: _cachedMid, apiSecret: _cachedSec };
58
+ }
59
+ function getCollectUrl() {
60
+ const { measurementId, apiSecret } = getCredentials();
61
+ if (!measurementId || !apiSecret)
62
+ return '';
63
+ return `https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`;
64
+ }
65
+ const PING_INTERVAL_MS = 24 * 60 * 60 * 1000;
66
+ let isTelemetryEnabled = true;
67
+ function setTelemetryEnabled(enabled) {
68
+ isTelemetryEnabled = enabled;
69
+ }
70
+ async function getOrCreateClientId() {
71
+ try {
72
+ const settings = await (0, settingsStore_1.loadSettings)();
73
+ if (settings.telemetryClientId) {
74
+ return settings.telemetryClientId;
75
+ }
76
+ const part1 = Math.floor(100000000 + Math.random() * 900000000);
77
+ const part2 = Math.floor(1000000000 + Math.random() * 9000000000);
78
+ const newId = `${part1}.${part2}`;
79
+ (0, settingsStore_1.saveSettings)({ ...settings, telemetryClientId: newId });
80
+ return newId;
81
+ }
82
+ catch {
83
+ return `${Math.floor(100000000 + Math.random() * 900000000)}.${Math.floor(1000000000 + Math.random() * 9000000000)}`;
84
+ }
85
+ }
86
+ function getSystemMetadata(environment) {
87
+ const rnConstants = react_native_1.Platform.constants;
88
+ const rnVersion = rnConstants?.reactNativeVersion
89
+ ? `${rnConstants.reactNativeVersion.major}.${rnConstants.reactNativeVersion.minor}.${rnConstants.reactNativeVersion.patch}`
90
+ : 'unknown';
91
+ const isHermes = Boolean(typeof global.HermesInternal === 'object' && global.HermesInternal !== null);
92
+ const isFabric = Boolean(global?.nativeFabricUIManager !== undefined);
93
+ const isDev = Boolean(typeof __DEV__ !== 'undefined' && __DEV__);
94
+ return {
95
+ lib_version: version_1.LIB_VERSION,
96
+ platform: react_native_1.Platform.OS,
97
+ os_version: String(react_native_1.Platform.Version || 'unknown'),
98
+ rn_version: rnVersion,
99
+ is_hermes: isHermes,
100
+ is_fabric: isFabric,
101
+ is_dev: isDev,
102
+ environment: environment || (isDev ? 'DEV' : 'PROD'),
103
+ engagement_time_msec: 1000,
104
+ };
105
+ }
106
+ async function trackActiveTelemetryHeartbeat(telemetryEnabled = true, environment) {
107
+ if (telemetryEnabled === false) {
108
+ isTelemetryEnabled = false;
109
+ return;
110
+ }
111
+ isTelemetryEnabled = true;
112
+ const url = getCollectUrl();
113
+ if (!url)
114
+ return;
115
+ try {
116
+ const settings = await (0, settingsStore_1.loadSettings)();
117
+ const lastPing = settings.telemetryLastPing || 0;
118
+ const now = Date.now();
119
+ if (now - lastPing < PING_INTERVAL_MS)
120
+ return;
121
+ const clientId = await getOrCreateClientId();
122
+ const params = getSystemMetadata(environment);
123
+ await fetch(url, {
124
+ method: 'POST',
125
+ headers: { 'Content-Type': 'application/json' },
126
+ body: JSON.stringify({
127
+ client_id: clientId,
128
+ non_personalized_ads: true,
129
+ events: [{ name: 'inspector_active_heartbeat', params }],
130
+ }),
131
+ });
132
+ (0, settingsStore_1.saveSettings)({ ...settings, telemetryLastPing: now });
133
+ }
134
+ catch {
135
+ }
136
+ }
@@ -1,8 +1,5 @@
1
1
  import React from 'react';
2
2
  type TranslationParams = Record<string, any>;
3
- /**
4
- * Standalone zero-dependency translation function
5
- */
6
3
  export declare function t(key: string, optionsOrFallback?: TranslationParams | string): string;
7
4
  export declare function setLanguage(lang: string): void;
8
5
  export declare function addTranslations(lang: string, translations: Record<string, any>): void;
@@ -16,9 +13,6 @@ export declare const i18n: {
16
13
  addTranslations: typeof addTranslations;
17
14
  setTranslations: typeof setTranslations;
18
15
  };
19
- /**
20
- * React hook compatible with react-i18next useTranslation()
21
- */
22
16
  export declare function useTranslation(): {
23
17
  t: typeof t;
24
18
  i18n: {
@@ -31,9 +25,6 @@ export declare function useTranslation(): {
31
25
  setTranslations: typeof setTranslations;
32
26
  };
33
27
  };
34
- /**
35
- * Backward-compatible I18nextProvider component
36
- */
37
28
  export declare const I18nextProvider: ({ children }: {
38
29
  children?: React.ReactNode;
39
30
  i18n?: any;