react-native-inapp-inspector 2.2.9 → 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 (92) hide show
  1. package/dist/commonjs/components/AppHeaderLogo.js +45 -12
  2. package/dist/commonjs/components/BrandSquareIcon.js +92 -49
  3. package/dist/commonjs/components/EmptyState.d.ts +7 -2
  4. package/dist/commonjs/components/EmptyState.js +11 -5
  5. package/dist/commonjs/components/Inspector/AnalyticsTab.js +29 -18
  6. package/dist/commonjs/components/Inspector/ConsoleTab.js +6 -1
  7. package/dist/commonjs/components/Inspector/CrashDetail.js +43 -9
  8. package/dist/commonjs/components/Inspector/CrashTab.js +34 -3
  9. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +80 -16
  10. package/dist/commonjs/components/Inspector/InspectorHeader.js +16 -3
  11. package/dist/commonjs/components/Inspector/NetworkDetail.js +3 -2
  12. package/dist/commonjs/components/Inspector/NetworkTab.js +103 -4
  13. package/dist/commonjs/components/Inspector/ReduxTab.js +19 -3
  14. package/dist/commonjs/components/Inspector/SettingsPanel.js +4 -4
  15. package/dist/commonjs/components/Inspector/StorageTab.js +19 -3
  16. package/dist/commonjs/components/JsonViewer.js +2 -0
  17. package/dist/commonjs/components/MetaAccordion.js +15 -3
  18. package/dist/commonjs/constants/version.d.ts +1 -1
  19. package/dist/commonjs/constants/version.js +1 -1
  20. package/dist/commonjs/customHooks/networkLogger.d.ts +3 -0
  21. package/dist/commonjs/customHooks/networkLogger.js +10 -1
  22. package/dist/commonjs/helpers/index.d.ts +6 -0
  23. package/dist/commonjs/helpers/index.js +196 -6
  24. package/dist/commonjs/helpers/searchQueryParser.js +62 -20
  25. package/dist/commonjs/i18n/index.d.ts +13 -0
  26. package/dist/commonjs/i18n/index.js +35 -2
  27. package/dist/commonjs/index.d.ts +3 -0
  28. package/dist/commonjs/index.js +80 -11
  29. package/dist/commonjs/styles/AppColors.d.ts +4 -0
  30. package/dist/commonjs/styles/AppColors.js +11 -1
  31. package/dist/commonjs/styles/AppFonts.d.ts +11 -0
  32. package/dist/commonjs/styles/AppFonts.js +11 -1
  33. package/dist/commonjs/types/interfaces.d.ts +1 -0
  34. package/dist/esm/components/AppHeaderLogo.js +45 -12
  35. package/dist/esm/components/BrandSquareIcon.js +92 -49
  36. package/dist/esm/components/EmptyState.d.ts +7 -2
  37. package/dist/esm/components/EmptyState.js +11 -5
  38. package/dist/esm/components/Inspector/AnalyticsTab.js +30 -19
  39. package/dist/esm/components/Inspector/ConsoleTab.js +6 -1
  40. package/dist/esm/components/Inspector/CrashDetail.js +43 -9
  41. package/dist/esm/components/Inspector/CrashTab.js +34 -3
  42. package/dist/esm/components/Inspector/DeviceInfoTab.js +80 -16
  43. package/dist/esm/components/Inspector/InspectorHeader.js +17 -4
  44. package/dist/esm/components/Inspector/NetworkDetail.js +3 -2
  45. package/dist/esm/components/Inspector/NetworkTab.js +103 -4
  46. package/dist/esm/components/Inspector/ReduxTab.js +19 -3
  47. package/dist/esm/components/Inspector/SettingsPanel.js +4 -4
  48. package/dist/esm/components/Inspector/StorageTab.js +19 -3
  49. package/dist/esm/components/JsonViewer.js +2 -0
  50. package/dist/esm/components/MetaAccordion.js +15 -3
  51. package/dist/esm/constants/version.d.ts +1 -1
  52. package/dist/esm/constants/version.js +1 -1
  53. package/dist/esm/customHooks/networkLogger.d.ts +3 -0
  54. package/dist/esm/customHooks/networkLogger.js +8 -0
  55. package/dist/esm/helpers/index.d.ts +6 -0
  56. package/dist/esm/helpers/index.js +193 -5
  57. package/dist/esm/helpers/searchQueryParser.js +62 -20
  58. package/dist/esm/i18n/index.d.ts +13 -0
  59. package/dist/esm/i18n/index.js +33 -3
  60. package/dist/esm/index.d.ts +3 -0
  61. package/dist/esm/index.js +68 -12
  62. package/dist/esm/styles/AppColors.d.ts +4 -0
  63. package/dist/esm/styles/AppColors.js +9 -0
  64. package/dist/esm/styles/AppFonts.d.ts +11 -0
  65. package/dist/esm/styles/AppFonts.js +9 -0
  66. package/dist/esm/types/interfaces.d.ts +1 -0
  67. package/package.json +1 -1
  68. package/src/components/AppHeaderLogo.tsx +46 -12
  69. package/src/components/BrandSquareIcon.tsx +127 -78
  70. package/src/components/EmptyState.tsx +27 -5
  71. package/src/components/Inspector/AnalyticsTab.tsx +48 -27
  72. package/src/components/Inspector/ConsoleTab.tsx +10 -0
  73. package/src/components/Inspector/CrashDetail.tsx +65 -9
  74. package/src/components/Inspector/CrashTab.tsx +41 -3
  75. package/src/components/Inspector/DeviceInfoTab.tsx +87 -16
  76. package/src/components/Inspector/InspectorHeader.tsx +24 -4
  77. package/src/components/Inspector/NetworkDetail.tsx +4 -4
  78. package/src/components/Inspector/NetworkTab.tsx +129 -4
  79. package/src/components/Inspector/ReduxTab.tsx +26 -8
  80. package/src/components/Inspector/SettingsPanel.tsx +4 -4
  81. package/src/components/Inspector/StorageTab.tsx +21 -3
  82. package/src/components/JsonViewer.tsx +2 -0
  83. package/src/components/MetaAccordion.tsx +18 -3
  84. package/src/constants/version.ts +1 -1
  85. package/src/customHooks/networkLogger.ts +15 -0
  86. package/src/helpers/index.ts +213 -5
  87. package/src/helpers/searchQueryParser.ts +63 -20
  88. package/src/i18n/index.ts +38 -3
  89. package/src/index.tsx +89 -11
  90. package/src/styles/AppColors.ts +9 -0
  91. package/src/styles/AppFonts.ts +16 -0
  92. package/src/types/interfaces.ts +1 -0
@@ -18,8 +18,9 @@ export function matchNetworkLogQuery(
18
18
  ): boolean {
19
19
  if (!searchQuery || searchQuery.trim().length === 0) return true;
20
20
 
21
+ // Split tokens by spaces or commas while respecting quotes
21
22
  const rawTokens =
22
- searchQuery.trim().match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g) || [];
23
+ searchQuery.trim().match(/(?:[^\s,"']+|"[^"]*"|'[^']*')+/g) || [];
23
24
 
24
25
  if (rawTokens.length === 0) return true;
25
26
 
@@ -32,27 +33,38 @@ export function matchNetworkLogQuery(
32
33
  const statusNum =
33
34
  typeof log.status === 'number'
34
35
  ? log.status
35
- : parseInt(String(log.status || 0), 10);
36
- const statusStr = String(log.status ?? '');
36
+ : log.status != null
37
+ ? parseInt(String(log.status), 10)
38
+ : null;
39
+ const statusStr = log.status != null ? String(log.status) : 'pending';
37
40
  const durationNum = log.duration || 0;
38
41
  const clientRaw = log.client || '';
42
+ const callerRaw = log.caller || '';
39
43
  const reqRaw =
40
44
  typeof log.request === 'string'
41
45
  ? log.request
42
- : JSON.stringify(log.request || '');
46
+ : log.request != null
47
+ ? JSON.stringify(log.request)
48
+ : '';
43
49
  const resRaw =
44
50
  typeof log.response === 'string'
45
51
  ? log.response
46
- : JSON.stringify(log.response || '');
47
- const reqHeadersRaw = JSON.stringify(log.requestHeaders || '');
48
- const resHeadersRaw = JSON.stringify(log.responseHeaders || '');
49
- const pathRaw = routePath || '';
52
+ : log.response != null
53
+ ? JSON.stringify(log.response)
54
+ : '';
55
+ const reqHeadersRaw = log.requestHeaders
56
+ ? JSON.stringify(log.requestHeaders)
57
+ : '';
58
+ const resHeadersRaw = log.responseHeaders
59
+ ? JSON.stringify(log.responseHeaders)
60
+ : '';
61
+ const pathRaw = routePath || (log as any)?.routeInfo?.path || '';
50
62
 
51
63
  // Construct search corpus based on active scope
52
64
  const getScopedCorpus = (caseSens: boolean): string => {
53
65
  let parts: string[] = [];
54
66
  if (scope === 'url') {
55
- parts = [methodRaw, urlRaw, pathRaw];
67
+ parts = [methodRaw, urlRaw, pathRaw, callerRaw];
56
68
  } else if (scope === 'reqBody') {
57
69
  parts = [reqRaw];
58
70
  } else if (scope === 'resBody') {
@@ -65,6 +77,7 @@ export function matchNetworkLogQuery(
65
77
  urlRaw,
66
78
  statusStr,
67
79
  pathRaw,
80
+ callerRaw,
68
81
  clientRaw,
69
82
  reqRaw,
70
83
  resRaw,
@@ -81,6 +94,7 @@ export function matchNetworkLogQuery(
81
94
  const methodStr = methodRaw.toLowerCase();
82
95
  const urlStr = urlRaw.toLowerCase();
83
96
  const clientStr = clientRaw.toLowerCase();
97
+ const callerStr = callerRaw.toLowerCase();
84
98
  const reqStr = reqRaw.toLowerCase();
85
99
  const resStr = resRaw.toLowerCase();
86
100
  const reqHeadersStr = reqHeadersRaw.toLowerCase();
@@ -107,18 +121,20 @@ export function matchNetworkLogQuery(
107
121
  // 2. status:<VAL> or s:<VAL>
108
122
  if (lowerToken.startsWith('status:') || lowerToken.startsWith('s:')) {
109
123
  const val = lowerToken.replace(/^(status:|s:)/, '').trim();
110
- if (val.startsWith('>=')) {
124
+ if (val === 'pending' || val === 'loading') {
125
+ if (log.status != null) return false;
126
+ } else if (val.startsWith('>=')) {
111
127
  const threshold = parseInt(val.slice(2), 10);
112
- if (isNaN(threshold) || statusNum < threshold) return false;
128
+ if (isNaN(threshold) || statusNum === null || statusNum < threshold) return false;
113
129
  } else if (val.startsWith('>')) {
114
130
  const threshold = parseInt(val.slice(1), 10);
115
- if (isNaN(threshold) || statusNum <= threshold) return false;
131
+ if (isNaN(threshold) || statusNum === null || statusNum <= threshold) return false;
116
132
  } else if (val.startsWith('<=')) {
117
133
  const threshold = parseInt(val.slice(2), 10);
118
- if (isNaN(threshold) || statusNum > threshold) return false;
134
+ if (isNaN(threshold) || statusNum === null || statusNum > threshold) return false;
119
135
  } else if (val.startsWith('<')) {
120
136
  const threshold = parseInt(val.slice(1), 10);
121
- if (isNaN(threshold) || statusNum >= threshold) return false;
137
+ if (isNaN(threshold) || statusNum === null || statusNum >= threshold) return false;
122
138
  } else if (val.endsWith('xx') || val.endsWith('x')) {
123
139
  const prefix = val.replace(/x/g, '');
124
140
  if (!statusStr.startsWith(prefix)) return false;
@@ -143,11 +159,13 @@ export function matchNetworkLogQuery(
143
159
  flag === 'fail'
144
160
  ) {
145
161
  const isErr =
146
- log.status === 0 || log.status == null || statusNum >= 400;
162
+ log.status === 0 || (statusNum !== null && statusNum >= 400);
147
163
  if (!isErr) return false;
148
164
  } else if (flag === 'success' || flag === 'ok' || flag === '2xx') {
149
- const isSuccess = statusNum >= 200 && statusNum < 300;
165
+ const isSuccess = statusNum !== null && statusNum >= 200 && statusNum < 300;
150
166
  if (!isSuccess) return false;
167
+ } else if (flag === 'pending' || flag === 'loading') {
168
+ if (log.status != null) return false;
151
169
  } else if (flag === 'slow') {
152
170
  if (durationNum < 1000) return false;
153
171
  } else if (flag === 'fast') {
@@ -169,6 +187,11 @@ export function matchNetworkLogQuery(
169
187
  resHeadersStr.includes('application/json') ||
170
188
  urlStr.includes('.json');
171
189
  if (!isJson) return false;
190
+ } else if (flag === 'image') {
191
+ const isImg =
192
+ resHeadersStr.includes('image/') ||
193
+ /\.(png|jpe?g|gif|webp|svg)/i.test(urlStr);
194
+ if (!isImg) return false;
172
195
  }
173
196
  continue;
174
197
  }
@@ -230,10 +253,20 @@ export function matchNetworkLogQuery(
230
253
  continue;
231
254
  }
232
255
 
233
- // 7. path:<PATH> or p:<PATH>
234
- if (lowerToken.startsWith('path:') || lowerToken.startsWith('p:')) {
235
- const targetPath = lowerToken.replace(/^(path:|p:)/, '').trim();
236
- if (!urlStr.includes(targetPath) && !pathStr.includes(targetPath)) {
256
+ // 7. path:<PATH> or p:<PATH> or page:<PAGE>
257
+ if (
258
+ lowerToken.startsWith('path:') ||
259
+ lowerToken.startsWith('p:') ||
260
+ lowerToken.startsWith('page:')
261
+ ) {
262
+ const targetPath = lowerToken
263
+ .replace(/^(path:|p:|page:)/, '')
264
+ .trim();
265
+ if (
266
+ !urlStr.includes(targetPath) &&
267
+ !pathStr.includes(targetPath) &&
268
+ !callerStr.includes(targetPath)
269
+ ) {
237
270
  return false;
238
271
  }
239
272
  continue;
@@ -274,6 +307,16 @@ export function matchNetworkLogQuery(
274
307
  } else {
275
308
  const queryTerm = isCaseSensitive ? token : lowerToken;
276
309
  if (!targetCorpus.includes(queryTerm)) {
310
+ // Special case: if user typed "error" / "failed", check error status
311
+ if (
312
+ queryTerm === 'error' ||
313
+ queryTerm === 'failed' ||
314
+ queryTerm === 'fail'
315
+ ) {
316
+ const isErr =
317
+ log.status === 0 || (statusNum !== null && statusNum >= 400);
318
+ if (isErr) continue;
319
+ }
277
320
  return false;
278
321
  }
279
322
  }
package/src/i18n/index.ts CHANGED
@@ -1,8 +1,14 @@
1
1
  import React from 'react';
2
- import en from './locales/en.json';
2
+ import enLocale from './locales/en.json';
3
3
 
4
4
  type TranslationParams = Record<string, any>;
5
5
 
6
+ const localeRegistry: Record<string, Record<string, any>> = {
7
+ en: enLocale,
8
+ };
9
+
10
+ let currentLanguage = 'en';
11
+
6
12
  /**
7
13
  * Lightweight nested lookup for translation keys (e.g. "network.headers")
8
14
  */
@@ -31,7 +37,12 @@ function interpolate(template: string, params?: TranslationParams): string {
31
37
  * Standalone zero-dependency translation function
32
38
  */
33
39
  export function t(key: string, optionsOrFallback?: TranslationParams | string): string {
34
- const raw = lookupKey(en, key);
40
+ const activeBundle = localeRegistry[currentLanguage] || localeRegistry.en;
41
+ let raw = lookupKey(activeBundle, key);
42
+ if (raw === undefined && currentLanguage !== 'en') {
43
+ raw = lookupKey(localeRegistry.en, key);
44
+ }
45
+
35
46
  if (typeof raw === 'string') {
36
47
  if (typeof optionsOrFallback === 'object' && optionsOrFallback !== null) {
37
48
  return interpolate(raw, optionsOrFallback);
@@ -44,9 +55,33 @@ export function t(key: string, optionsOrFallback?: TranslationParams | string):
44
55
  return key;
45
56
  }
46
57
 
58
+ export function setLanguage(lang: string): void {
59
+ if (typeof lang === 'string' && lang.trim()) {
60
+ currentLanguage = lang.trim();
61
+ i18n.language = currentLanguage;
62
+ }
63
+ }
64
+
65
+ export function addTranslations(lang: string, translations: Record<string, any>): void {
66
+ if (!lang || !translations || typeof translations !== 'object') return;
67
+ localeRegistry[lang] = {
68
+ ...(localeRegistry[lang] || {}),
69
+ ...translations,
70
+ };
71
+ }
72
+
73
+ export function setTranslations(translations: Record<string, any>, lang: string = 'en'): void {
74
+ addTranslations(lang, translations);
75
+ }
76
+
47
77
  export const i18n = {
48
78
  t,
49
- language: 'en',
79
+ language: currentLanguage,
80
+ changeLanguage: setLanguage,
81
+ addResourceBundle: (lng: string, _ns: string, resources: any) => addTranslations(lng, resources),
82
+ setLanguage,
83
+ addTranslations,
84
+ setTranslations,
50
85
  };
51
86
 
52
87
  /**
package/src/index.tsx CHANGED
@@ -26,6 +26,7 @@ import {
26
26
  import {
27
27
  formatDisplayUrl,
28
28
  getNavigationInfo,
29
+ getLogPageName,
29
30
  deduplicateLogs,
30
31
  getDomainColor,
31
32
  getEventCategory,
@@ -55,6 +56,7 @@ import {
55
56
  subscribeNetworkLogs,
56
57
  setNetworkModuleEnabled,
57
58
  setMaxNetworkLogsLimit,
59
+ setRouteInfoProvider,
58
60
  } from './customHooks/networkLogger';
59
61
 
60
62
  // Console
@@ -357,8 +359,8 @@ const NetworkInspector = ({
357
359
  bundle: false,
358
360
  performance: false,
359
361
  crash: false,
360
- device: true,
361
- storage: true,
362
+ device: false,
363
+ storage: false,
362
364
  });
363
365
 
364
366
  const [maxNetworkLogs, setMaxNetworkLogs] = useState<number>(100);
@@ -419,8 +421,8 @@ const NetworkInspector = ({
419
421
  bundle: false,
420
422
  performance: false,
421
423
  crash: false,
422
- device: true,
423
- storage: true,
424
+ device: false,
425
+ storage: false,
424
426
  });
425
427
  setDefaultTab('apis');
426
428
  setIsAutoRamLimitEnabled(true);
@@ -490,6 +492,8 @@ const NetworkInspector = ({
490
492
  bundle: false,
491
493
  performance: false,
492
494
  crash: false,
495
+ device: false,
496
+ storage: false,
493
497
  },
494
498
  ...(saved.tabVisibility || {}),
495
499
  apis: true,
@@ -708,12 +712,23 @@ const NetworkInspector = ({
708
712
  const hasNavigationContext = navigationContext !== undefined;
709
713
 
710
714
  const currentRouteRef = useRef<RouteInfo>({
711
- path: 'Navigators',
715
+ path: '',
712
716
  params: null,
713
717
  });
718
+
719
+ useEffect(() => {
720
+ setRouteInfoProvider(() => currentRouteRef.current);
721
+ return () => {
722
+ setRouteInfoProvider(null);
723
+ };
724
+ }, []);
725
+
714
726
  useEffect(() => {
715
727
  if (navState) {
716
- currentRouteRef.current = getNavigationInfo(navState);
728
+ const info = getNavigationInfo(navState);
729
+ if (info?.path) {
730
+ currentRouteRef.current = info;
731
+ }
717
732
  }
718
733
  }, [navState]);
719
734
 
@@ -723,9 +738,22 @@ const NetworkInspector = ({
723
738
  const updateState = () => {
724
739
  try {
725
740
  if (typeof navigationRef.isReady === 'function' && navigationRef.isReady()) {
741
+ const currentRoute = typeof navigationRef.getCurrentRoute === 'function'
742
+ ? navigationRef.getCurrentRoute()
743
+ : null;
744
+ if (currentRoute?.name) {
745
+ currentRouteRef.current = {
746
+ path: currentRoute.name,
747
+ params: currentRoute.params || null,
748
+ };
749
+ }
726
750
  const state = navigationRef.getRootState();
727
751
  if (state) {
728
752
  setNavState(state);
753
+ const routeInfo = getNavigationInfo(state);
754
+ if (routeInfo?.path) {
755
+ currentRouteRef.current = routeInfo;
756
+ }
729
757
  }
730
758
  }
731
759
  } catch (err) {
@@ -1077,7 +1105,10 @@ const NetworkInspector = ({
1077
1105
  if (freshIds.size > 0) {
1078
1106
  freshIds.forEach(id => {
1079
1107
  if (!logRouteMapRef.current.has(id)) {
1080
- logRouteMapRef.current.set(id, currentRouteRef.current);
1108
+ const matchedLog = deduped.find(l => l.id === id);
1109
+ const resolvedRoute =
1110
+ (matchedLog as any)?.routeInfo || currentRouteRef.current;
1111
+ logRouteMapRef.current.set(id, resolvedRoute);
1081
1112
  }
1082
1113
  });
1083
1114
  setNewLogIds(freshIds);
@@ -1091,6 +1122,13 @@ const NetworkInspector = ({
1091
1122
  const deduped = deduplicateLogs(raw);
1092
1123
  const incoming = new Set(deduped.map(l => l.id));
1093
1124
  prevLogIdsRef.current = incoming;
1125
+ deduped.forEach(l => {
1126
+ if (!logRouteMapRef.current.has(l.id)) {
1127
+ const resolvedRoute =
1128
+ (l as any)?.routeInfo || currentRouteRef.current;
1129
+ logRouteMapRef.current.set(l.id, resolvedRoute);
1130
+ }
1131
+ });
1094
1132
  setLogs(deduped);
1095
1133
  } else {
1096
1134
  timeoutId = setTimeout(updateNetworkState, 250);
@@ -1378,8 +1416,9 @@ const NetworkInspector = ({
1378
1416
 
1379
1417
  for (let i = 0; i < filteredLogs.length; i++) {
1380
1418
  const log = filteredLogs[i];
1381
- const routeInfo = logRouteMapRef.current.get(log.id);
1382
- const pageName = routeInfo?.path || 'Navigators';
1419
+ const routeInfo =
1420
+ logRouteMapRef.current.get(log.id) || (log as any)?.routeInfo;
1421
+ const pageName = getLogPageName(log, routeInfo);
1383
1422
 
1384
1423
  if (
1385
1424
  groups.length === 0 ||
@@ -1680,7 +1719,23 @@ const NetworkInspector = ({
1680
1719
  log.sourceMethod || '',
1681
1720
  ].join(' ').toLowerCase();
1682
1721
 
1683
- return queryTokens.every(token => searchTarget.includes(token));
1722
+ return queryTokens.every(token => {
1723
+ if (token.startsWith('level:') || token.startsWith('is:') || token.startsWith('type:')) {
1724
+ const flag = token.replace(/^(level:|is:|type:)/, '').trim();
1725
+ if (flag === 'error' || flag === 'err') return log.type === 'error';
1726
+ if (flag === 'warn' || flag === 'warning') return log.type === 'warn';
1727
+ if (flag === 'info') return log.type === 'info';
1728
+ if (flag === 'log') return log.sourceMethod === 'log';
1729
+ if (flag === 'analytics') return (log.message || '').toLowerCase().includes('[analytics');
1730
+ }
1731
+ if (token === 'error' || token === 'err') {
1732
+ return log.type === 'error' || searchTarget.includes(token);
1733
+ }
1734
+ if (token === 'warn' || token === 'warning') {
1735
+ return log.type === 'warn' || searchTarget.includes(token);
1736
+ }
1737
+ return searchTarget.includes(token);
1738
+ });
1684
1739
  });
1685
1740
  }
1686
1741
 
@@ -2331,4 +2386,27 @@ export {
2331
2386
  CrashDetailSubTab,
2332
2387
  CrashFilterType,
2333
2388
  BreadcrumbType,
2334
- } from './types';
2389
+ } from './types';
2390
+
2391
+ export {
2392
+ AppFonts,
2393
+ setAppFonts,
2394
+ type AppFontConfig,
2395
+ } from './styles/AppFonts';
2396
+
2397
+ export {
2398
+ AppColors,
2399
+ setAppColors,
2400
+ getThemeColors,
2401
+ updateAppColorsTheme,
2402
+ } from './styles/AppColors';
2403
+
2404
+ export {
2405
+ t,
2406
+ i18n,
2407
+ useTranslation,
2408
+ setLanguage,
2409
+ addTranslations,
2410
+ setTranslations,
2411
+ I18nextProvider,
2412
+ } from './i18n';
@@ -405,4 +405,13 @@ export const updateAppColorsTheme = (isDark: boolean) => {
405
405
  Object.assign(AppColors, getThemeColors(isDark));
406
406
  };
407
407
 
408
+ /**
409
+ * Configure or override specific color tokens used throughout the inspector.
410
+ */
411
+ export const setAppColors = (customColors: Partial<typeof LightColors>): void => {
412
+ if (!customColors || typeof customColors !== 'object') return;
413
+ Object.assign(AppColors, customColors);
414
+ Object.assign(LightColors, customColors);
415
+ };
416
+
408
417
  export default AppColors;
@@ -1,3 +1,10 @@
1
+ export interface AppFontConfig {
2
+ interRegular?: string;
3
+ interMedium?: string;
4
+ interBold?: string;
5
+ Sfprotext?: string;
6
+ }
7
+
1
8
  export const AppFonts = {
2
9
  interRegular: 'Inter-Regular',
3
10
  interMedium: 'Inter-Medium',
@@ -5,4 +12,13 @@ export const AppFonts = {
5
12
  Sfprotext: 'Inter-Regular',
6
13
  };
7
14
 
15
+ /**
16
+ * Configure or override font families used across all inspector screens.
17
+ * Useful when integrating into apps with custom font setups or system fonts.
18
+ */
19
+ export const setAppFonts = (customFonts: Partial<typeof AppFonts>): void => {
20
+ if (!customFonts || typeof customFonts !== 'object') return;
21
+ Object.assign(AppFonts, customFonts);
22
+ };
23
+
8
24
  export default AppFonts;
@@ -128,6 +128,7 @@ export interface NetworkLog {
128
128
  /** Client identifier: axios, fetch, xhr, apollo, etc. */
129
129
  client?: 'axios' | 'fetch' | 'xhr' | 'apollo' | 'graphql' | string;
130
130
  caller?: string;
131
+ routeInfo?: RouteInfo;
131
132
  }
132
133
 
133
134
  export interface RouteInfo {