react-native-inapp-inspector 2.0.0 → 2.0.1

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 (63) hide show
  1. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +10 -24
  2. package/dist/commonjs/components/ConsoleLogCard.js +5 -5
  3. package/dist/commonjs/components/EndOfListFooter.js +1 -1
  4. package/dist/commonjs/components/Inspector/AnalyticsTab.js +19 -71
  5. package/dist/commonjs/components/Inspector/BundleTab.js +670 -188
  6. package/dist/commonjs/components/Inspector/ConsoleTab.js +109 -98
  7. package/dist/commonjs/components/Inspector/CrashTab.js +2 -1
  8. package/dist/commonjs/components/Inspector/InspectorHeader.js +102 -19
  9. package/dist/commonjs/components/Inspector/MainScreen.js +147 -17
  10. package/dist/commonjs/components/Inspector/NetworkTab.js +104 -20
  11. package/dist/commonjs/components/Inspector/SettingsPanel.js +1111 -1385
  12. package/dist/commonjs/components/Inspector/TabBar.js +3 -4
  13. package/dist/commonjs/components/JsonViewer.js +9 -4
  14. package/dist/commonjs/components/LogCard.js +31 -1
  15. package/dist/commonjs/components/LogSyntaxHighlighter.d.ts +16 -0
  16. package/dist/commonjs/components/LogSyntaxHighlighter.js +130 -0
  17. package/dist/commonjs/components/NetworkIcons.d.ts +2 -0
  18. package/dist/commonjs/components/NetworkIcons.js +10 -1
  19. package/dist/commonjs/components/Slider.d.ts +13 -0
  20. package/dist/commonjs/components/Slider.js +261 -0
  21. package/dist/commonjs/constants/version.d.ts +1 -1
  22. package/dist/commonjs/constants/version.js +1 -1
  23. package/dist/commonjs/customHooks/analyticsLogger.js +1 -1
  24. package/dist/commonjs/customHooks/crashHandler.js +1 -1
  25. package/dist/commonjs/helpers/index.d.ts +1 -0
  26. package/dist/commonjs/helpers/index.js +15 -0
  27. package/dist/commonjs/helpers/searchQueryParser.d.ts +6 -0
  28. package/dist/commonjs/helpers/searchQueryParser.js +236 -0
  29. package/dist/commonjs/helpers/settingsStore.js +13 -13
  30. package/dist/commonjs/index.js +7 -20
  31. package/dist/commonjs/styles/index.js +35 -35
  32. package/dist/esm/components/ConsoleLogCard.js +5 -5
  33. package/dist/esm/components/EndOfListFooter.js +2 -2
  34. package/dist/esm/components/Inspector/AnalyticsTab.js +21 -73
  35. package/dist/esm/components/Inspector/BundleTab.js +670 -188
  36. package/dist/esm/components/Inspector/ConsoleTab.js +110 -99
  37. package/dist/esm/components/Inspector/CrashTab.js +2 -1
  38. package/dist/esm/components/Inspector/InspectorHeader.js +103 -20
  39. package/dist/esm/components/Inspector/MainScreen.js +115 -18
  40. package/dist/esm/components/Inspector/NetworkTab.js +105 -21
  41. package/dist/esm/components/Inspector/SettingsPanel.js +1114 -1388
  42. package/dist/esm/components/Inspector/TabBar.js +4 -5
  43. package/dist/esm/components/JsonViewer.js +9 -4
  44. package/dist/esm/components/LogCard.js +32 -2
  45. package/dist/esm/components/LogSyntaxHighlighter.d.ts +16 -0
  46. package/dist/esm/components/LogSyntaxHighlighter.js +123 -0
  47. package/dist/esm/components/NetworkIcons.d.ts +2 -0
  48. package/dist/esm/components/NetworkIcons.js +7 -0
  49. package/dist/esm/components/Slider.d.ts +13 -0
  50. package/dist/esm/components/Slider.js +222 -0
  51. package/dist/esm/constants/version.d.ts +1 -1
  52. package/dist/esm/constants/version.js +1 -1
  53. package/dist/esm/customHooks/analyticsLogger.js +1 -1
  54. package/dist/esm/customHooks/crashHandler.js +1 -1
  55. package/dist/esm/helpers/index.d.ts +1 -0
  56. package/dist/esm/helpers/index.js +1 -0
  57. package/dist/esm/helpers/searchQueryParser.d.ts +6 -0
  58. package/dist/esm/helpers/searchQueryParser.js +233 -0
  59. package/dist/esm/helpers/settingsStore.js +13 -13
  60. package/dist/esm/index.js +8 -21
  61. package/dist/esm/styles/index.js +35 -35
  62. package/ios/NetworkInspectorModule.m +81 -41
  63. package/package.json +1 -1
@@ -0,0 +1,236 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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.
7
+ */
8
+ function matchNetworkLogQuery(log, searchQuery, routePath) {
9
+ if (!searchQuery || searchQuery.trim().length === 0)
10
+ return true;
11
+ const rawTokens = searchQuery
12
+ .trim()
13
+ .match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g) || [];
14
+ if (rawTokens.length === 0)
15
+ return true;
16
+ const methodStr = (log.method || '').toLowerCase();
17
+ const urlStr = (log.url || '').toLowerCase();
18
+ const statusNum = typeof log.status === 'number' ? log.status : parseInt(String(log.status || 0), 10);
19
+ const statusStr = String(log.status ?? '');
20
+ const durationNum = log.duration || 0;
21
+ const clientStr = (log.client || '').toLowerCase();
22
+ const reqStr = typeof log.request === 'string' ? log.request : JSON.stringify(log.request || '');
23
+ const resStr = typeof log.response === 'string' ? log.response : JSON.stringify(log.response || '');
24
+ const reqHeadersStr = JSON.stringify(log.requestHeaders || '').toLowerCase();
25
+ const resHeadersStr = JSON.stringify(log.responseHeaders || '').toLowerCase();
26
+ const pathStr = routePath ? routePath.toLowerCase() : '';
27
+ const fullSearchCorpus = [
28
+ methodStr,
29
+ urlStr,
30
+ statusStr,
31
+ pathStr,
32
+ clientStr,
33
+ reqStr.toLowerCase(),
34
+ resStr.toLowerCase(),
35
+ reqHeadersStr,
36
+ resHeadersStr,
37
+ ].join(' ');
38
+ for (const rawToken of rawTokens) {
39
+ const token = rawToken.replace(/^["']|["']$/g, '').trim();
40
+ if (!token)
41
+ continue;
42
+ const lowerToken = token.toLowerCase();
43
+ // 1. method:<VAL> or m:<VAL>
44
+ if (lowerToken.startsWith('method:') || lowerToken.startsWith('m:')) {
45
+ const targetMethod = lowerToken.replace(/^(method:|m:)/, '').trim();
46
+ if (targetMethod.startsWith('!')) {
47
+ if (methodStr === targetMethod.slice(1))
48
+ return false;
49
+ }
50
+ else {
51
+ if (methodStr !== targetMethod)
52
+ return false;
53
+ }
54
+ continue;
55
+ }
56
+ // 2. status:<VAL> or s:<VAL>
57
+ if (lowerToken.startsWith('status:') || lowerToken.startsWith('s:')) {
58
+ const val = lowerToken.replace(/^(status:|s:)/, '').trim();
59
+ if (val.startsWith('>=')) {
60
+ const threshold = parseInt(val.slice(2), 10);
61
+ if (isNaN(threshold) || statusNum < threshold)
62
+ return false;
63
+ }
64
+ else if (val.startsWith('>')) {
65
+ const threshold = parseInt(val.slice(1), 10);
66
+ if (isNaN(threshold) || statusNum <= threshold)
67
+ return false;
68
+ }
69
+ else if (val.startsWith('<=')) {
70
+ const threshold = parseInt(val.slice(2), 10);
71
+ if (isNaN(threshold) || statusNum > threshold)
72
+ return false;
73
+ }
74
+ else if (val.startsWith('<')) {
75
+ const threshold = parseInt(val.slice(1), 10);
76
+ if (isNaN(threshold) || statusNum >= threshold)
77
+ return false;
78
+ }
79
+ else if (val.endsWith('xx') || val.endsWith('x')) {
80
+ const prefix = val.replace(/x/g, '');
81
+ if (!statusStr.startsWith(prefix))
82
+ return false;
83
+ }
84
+ else {
85
+ const targetCode = parseInt(val, 10);
86
+ if (!isNaN(targetCode)) {
87
+ if (statusNum !== targetCode)
88
+ return false;
89
+ }
90
+ else if (!statusStr.includes(val)) {
91
+ return false;
92
+ }
93
+ }
94
+ continue;
95
+ }
96
+ // 3. is:<FLAG>
97
+ if (lowerToken.startsWith('is:')) {
98
+ const flag = lowerToken.slice(3).trim();
99
+ if (flag === 'error' || flag === 'failed' || flag === 'err' || flag === 'fail') {
100
+ const isErr = log.status === 0 || log.status == null || statusNum >= 400;
101
+ if (!isErr)
102
+ return false;
103
+ }
104
+ else if (flag === 'success' || flag === 'ok' || flag === '2xx') {
105
+ const isSuccess = statusNum >= 200 && statusNum < 300;
106
+ if (!isSuccess)
107
+ return false;
108
+ }
109
+ else if (flag === 'slow') {
110
+ if (durationNum < 1000)
111
+ return false;
112
+ }
113
+ else if (flag === 'fast') {
114
+ if (durationNum >= 200)
115
+ return false;
116
+ }
117
+ else if (flag === 'graphql' || flag === 'gql') {
118
+ const isGql = urlStr.includes('graphql') ||
119
+ clientStr === 'graphql' ||
120
+ clientStr === 'apollo';
121
+ if (!isGql)
122
+ return false;
123
+ }
124
+ else if (flag === 'https') {
125
+ if (!urlStr.startsWith('https'))
126
+ return false;
127
+ }
128
+ else if (flag === 'http') {
129
+ if (urlStr.startsWith('https') || !urlStr.startsWith('http'))
130
+ return false;
131
+ }
132
+ else if (flag === 'json') {
133
+ const isJson = reqHeadersStr.includes('application/json') ||
134
+ resHeadersStr.includes('application/json') ||
135
+ urlStr.includes('.json');
136
+ if (!isJson)
137
+ return false;
138
+ }
139
+ continue;
140
+ }
141
+ // 4. slow:<DURATION> or dur:<DURATION> or duration:<DURATION>
142
+ if (lowerToken.startsWith('slow:') ||
143
+ lowerToken.startsWith('dur:') ||
144
+ lowerToken.startsWith('duration:')) {
145
+ const val = lowerToken.replace(/^(slow:|dur:|duration:)/, '').trim();
146
+ let thresholdMs = 0;
147
+ let isGreater = true;
148
+ let cleanVal = val;
149
+ if (val.startsWith('>=')) {
150
+ isGreater = true;
151
+ cleanVal = val.slice(2);
152
+ }
153
+ else if (val.startsWith('>')) {
154
+ isGreater = true;
155
+ cleanVal = val.slice(1);
156
+ }
157
+ else if (val.startsWith('<=')) {
158
+ isGreater = false;
159
+ cleanVal = val.slice(2);
160
+ }
161
+ else if (val.startsWith('<')) {
162
+ isGreater = false;
163
+ cleanVal = val.slice(1);
164
+ }
165
+ if (cleanVal.endsWith('s') && !cleanVal.endsWith('ms')) {
166
+ thresholdMs = parseFloat(cleanVal.slice(0, -1)) * 1000;
167
+ }
168
+ else if (cleanVal.endsWith('ms')) {
169
+ thresholdMs = parseFloat(cleanVal.slice(0, -2));
170
+ }
171
+ else {
172
+ thresholdMs = parseFloat(cleanVal);
173
+ }
174
+ if (!isNaN(thresholdMs)) {
175
+ if (isGreater) {
176
+ if (durationNum < thresholdMs)
177
+ return false;
178
+ }
179
+ else {
180
+ if (durationNum > thresholdMs)
181
+ return false;
182
+ }
183
+ }
184
+ continue;
185
+ }
186
+ // 5. client:<CLIENT> or c:<CLIENT>
187
+ if (lowerToken.startsWith('client:') || lowerToken.startsWith('c:')) {
188
+ const targetClient = lowerToken.replace(/^(client:|c:)/, '').trim();
189
+ if (!clientStr.includes(targetClient))
190
+ return false;
191
+ continue;
192
+ }
193
+ // 6. domain:<DOMAIN> or d:<DOMAIN>
194
+ if (lowerToken.startsWith('domain:') || lowerToken.startsWith('d:')) {
195
+ const targetDomain = lowerToken.replace(/^(domain:|d:)/, '').trim();
196
+ if (!urlStr.includes(targetDomain))
197
+ return false;
198
+ continue;
199
+ }
200
+ // 7. path:<PATH> or p:<PATH>
201
+ if (lowerToken.startsWith('path:') || lowerToken.startsWith('p:')) {
202
+ const targetPath = lowerToken.replace(/^(path:|p:)/, '').trim();
203
+ if (!urlStr.includes(targetPath) && !pathStr.includes(targetPath)) {
204
+ return false;
205
+ }
206
+ continue;
207
+ }
208
+ // 8. req:<TERM> or body:<TERM>
209
+ if (lowerToken.startsWith('req:') || lowerToken.startsWith('body:')) {
210
+ const target = lowerToken.replace(/^(req:|body:)/, '').trim();
211
+ if (!reqStr.toLowerCase().includes(target))
212
+ return false;
213
+ continue;
214
+ }
215
+ // 9. res:<TERM>
216
+ if (lowerToken.startsWith('res:')) {
217
+ const target = lowerToken.slice(4).trim();
218
+ if (!resStr.toLowerCase().includes(target))
219
+ return false;
220
+ continue;
221
+ }
222
+ // 10. header:<TERM> or h:<TERM>
223
+ if (lowerToken.startsWith('header:') || lowerToken.startsWith('h:')) {
224
+ const target = lowerToken.replace(/^(header:|h:)/, '').trim();
225
+ if (!reqHeadersStr.includes(target) && !resHeadersStr.includes(target)) {
226
+ return false;
227
+ }
228
+ continue;
229
+ }
230
+ // 11. Generic Plain Substring Match
231
+ if (!fullSearchCorpus.includes(lowerToken)) {
232
+ return false;
233
+ }
234
+ }
235
+ return true;
236
+ }
@@ -111,19 +111,19 @@ function getCustomStorage() {
111
111
  function calculateRamBasedLimits(freeRamMb) {
112
112
  if (freeRamMb >= 3000) {
113
113
  return {
114
- maxNetworkLogs: 1000,
115
- maxConsoleLogs: 1500,
116
- maxAnalyticsEvents: 500,
117
- maxCrashRecords: 100,
114
+ maxNetworkLogs: 100,
115
+ maxConsoleLogs: 100,
116
+ maxAnalyticsEvents: 75,
117
+ maxCrashRecords: 50,
118
118
  profileName: 'High-End',
119
119
  freeRamMb,
120
120
  };
121
121
  }
122
122
  else if (freeRamMb >= 1500) {
123
123
  return {
124
- maxNetworkLogs: 500,
125
- maxConsoleLogs: 750,
126
- maxAnalyticsEvents: 250,
124
+ maxNetworkLogs: 100,
125
+ maxConsoleLogs: 100,
126
+ maxAnalyticsEvents: 75,
127
127
  maxCrashRecords: 50,
128
128
  profileName: 'Standard',
129
129
  freeRamMb,
@@ -131,9 +131,9 @@ function calculateRamBasedLimits(freeRamMb) {
131
131
  }
132
132
  else if (freeRamMb >= 600) {
133
133
  return {
134
- maxNetworkLogs: 200,
135
- maxConsoleLogs: 300,
136
- maxAnalyticsEvents: 100,
134
+ maxNetworkLogs: 100,
135
+ maxConsoleLogs: 100,
136
+ maxAnalyticsEvents: 50,
137
137
  maxCrashRecords: 25,
138
138
  profileName: 'Compact',
139
139
  freeRamMb,
@@ -141,9 +141,9 @@ function calculateRamBasedLimits(freeRamMb) {
141
141
  }
142
142
  else {
143
143
  return {
144
- maxNetworkLogs: 100,
145
- maxConsoleLogs: 150,
146
- maxAnalyticsEvents: 50,
144
+ maxNetworkLogs: 50,
145
+ maxConsoleLogs: 50,
146
+ maxAnalyticsEvents: 25,
147
147
  maxCrashRecords: 15,
148
148
  profileName: 'Ultra-Light',
149
149
  freeRamMb,
@@ -139,7 +139,7 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
139
139
  // ─── Crash state ───────────────────────────────────────────────────────────
140
140
  const [crashRecords, setCrashRecords] = (0, react_1.useState)(() => (0, crashHandler_1.getCrashRecords)());
141
141
  const [selectedCrash, setSelectedCrash] = (0, react_1.useState)(null);
142
- const [maxCrashLogs, setMaxCrashLogs] = (0, react_1.useState)(100);
142
+ const [maxCrashLogs, setMaxCrashLogs] = (0, react_1.useState)(50);
143
143
  (0, react_1.useEffect)(() => {
144
144
  (0, crashHandler_1.setMaxCrashLogsLimit)(maxCrashLogs);
145
145
  }, [maxCrashLogs]);
@@ -171,7 +171,7 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
171
171
  setLastReadCrashesCount(crashRecords.length);
172
172
  }
173
173
  }, [activeTab, crashRecords.length]);
174
- const [maxConsoleLogs, setMaxConsoleLogs] = (0, react_1.useState)(200);
174
+ const [maxConsoleLogs, setMaxConsoleLogs] = (0, react_1.useState)(100);
175
175
  const [showConsoleLevels, setShowConsoleLevels] = (0, react_1.useState)({
176
176
  info: true,
177
177
  warn: false,
@@ -216,7 +216,7 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
216
216
  crash: false,
217
217
  });
218
218
  const [maxNetworkLogs, setMaxNetworkLogs] = (0, react_1.useState)(100);
219
- const [maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit] = (0, react_1.useState)(250);
219
+ const [maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit] = (0, react_1.useState)(75);
220
220
  const [isAutoRamLimitEnabled, setIsAutoRamLimitEnabled] = (0, react_1.useState)(true);
221
221
  const [deviceFreeRamMb, setDeviceFreeRamMb] = (0, react_1.useState)(1800);
222
222
  const [reduxAutoRefresh, setReduxAutoRefreshState] = (0, react_1.useState)(true);
@@ -1046,23 +1046,10 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
1046
1046
  if (!matchedMethod)
1047
1047
  return false;
1048
1048
  }
1049
- // Comprehensive Search Bar Check
1049
+ // Advanced Search Query Engine Check (Supports method:POST, is:error, slow:>1s, status:200, headers, body, etc.)
1050
1050
  if (search && search.trim().length > 0) {
1051
- const queryTokens = search.trim().toLowerCase().split(/\s+/).filter(Boolean);
1052
1051
  const routePath = logRouteMapRef.current.get(log.id)?.path || '';
1053
- const reqStr = typeof log.request === 'string' ? log.request : JSON.stringify(log.request || '');
1054
- const resStr = typeof log.response === 'string' ? log.response : JSON.stringify(log.response || '');
1055
- const searchTarget = [
1056
- log.method || '',
1057
- log.url || '',
1058
- String(log.status ?? ''),
1059
- routePath,
1060
- reqStr,
1061
- resStr,
1062
- JSON.stringify(log.requestHeaders || ''),
1063
- JSON.stringify(log.responseHeaders || ''),
1064
- ].join(' ').toLowerCase();
1065
- const isMatch = queryTokens.every(token => searchTarget.includes(token));
1052
+ const isMatch = (0, helpers_1.matchNetworkLogQuery)(log, search, routePath);
1066
1053
  if (!isMatch)
1067
1054
  return false;
1068
1055
  }
@@ -1366,8 +1353,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
1366
1353
  else if (analyticsFilters.sortBy === 'count_desc') {
1367
1354
  result = [...result].sort((a, b) => (b.count || 1) - (a.count || 1));
1368
1355
  }
1369
- return result;
1370
- }, [analyticsEvents, analyticsSearch, analyticsFilters]);
1356
+ return result.slice(0, maxAnalyticsEventsLimit);
1357
+ }, [analyticsEvents, analyticsSearch, analyticsFilters, maxAnalyticsEventsLimit]);
1371
1358
  const filteredConsoleLogs = (0, react_1.useMemo)(() => {
1372
1359
  let result = visibleConsoleLogs;
1373
1360
  // Filters check
@@ -43,10 +43,10 @@ const getRawStyles = (colors) => ({
43
43
  header: {
44
44
  flexDirection: 'row',
45
45
  alignItems: 'center',
46
- paddingHorizontal: 12,
47
- paddingVertical: 10,
46
+ paddingHorizontal: 10,
47
+ paddingVertical: 8,
48
48
  zIndex: 10,
49
- minHeight: 56,
49
+ minHeight: 52,
50
50
  shadowColor: colors.black,
51
51
  shadowOffset: { width: 0, height: 2 },
52
52
  shadowOpacity: 0.08,
@@ -70,7 +70,7 @@ const getRawStyles = (colors) => ({
70
70
  flexDirection: 'row',
71
71
  alignItems: 'center',
72
72
  justifyContent: 'flex-end',
73
- gap: 6,
73
+ gap: 5,
74
74
  },
75
75
  headerTitle: {
76
76
  fontFamily: AppFonts_1.AppFonts.interBold,
@@ -172,7 +172,7 @@ const getRawStyles = (colors) => ({
172
172
  fontSize: 12,
173
173
  letterSpacing: 0.2,
174
174
  },
175
- listContent: { paddingBottom: 12 },
175
+ listContent: { paddingBottom: react_native_1.Platform.OS === 'ios' ? 44 : 32 },
176
176
  // #2 — scroll-to-top button, always shown at the bottom right.
177
177
  scrollTopBtn: {
178
178
  position: 'absolute',
@@ -193,9 +193,9 @@ const getRawStyles = (colors) => ({
193
193
  },
194
194
  detailScroll: { flex: 1 },
195
195
  closeButtonSquare: {
196
- width: 32,
197
- height: 32,
198
- borderRadius: 8,
196
+ width: 30,
197
+ height: 30,
198
+ borderRadius: 7,
199
199
  backgroundColor: `${colors.white}2B`,
200
200
  alignItems: 'center',
201
201
  justifyContent: 'center',
@@ -414,12 +414,12 @@ const getRawStyles = (colors) => ({
414
414
  },
415
415
  clearBtn: { padding: 4 },
416
416
  domainHeaderCard: {
417
- marginHorizontal: 12,
418
- marginTop: 12,
417
+ marginHorizontal: 8,
418
+ marginTop: 10,
419
419
  marginBottom: 4,
420
- paddingHorizontal: 12,
421
- paddingVertical: 8,
422
- borderRadius: 10,
420
+ paddingHorizontal: 8,
421
+ paddingVertical: 7,
422
+ borderRadius: 9,
423
423
  backgroundColor: colors.grayBackground,
424
424
  borderWidth: 1,
425
425
  borderColor: colors.grayBorderSecondary,
@@ -441,18 +441,18 @@ const getRawStyles = (colors) => ({
441
441
  flex: 1,
442
442
  minWidth: 0,
443
443
  marginRight: 6,
444
- gap: 8,
444
+ gap: 6,
445
445
  },
446
446
  domainIconWrap: {
447
- width: 26,
448
- height: 26,
449
- borderRadius: 6,
447
+ width: 22,
448
+ height: 22,
449
+ borderRadius: 5,
450
450
  alignItems: 'center',
451
451
  justifyContent: 'center',
452
452
  },
453
453
  domainTitleText: {
454
454
  fontFamily: AppFonts_1.AppFonts.interBold,
455
- fontSize: 13.5,
455
+ fontSize: 13,
456
456
  fontWeight: '700',
457
457
  color: colors.primaryBlack,
458
458
  textTransform: 'capitalize',
@@ -514,23 +514,23 @@ const getRawStyles = (colors) => ({
514
514
  flexDirection: 'row',
515
515
  alignItems: 'center',
516
516
  gap: 3,
517
- paddingHorizontal: 6,
518
- paddingVertical: 3,
519
- borderRadius: 6,
517
+ paddingHorizontal: 5,
518
+ paddingVertical: 2.5,
519
+ borderRadius: 5,
520
520
  borderWidth: 1,
521
521
  borderColor: colors.grayBorderSecondary,
522
522
  backgroundColor: colors.primaryLight,
523
523
  },
524
524
  domainStatText: {
525
525
  fontFamily: AppFonts_1.AppFonts.interBold,
526
- fontSize: 10,
526
+ fontSize: 9.5,
527
527
  },
528
528
  treeNodeRow: {
529
529
  flexDirection: 'row',
530
530
  alignItems: 'stretch',
531
- marginHorizontal: 12,
532
- paddingRight: 8,
533
- paddingLeft: 4,
531
+ marginHorizontal: 8,
532
+ paddingRight: 4,
533
+ paddingLeft: 0,
534
534
  backgroundColor: colors.grayBackground,
535
535
  borderLeftWidth: 1,
536
536
  borderRightWidth: 1,
@@ -544,14 +544,14 @@ const getRawStyles = (colors) => ({
544
544
  paddingBottom: 6,
545
545
  },
546
546
  treeLines: {
547
- width: 28,
547
+ width: 14,
548
548
  position: 'relative',
549
549
  },
550
550
  modernTreeLine: {
551
551
  position: 'absolute',
552
- left: 14,
552
+ left: 7,
553
553
  top: 0,
554
- width: 14,
554
+ width: 7,
555
555
  height: '100%',
556
556
  borderLeftWidth: 1.5,
557
557
  opacity: 0.5,
@@ -559,19 +559,19 @@ const getRawStyles = (colors) => ({
559
559
  modernTreeLineLast: {
560
560
  height: '50%',
561
561
  borderBottomWidth: 1.5,
562
- borderBottomLeftRadius: 10,
562
+ borderBottomLeftRadius: 8,
563
563
  },
564
564
  modernTreeBranch: {
565
565
  position: 'absolute',
566
- left: 14,
566
+ left: 7,
567
567
  top: '50%',
568
- width: 14,
568
+ width: 7,
569
569
  borderTopWidth: 1.5,
570
570
  opacity: 0.5,
571
571
  },
572
572
  treeCardWrapper: {
573
573
  flex: 1,
574
- paddingVertical: 3.5,
574
+ paddingVertical: 3,
575
575
  },
576
576
  card: {
577
577
  marginHorizontal: 0,
@@ -611,10 +611,10 @@ const getRawStyles = (colors) => ({
611
611
  gap: 5,
612
612
  },
613
613
  smallCheckbox: {
614
- width: 13,
615
- height: 13,
614
+ width: 15,
615
+ height: 15,
616
616
  borderRadius: 4,
617
- borderWidth: 1.5,
617
+ borderWidth: 1.8,
618
618
  borderColor: colors.grayTextWeak,
619
619
  alignItems: 'center',
620
620
  justifyContent: 'center',
@@ -4,8 +4,8 @@ import { Pressable, StyleSheet, Text, View, } from 'react-native';
4
4
  import { AppColors } from '../styles/AppColors';
5
5
  import { AppFonts } from '../styles/AppFonts';
6
6
  import { formatTime, getJsonContent, getJsonPreviewText, parseStackLine, openInVSCode, } from '../helpers';
7
- import HighlightText from './HighlightText';
8
7
  import CopyButton from './CopyButton';
8
+ import LogSyntaxHighlighter from './LogSyntaxHighlighter';
9
9
  import { ChevronIcon, ExternalLinkIcon, FlaskIcon, ZapIcon, GlobeIcon, DiceIcon, AtomIcon, BarChartIcon, KeyIcon, SmartphoneIcon, AlertTriangleIcon, BugIcon, TagIcon, } from './NetworkIcons';
10
10
  import { useInspector } from './Inspector/InspectorContext';
11
11
  const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle, numberOfLines) => {
@@ -73,10 +73,10 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
73
73
  </View>);
74
74
  })}
75
75
  </View>
76
- <HighlightText text={remainingText} search={searchStr} style={textStyle} highlightStyle={highlightStyle} numberOfLines={numberOfLines} detectLinks={true}/>
76
+ <LogSyntaxHighlighter text={remainingText} search={searchStr} style={textStyle} numberOfLines={numberOfLines} detectLinks={true}/>
77
77
  </View>);
78
78
  }
79
- return (<HighlightText text={message} search={searchStr} style={textStyle} highlightStyle={highlightStyle} numberOfLines={numberOfLines} detectLinks={true}/>);
79
+ return (<LogSyntaxHighlighter text={message} search={searchStr} style={textStyle} numberOfLines={numberOfLines} detectLinks={true}/>);
80
80
  };
81
81
  export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchStr = '', }) {
82
82
  const { setSelectedLog } = useInspector();
@@ -234,10 +234,10 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
234
234
  {jsonContent ? (<>
235
235
  {jsonContent.header ? (getLogMessageWithBadges(jsonContent.header, searchStr, [styles.messageText, { color: AppColors.primaryBlack }], styles.highlight, 2)) : null}
236
236
  {jsonPreview && (<View style={styles.jsonPreviewContainer}>
237
- <HighlightText text={jsonPreview.text} search={searchStr} style={[
237
+ <LogSyntaxHighlighter text={jsonPreview.text} search={searchStr} style={[
238
238
  styles.jsonPreviewText,
239
239
  { color: AppColors.primaryBlack },
240
- ]} highlightStyle={styles.highlight} detectLinks={false} numberOfLines={5}/>
240
+ ]} detectLinks={false} numberOfLines={5}/>
241
241
  </View>)}
242
242
  </>) : (getLogMessageWithBadges(item.message, searchStr, [styles.messageText, { color: AppColors.primaryBlack }], styles.highlight, 3))}
243
243
  </View>
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { StyleSheet, Text, View } from 'react-native';
2
+ import { Platform, StyleSheet, Text, View } from 'react-native';
3
3
  import { AppColors } from '../styles/AppColors';
4
4
  import { AppFonts } from '../styles/AppFonts';
5
5
  import { CheckIcon } from './NetworkIcons';
@@ -27,7 +27,7 @@ const styles = StyleSheet.create({
27
27
  justifyContent: 'center',
28
28
  paddingHorizontal: 16,
29
29
  paddingTop: 16,
30
- paddingBottom: 28,
30
+ paddingBottom: Platform.OS === 'ios' ? 44 : 32,
31
31
  gap: 8,
32
32
  },
33
33
  dividerLine: {