react-native-inapp-inspector 2.3.14 → 2.3.15

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 (65) hide show
  1. package/dist/commonjs/components/AnimatedEntrance.js +3 -3
  2. package/dist/commonjs/components/ConsoleLogCard.js +174 -100
  3. package/dist/commonjs/components/Inspector/ConsoleTab.js +25 -16
  4. package/dist/commonjs/components/Inspector/CrashTab.js +19 -5
  5. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +198 -98
  6. package/dist/commonjs/components/Inspector/InspectorHeader.js +2 -2
  7. package/dist/commonjs/components/Inspector/MainScreen.js +56 -56
  8. package/dist/commonjs/components/Inspector/NetworkTab.js +1 -335
  9. package/dist/commonjs/components/Inspector/PerformanceTab.js +32 -6
  10. package/dist/commonjs/components/Inspector/ReduxTab.js +3 -1
  11. package/dist/commonjs/components/Inspector/StorageTab.js +23 -5
  12. package/dist/commonjs/components/JsonViewer.js +14 -2
  13. package/dist/commonjs/components/LogCard.js +428 -227
  14. package/dist/commonjs/constants/version.d.ts +1 -1
  15. package/dist/commonjs/constants/version.js +1 -1
  16. package/dist/commonjs/customHooks/analyticsLogger.js +1 -1
  17. package/dist/commonjs/customHooks/consoleLogger.js +34 -2
  18. package/dist/commonjs/customHooks/crashHandler.js +1 -1
  19. package/dist/commonjs/customHooks/networkLogger.js +184 -26
  20. package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
  21. package/dist/commonjs/helpers/searchQueryParser.js +37 -291
  22. package/dist/commonjs/index.js +141 -27
  23. package/dist/esm/components/AnimatedEntrance.js +3 -3
  24. package/dist/esm/components/ConsoleLogCard.js +141 -100
  25. package/dist/esm/components/Inspector/ConsoleTab.js +25 -16
  26. package/dist/esm/components/Inspector/CrashTab.js +19 -5
  27. package/dist/esm/components/Inspector/DeviceInfoTab.js +198 -98
  28. package/dist/esm/components/Inspector/InspectorHeader.js +3 -3
  29. package/dist/esm/components/Inspector/MainScreen.js +56 -56
  30. package/dist/esm/components/Inspector/NetworkTab.js +2 -336
  31. package/dist/esm/components/Inspector/PerformanceTab.js +32 -6
  32. package/dist/esm/components/Inspector/ReduxTab.js +3 -1
  33. package/dist/esm/components/Inspector/StorageTab.js +23 -5
  34. package/dist/esm/components/JsonViewer.js +14 -2
  35. package/dist/esm/components/LogCard.js +422 -221
  36. package/dist/esm/constants/version.d.ts +1 -1
  37. package/dist/esm/constants/version.js +1 -1
  38. package/dist/esm/customHooks/analyticsLogger.js +1 -1
  39. package/dist/esm/customHooks/consoleLogger.js +34 -2
  40. package/dist/esm/customHooks/crashHandler.js +1 -1
  41. package/dist/esm/customHooks/networkLogger.js +184 -26
  42. package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
  43. package/dist/esm/helpers/searchQueryParser.js +37 -291
  44. package/dist/esm/index.js +141 -27
  45. package/package.json +1 -1
  46. package/src/components/AnimatedEntrance.tsx +3 -3
  47. package/src/components/ConsoleLogCard.tsx +154 -103
  48. package/src/components/Inspector/ConsoleTab.tsx +27 -18
  49. package/src/components/Inspector/CrashTab.tsx +19 -5
  50. package/src/components/Inspector/DeviceInfoTab.tsx +224 -102
  51. package/src/components/Inspector/InspectorHeader.tsx +5 -3
  52. package/src/components/Inspector/MainScreen.tsx +2 -3
  53. package/src/components/Inspector/NetworkTab.tsx +1 -402
  54. package/src/components/Inspector/PerformanceTab.tsx +36 -7
  55. package/src/components/Inspector/ReduxTab.tsx +9 -1
  56. package/src/components/Inspector/StorageTab.tsx +27 -7
  57. package/src/components/JsonViewer.tsx +15 -2
  58. package/src/components/LogCard.tsx +528 -339
  59. package/src/constants/version.ts +1 -1
  60. package/src/customHooks/analyticsLogger.ts +1 -1
  61. package/src/customHooks/consoleLogger.ts +36 -3
  62. package/src/customHooks/crashHandler.ts +1 -1
  63. package/src/customHooks/networkLogger.ts +214 -26
  64. package/src/helpers/searchQueryParser.ts +40 -285
  65. package/src/index.tsx +332 -211
@@ -44,13 +44,27 @@ const constants_1 = require("../constants");
44
44
  const helpers_1 = require("../helpers");
45
45
  const NetworkIcons_1 = require("./NetworkIcons");
46
46
  const AppFonts_1 = require("../styles/AppFonts");
47
- const styles_1 = __importDefault(require("../styles"));
48
47
  const HighlightText_1 = __importDefault(require("./HighlightText"));
49
48
  const TouchableScale_1 = __importDefault(require("./TouchableScale"));
50
49
  const i18n_1 = require("../i18n");
51
50
  const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineMinStart, timelineTotalRange, isNew, isSelected, onToggleSelect, searchStr, }) {
52
51
  const { t } = (0, i18n_1.useTranslation)();
53
52
  const methodColor = constants_1.METHOD_COLORS[item.method] ?? constants_1.METHOD_COLORS.ALL;
53
+ const urlParsed = (0, react_1.useMemo)(() => {
54
+ try {
55
+ const u = new URL(item.url);
56
+ const host = u.host;
57
+ const path = u.pathname + (u.search ? u.search : '');
58
+ const isHttps = u.protocol === 'https:';
59
+ return { host, path: path || '/', isHttps };
60
+ }
61
+ catch {
62
+ const isHttps = item.url.toLowerCase().startsWith('https:');
63
+ const path = (0, helpers_1.getPath)(item.url);
64
+ const host = (0, helpers_1.getBaseUrl)(item.url).replace(/^https?:\/\//, '');
65
+ return { host, path: path || item.url, isHttps };
66
+ }
67
+ }, [item.url]);
54
68
  const handleOpenUrl = (e) => {
55
69
  e?.stopPropagation?.();
56
70
  react_native_1.Alert.alert(t('common.openInBrowser') || 'Open in Browser', `${t('common.openInBrowserPrompt') || 'Are you sure you want to open this URL in your external browser?'}\n\n${item.url}`, [
@@ -81,12 +95,6 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
81
95
  : isFailed
82
96
  ? AppColors_1.AppColors.errorColor
83
97
  : AppColors_1.AppColors.greenColor;
84
- const leftPercent = timelineTotalRange > 0
85
- ? ((item.startTime - timelineMinStart) / timelineTotalRange) * 100
86
- : 0;
87
- const widthPercent = timelineTotalRange > 0
88
- ? ((item.duration || 10) / timelineTotalRange) * 100
89
- : 100;
90
98
  const shimmerOpacity = (0, react_1.useRef)(new react_native_1.Animated.Value(isNew ? 0.35 : 0)).current;
91
99
  (0, react_1.useEffect)(() => {
92
100
  if (isNew) {
@@ -97,54 +105,83 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
97
105
  }).start();
98
106
  }
99
107
  }, [isNew]);
108
+ const getStatusText = () => {
109
+ if (isLoading)
110
+ return '...';
111
+ if (item.status === 0 || item.status == null) {
112
+ return t('network.statusFailed') || 'FAILED';
113
+ }
114
+ const num = typeof item.status === 'number' ? item.status : parseInt(String(item.status || 0), 10);
115
+ if (num === 200)
116
+ return '200 OK';
117
+ if (num === 201)
118
+ return '201 Created';
119
+ if (num === 204)
120
+ return '204 No Content';
121
+ if (num === 304)
122
+ return '304 Not Modified';
123
+ if (num === 400)
124
+ return '400 Bad Req';
125
+ if (num === 401)
126
+ return '401 Unauth';
127
+ if (num === 403)
128
+ return '403 Forbidden';
129
+ if (num === 404)
130
+ return '404 Not Found';
131
+ if (num === 500)
132
+ return '500 Error';
133
+ return String(item.status);
134
+ };
100
135
  const renderStatusIcon = () => {
101
136
  if (isLoading) {
102
- return <NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.darkOrange} size={9}/>;
137
+ return <NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.darkOrange} size={10}/>;
103
138
  }
104
139
  const num = typeof item.status === 'number' ? item.status : parseInt(String(item.status || 0), 10);
105
140
  if (num >= 200 && num < 300) {
106
- return <NetworkIcons_1.CircleCheckIcon color={AppColors_1.AppColors.greenColor} size={9}/>;
141
+ return <NetworkIcons_1.CircleCheckIcon color={AppColors_1.AppColors.greenColor} size={10}/>;
107
142
  }
108
143
  if (num >= 300 && num < 400) {
109
- return <NetworkIcons_1.RepeatIcon color={AppColors_1.AppColors.amber700} size={9}/>;
144
+ return <NetworkIcons_1.RepeatIcon color={AppColors_1.AppColors.amber700} size={10}/>;
110
145
  }
111
146
  if (num >= 400 && num < 500) {
112
- return <NetworkIcons_1.CircleAlertIcon color={AppColors_1.AppColors.darkOrange} size={9}/>;
147
+ return <NetworkIcons_1.CircleAlertIcon color={AppColors_1.AppColors.darkOrange} size={10}/>;
113
148
  }
114
- return <NetworkIcons_1.CircleXIcon color={AppColors_1.AppColors.errorColor} size={9}/>;
149
+ return <NetworkIcons_1.CircleXIcon color={AppColors_1.AppColors.errorColor} size={10}/>;
115
150
  };
116
151
  const triggeredAt = (0, helpers_1.formatDateTime)(item.startTime);
117
152
  const isJson = item.url.split('?')[0].toLowerCase().endsWith('.json');
118
- return (<TouchableScale_1.default onPress={onPress} style={[
119
- styles_1.default.card,
153
+ return (<react_native_1.View style={styles.container}>
154
+ <TouchableScale_1.default onPress={onPress} style={[
155
+ styles.card,
120
156
  {
121
157
  borderLeftWidth: 3.5,
122
158
  borderLeftColor: cardStatusColor,
159
+ backgroundColor: isFailed ? '#FFF8F8' : AppColors_1.AppColors.white,
123
160
  },
124
161
  ]}>
125
- <react_native_1.View style={styles_1.default.cardBody}>
126
-
127
- <react_native_1.View style={styles_1.default.cardHeaderRow}>
128
- <react_native_1.View style={styles_1.default.cardHeaderLeft}>
129
- <react_native_1.Pressable onPress={() => onToggleSelect(item.id)} hitSlop={12} style={[
130
- styles_1.default.smallCheckbox,
131
- isSelected && styles_1.default.smallCheckboxChecked,
162
+ <react_native_1.View style={styles.cardBody}>
163
+
164
+ <react_native_1.View style={styles.cardHeaderRow}>
165
+ <react_native_1.View style={styles.cardHeaderLeft}>
166
+ <react_native_1.Pressable onPress={() => onToggleSelect(item.id)} hitSlop={12} style={[
167
+ styles.smallCheckbox,
168
+ isSelected && styles.smallCheckboxChecked,
132
169
  ]}>
133
- {isSelected && (<react_native_svg_1.default width={9} height={9} viewBox="0 0 24 24" fill="none">
134
- <react_native_svg_1.Path d="M20 6L9 17l-5-5" stroke={AppColors_1.AppColors.white} strokeWidth="4" strokeLinecap="round" strokeLinejoin="round"/>
135
- </react_native_svg_1.default>)}
136
- </react_native_1.Pressable>
170
+ {isSelected && (<react_native_svg_1.default width={9} height={9} viewBox="0 0 24 24" fill="none">
171
+ <react_native_svg_1.Path d="M20 6L9 17l-5-5" stroke={AppColors_1.AppColors.white} strokeWidth="4" strokeLinecap="round" strokeLinejoin="round"/>
172
+ </react_native_svg_1.default>)}
173
+ </react_native_1.Pressable>
137
174
 
138
- <react_native_1.Text style={styles_1.default.serialNumber}>#{item.id + 1}</react_native_1.Text>
175
+ <react_native_1.Text style={styles.serialNumber}>#{item.id + 1}</react_native_1.Text>
139
176
 
140
- <react_native_1.View style={[styles_1.default.methodBadge, { backgroundColor: methodColor }]}>
141
- <react_native_1.Text style={[styles_1.default.methodBadgeText, { color: AppColors_1.AppColors.white }]}>
142
- {item.method}
143
- </react_native_1.Text>
144
- </react_native_1.View>
177
+ <react_native_1.View style={[styles.methodBadge, { backgroundColor: methodColor }]}>
178
+ <react_native_1.Text style={styles.methodBadgeText}>
179
+ {item.method}
180
+ </react_native_1.Text>
181
+ </react_native_1.View>
145
182
 
146
- {item.client && (<react_native_1.View style={[
147
- styles_1.default.chip,
183
+ {item.client && (<react_native_1.View style={[
184
+ styles.chip,
148
185
  {
149
186
  backgroundColor: item.client === 'axios'
150
187
  ? `${AppColors_1.AppColors.purple}14`
@@ -160,16 +197,11 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
160
197
  : item.client === 'xhr'
161
198
  ? `${AppColors_1.AppColors.amber500}30`
162
199
  : `${AppColors_1.AppColors.sky500}30`,
163
- paddingHorizontal: 4.5,
164
- paddingVertical: 1,
165
- borderRadius: 4,
166
200
  },
167
201
  ]}>
168
- <react_native_1.Text style={[
169
- styles_1.default.chipText,
202
+ <react_native_1.Text style={[
203
+ styles.chipText,
170
204
  {
171
- fontFamily: AppFonts_1.AppFonts.interBold,
172
- fontSize: 8.5,
173
205
  color: item.client === 'axios'
174
206
  ? AppColors_1.AppColors.purple
175
207
  : item.client === 'apollo' || item.client === 'graphql'
@@ -179,87 +211,47 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
179
211
  : AppColors_1.AppColors.sky600,
180
212
  },
181
213
  ]}>
182
- {item.client.toUpperCase()}
183
- </react_native_1.Text>
184
- </react_native_1.View>)}
214
+ {item.client.toUpperCase()}
215
+ </react_native_1.Text>
216
+ </react_native_1.View>)}
185
217
 
186
-
187
- <react_native_1.View style={[
188
- styles_1.default.chip,
189
- {
190
- backgroundColor: item.url.toLowerCase().startsWith('https')
191
- ? AppColors_1.AppColors.mintGreenBg
192
- : AppColors_1.AppColors.amberWarmBg,
193
- borderColor: item.url.toLowerCase().startsWith('https')
194
- ? AppColors_1.AppColors.mintGreenBorder
195
- : AppColors_1.AppColors.amberWarmBorder,
196
- paddingHorizontal: 4,
197
- paddingVertical: 1,
198
- borderRadius: 4,
199
- },
200
- ]}>
201
- <react_native_1.Text style={[
202
- styles_1.default.chipText,
203
- {
204
- fontFamily: AppFonts_1.AppFonts.interBold,
205
- fontSize: 8,
206
- color: item.url.toLowerCase().startsWith('https')
207
- ? AppColors_1.AppColors.mintGreenText
208
- : AppColors_1.AppColors.amber700,
209
- },
210
- ]}>
211
- {item.url.toLowerCase().startsWith('https') ? 'HTTPS' : 'HTTP'}
212
- </react_native_1.Text>
213
- </react_native_1.View>
214
-
215
-
216
- {(item.url.toLowerCase().includes('graphql') ||
218
+
219
+ {(item.url.toLowerCase().includes('graphql') ||
217
220
  item.client === 'apollo' ||
218
221
  item.client === 'graphql') && (<react_native_1.View style={[
219
- styles_1.default.chip,
222
+ styles.chip,
220
223
  {
221
224
  backgroundColor: AppColors_1.AppColors.roseBg,
222
225
  borderColor: AppColors_1.AppColors.roseBorder,
223
- paddingHorizontal: 4,
224
- paddingVertical: 1,
225
- borderRadius: 4,
226
226
  },
227
227
  ]}>
228
- <react_native_1.Text style={[
229
- styles_1.default.chipText,
230
- {
231
- fontFamily: AppFonts_1.AppFonts.interBold,
232
- fontSize: 8,
233
- color: AppColors_1.AppColors.pink600,
234
- },
228
+ <react_native_1.Text style={[
229
+ styles.chipText,
230
+ { color: AppColors_1.AppColors.pink600 },
235
231
  ]}>
236
- GQL
237
- </react_native_1.Text>
238
- </react_native_1.View>)}
239
- </react_native_1.View>
232
+ GQL
233
+ </react_native_1.Text>
234
+ </react_native_1.View>)}
235
+ </react_native_1.View>
240
236
 
241
- <react_native_1.View style={[
242
- styles_1.default.statusPill,
237
+ <react_native_1.View style={[
238
+ styles.statusPill,
243
239
  {
244
- flexDirection: 'row',
245
- alignItems: 'center',
246
- gap: 3.5,
247
240
  backgroundColor: isFailed
248
- ? `${AppColors_1.AppColors.errorColor}15`
241
+ ? `${AppColors_1.AppColors.errorColor}14`
249
242
  : isLoading
250
- ? `${AppColors_1.AppColors.darkOrange}15`
251
- : `${statusColor}15`,
243
+ ? `${AppColors_1.AppColors.darkOrange}14`
244
+ : `${statusColor}14`,
252
245
  borderColor: isFailed
253
- ? `${AppColors_1.AppColors.errorColor}30`
246
+ ? `${AppColors_1.AppColors.errorColor}33`
254
247
  : isLoading
255
- ? `${AppColors_1.AppColors.darkOrange}30`
256
- : `${statusColor}30`,
257
- flexShrink: 0,
248
+ ? `${AppColors_1.AppColors.darkOrange}33`
249
+ : `${statusColor}33`,
258
250
  },
259
251
  ]}>
260
- {renderStatusIcon()}
261
- <react_native_1.Text style={[
262
- styles_1.default.statusPillText,
252
+ {renderStatusIcon()}
253
+ <react_native_1.Text style={[
254
+ styles.statusPillText,
263
255
  {
264
256
  color: isFailed
265
257
  ? AppColors_1.AppColors.errorColor
@@ -268,154 +260,363 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
268
260
  : statusColor,
269
261
  },
270
262
  ]}>
271
- {isLoading
272
- ? '...'
273
- : isFailed
274
- ? (item.status ? `${item.status}` : t('network.statusFailed'))
275
- : item.status}
276
- </react_native_1.Text>
263
+ {getStatusText()}
264
+ </react_native_1.Text>
265
+ </react_native_1.View>
277
266
  </react_native_1.View>
278
- </react_native_1.View>
279
267
 
280
-
281
- <react_native_1.View style={styles_1.default.cardSlugBox}>
282
- <react_native_1.Pressable onPress={handleOpenUrl} style={styles_1.default.slugLeft} hitSlop={6}>
283
- <react_native_1.View style={{
284
- width: 17,
285
- height: 17,
286
- borderRadius: 4,
287
- backgroundColor: `${AppColors_1.AppColors.skyBlue}1A`,
288
- alignItems: 'center',
289
- justifyContent: 'center',
290
- marginRight: 4,
291
- flexShrink: 0,
292
- }}>
293
- <NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.skyBlue} size={11}/>
268
+
269
+ <react_native_1.Pressable onPress={handleOpenUrl} hitSlop={6} style={styles.urlBox}>
270
+ <react_native_1.View style={styles.urlMainRow}>
271
+ <HighlightText_1.default text={urlParsed.path} search={searchStr} style={styles.pathText} highlightStyle={styles.highlight} numberOfLines={2} ellipsizeMode="middle"/>
272
+ <react_native_1.View style={styles.urlBadgeRow}>
273
+ {isJson && (<react_native_1.View style={styles.jsonBadge}>
274
+ <react_native_1.Text style={styles.jsonBadgeText}>.json</react_native_1.Text>
275
+ </react_native_1.View>)}
276
+ {item.duplicateCount != null && item.duplicateCount > 1 && (<react_native_1.View style={styles.dupBadge}>
277
+ <react_native_1.Text style={styles.dupBadgeText}>×{item.duplicateCount}</react_native_1.Text>
278
+ </react_native_1.View>)}
279
+ </react_native_1.View>
294
280
  </react_native_1.View>
295
- <HighlightText_1.default text={item.url} search={searchStr} style={[styles_1.default.slugText, { color: AppColors_1.AppColors.skyBlue, textDecorationLine: 'underline' }]} highlightStyle={styles_1.default.highlight} numberOfLines={2} ellipsizeMode="middle"/>
296
- </react_native_1.Pressable>
297
281
 
298
- <react_native_1.View style={styles_1.default.slugRight}>
299
- {isJson && (<react_native_1.View style={[
300
- styles_1.default.chip,
282
+ {urlParsed.host ? (<react_native_1.View style={styles.hostRow}>
283
+ <react_native_1.View style={[
284
+ styles.protoBadge,
301
285
  {
302
- backgroundColor: `${AppColors_1.AppColors.darkOrange}12`,
303
- borderColor: `${AppColors_1.AppColors.darkOrange}28`,
286
+ backgroundColor: urlParsed.isHttps
287
+ ? `${AppColors_1.AppColors.emerald600}12`
288
+ : `${AppColors_1.AppColors.amber600}12`,
289
+ borderColor: urlParsed.isHttps
290
+ ? `${AppColors_1.AppColors.emerald600}2B`
291
+ : `${AppColors_1.AppColors.amber600}2B`,
304
292
  },
305
293
  ]}>
306
- <react_native_1.Text style={[styles_1.default.chipText, { color: AppColors_1.AppColors.darkOrange }]}>
307
- .json
308
- </react_native_1.Text>
309
- </react_native_1.View>)}
310
-
311
- {item.duplicateCount != null && item.duplicateCount > 1 && (<react_native_1.View style={[
312
- styles_1.default.chip,
294
+ <react_native_1.Text style={[
295
+ styles.protoBadgeText,
313
296
  {
314
- backgroundColor: `${AppColors_1.AppColors.purple}12`,
315
- borderColor: `${AppColors_1.AppColors.purple}28`,
297
+ color: urlParsed.isHttps
298
+ ? AppColors_1.AppColors.emerald600
299
+ : AppColors_1.AppColors.amber700,
316
300
  },
317
301
  ]}>
318
- <react_native_1.Text style={[
319
- styles_1.default.chipText,
320
- { color: AppColors_1.AppColors.purple, fontWeight: '700' },
321
- ]}>
322
- ×{item.duplicateCount}
302
+ {urlParsed.isHttps ? 'HTTPS' : 'HTTP'}
303
+ </react_native_1.Text>
304
+ </react_native_1.View>
305
+ <react_native_1.Text style={styles.hostText} numberOfLines={1} ellipsizeMode="tail">
306
+ {urlParsed.host}
323
307
  </react_native_1.Text>
324
- </react_native_1.View>)}
325
- </react_native_1.View>
326
- </react_native_1.View>
308
+ </react_native_1.View>) : null}
309
+ </react_native_1.Pressable>
310
+
311
+
312
+ <react_native_1.View style={styles.cardFooterRow}>
313
+ <react_native_1.View style={styles.footerLeft}>
314
+ <react_native_1.View style={styles.cardDateRow}>
315
+ <NetworkIcons_1.CalendarIcon color={AppColors_1.AppColors.grayTextWeak} size={10}/>
316
+ <react_native_1.Text style={styles.cardDateText}>{triggeredAt}</react_native_1.Text>
317
+ </react_native_1.View>
327
318
 
328
-
329
- <react_native_1.View style={styles_1.default.cardFooterRow}>
330
- <react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, flex: 1, minWidth: 0, marginRight: 8 }}>
331
- <react_native_1.View style={[styles_1.default.cardDateRow, { flexShrink: 0 }]}>
332
- <NetworkIcons_1.CalendarIcon color={AppColors_1.AppColors.grayTextWeak} size={10}/>
333
- <react_native_1.Text style={styles_1.default.cardDateText}>{triggeredAt}</react_native_1.Text>
319
+ {item.caller && item.caller !== 'Unknown' && (<react_native_1.View style={styles.callerChip}>
320
+ <NetworkIcons_1.PinIcon color={AppColors_1.AppColors.sky600} size={8.5}/>
321
+ <react_native_1.Text style={styles.callerChipText} numberOfLines={1} ellipsizeMode="middle">
322
+ {item.caller}
323
+ </react_native_1.Text>
324
+ </react_native_1.View>)}
334
325
  </react_native_1.View>
335
326
 
336
- {item.caller && item.caller !== 'Unknown' && (<react_native_1.View style={[
337
- styles_1.default.chip,
338
- {
339
- flexDirection: 'row',
340
- alignItems: 'center',
341
- gap: 3,
342
- backgroundColor: `${AppColors_1.AppColors.skyBlue}14`,
343
- borderColor: `${AppColors_1.AppColors.skyBlue}30`,
344
- paddingHorizontal: 5,
345
- paddingVertical: 1,
346
- borderRadius: 4,
347
- flexShrink: 1,
348
- minWidth: 0,
349
- },
350
- ]}>
351
- <NetworkIcons_1.PinIcon color={AppColors_1.AppColors.skyBlue} size={8.5}/>
352
- <react_native_1.Text style={[
353
- styles_1.default.chipText,
354
- {
355
- color: AppColors_1.AppColors.skyBlue,
356
- fontSize: 8.5,
357
- fontFamily: AppFonts_1.AppFonts.interMedium,
358
- },
359
- ]} numberOfLines={1} ellipsizeMode="middle">
360
- {item.caller}
361
- </react_native_1.Text>
362
- </react_native_1.View>)}
363
- </react_native_1.View>
327
+ <react_native_1.View style={styles.footerRight}>
328
+ {item.response != null && (<react_native_1.View style={styles.metaStatChip}>
329
+ <NetworkIcons_1.SizeIcon color={AppColors_1.AppColors.purple} size={9}/>
330
+ <react_native_1.Text style={styles.metaStatText}>
331
+ {(0, helpers_1.getSize)(item.response)}
332
+ </react_native_1.Text>
333
+ </react_native_1.View>)}
364
334
 
365
- <react_native_1.View style={styles_1.default.cardFooterRight}>
366
- {item.response != null && (<react_native_1.View style={[
367
- styles_1.default.chip,
335
+ {item.duration != null && !isFailed && (<react_native_1.View style={[
336
+ styles.metaStatChip,
368
337
  {
369
- backgroundColor: `${AppColors_1.AppColors.purple}12`,
370
- borderColor: `${AppColors_1.AppColors.purple}2E`,
338
+ backgroundColor: `${durationColor}12`,
339
+ borderColor: `${durationColor}2E`,
371
340
  },
372
341
  ]}>
373
- <NetworkIcons_1.SizeIcon color={AppColors_1.AppColors.purple} size={9}/>
374
- <react_native_1.Text style={[
375
- styles_1.default.chipText,
376
- { color: AppColors_1.AppColors.purple, fontSize: 9.5 },
377
- ]}>
378
- {(0, helpers_1.getSize)(item.response)}
379
- </react_native_1.Text>
380
- </react_native_1.View>)}
342
+ <NetworkIcons_1.ClockIcon color={durationColor} size={9}/>
343
+ <react_native_1.Text style={[styles.metaStatText, { color: durationColor }]}>
344
+ {item.duration}ms
345
+ </react_native_1.Text>
346
+ </react_native_1.View>)}
347
+ </react_native_1.View>
348
+ </react_native_1.View>
381
349
 
382
- {item.duration != null && !isFailed && (<react_native_1.View style={[
383
- styles_1.default.chip,
350
+
351
+ {typeof item.duration === 'number' && item.duration > 0 && !isFailed && (<react_native_1.View style={styles.waterfallContainer}>
352
+ <react_native_1.View style={[
353
+ styles.waterfallBar,
384
354
  {
385
- backgroundColor: `${durationColor}15`,
386
- borderColor: `${durationColor}30`,
355
+ width: `${Math.min(100, Math.max(6, (item.duration / 1200) * 100))}%`,
356
+ backgroundColor: durationColor,
387
357
  },
388
- ]}>
389
- <NetworkIcons_1.ClockIcon color={durationColor} size={9}/>
390
- <react_native_1.Text style={[styles_1.default.chipText, { color: durationColor, fontSize: 9.5 }]}>
391
- {item.duration}ms
392
- </react_native_1.Text>
393
- </react_native_1.View>)}
394
- </react_native_1.View>
358
+ ]}/>
359
+ </react_native_1.View>)}
395
360
  </react_native_1.View>
396
361
 
397
-
398
- {typeof item.duration === 'number' && item.duration > 0 && !isFailed && (<react_native_1.View style={{ marginTop: 6, gap: 2 }}>
399
- <react_native_1.View style={{
400
- height: 2.5,
401
- width: '100%',
402
- backgroundColor: AppColors_1.AppColors.grayBorderSecondary,
403
- borderRadius: 1.5,
404
- overflow: 'hidden',
405
- }}>
406
- <react_native_1.View style={{
407
- height: '100%',
408
- width: `${Math.min(100, Math.max(6, (item.duration / 1200) * 100))}%`,
409
- backgroundColor: durationColor,
410
- borderRadius: 1.5,
411
- }}/>
412
- </react_native_1.View>
413
- </react_native_1.View>)}
414
- </react_native_1.View>
415
- <react_native_1.Animated.View pointerEvents="none" style={[
362
+ <react_native_1.Animated.View pointerEvents="none" style={[
416
363
  react_native_1.StyleSheet.absoluteFill,
417
364
  { backgroundColor: methodColor, opacity: shimmerOpacity },
418
365
  ]}/>
419
- </TouchableScale_1.default>);
366
+ </TouchableScale_1.default>
367
+ </react_native_1.View>);
368
+ });
369
+ const styles = react_native_1.StyleSheet.create({
370
+ container: {
371
+ paddingHorizontal: 10,
372
+ paddingVertical: 3.5,
373
+ },
374
+ card: {
375
+ alignSelf: 'stretch',
376
+ borderRadius: 11,
377
+ overflow: 'hidden',
378
+ shadowColor: AppColors_1.AppColors.black,
379
+ shadowOffset: { width: 0, height: 1.5 },
380
+ shadowOpacity: 0.04,
381
+ shadowRadius: 3,
382
+ elevation: 1.5,
383
+ borderWidth: 1,
384
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
385
+ backgroundColor: AppColors_1.AppColors.white,
386
+ },
387
+ cardBody: {
388
+ paddingHorizontal: 12,
389
+ paddingTop: 9,
390
+ paddingBottom: 8,
391
+ },
392
+ cardHeaderRow: {
393
+ flexDirection: 'row',
394
+ alignItems: 'center',
395
+ justifyContent: 'space-between',
396
+ marginBottom: 6,
397
+ minHeight: 22,
398
+ },
399
+ cardHeaderLeft: {
400
+ flexDirection: 'row',
401
+ alignItems: 'center',
402
+ flex: 1,
403
+ marginRight: 6,
404
+ gap: 5.5,
405
+ minWidth: 0,
406
+ flexWrap: 'wrap',
407
+ },
408
+ smallCheckbox: {
409
+ width: 15,
410
+ height: 15,
411
+ borderRadius: 4,
412
+ borderWidth: 1.6,
413
+ borderColor: AppColors_1.AppColors.grayTextWeak,
414
+ alignItems: 'center',
415
+ justifyContent: 'center',
416
+ backgroundColor: AppColors_1.AppColors.white,
417
+ },
418
+ smallCheckboxChecked: {
419
+ backgroundColor: AppColors_1.AppColors.purple,
420
+ borderColor: AppColors_1.AppColors.purple,
421
+ },
422
+ serialNumber: {
423
+ fontFamily: AppFonts_1.AppFonts.interBold,
424
+ color: AppColors_1.AppColors.grayTextWeak,
425
+ fontSize: 10,
426
+ },
427
+ methodBadge: {
428
+ paddingHorizontal: 6.5,
429
+ paddingVertical: 2,
430
+ borderRadius: 5,
431
+ alignItems: 'center',
432
+ justifyContent: 'center',
433
+ },
434
+ methodBadgeText: {
435
+ fontFamily: AppFonts_1.AppFonts.interBold,
436
+ fontSize: 9.5,
437
+ letterSpacing: 0.5,
438
+ color: AppColors_1.AppColors.white,
439
+ },
440
+ chip: {
441
+ paddingHorizontal: 5,
442
+ paddingVertical: 1.5,
443
+ borderRadius: 4,
444
+ borderWidth: 1,
445
+ },
446
+ chipText: {
447
+ fontFamily: AppFonts_1.AppFonts.interBold,
448
+ fontSize: 8.5,
449
+ },
450
+ statusPill: {
451
+ flexDirection: 'row',
452
+ alignItems: 'center',
453
+ gap: 4,
454
+ paddingHorizontal: 7,
455
+ paddingVertical: 2.5,
456
+ borderRadius: 6,
457
+ borderWidth: 1,
458
+ flexShrink: 0,
459
+ },
460
+ statusPillText: {
461
+ fontFamily: AppFonts_1.AppFonts.interBold,
462
+ fontSize: 9.5,
463
+ },
464
+ urlBox: {
465
+ backgroundColor: AppColors_1.AppColors.grayBackground,
466
+ borderRadius: 8,
467
+ borderWidth: 1,
468
+ borderColor: AppColors_1.AppColors.dividerColor,
469
+ paddingHorizontal: 9,
470
+ paddingVertical: 6,
471
+ marginVertical: 4,
472
+ gap: 4,
473
+ },
474
+ urlMainRow: {
475
+ flexDirection: 'row',
476
+ alignItems: 'flex-start',
477
+ justifyContent: 'space-between',
478
+ gap: 6,
479
+ },
480
+ pathText: {
481
+ fontFamily: AppFonts_1.AppFonts.interBold,
482
+ fontSize: 12,
483
+ lineHeight: 16.5,
484
+ color: AppColors_1.AppColors.primaryBlack,
485
+ flex: 1,
486
+ },
487
+ urlBadgeRow: {
488
+ flexDirection: 'row',
489
+ alignItems: 'center',
490
+ gap: 4,
491
+ flexShrink: 0,
492
+ },
493
+ jsonBadge: {
494
+ backgroundColor: `${AppColors_1.AppColors.darkOrange}14`,
495
+ borderColor: `${AppColors_1.AppColors.darkOrange}2E`,
496
+ borderWidth: 1,
497
+ paddingHorizontal: 4,
498
+ paddingVertical: 1,
499
+ borderRadius: 3,
500
+ },
501
+ jsonBadgeText: {
502
+ fontFamily: AppFonts_1.AppFonts.interBold,
503
+ fontSize: 8.5,
504
+ color: AppColors_1.AppColors.darkOrange,
505
+ },
506
+ dupBadge: {
507
+ backgroundColor: `${AppColors_1.AppColors.purple}14`,
508
+ borderColor: `${AppColors_1.AppColors.purple}2E`,
509
+ borderWidth: 1,
510
+ paddingHorizontal: 4,
511
+ paddingVertical: 1,
512
+ borderRadius: 3,
513
+ },
514
+ dupBadgeText: {
515
+ fontFamily: AppFonts_1.AppFonts.interBold,
516
+ fontSize: 8.5,
517
+ color: AppColors_1.AppColors.purple,
518
+ },
519
+ hostRow: {
520
+ flexDirection: 'row',
521
+ alignItems: 'center',
522
+ gap: 5,
523
+ },
524
+ protoBadge: {
525
+ paddingHorizontal: 4,
526
+ paddingVertical: 1,
527
+ borderRadius: 3,
528
+ borderWidth: 1,
529
+ },
530
+ protoBadgeText: {
531
+ fontFamily: AppFonts_1.AppFonts.interBold,
532
+ fontSize: 7.5,
533
+ },
534
+ hostText: {
535
+ fontFamily: AppFonts_1.AppFonts.interMedium,
536
+ fontSize: 10.5,
537
+ color: AppColors_1.AppColors.grayText,
538
+ flex: 1,
539
+ },
540
+ highlight: {
541
+ backgroundColor: AppColors_1.AppColors.yellowHighlight,
542
+ color: AppColors_1.AppColors.primaryBlack,
543
+ borderRadius: 2,
544
+ },
545
+ cardFooterRow: {
546
+ flexDirection: 'row',
547
+ alignItems: 'center',
548
+ justifyContent: 'space-between',
549
+ marginTop: 4,
550
+ gap: 6,
551
+ },
552
+ footerLeft: {
553
+ flexDirection: 'row',
554
+ alignItems: 'center',
555
+ gap: 6,
556
+ flex: 1,
557
+ minWidth: 0,
558
+ },
559
+ footerRight: {
560
+ flexDirection: 'row',
561
+ alignItems: 'center',
562
+ gap: 5,
563
+ flexShrink: 0,
564
+ },
565
+ cardDateRow: {
566
+ flexDirection: 'row',
567
+ alignItems: 'center',
568
+ gap: 3.5,
569
+ },
570
+ cardDateText: {
571
+ fontFamily: AppFonts_1.AppFonts.interRegular,
572
+ fontSize: 9.5,
573
+ color: AppColors_1.AppColors.grayTextWeak,
574
+ },
575
+ callerChip: {
576
+ flexDirection: 'row',
577
+ alignItems: 'center',
578
+ gap: 3,
579
+ backgroundColor: `${AppColors_1.AppColors.sky600}10`,
580
+ borderColor: `${AppColors_1.AppColors.sky600}2B`,
581
+ borderWidth: 1,
582
+ paddingHorizontal: 5,
583
+ paddingVertical: 1,
584
+ borderRadius: 4,
585
+ flexShrink: 1,
586
+ minWidth: 0,
587
+ },
588
+ callerChipText: {
589
+ color: AppColors_1.AppColors.sky600,
590
+ fontSize: 8.5,
591
+ fontFamily: AppFonts_1.AppFonts.interBold,
592
+ },
593
+ metaStatChip: {
594
+ flexDirection: 'row',
595
+ alignItems: 'center',
596
+ gap: 3,
597
+ backgroundColor: `${AppColors_1.AppColors.purple}10`,
598
+ borderColor: `${AppColors_1.AppColors.purple}28`,
599
+ borderWidth: 1,
600
+ paddingHorizontal: 5,
601
+ paddingVertical: 1.5,
602
+ borderRadius: 4,
603
+ },
604
+ metaStatText: {
605
+ fontFamily: AppFonts_1.AppFonts.interBold,
606
+ color: AppColors_1.AppColors.purple,
607
+ fontSize: 9,
608
+ },
609
+ waterfallContainer: {
610
+ height: 2.5,
611
+ width: '100%',
612
+ backgroundColor: AppColors_1.AppColors.grayBorderSecondary,
613
+ borderRadius: 1.5,
614
+ overflow: 'hidden',
615
+ marginTop: 6,
616
+ },
617
+ waterfallBar: {
618
+ height: '100%',
619
+ borderRadius: 1.5,
620
+ },
420
621
  });
421
622
  exports.default = LogCard;