react-native-inapp-inspector 2.2.8 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +22 -7
  2. package/dist/commonjs/components/AppHeaderLogo.js +45 -12
  3. package/dist/commonjs/components/BrandSquareIcon.js +92 -49
  4. package/dist/commonjs/components/EmptyState.d.ts +7 -2
  5. package/dist/commonjs/components/EmptyState.js +11 -5
  6. package/dist/commonjs/components/Inspector/AnalyticsTab.js +29 -18
  7. package/dist/commonjs/components/Inspector/ConsoleTab.js +6 -1
  8. package/dist/commonjs/components/Inspector/CrashDetail.js +43 -9
  9. package/dist/commonjs/components/Inspector/CrashTab.js +34 -3
  10. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +80 -16
  11. package/dist/commonjs/components/Inspector/InspectorHeader.js +16 -3
  12. package/dist/commonjs/components/Inspector/NetworkDetail.js +3 -2
  13. package/dist/commonjs/components/Inspector/NetworkTab.js +103 -4
  14. package/dist/commonjs/components/Inspector/ReduxTab.js +19 -3
  15. package/dist/commonjs/components/Inspector/SettingsPanel.js +4 -4
  16. package/dist/commonjs/components/Inspector/StorageTab.js +19 -3
  17. package/dist/commonjs/components/JsonViewer.js +2 -0
  18. package/dist/commonjs/components/MetaAccordion.js +15 -3
  19. package/dist/commonjs/constants/version.d.ts +1 -1
  20. package/dist/commonjs/constants/version.js +1 -1
  21. package/dist/commonjs/customHooks/networkLogger.d.ts +3 -0
  22. package/dist/commonjs/customHooks/networkLogger.js +10 -1
  23. package/dist/commonjs/helpers/index.d.ts +6 -0
  24. package/dist/commonjs/helpers/index.js +196 -6
  25. package/dist/commonjs/helpers/searchQueryParser.js +62 -20
  26. package/dist/commonjs/i18n/index.d.ts +13 -0
  27. package/dist/commonjs/i18n/index.js +35 -2
  28. package/dist/commonjs/index.d.ts +3 -0
  29. package/dist/commonjs/index.js +80 -11
  30. package/dist/commonjs/native/NativeInspector.js +13 -0
  31. package/dist/commonjs/native/NativeNetworkInspector.d.ts +1 -1
  32. package/dist/commonjs/styles/AppColors.d.ts +4 -0
  33. package/dist/commonjs/styles/AppColors.js +11 -1
  34. package/dist/commonjs/styles/AppFonts.d.ts +11 -0
  35. package/dist/commonjs/styles/AppFonts.js +11 -1
  36. package/dist/commonjs/types/interfaces.d.ts +1 -0
  37. package/dist/esm/components/AppHeaderLogo.js +45 -12
  38. package/dist/esm/components/BrandSquareIcon.js +92 -49
  39. package/dist/esm/components/EmptyState.d.ts +7 -2
  40. package/dist/esm/components/EmptyState.js +11 -5
  41. package/dist/esm/components/Inspector/AnalyticsTab.js +30 -19
  42. package/dist/esm/components/Inspector/ConsoleTab.js +6 -1
  43. package/dist/esm/components/Inspector/CrashDetail.js +43 -9
  44. package/dist/esm/components/Inspector/CrashTab.js +34 -3
  45. package/dist/esm/components/Inspector/DeviceInfoTab.js +80 -16
  46. package/dist/esm/components/Inspector/InspectorHeader.js +17 -4
  47. package/dist/esm/components/Inspector/NetworkDetail.js +3 -2
  48. package/dist/esm/components/Inspector/NetworkTab.js +103 -4
  49. package/dist/esm/components/Inspector/ReduxTab.js +19 -3
  50. package/dist/esm/components/Inspector/SettingsPanel.js +4 -4
  51. package/dist/esm/components/Inspector/StorageTab.js +19 -3
  52. package/dist/esm/components/JsonViewer.js +2 -0
  53. package/dist/esm/components/MetaAccordion.js +15 -3
  54. package/dist/esm/constants/version.d.ts +1 -1
  55. package/dist/esm/constants/version.js +1 -1
  56. package/dist/esm/customHooks/networkLogger.d.ts +3 -0
  57. package/dist/esm/customHooks/networkLogger.js +8 -0
  58. package/dist/esm/helpers/index.d.ts +6 -0
  59. package/dist/esm/helpers/index.js +193 -5
  60. package/dist/esm/helpers/searchQueryParser.js +62 -20
  61. package/dist/esm/i18n/index.d.ts +13 -0
  62. package/dist/esm/i18n/index.js +33 -3
  63. package/dist/esm/index.d.ts +3 -0
  64. package/dist/esm/index.js +68 -12
  65. package/dist/esm/native/NativeInspector.js +13 -0
  66. package/dist/esm/native/NativeNetworkInspector.d.ts +1 -1
  67. package/dist/esm/styles/AppColors.d.ts +4 -0
  68. package/dist/esm/styles/AppColors.js +9 -0
  69. package/dist/esm/styles/AppFonts.d.ts +11 -0
  70. package/dist/esm/styles/AppFonts.js +9 -0
  71. package/dist/esm/types/interfaces.d.ts +1 -0
  72. package/ios/NetworkInspectorModule.mm +11 -1
  73. package/package.json +1 -1
  74. package/src/components/AppHeaderLogo.tsx +46 -12
  75. package/src/components/BrandSquareIcon.tsx +127 -78
  76. package/src/components/EmptyState.tsx +27 -5
  77. package/src/components/Inspector/AnalyticsTab.tsx +48 -27
  78. package/src/components/Inspector/ConsoleTab.tsx +10 -0
  79. package/src/components/Inspector/CrashDetail.tsx +65 -9
  80. package/src/components/Inspector/CrashTab.tsx +41 -3
  81. package/src/components/Inspector/DeviceInfoTab.tsx +87 -16
  82. package/src/components/Inspector/InspectorHeader.tsx +24 -4
  83. package/src/components/Inspector/NetworkDetail.tsx +4 -4
  84. package/src/components/Inspector/NetworkTab.tsx +129 -4
  85. package/src/components/Inspector/ReduxTab.tsx +26 -8
  86. package/src/components/Inspector/SettingsPanel.tsx +4 -4
  87. package/src/components/Inspector/StorageTab.tsx +21 -3
  88. package/src/components/JsonViewer.tsx +2 -0
  89. package/src/components/MetaAccordion.tsx +18 -3
  90. package/src/constants/version.ts +1 -1
  91. package/src/customHooks/networkLogger.ts +15 -0
  92. package/src/helpers/index.ts +213 -5
  93. package/src/helpers/searchQueryParser.ts +63 -20
  94. package/src/i18n/index.ts +38 -3
  95. package/src/index.tsx +89 -11
  96. package/src/native/NativeInspector.ts +13 -0
  97. package/src/native/NativeNetworkInspector.ts +1 -1
  98. package/src/styles/AppColors.ts +9 -0
  99. package/src/styles/AppFonts.ts +16 -0
  100. package/src/types/interfaces.ts +1 -0
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.registerComponentProfile = exports.getHermesMemoryStats = exports.measureAsync = exports.trackHeavyTask = exports.trackNavigationTransition = exports.trackComponentRender = exports.useNavigationProfiler = exports.useComponentProfiler = exports.usePerformanceTracker = exports.registerGAPlugin = exports.getEventCategory = exports.getLastActionForReducer = exports.clearActionHistory = exports.getActionHistory = exports.subscribeReduxState = exports.getReduxState = exports.inspectorReduxMiddleware = exports.connectReduxStore = exports.ErrorBoundary = exports.CrashTab = exports.computeCrashFingerprint = exports.recordUserActionBreadcrumb = exports.recordReduxBreadcrumb = exports.recordNetworkBreadcrumb = exports.recordNavigationBreadcrumb = exports.addCrashBreadcrumb = exports.recordCustomCrash = exports.parseCrashStackTrace = exports.exportCrashReport = exports.simulateTestCrash = exports.clearCrashRecords = exports.getCrashRecords = exports.emitCrashEvent = exports.subscribeCrashEvents = exports.setupGlobalCrashHandler = exports.getCollectionEnabled = exports.getDefaultEventParameters = exports.getCurrentUserId = exports.getCurrentUserProperties = exports.clearAnalyticsEvents = exports.subscribeAnalyticsEvents = exports.logAnalyticsEvent = exports.setupAnalyticsLogger = exports.subscribeConsoleLogs = exports.clearConsoleLogs = exports.setupConsoleLogger = exports.addAxiosInterceptors = exports.subscribeNetworkLogs = exports.clearNetworkLogs = exports.setupNetworkLogger = void 0;
40
40
  exports.connectMMKV = exports.connectAsyncStorage = exports.BrandCircleIcon = exports.BrandSquareIcon = exports.prunePerformanceEvents = exports.getMaxPerformanceEventsLimit = exports.setMaxPerformanceEventsLimit = exports.pruneCrashRecords = exports.getMaxCrashLogsLimit = exports.pruneAnalyticsLogs = exports.getMaxAnalyticsLogsLimit = exports.setMaxAnalyticsLogsLimit = exports.pruneReduxHistory = exports.getMaxReduxHistoryLimit = exports.setMaxReduxHistoryLimit = exports.pruneConsoleLogs = exports.getMaxConsoleLogsLimit = exports.setMaxConsoleLogsLimit = exports.pruneNetworkLogs = exports.getMaxNetworkLogsLimit = exports.setMaxNetworkLogsLimit = exports.subscribeMemoryWarning = exports.pruneAllLogs = exports.setupMemoryWarningHandler = exports.isNativeModuleAvailable = exports.setNativeStorageItem = exports.getNativeStorageItem = exports.getNativeFpsMetrics = exports.stopNativeFpsMonitoring = exports.startNativeFpsMonitoring = exports.subscribeNativeDeviceShake = exports.subscribeNativeFloatingButtonPress = exports.setNativeFloatingButtonBadge = exports.hideNativeFloatingButton = exports.showNativeFloatingButton = exports.subscribeNativeCrashes = exports.enableNativeCrashProtection = exports.getNativeDeviceMetrics = exports.InspectCatch = exports.InspectTrackTime = exports.InspectLog = exports.generateFixSnippet = exports.getInitialPerformanceEvents = exports.getInitialRenderProfiles = exports.getPerformanceEvents = exports.subscribePerformanceEvents = exports.clearPerformanceEvents = exports.logPerformanceEvent = exports.getRenderProfiles = exports.subscribeRenderProfiles = void 0;
41
- exports.BreadcrumbType = exports.CrashFilterType = exports.CrashDetailSubTab = exports.CrashExportFormat = exports.CrashType = exports.PerformanceSubTab = exports.BundleSubTab = exports.DiffResultType = exports.StackFrameType = exports.GAEventCategory = exports.AnalyticsEventSource = exports.ConsoleLogType = exports.LogFilter = exports.SettingsSubTab = exports.SettingsPage = exports.ModalAnimationType = exports.LocalFilter = exports.SortOrder = exports.StatusFilter = exports.Method = exports.ActiveTab = exports.subscribeToStorageChanges = exports.clearStorageDriver = exports.removeStorageEntry = exports.setStorageEntry = exports.fetchStorageEntries = exports.getRegisteredMMKVInstanceIds = exports.isMMKVConnected = exports.isAsyncStorageConnected = void 0;
41
+ exports.I18nextProvider = exports.setTranslations = exports.addTranslations = exports.setLanguage = exports.useTranslation = exports.i18n = exports.t = exports.updateAppColorsTheme = exports.getThemeColors = exports.setAppColors = exports.AppColors = exports.setAppFonts = exports.AppFonts = exports.BreadcrumbType = exports.CrashFilterType = exports.CrashDetailSubTab = exports.CrashExportFormat = exports.CrashType = exports.PerformanceSubTab = exports.BundleSubTab = exports.DiffResultType = exports.StackFrameType = exports.GAEventCategory = exports.AnalyticsEventSource = exports.ConsoleLogType = exports.LogFilter = exports.SettingsSubTab = exports.SettingsPage = exports.ModalAnimationType = exports.LocalFilter = exports.SortOrder = exports.StatusFilter = exports.Method = exports.ActiveTab = exports.subscribeToStorageChanges = exports.clearStorageDriver = exports.removeStorageEntry = exports.setStorageEntry = exports.fetchStorageEntries = exports.getRegisteredMMKVInstanceIds = exports.isMMKVConnected = exports.isAsyncStorageConnected = void 0;
42
42
  const react_1 = __importStar(require("react"));
43
43
  const react_native_1 = require("react-native");
44
44
  const native_1 = require("@react-navigation/native");
@@ -224,8 +224,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
224
224
  bundle: false,
225
225
  performance: false,
226
226
  crash: false,
227
- device: true,
228
- storage: true,
227
+ device: false,
228
+ storage: false,
229
229
  });
230
230
  const [maxNetworkLogs, setMaxNetworkLogs] = (0, react_1.useState)(100);
231
231
  const [maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit] = (0, react_1.useState)(75);
@@ -280,8 +280,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
280
280
  bundle: false,
281
281
  performance: false,
282
282
  crash: false,
283
- device: true,
284
- storage: true,
283
+ device: false,
284
+ storage: false,
285
285
  });
286
286
  setDefaultTab('apis');
287
287
  setIsAutoRamLimitEnabled(true);
@@ -355,6 +355,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
355
355
  bundle: false,
356
356
  performance: false,
357
357
  crash: false,
358
+ device: false,
359
+ storage: false,
358
360
  },
359
361
  ...(saved.tabVisibility || {}),
360
362
  apis: true,
@@ -580,12 +582,21 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
580
582
  const navigationContext = react_1.default.useContext(native_1.NavigationContext);
581
583
  const hasNavigationContext = navigationContext !== undefined;
582
584
  const currentRouteRef = (0, react_1.useRef)({
583
- path: 'Navigators',
585
+ path: '',
584
586
  params: null,
585
587
  });
588
+ (0, react_1.useEffect)(() => {
589
+ (0, networkLogger_1.setRouteInfoProvider)(() => currentRouteRef.current);
590
+ return () => {
591
+ (0, networkLogger_1.setRouteInfoProvider)(null);
592
+ };
593
+ }, []);
586
594
  (0, react_1.useEffect)(() => {
587
595
  if (navState) {
588
- currentRouteRef.current = (0, helpers_1.getNavigationInfo)(navState);
596
+ const info = (0, helpers_1.getNavigationInfo)(navState);
597
+ if (info?.path) {
598
+ currentRouteRef.current = info;
599
+ }
589
600
  }
590
601
  }, [navState]);
591
602
  (0, react_1.useEffect)(() => {
@@ -594,9 +605,22 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
594
605
  const updateState = () => {
595
606
  try {
596
607
  if (typeof navigationRef.isReady === 'function' && navigationRef.isReady()) {
608
+ const currentRoute = typeof navigationRef.getCurrentRoute === 'function'
609
+ ? navigationRef.getCurrentRoute()
610
+ : null;
611
+ if (currentRoute?.name) {
612
+ currentRouteRef.current = {
613
+ path: currentRoute.name,
614
+ params: currentRoute.params || null,
615
+ };
616
+ }
597
617
  const state = navigationRef.getRootState();
598
618
  if (state) {
599
619
  setNavState(state);
620
+ const routeInfo = (0, helpers_1.getNavigationInfo)(state);
621
+ if (routeInfo?.path) {
622
+ currentRouteRef.current = routeInfo;
623
+ }
600
624
  }
601
625
  }
602
626
  }
@@ -908,7 +932,9 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
908
932
  if (freshIds.size > 0) {
909
933
  freshIds.forEach(id => {
910
934
  if (!logRouteMapRef.current.has(id)) {
911
- logRouteMapRef.current.set(id, currentRouteRef.current);
935
+ const matchedLog = deduped.find(l => l.id === id);
936
+ const resolvedRoute = matchedLog?.routeInfo || currentRouteRef.current;
937
+ logRouteMapRef.current.set(id, resolvedRoute);
912
938
  }
913
939
  });
914
940
  setNewLogIds(freshIds);
@@ -921,6 +947,12 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
921
947
  const deduped = (0, helpers_1.deduplicateLogs)(raw);
922
948
  const incoming = new Set(deduped.map(l => l.id));
923
949
  prevLogIdsRef.current = incoming;
950
+ deduped.forEach(l => {
951
+ if (!logRouteMapRef.current.has(l.id)) {
952
+ const resolvedRoute = l?.routeInfo || currentRouteRef.current;
953
+ logRouteMapRef.current.set(l.id, resolvedRoute);
954
+ }
955
+ });
924
956
  setLogs(deduped);
925
957
  }
926
958
  else {
@@ -1192,8 +1224,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
1192
1224
  const groups = [];
1193
1225
  for (let i = 0; i < filteredLogs.length; i++) {
1194
1226
  const log = filteredLogs[i];
1195
- const routeInfo = logRouteMapRef.current.get(log.id);
1196
- const pageName = routeInfo?.path || 'Navigators';
1227
+ const routeInfo = logRouteMapRef.current.get(log.id) || log?.routeInfo;
1228
+ const pageName = (0, helpers_1.getLogPageName)(log, routeInfo);
1197
1229
  if (groups.length === 0 ||
1198
1230
  groups[groups.length - 1].pageName !== pageName) {
1199
1231
  groups.push({ pageName, color: (0, helpers_1.getDomainColor)(pageName), logs: [] });
@@ -1446,7 +1478,28 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
1446
1478
  log.type || '',
1447
1479
  log.sourceMethod || '',
1448
1480
  ].join(' ').toLowerCase();
1449
- return queryTokens.every(token => searchTarget.includes(token));
1481
+ return queryTokens.every(token => {
1482
+ if (token.startsWith('level:') || token.startsWith('is:') || token.startsWith('type:')) {
1483
+ const flag = token.replace(/^(level:|is:|type:)/, '').trim();
1484
+ if (flag === 'error' || flag === 'err')
1485
+ return log.type === 'error';
1486
+ if (flag === 'warn' || flag === 'warning')
1487
+ return log.type === 'warn';
1488
+ if (flag === 'info')
1489
+ return log.type === 'info';
1490
+ if (flag === 'log')
1491
+ return log.sourceMethod === 'log';
1492
+ if (flag === 'analytics')
1493
+ return (log.message || '').toLowerCase().includes('[analytics');
1494
+ }
1495
+ if (token === 'error' || token === 'err') {
1496
+ return log.type === 'error' || searchTarget.includes(token);
1497
+ }
1498
+ if (token === 'warn' || token === 'warning') {
1499
+ return log.type === 'warn' || searchTarget.includes(token);
1500
+ }
1501
+ return searchTarget.includes(token);
1502
+ });
1450
1503
  });
1451
1504
  }
1452
1505
  // #7 — apply sort order (newest/oldest first)
@@ -1994,3 +2047,19 @@ Object.defineProperty(exports, "CrashExportFormat", { enumerable: true, get: fun
1994
2047
  Object.defineProperty(exports, "CrashDetailSubTab", { enumerable: true, get: function () { return types_1.CrashDetailSubTab; } });
1995
2048
  Object.defineProperty(exports, "CrashFilterType", { enumerable: true, get: function () { return types_1.CrashFilterType; } });
1996
2049
  Object.defineProperty(exports, "BreadcrumbType", { enumerable: true, get: function () { return types_1.BreadcrumbType; } });
2050
+ var AppFonts_1 = require("./styles/AppFonts");
2051
+ Object.defineProperty(exports, "AppFonts", { enumerable: true, get: function () { return AppFonts_1.AppFonts; } });
2052
+ Object.defineProperty(exports, "setAppFonts", { enumerable: true, get: function () { return AppFonts_1.setAppFonts; } });
2053
+ var AppColors_1 = require("./styles/AppColors");
2054
+ Object.defineProperty(exports, "AppColors", { enumerable: true, get: function () { return AppColors_1.AppColors; } });
2055
+ Object.defineProperty(exports, "setAppColors", { enumerable: true, get: function () { return AppColors_1.setAppColors; } });
2056
+ Object.defineProperty(exports, "getThemeColors", { enumerable: true, get: function () { return AppColors_1.getThemeColors; } });
2057
+ Object.defineProperty(exports, "updateAppColorsTheme", { enumerable: true, get: function () { return AppColors_1.updateAppColorsTheme; } });
2058
+ var i18n_2 = require("./i18n");
2059
+ Object.defineProperty(exports, "t", { enumerable: true, get: function () { return i18n_2.t; } });
2060
+ Object.defineProperty(exports, "i18n", { enumerable: true, get: function () { return i18n_2.i18n; } });
2061
+ Object.defineProperty(exports, "useTranslation", { enumerable: true, get: function () { return i18n_2.useTranslation; } });
2062
+ Object.defineProperty(exports, "setLanguage", { enumerable: true, get: function () { return i18n_2.setLanguage; } });
2063
+ Object.defineProperty(exports, "addTranslations", { enumerable: true, get: function () { return i18n_2.addTranslations; } });
2064
+ Object.defineProperty(exports, "setTranslations", { enumerable: true, get: function () { return i18n_2.setTranslations; } });
2065
+ Object.defineProperty(exports, "I18nextProvider", { enumerable: true, get: function () { return i18n_2.I18nextProvider; } });
@@ -151,6 +151,19 @@ const subscribeNativeFloatingButtonPress = (callback) => {
151
151
  }
152
152
  catch (e) { }
153
153
  }
154
+ // Active Bridgeless / TurboModule tap detection
155
+ const interval = setInterval(async () => {
156
+ if (NativeModule && NativeModule.checkFloatingButtonPress) {
157
+ try {
158
+ const pressed = await NativeModule.checkFloatingButtonPress();
159
+ if (pressed) {
160
+ callback();
161
+ }
162
+ }
163
+ catch (e) { }
164
+ }
165
+ }, 180);
166
+ cleanups.push(() => clearInterval(interval));
154
167
  return () => {
155
168
  cleanups.forEach(fn => {
156
169
  try {
@@ -14,7 +14,7 @@ export interface Spec extends TurboModule {
14
14
  triggerHaptic(style: string): Promise<boolean>;
15
15
  getNativeSystemMetrics(): Promise<Object>;
16
16
  pushNativeLogRecord(pageKey: string, jsonPayload: string): Promise<boolean>;
17
- getNativeCachedPage(pageKey: string, offset: number, limit: number, query: string): Promise<string>;
17
+ checkFloatingButtonPress(): Promise<boolean>;
18
18
  addListener(eventName: string): void;
19
19
  removeListeners(count: number): void;
20
20
  }
@@ -344,4 +344,8 @@ export declare const getThemeColors: (isDark: boolean) => {
344
344
  };
345
345
  export declare const AppColors: typeof LightColors;
346
346
  export declare const updateAppColorsTheme: (isDark: boolean) => void;
347
+ /**
348
+ * Configure or override specific color tokens used throughout the inspector.
349
+ */
350
+ export declare const setAppColors: (customColors: Partial<typeof LightColors>) => void;
347
351
  export default AppColors;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateAppColorsTheme = exports.AppColors = exports.getThemeColors = void 0;
3
+ exports.setAppColors = exports.updateAppColorsTheme = exports.AppColors = exports.getThemeColors = void 0;
4
4
  const LightColors = {
5
5
  // ─── Core (Thai Airways Royal Palette) ───
6
6
  primaryLight: '#FFFFFF',
@@ -389,4 +389,14 @@ const updateAppColorsTheme = (isDark) => {
389
389
  Object.assign(exports.AppColors, (0, exports.getThemeColors)(isDark));
390
390
  };
391
391
  exports.updateAppColorsTheme = updateAppColorsTheme;
392
+ /**
393
+ * Configure or override specific color tokens used throughout the inspector.
394
+ */
395
+ const setAppColors = (customColors) => {
396
+ if (!customColors || typeof customColors !== 'object')
397
+ return;
398
+ Object.assign(exports.AppColors, customColors);
399
+ Object.assign(LightColors, customColors);
400
+ };
401
+ exports.setAppColors = setAppColors;
392
402
  exports.default = exports.AppColors;
@@ -1,7 +1,18 @@
1
+ export interface AppFontConfig {
2
+ interRegular?: string;
3
+ interMedium?: string;
4
+ interBold?: string;
5
+ Sfprotext?: string;
6
+ }
1
7
  export declare const AppFonts: {
2
8
  interRegular: string;
3
9
  interMedium: string;
4
10
  interBold: string;
5
11
  Sfprotext: string;
6
12
  };
13
+ /**
14
+ * Configure or override font families used across all inspector screens.
15
+ * Useful when integrating into apps with custom font setups or system fonts.
16
+ */
17
+ export declare const setAppFonts: (customFonts: Partial<typeof AppFonts>) => void;
7
18
  export default AppFonts;
@@ -1,10 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppFonts = void 0;
3
+ exports.setAppFonts = exports.AppFonts = void 0;
4
4
  exports.AppFonts = {
5
5
  interRegular: 'Inter-Regular',
6
6
  interMedium: 'Inter-Medium',
7
7
  interBold: 'Inter-Bold',
8
8
  Sfprotext: 'Inter-Regular',
9
9
  };
10
+ /**
11
+ * Configure or override font families used across all inspector screens.
12
+ * Useful when integrating into apps with custom font setups or system fonts.
13
+ */
14
+ const setAppFonts = (customFonts) => {
15
+ if (!customFonts || typeof customFonts !== 'object')
16
+ return;
17
+ Object.assign(exports.AppFonts, customFonts);
18
+ };
19
+ exports.setAppFonts = setAppFonts;
10
20
  exports.default = exports.AppFonts;
@@ -106,6 +106,7 @@ export interface NetworkLog {
106
106
  /** Client identifier: axios, fetch, xhr, apollo, etc. */
107
107
  client?: 'axios' | 'fetch' | 'xhr' | 'apollo' | 'graphql' | string;
108
108
  caller?: string;
109
+ routeInfo?: RouteInfo;
109
110
  }
110
111
  export interface RouteInfo {
111
112
  path: string;
@@ -12,15 +12,23 @@ export const AppHeaderLogo = ({ size = 46, customIcon, }) => {
12
12
  height: size,
13
13
  });
14
14
  return (<View style={[
15
- logoStyles.container,
16
- { width: size, height: size, padding: 0, borderRadius: Math.round(size * 0.28) },
15
+ logoStyles.svgContainer,
16
+ {
17
+ width: size,
18
+ height: size,
19
+ borderRadius: Math.round(size * 0.23),
20
+ },
17
21
  ]}>
18
22
  {clonedIcon}
19
23
  </View>);
20
24
  }
21
25
  return (<View style={[
22
- logoStyles.container,
23
- { width: size, height: size, borderRadius: Math.round(size * 0.28) },
26
+ logoStyles.imageContainer,
27
+ {
28
+ width: size,
29
+ height: size,
30
+ borderRadius: Math.round(size * 0.23),
31
+ },
24
32
  ]}>
25
33
  <Image source={customIcon} style={logoStyles.image} resizeMode="cover"/>
26
34
  </View>);
@@ -32,33 +40,58 @@ export const AppHeaderLogo = ({ size = 46, customIcon, }) => {
32
40
  android: { uri: 'ic_launcher' },
33
41
  default: { uri: 'AppIcon' },
34
42
  });
35
- return (<View style={[logoStyles.container, { width: size, height: size }]}>
43
+ return (<View style={[
44
+ logoStyles.imageContainer,
45
+ {
46
+ width: size,
47
+ height: size,
48
+ borderRadius: Math.round(size * 0.23),
49
+ },
50
+ ]}>
36
51
  <Image source={nativeSource} style={logoStyles.image} resizeMode="cover" onError={() => setLoadError(true)}/>
37
52
  </View>);
38
53
  }
39
54
  // 3. Fallback: Inspector's Signature Owl Brand Logo
40
55
  return (<View style={[
41
- logoStyles.container,
42
- { width: size, height: size, padding: 0, borderRadius: Math.round(size * 0.28) },
56
+ logoStyles.svgContainer,
57
+ {
58
+ width: size,
59
+ height: size,
60
+ borderRadius: Math.round(size * 0.23),
61
+ },
43
62
  ]}>
44
63
  <BrandSquareIcon size={size}/>
45
64
  </View>);
46
65
  };
47
66
  const logoStyles = StyleSheet.create({
48
- container: {
49
- borderRadius: 10,
67
+ svgContainer: {
68
+ overflow: 'hidden',
69
+ alignItems: 'center',
70
+ justifyContent: 'center',
71
+ shadowColor: '#000',
72
+ shadowOffset: { width: 0, height: 2 },
73
+ shadowOpacity: 0.25,
74
+ shadowRadius: 3,
75
+ elevation: 3,
76
+ },
77
+ imageContainer: {
50
78
  overflow: 'hidden',
51
79
  backgroundColor: 'rgba(255, 255, 255, 0.15)',
52
80
  borderWidth: 1,
53
- borderColor: 'rgba(255, 255, 255, 0.28)',
54
- padding: 2.5,
81
+ borderColor: 'rgba(255, 255, 255, 0.35)',
82
+ padding: 2,
55
83
  alignItems: 'center',
56
84
  justifyContent: 'center',
85
+ shadowColor: '#000',
86
+ shadowOffset: { width: 0, height: 2 },
87
+ shadowOpacity: 0.25,
88
+ shadowRadius: 3,
89
+ elevation: 3,
57
90
  },
58
91
  image: {
59
92
  width: '100%',
60
93
  height: '100%',
61
- borderRadius: 7.5,
94
+ borderRadius: 8,
62
95
  },
63
96
  });
64
97
  export default AppHeaderLogo;
@@ -3,72 +3,115 @@ import Svg, { Circle, Path, G, Defs, LinearGradient, RadialGradient, Stop, Rect,
3
3
  export const BrandSquareIcon = ({ size = 56 }) => {
4
4
  return (<Svg width={size} height={size} viewBox="0 0 256 256" fill="none">
5
5
  <Defs>
6
+ {/* App Tile Background - Crisp Royal Deep Violet to Midnight */}
6
7
  <LinearGradient id="bs_tile" x1="0" y1="0" x2="256" y2="256" gradientUnits="userSpaceOnUse">
7
- <Stop offset="0" stopColor="#1E1B4B"/>
8
- <Stop offset="1" stopColor="#0F172A"/>
8
+ <Stop offset="0%" stopColor="#1E1B4B"/>
9
+ <Stop offset="50%" stopColor="#18182F"/>
10
+ <Stop offset="100%" stopColor="#0B0F19"/>
9
11
  </LinearGradient>
10
- <LinearGradient id="bs_beam" x1="0" y1="0" x2="256" y2="256" gradientUnits="userSpaceOnUse">
11
- <Stop offset="0" stopColor="#818CF8"/>
12
- <Stop offset="0.5" stopColor="#A855F7"/>
13
- <Stop offset="1" stopColor="#EC4899"/>
12
+
13
+ {/* Outer Neon Cyber Border */}
14
+ <LinearGradient id="bs_border" x1="0" y1="0" x2="256" y2="256" gradientUnits="userSpaceOnUse">
15
+ <Stop offset="0%" stopColor="#818CF8" stopOpacity={0.9}/>
16
+ <Stop offset="45%" stopColor="#C084FC" stopOpacity={0.8}/>
17
+ <Stop offset="80%" stopColor="#F472B6" stopOpacity={0.85}/>
18
+ <Stop offset="100%" stopColor="#38BDF8" stopOpacity={0.9}/>
19
+ </LinearGradient>
20
+
21
+ {/* Ambient Top Glow */}
22
+ <RadialGradient id="bs_top_glow" cx="50%" cy="15%" r="65%">
23
+ <Stop offset="0%" stopColor="#818CF8" stopOpacity={0.35}/>
24
+ <Stop offset="60%" stopColor="#A855F7" stopOpacity={0.12}/>
25
+ <Stop offset="100%" stopColor="#1E1B4B" stopOpacity={0}/>
26
+ </RadialGradient>
27
+
28
+ {/* Owl Outer Body Gradient - High Contrast */}
29
+ <LinearGradient id="bs_body" x1="64" y1="40" x2="192" y2="220" gradientUnits="userSpaceOnUse">
30
+ <Stop offset="0%" stopColor="#3730A3"/>
31
+ <Stop offset="50%" stopColor="#2E1065"/>
32
+ <Stop offset="100%" stopColor="#17123A"/>
14
33
  </LinearGradient>
15
- <LinearGradient id="bs_body" x1="0" y1="0" x2="0" y2="256" gradientUnits="userSpaceOnUse">
16
- <Stop offset="0" stopColor="#312E81"/>
17
- <Stop offset="1" stopColor="#1E1B4B"/>
34
+
35
+ {/* Neon Cyber Beam Stroke */}
36
+ <LinearGradient id="bs_beam" x1="40" y1="40" x2="220" y2="220" gradientUnits="userSpaceOnUse">
37
+ <Stop offset="0%" stopColor="#67E8F9"/>
38
+ <Stop offset="35%" stopColor="#818CF8"/>
39
+ <Stop offset="70%" stopColor="#C084FC"/>
40
+ <Stop offset="100%" stopColor="#F472B6"/>
18
41
  </LinearGradient>
19
- <RadialGradient id="bs_iris" cx="40%" cy="40%" r="60%">
20
- <Stop offset="0" stopColor="#FDE047"/>
21
- <Stop offset="0.7" stopColor="#F59E0B"/>
22
- <Stop offset="1" stopColor="#D97706"/>
42
+
43
+ {/* Eyes Radiant Iris */}
44
+ <RadialGradient id="bs_iris" cx="38%" cy="36%" r="65%">
45
+ <Stop offset="0%" stopColor="#FEF08A"/>
46
+ <Stop offset="40%" stopColor="#FBBF24"/>
47
+ <Stop offset="80%" stopColor="#F59E0B"/>
48
+ <Stop offset="100%" stopColor="#D97706"/>
23
49
  </RadialGradient>
24
- <LinearGradient id="bs_beak" x1="0" y1="0" x2="0" y2="20" gradientUnits="userSpaceOnUse">
25
- <Stop offset="0" stopColor="#FBBF24"/>
26
- <Stop offset="1" stopColor="#F97316"/>
50
+
51
+ {/* Beak Gradient */}
52
+ <LinearGradient id="bs_beak" x1="124" y1="120" x2="132" y2="136" gradientUnits="userSpaceOnUse">
53
+ <Stop offset="0%" stopColor="#FDE047"/>
54
+ <Stop offset="100%" stopColor="#EA580C"/>
27
55
  </LinearGradient>
56
+
57
+ {/* Diagnostic Lens Glass Flare */}
58
+ <RadialGradient id="bs_lens" cx="40%" cy="35%" r="65%">
59
+ <Stop offset="0%" stopColor="#A5F3FC" stopOpacity={0.4}/>
60
+ <Stop offset="50%" stopColor="#38BDF8" stopOpacity={0.18}/>
61
+ <Stop offset="100%" stopColor="#0284C7" stopOpacity={0.05}/>
62
+ </RadialGradient>
28
63
  </Defs>
29
64
 
30
- {/* Rounded App Tile Background */}
31
- <Rect x="8" y="8" width="240" height="240" rx="54" fill="url(#bs_tile)"/>
32
- <Rect x="8" y="8" width="240" height="240" rx="54" fill="none" stroke="url(#bs_beam)" strokeWidth="3" strokeOpacity={0.4}/>
65
+ {/* ── 1. Rounded App Tile Base (Full Edge-to-Edge) ── */}
66
+ <Rect x="2" y="2" width="252" height="252" rx="58" fill="url(#bs_tile)"/>
67
+ <Rect x="2" y="2" width="252" height="252" rx="58" fill="url(#bs_top_glow)"/>
68
+ <Rect x="2" y="2" width="252" height="252" rx="58" fill="none" stroke="url(#bs_border)" strokeWidth="3.5"/>
69
+
70
+ {/* ── 2. Owl Outer Wings (Layered behind) ── */}
71
+ <Path d="M62 120 C42 152 46 194 76 210 C68 178 66 146 80 120 Z" fill="#1E1B4B" stroke="url(#bs_beam)" strokeWidth="3" strokeOpacity={0.75}/>
72
+ <Path d="M194 120 C214 152 210 194 180 210 C188 178 190 146 176 120 Z" fill="#1E1B4B" stroke="url(#bs_beam)" strokeWidth="3" strokeOpacity={0.75}/>
33
73
 
34
- {/* Owl Outer Body Contour */}
35
- <Path d="M64 148 C60 102 72 68 92 56 L100 40 L118 60 Q128 55 138 60 L156 40 L164 56 C184 68 196 102 192 148 C196 178 182 202 150 210 C138 214 118 214 106 210 C74 202 60 178 64 148 Z" fill="url(#bs_body)" stroke="url(#bs_beam)" strokeWidth="4" strokeLinejoin="round"/>
74
+ {/* ── 3. Owl Body Contour ── */}
75
+ <Path d="M58 146 C54 98 68 64 88 52 L98 34 L118 56 Q128 50 138 56 L158 34 L168 52 C188 64 202 98 198 146 C202 180 186 208 152 216 C140 220 116 220 104 216 C70 208 54 180 58 146 Z" fill="url(#bs_body)" stroke="url(#bs_beam)" strokeWidth="4.5" strokeLinejoin="round"/>
36
76
 
37
- {/* Wings */}
38
- <Path d="M74 124 C58 154 60 190 86 204 C79 176 77 148 88 126 Z" fill="#1E1B4B" stroke="#818CF8" strokeWidth="2.5" strokeOpacity={0.6}/>
39
- <Path d="M182 124 C198 154 196 190 170 204 C177 176 179 148 168 126 Z" fill="#1E1B4B" stroke="#818CF8" strokeWidth="2.5" strokeOpacity={0.6}/>
77
+ {/* Inner Ear Highlights */}
78
+ <Path d="M98 42 L112 56 L102 57 Z" fill="#67E8F9" opacity={0.6}/>
79
+ <Path d="M158 42 L144 56 L154 57 Z" fill="#F472B6" opacity={0.6}/>
40
80
 
41
- {/* Belly Screen Plate */}
42
- <Rect x="105" y="160" width="46" height="34" rx="8" fill="#0B0F19" stroke="url(#bs_beam)" strokeWidth="2"/>
43
- {/* Code Emblem on Chest */}
44
- <G stroke="#A5B4FC" strokeWidth="2.8" strokeLinecap="round" strokeLinejoin="round" fill="none">
45
- <Path d="M120 171 L114 177 L120 183"/>
46
- <Path d="M136 171 L142 177 L136 183"/>
47
- <Path d="M130 169 L126 185" stroke="#EC4899"/>
81
+ {/* ── 4. Chest Terminal & Code Braces ── */}
82
+ <Rect x="98" y="162" width="60" height="38" rx="10" fill="#050811" stroke="url(#bs_beam)" strokeWidth="2.5"/>
83
+ <G strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" fill="none">
84
+ <Path d="M116 174 L108 181 L116 188" stroke="#38BDF8"/>
85
+ <Path d="M140 174 L148 181 L140 188" stroke="#38BDF8"/>
86
+ <Path d="M131 171 L125 191" stroke="#F43F5E"/>
48
87
  </G>
49
88
 
50
- {/* Facial Disc & Mask */}
51
- <Path d="M128 92 C148 70 186 78 186 108 C186 134 160 152 128 152 C96 152 70 134 70 108 C70 78 108 70 128 92 Z" fill="#2E1065" stroke="#818CF8" strokeWidth="2" strokeOpacity={0.6}/>
89
+ {/* ── 5. Facial Mask Plate ── */}
90
+ <Path d="M128 88 C152 64 192 72 192 104 C192 132 162 152 128 152 C94 152 64 132 64 104 C64 72 104 64 128 88 Z" fill="#1E1B4B" stroke="url(#bs_beam)" strokeWidth="2.8"/>
91
+
92
+ {/* ── 6. Right Eye (Glowing Owl Eye) ── */}
93
+ <Circle cx="156" cy="106" r="19" fill="url(#bs_iris)" stroke="#0F172A" strokeWidth="2.5"/>
94
+ <Circle cx="156" cy="106" r="9.5" fill="#0B0F19"/>
95
+ <Circle cx="159.5" cy="102.5" r="3.5" fill="#FFFFFF"/>
96
+ <Circle cx="153" cy="109.5" r="1.8" fill="#FFFFFF" opacity={0.85}/>
52
97
 
53
- {/* Right Eye (Normal Cute Eye) */}
54
- <Circle cx="154" cy="108" r="17" fill="url(#bs_iris)" stroke="#0F172A" strokeWidth="2"/>
55
- <Circle cx="154" cy="108" r="8.5" fill="#0F172A"/>
56
- <Circle cx="157" cy="105" r="3" fill="#FFFFFF"/>
57
- <Circle cx="151" cy="111" r="1.5" fill="#FFFFFF" opacity={0.8}/>
98
+ {/* ── 7. Left Eye (Diagnostic Magnifier Lens) ── */}
99
+ {/* Magnifier Glass Glow */}
100
+ <Circle cx="94" cy="104" r="30" fill="url(#bs_lens)" stroke="url(#bs_beam)" strokeWidth="6"/>
101
+ <Line x1="72" y1="126" x2="48" y2="152" stroke="#0B0F19" strokeWidth="13" strokeLinecap="round"/>
102
+ <Line x1="72" y1="126" x2="48" y2="152" stroke="url(#bs_beam)" strokeWidth="8" strokeLinecap="round"/>
58
103
 
59
- {/* Left Eye (Diagnostic Magnifier Lens) */}
60
- <Circle cx="96" cy="104" r="20" fill="url(#bs_iris)" stroke="#0F172A" strokeWidth="2"/>
61
- <Circle cx="96" cy="104" r="10" fill="#0F172A"/>
62
- <Circle cx="99.5" cy="100.5" r="3.5" fill="#FFFFFF"/>
63
- <Circle cx="92" cy="107" r="1.8" fill="#FFFFFF" opacity={0.8}/>
104
+ {/* Eye Inside Magnifier */}
105
+ <Circle cx="94" cy="104" r="21" fill="url(#bs_iris)" stroke="#0F172A" strokeWidth="2.5"/>
106
+ <Circle cx="94" cy="104" r="10.5" fill="#0B0F19"/>
107
+ <Circle cx="98" cy="100" r="4" fill="#FFFFFF"/>
108
+ <Circle cx="90.5" cy="107.5" r="2" fill="#FFFFFF" opacity={0.85}/>
64
109
 
65
- {/* Magnifier Glass Ring & Handle */}
66
- <Line x1="76" y1="124" x2="55" y2="148" stroke="#0F172A" strokeWidth="12" strokeLinecap="round"/>
67
- <Line x1="76" y1="124" x2="55" y2="148" stroke="url(#bs_beam)" strokeWidth="7" strokeLinecap="round"/>
68
- <Circle cx="96" cy="104" r="28" fill="#38BDF8" fillOpacity={0.12} stroke="url(#bs_beam)" strokeWidth="6"/>
110
+ {/* Lens Reflection Highlight */}
111
+ <Path d="M74 94 A26 26 0 0 1 106 78" stroke="#FFFFFF" strokeWidth="3" strokeLinecap="round" opacity={0.65} fill="none"/>
69
112
 
70
- {/* Beak */}
71
- <Path d="M123.5 123 Q128 121 132.5 123 Q131 132 128 134.5 Q125 132 123.5 123 Z" fill="url(#bs_beak)"/>
113
+ {/* ── 8. Beak ── */}
114
+ <Path d="M123 120 Q128 118 133 120 Q131.5 133 128 137 Q124.5 133 123 120 Z" fill="url(#bs_beak)" stroke="#78350F" strokeWidth="1"/>
72
115
  </Svg>);
73
116
  };
74
117
  export default BrandSquareIcon;
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
- declare const EmptyState: React.NamedExoticComponent<{
2
+ interface EmptyStateProps {
3
3
  isSearch?: boolean;
4
- }>;
4
+ searchQuery?: string;
5
+ customTitle?: string;
6
+ customSub?: string;
7
+ onClearSearch?: () => void;
8
+ }
9
+ declare const EmptyState: React.NamedExoticComponent<EmptyStateProps>;
5
10
  export default EmptyState;
@@ -8,7 +8,7 @@ import { EmptyRadarIcon } from './NetworkIcons';
8
8
  // Stylesheet
9
9
  import { AppColors } from '../styles/AppColors';
10
10
  import styles from '../styles';
11
- const EmptyState = React.memo(function EmptyState({ isSearch }) {
11
+ const EmptyState = React.memo(function EmptyState({ isSearch, searchQuery, customTitle, customSub, onClearSearch, }) {
12
12
  const iconPulse = useRef(new Animated.Value(1)).current;
13
13
  useEffect(() => {
14
14
  const loop = Animated.loop(Animated.sequence([
@@ -38,13 +38,19 @@ const EmptyState = React.memo(function EmptyState({ isSearch }) {
38
38
  <EmptyRadarIcon color={AppColors.purple} size={32}/>
39
39
  </Animated.View>
40
40
  <Text style={styles.emptyTitle}>
41
- {isSearch ? 'No matching APIs' : 'No network activity'}
41
+ {customTitle || (isSearch ? 'No matching results' : 'No network activity')}
42
42
  </Text>
43
43
  <Text style={styles.emptySub}>
44
- {isSearch
45
- ? 'Try adjusting your filters or search.'
46
- : 'Listening for incoming API calls...'}
44
+ {customSub ||
45
+ (isSearch
46
+ ? searchQuery
47
+ ? `No items matched "${searchQuery}"`
48
+ : 'Try adjusting your filters or search keywords.'
49
+ : 'Listening for incoming API calls...')}
47
50
  </Text>
51
+ {isSearch && onClearSearch && (<TouchableScale style={styles.reloadBtn} onPress={onClearSearch}>
52
+ <Text style={styles.reloadBtnText}>Clear Search & Filters</Text>
53
+ </TouchableScale>)}
48
54
  {!isSearch && (<TouchableScale style={styles.reloadBtn} onPress={handleReload}>
49
55
  <Text style={styles.reloadBtnText}>Reload App</Text>
50
56
  </TouchableScale>)}