react-native-inapp-inspector 1.1.32 → 1.1.34
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.
- package/dist/commonjs/components/Inspector/BundleTab.js +282 -39
- package/dist/commonjs/components/Inspector/ReduxDetail.js +574 -75
- package/dist/commonjs/components/Inspector/ReduxTab.js +59 -180
- package/dist/commonjs/components/NetworkIcons.d.ts +2 -0
- package/dist/commonjs/components/NetworkIcons.js +14 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +5 -2
- package/dist/commonjs/customHooks/bundleAnalyzer.js +229 -216
- package/dist/commonjs/customHooks/consoleLogger.js +7 -2
- package/dist/commonjs/helpers/index.js +19 -2
- package/dist/esm/components/Inspector/BundleTab.js +283 -40
- package/dist/esm/components/Inspector/ReduxDetail.js +575 -76
- package/dist/esm/components/Inspector/ReduxTab.js +60 -181
- package/dist/esm/components/NetworkIcons.d.ts +2 -0
- package/dist/esm/components/NetworkIcons.js +11 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +5 -2
- package/dist/esm/customHooks/bundleAnalyzer.js +227 -215
- package/dist/esm/customHooks/consoleLogger.js +7 -2
- package/dist/esm/helpers/index.js +19 -2
- package/package.json +1 -1
|
@@ -58,7 +58,7 @@ const getOriginBadge = (originType) => {
|
|
|
58
58
|
case 'saga':
|
|
59
59
|
return {
|
|
60
60
|
label: 'SAGA',
|
|
61
|
-
|
|
61
|
+
renderIcon: (color, size = 9) => (<NetworkIcons_1.BoltIcon color={color} size={size}/>),
|
|
62
62
|
bg: AppColors_1.AppColors.purple100,
|
|
63
63
|
text: AppColors_1.AppColors.brandPurple,
|
|
64
64
|
border: AppColors_1.AppColors.purple200,
|
|
@@ -66,7 +66,7 @@ const getOriginBadge = (originType) => {
|
|
|
66
66
|
case 'thunk':
|
|
67
67
|
return {
|
|
68
68
|
label: 'THUNK',
|
|
69
|
-
|
|
69
|
+
renderIcon: (color, size = 9) => (<NetworkIcons_1.AtomIcon color={color} size={size}/>),
|
|
70
70
|
bg: AppColors_1.AppColors.amber100,
|
|
71
71
|
text: AppColors_1.AppColors.amber800Warm,
|
|
72
72
|
border: AppColors_1.AppColors.amber200,
|
|
@@ -74,7 +74,7 @@ const getOriginBadge = (originType) => {
|
|
|
74
74
|
case 'ui':
|
|
75
75
|
return {
|
|
76
76
|
label: 'UI',
|
|
77
|
-
|
|
77
|
+
renderIcon: (color, size = 9) => (<NetworkIcons_1.ScreenIcon color={color} size={size}/>),
|
|
78
78
|
bg: AppColors_1.AppColors.sky100,
|
|
79
79
|
text: AppColors_1.AppColors.sky600,
|
|
80
80
|
border: AppColors_1.AppColors.sky400,
|
|
@@ -82,7 +82,7 @@ const getOriginBadge = (originType) => {
|
|
|
82
82
|
case 'listener':
|
|
83
83
|
return {
|
|
84
84
|
label: 'LISTENER',
|
|
85
|
-
|
|
85
|
+
renderIcon: (color, size = 9) => (<NetworkIcons_1.ListenerIcon color={color} size={size}/>),
|
|
86
86
|
bg: AppColors_1.AppColors.teal100,
|
|
87
87
|
text: AppColors_1.AppColors.teal700,
|
|
88
88
|
border: AppColors_1.AppColors.teal400,
|
|
@@ -90,7 +90,7 @@ const getOriginBadge = (originType) => {
|
|
|
90
90
|
default:
|
|
91
91
|
return {
|
|
92
92
|
label: 'DIRECT',
|
|
93
|
-
|
|
93
|
+
renderIcon: (color, size = 9) => (<NetworkIcons_1.BoltIcon color={color} size={size}/>),
|
|
94
94
|
bg: AppColors_1.AppColors.slate100,
|
|
95
95
|
text: AppColors_1.AppColors.slate700,
|
|
96
96
|
border: AppColors_1.AppColors.slate200,
|
|
@@ -99,11 +99,12 @@ const getOriginBadge = (originType) => {
|
|
|
99
99
|
};
|
|
100
100
|
const ReduxDetail = react_1.default.memo(() => {
|
|
101
101
|
const { t } = (0, i18n_1.useTranslation)();
|
|
102
|
-
const { reduxState, reduxLastActionMap, selectedReduxSlice, selectedReduxAction, setSelectedReduxSlice,
|
|
102
|
+
const { reduxState, reduxLastActionMap, selectedReduxSlice, selectedReduxAction, setSelectedReduxSlice, } = (0, InspectorContext_1.useInspector)();
|
|
103
103
|
// Search filter within details
|
|
104
104
|
const [detailSearch, setDetailSearch] = (0, react_1.useState)('');
|
|
105
|
-
// Sub-tabs for Slice
|
|
105
|
+
// Sub-tabs for Slice & Action
|
|
106
106
|
const [sliceTab, setSliceTab] = (0, react_1.useState)('live');
|
|
107
|
+
const [actionTab, setActionTab] = (0, react_1.useState)('payload');
|
|
107
108
|
const [viewMode, setViewMode] = (0, react_1.useState)('pretty');
|
|
108
109
|
// Selected Action inside Timeline
|
|
109
110
|
const [expandedActionId, setExpandedActionId] = (0, react_1.useState)(null);
|
|
@@ -124,6 +125,18 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
124
125
|
return action.affectedSlices.includes(selectedReduxSlice);
|
|
125
126
|
});
|
|
126
127
|
}, [allActionHistory, selectedReduxSlice]);
|
|
128
|
+
// Filtered slice actions by search query in timeline tab
|
|
129
|
+
const filteredTimelineActions = (0, react_1.useMemo)(() => {
|
|
130
|
+
if (!detailSearch.trim())
|
|
131
|
+
return sliceActions;
|
|
132
|
+
const q = detailSearch.toLowerCase();
|
|
133
|
+
return sliceActions.filter(action => {
|
|
134
|
+
return (action.type.toLowerCase().includes(q) ||
|
|
135
|
+
(action.callerFile && action.callerFile.toLowerCase().includes(q)) ||
|
|
136
|
+
(action.payload &&
|
|
137
|
+
JSON.stringify(action.payload).toLowerCase().includes(q)));
|
|
138
|
+
});
|
|
139
|
+
}, [sliceActions, detailSearch]);
|
|
127
140
|
(0, react_1.useEffect)(() => {
|
|
128
141
|
if (!selectedReduxSlice)
|
|
129
142
|
return;
|
|
@@ -220,22 +233,24 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
220
233
|
const sliceTabs = [
|
|
221
234
|
{
|
|
222
235
|
key: 'live',
|
|
223
|
-
label: t('redux.liveState'),
|
|
236
|
+
label: t('redux.liveState', 'Live State'),
|
|
224
237
|
icon: (isActive) => (<NetworkIcons_1.LiveStateIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
225
238
|
},
|
|
226
239
|
{
|
|
227
240
|
key: 'timeline',
|
|
228
|
-
label: `${t('redux.timeline')} (${sliceActions.length})`,
|
|
241
|
+
label: `${t('redux.timeline', 'Timeline')} (${sliceActions.length})`,
|
|
229
242
|
icon: (isActive) => (<NetworkIcons_1.TimelineIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
230
243
|
},
|
|
231
244
|
{
|
|
232
245
|
key: 'persisted',
|
|
233
|
-
label: isPersisted
|
|
246
|
+
label: isPersisted
|
|
247
|
+
? t('redux.persisted', 'Persisted')
|
|
248
|
+
: t('redux.storage', 'Storage'),
|
|
234
249
|
icon: (isActive) => (<NetworkIcons_1.StorageIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
235
250
|
},
|
|
236
251
|
{
|
|
237
252
|
key: 'metadata',
|
|
238
|
-
label: t('redux.metadata'),
|
|
253
|
+
label: t('redux.metadata', 'Metadata'),
|
|
239
254
|
icon: (isActive) => (<NetworkIcons_1.MetadataIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
240
255
|
},
|
|
241
256
|
];
|
|
@@ -243,18 +258,34 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
243
258
|
{/* Info Header Bar */}
|
|
244
259
|
<react_native_1.View style={reduxDetailStyles.infoBar}>
|
|
245
260
|
<react_native_1.View style={reduxDetailStyles.infoTopRow}>
|
|
246
|
-
<react_native_1.View style={{
|
|
247
|
-
|
|
248
|
-
|
|
261
|
+
<react_native_1.View style={{
|
|
262
|
+
flexDirection: 'row',
|
|
263
|
+
alignItems: 'center',
|
|
264
|
+
gap: 6,
|
|
265
|
+
flexWrap: 'wrap',
|
|
266
|
+
flex: 1,
|
|
267
|
+
minWidth: 0,
|
|
268
|
+
}}>
|
|
269
|
+
<react_native_1.View style={[
|
|
270
|
+
reduxDetailStyles.methodBadge,
|
|
271
|
+
{ backgroundColor: AppColors_1.AppColors.indigo600Alt },
|
|
272
|
+
]}>
|
|
273
|
+
<react_native_1.Text style={reduxDetailStyles.methodBadgeText}>
|
|
274
|
+
{t('redux.slice', 'SLICE')}
|
|
275
|
+
</react_native_1.Text>
|
|
249
276
|
</react_native_1.View>
|
|
250
|
-
<react_native_1.Text style={reduxDetailStyles.sliceNameText}>
|
|
277
|
+
<react_native_1.Text style={reduxDetailStyles.sliceNameText} numberOfLines={1}>
|
|
251
278
|
{selectedReduxSlice}
|
|
252
279
|
</react_native_1.Text>
|
|
253
280
|
{isPersisted ? (<react_native_1.View style={reduxDetailStyles.persistedChip}>
|
|
254
281
|
<NetworkIcons_1.StorageIcon color={AppColors_1.AppColors.emerald700} size={10}/>
|
|
255
|
-
<react_native_1.Text style={reduxDetailStyles.persistedChipText}>
|
|
282
|
+
<react_native_1.Text style={reduxDetailStyles.persistedChipText}>
|
|
283
|
+
{t('redux.persisted', 'Persisted').toUpperCase()}
|
|
284
|
+
</react_native_1.Text>
|
|
256
285
|
</react_native_1.View>) : (<react_native_1.View style={reduxDetailStyles.inMemoryChip}>
|
|
257
|
-
<react_native_1.Text style={reduxDetailStyles.inMemoryChipText}>
|
|
286
|
+
<react_native_1.Text style={reduxDetailStyles.inMemoryChipText}>
|
|
287
|
+
{t('redux.inMemory', 'In-Memory').toUpperCase()}
|
|
288
|
+
</react_native_1.Text>
|
|
258
289
|
</react_native_1.View>)}
|
|
259
290
|
{lastAction?.timestamp && (<react_native_1.View style={reduxDetailStyles.timePill}>
|
|
260
291
|
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.violet600} size={10}/>
|
|
@@ -265,29 +296,93 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
265
296
|
</react_native_1.View>
|
|
266
297
|
|
|
267
298
|
{/* Copy Button */}
|
|
268
|
-
<CopyButton_1.default value={() => (sliceTab === 'live' ? sliceData : persistedData)} label={t('redux.sliceJson')}/>
|
|
299
|
+
<CopyButton_1.default value={() => (sliceTab === 'live' ? sliceData : persistedData)} label={t('redux.sliceJson', 'Slice JSON')}/>
|
|
269
300
|
</react_native_1.View>
|
|
270
301
|
|
|
271
302
|
{/* Sub Stats Row */}
|
|
272
303
|
<react_native_1.View style={reduxDetailStyles.subStatsRow}>
|
|
273
|
-
<react_native_1.View style={[
|
|
304
|
+
<react_native_1.View style={[
|
|
305
|
+
reduxDetailStyles.statPill,
|
|
306
|
+
{
|
|
307
|
+
backgroundColor: AppColors_1.AppColors.indigo50,
|
|
308
|
+
borderColor: AppColors_1.AppColors.indigo400,
|
|
309
|
+
},
|
|
310
|
+
]}>
|
|
274
311
|
<NetworkIcons_1.LayersIcon color={AppColors_1.AppColors.indigo600Alt} size={11}/>
|
|
275
|
-
<react_native_1.Text style={[
|
|
276
|
-
|
|
312
|
+
<react_native_1.Text style={[
|
|
313
|
+
reduxDetailStyles.statLabel,
|
|
314
|
+
{ color: AppColors_1.AppColors.indigo600Alt },
|
|
315
|
+
]}>
|
|
316
|
+
{t('redux.keys', 'Keys')}:
|
|
317
|
+
</react_native_1.Text>
|
|
318
|
+
<react_native_1.Text style={[
|
|
319
|
+
reduxDetailStyles.statValue,
|
|
320
|
+
{ color: AppColors_1.AppColors.indigo600Alt },
|
|
321
|
+
]}>
|
|
322
|
+
{fieldsCount}
|
|
323
|
+
</react_native_1.Text>
|
|
277
324
|
</react_native_1.View>
|
|
278
|
-
<react_native_1.View style={[
|
|
279
|
-
|
|
280
|
-
|
|
325
|
+
<react_native_1.View style={[
|
|
326
|
+
reduxDetailStyles.statPill,
|
|
327
|
+
{
|
|
328
|
+
backgroundColor: AppColors_1.AppColors.sky100,
|
|
329
|
+
borderColor: AppColors_1.AppColors.sky400,
|
|
330
|
+
},
|
|
331
|
+
]}>
|
|
332
|
+
<react_native_1.Text style={[
|
|
333
|
+
reduxDetailStyles.statLabel,
|
|
334
|
+
{ color: AppColors_1.AppColors.sky600 },
|
|
335
|
+
]}>
|
|
336
|
+
{t('redux.size', 'Size')}:
|
|
337
|
+
</react_native_1.Text>
|
|
338
|
+
<react_native_1.Text style={[
|
|
339
|
+
reduxDetailStyles.statValue,
|
|
340
|
+
{ color: AppColors_1.AppColors.sky600 },
|
|
341
|
+
]}>
|
|
342
|
+
{(0, helpers_1.getSize)(sliceData)}
|
|
343
|
+
</react_native_1.Text>
|
|
281
344
|
</react_native_1.View>
|
|
282
|
-
<react_native_1.View style={[
|
|
345
|
+
<react_native_1.View style={[
|
|
346
|
+
reduxDetailStyles.statPill,
|
|
347
|
+
{
|
|
348
|
+
backgroundColor: AppColors_1.AppColors.purple100,
|
|
349
|
+
borderColor: AppColors_1.AppColors.purple200,
|
|
350
|
+
},
|
|
351
|
+
]}>
|
|
283
352
|
<NetworkIcons_1.TimelineIcon color={AppColors_1.AppColors.violet600} size={11}/>
|
|
284
|
-
<react_native_1.Text style={[
|
|
285
|
-
|
|
353
|
+
<react_native_1.Text style={[
|
|
354
|
+
reduxDetailStyles.statLabel,
|
|
355
|
+
{ color: AppColors_1.AppColors.brandPurple },
|
|
356
|
+
]}>
|
|
357
|
+
{t('redux.timeline', 'Timeline')}:
|
|
358
|
+
</react_native_1.Text>
|
|
359
|
+
<react_native_1.Text style={[
|
|
360
|
+
reduxDetailStyles.statValue,
|
|
361
|
+
{ color: AppColors_1.AppColors.brandPurple },
|
|
362
|
+
]}>
|
|
363
|
+
{sliceActions.length}
|
|
364
|
+
</react_native_1.Text>
|
|
286
365
|
</react_native_1.View>
|
|
287
|
-
{lastAction && (<react_native_1.View style={[
|
|
366
|
+
{lastAction && (<react_native_1.View style={[
|
|
367
|
+
reduxDetailStyles.statPill,
|
|
368
|
+
{
|
|
369
|
+
backgroundColor: AppColors_1.AppColors.amber100,
|
|
370
|
+
borderColor: AppColors_1.AppColors.amber200,
|
|
371
|
+
flexShrink: 1,
|
|
372
|
+
maxWidth: 160,
|
|
373
|
+
},
|
|
374
|
+
]}>
|
|
288
375
|
<NetworkIcons_1.BoltIcon color={AppColors_1.AppColors.amber800Warm} size={11}/>
|
|
289
|
-
<react_native_1.Text style={[
|
|
290
|
-
|
|
376
|
+
<react_native_1.Text style={[
|
|
377
|
+
reduxDetailStyles.statLabel,
|
|
378
|
+
{ color: AppColors_1.AppColors.amber800Warm },
|
|
379
|
+
]}>
|
|
380
|
+
{t('redux.last', 'Last')}:
|
|
381
|
+
</react_native_1.Text>
|
|
382
|
+
<react_native_1.Text style={[
|
|
383
|
+
reduxDetailStyles.statValue,
|
|
384
|
+
{ color: AppColors_1.AppColors.amber800Warm, flexShrink: 1 },
|
|
385
|
+
]} numberOfLines={1}>
|
|
291
386
|
{lastAction.type}
|
|
292
387
|
</react_native_1.Text>
|
|
293
388
|
</react_native_1.View>)}
|
|
@@ -297,10 +392,12 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
297
392
|
<SegmentedTabs_1.default tabs={sliceTabs} activeKey={sliceTab} onChange={key => setSliceTab(key)} style={{ marginTop: 10 }}/>
|
|
298
393
|
</react_native_1.View>
|
|
299
394
|
|
|
300
|
-
{/* Search Bar within slice */}
|
|
395
|
+
{/* Search Bar within slice (for Live, Timeline, Persisted) */}
|
|
301
396
|
{sliceTab !== 'metadata' && (<react_native_1.View style={reduxDetailStyles.searchContainer}>
|
|
302
397
|
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
303
|
-
<react_native_1.TextInput placeholder=
|
|
398
|
+
<react_native_1.TextInput placeholder={sliceTab === 'timeline'
|
|
399
|
+
? 'Search action type, file, or payload...'
|
|
400
|
+
: 'Search keys or values...'} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={detailSearch} onChangeText={setDetailSearch} style={reduxDetailStyles.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
304
401
|
{detailSearch.length > 0 && (<react_native_1.Pressable onPress={() => setDetailSearch('')} hitSlop={10}>
|
|
305
402
|
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
306
403
|
</react_native_1.Pressable>)}
|
|
@@ -308,11 +405,14 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
308
405
|
|
|
309
406
|
{/* Content Body */}
|
|
310
407
|
{sliceTab === 'timeline' ? (<react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 12, paddingBottom: 40 }} keyboardShouldPersistTaps="handled">
|
|
311
|
-
{
|
|
408
|
+
{filteredTimelineActions.length === 0 ? (<react_native_1.View style={reduxDetailStyles.emptyBox}>
|
|
409
|
+
<NetworkIcons_1.TimelineIcon color={AppColors_1.AppColors.grayTextWeak} size={28}/>
|
|
312
410
|
<react_native_1.Text style={reduxDetailStyles.emptyBoxText}>
|
|
313
|
-
|
|
411
|
+
{detailSearch.trim()
|
|
412
|
+
? 'No actions matching your search query.'
|
|
413
|
+
: 'No dispatched actions recorded for this slice yet.'}
|
|
314
414
|
</react_native_1.Text>
|
|
315
|
-
</react_native_1.View>) : (
|
|
415
|
+
</react_native_1.View>) : (filteredTimelineActions.map((action, aIdx) => {
|
|
316
416
|
const isExpanded = expandedActionId === action.id;
|
|
317
417
|
const originMeta = getOriginBadge(action.originType);
|
|
318
418
|
const callerBasename = action.callerFile
|
|
@@ -321,7 +421,14 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
321
421
|
return (<AnimatedEntrance_1.default key={action.id} index={aIdx} distance={6}>
|
|
322
422
|
<TouchableScale_1.default onPress={() => setExpandedActionId(isExpanded ? null : action.id)} style={reduxDetailStyles.timelineCard}>
|
|
323
423
|
<react_native_1.View style={reduxDetailStyles.timelineHeader}>
|
|
324
|
-
<react_native_1.View style={{
|
|
424
|
+
<react_native_1.View style={{
|
|
425
|
+
flexDirection: 'row',
|
|
426
|
+
alignItems: 'center',
|
|
427
|
+
gap: 6,
|
|
428
|
+
flex: 1,
|
|
429
|
+
minWidth: 0,
|
|
430
|
+
flexWrap: 'wrap',
|
|
431
|
+
}}>
|
|
325
432
|
<react_native_1.View style={reduxDetailStyles.actionBadge}>
|
|
326
433
|
<react_native_1.Text style={reduxDetailStyles.actionBadgeText}>
|
|
327
434
|
#{action.id}
|
|
@@ -333,13 +440,13 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
333
440
|
alignItems: 'center',
|
|
334
441
|
gap: 3,
|
|
335
442
|
backgroundColor: originMeta.bg,
|
|
336
|
-
paddingHorizontal:
|
|
443
|
+
paddingHorizontal: 5,
|
|
337
444
|
paddingVertical: 2,
|
|
338
445
|
borderRadius: 4,
|
|
339
446
|
borderWidth: 1,
|
|
340
447
|
borderColor: originMeta.border,
|
|
341
448
|
}}>
|
|
342
|
-
|
|
449
|
+
{originMeta.renderIcon(originMeta.text, 8.5)}
|
|
343
450
|
<react_native_1.Text style={{
|
|
344
451
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
345
452
|
fontSize: 8.5,
|
|
@@ -366,18 +473,29 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
366
473
|
flexDirection: 'row',
|
|
367
474
|
alignItems: 'center',
|
|
368
475
|
justifyContent: 'space-between',
|
|
369
|
-
marginTop:
|
|
476
|
+
marginTop: 6,
|
|
370
477
|
marginBottom: 2,
|
|
371
|
-
paddingHorizontal:
|
|
372
|
-
paddingVertical:
|
|
478
|
+
paddingHorizontal: 8,
|
|
479
|
+
paddingVertical: 4,
|
|
373
480
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
374
|
-
borderRadius:
|
|
481
|
+
borderRadius: 6,
|
|
375
482
|
borderWidth: 1,
|
|
376
483
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
377
484
|
}}>
|
|
378
|
-
<react_native_1.View style={{
|
|
379
|
-
|
|
380
|
-
|
|
485
|
+
<react_native_1.View style={{
|
|
486
|
+
flexDirection: 'row',
|
|
487
|
+
alignItems: 'center',
|
|
488
|
+
gap: 5,
|
|
489
|
+
flex: 1,
|
|
490
|
+
minWidth: 0,
|
|
491
|
+
}}>
|
|
492
|
+
<NetworkIcons_1.DocIcon color={AppColors_1.AppColors.sky600} size={10}/>
|
|
493
|
+
<react_native_1.Text style={{
|
|
494
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
495
|
+
fontSize: 9.5,
|
|
496
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
497
|
+
}}>
|
|
498
|
+
{t('redux.triggeredFrom', 'Triggered From:')}
|
|
381
499
|
</react_native_1.Text>
|
|
382
500
|
<react_native_1.Text style={{
|
|
383
501
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
@@ -394,12 +512,16 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
394
512
|
gap: 3,
|
|
395
513
|
backgroundColor: AppColors_1.AppColors.sky100,
|
|
396
514
|
paddingHorizontal: 5,
|
|
397
|
-
paddingVertical:
|
|
398
|
-
borderRadius:
|
|
515
|
+
paddingVertical: 2,
|
|
516
|
+
borderRadius: 4,
|
|
399
517
|
}}>
|
|
400
518
|
<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600} size={9}/>
|
|
401
|
-
<react_native_1.Text style={{
|
|
402
|
-
|
|
519
|
+
<react_native_1.Text style={{
|
|
520
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
521
|
+
fontSize: 8.5,
|
|
522
|
+
color: AppColors_1.AppColors.sky600,
|
|
523
|
+
}}>
|
|
524
|
+
{t('redux.openInEditor', 'Open in Editor')}
|
|
403
525
|
</react_native_1.Text>
|
|
404
526
|
</react_native_1.Pressable>
|
|
405
527
|
</react_native_1.View>)}
|
|
@@ -407,9 +529,9 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
407
529
|
{/* Expanded Payload, Diff Viewer & Call Stack */}
|
|
408
530
|
{isExpanded ? (<react_native_1.View style={reduxDetailStyles.expandedContent}>
|
|
409
531
|
{/* Call Stack Trace Box */}
|
|
410
|
-
{action.stack ? (<react_native_1.View style={{ marginBottom:
|
|
532
|
+
{action.stack ? (<react_native_1.View style={{ marginBottom: 12 }}>
|
|
411
533
|
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
412
|
-
{t('redux.callStack')}:
|
|
534
|
+
{t('redux.callStack', 'Call Stack Trace')}:
|
|
413
535
|
</react_native_1.Text>
|
|
414
536
|
<react_native_1.View style={{
|
|
415
537
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
@@ -422,37 +544,48 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
422
544
|
{action.stack
|
|
423
545
|
.split('\n')
|
|
424
546
|
.map(l => l.trim())
|
|
425
|
-
.filter(l => l.length > 0 &&
|
|
547
|
+
.filter(l => l.length > 0 &&
|
|
548
|
+
!l.includes('reduxLogger') &&
|
|
549
|
+
!l.includes('inspectorReduxMiddleware'))
|
|
426
550
|
.slice(0, 8)
|
|
427
551
|
.map((frameLine, fIdx) => {
|
|
428
552
|
const parsed = (0, helpers_1.parseStackLine)(frameLine, fIdx === 0);
|
|
429
553
|
const isApp = parsed.frameType === 'app';
|
|
430
554
|
return (<react_native_1.Pressable key={fIdx} onPress={() => {
|
|
431
555
|
if (parsed.fileName !== 'Unknown') {
|
|
432
|
-
(0, helpers_1.openInVSCode)(parsed.fullPath ||
|
|
556
|
+
(0, helpers_1.openInVSCode)(parsed.fullPath ||
|
|
557
|
+
parsed.fileName, parsed.lineNumber, parsed.columnNumber);
|
|
433
558
|
}
|
|
434
559
|
}} style={{
|
|
435
560
|
flexDirection: 'row',
|
|
436
561
|
alignItems: 'center',
|
|
437
562
|
justifyContent: 'space-between',
|
|
438
|
-
paddingVertical:
|
|
563
|
+
paddingVertical: 3,
|
|
439
564
|
borderBottomWidth: fIdx < 7 ? 0.5 : 0,
|
|
440
565
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
441
566
|
}}>
|
|
442
567
|
<react_native_1.View style={{ flex: 1, minWidth: 0 }}>
|
|
443
568
|
<react_native_1.Text style={{
|
|
444
|
-
fontFamily: isApp
|
|
569
|
+
fontFamily: isApp
|
|
570
|
+
? AppFonts_1.AppFonts.interBold
|
|
571
|
+
: AppFonts_1.AppFonts.interRegular,
|
|
445
572
|
fontSize: 9.5,
|
|
446
|
-
color: isApp
|
|
573
|
+
color: isApp
|
|
574
|
+
? AppColors_1.AppColors.primaryBlack
|
|
575
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
447
576
|
}} numberOfLines={1}>
|
|
448
577
|
{parsed.functionName || 'anonymous'}
|
|
449
578
|
</react_native_1.Text>
|
|
450
579
|
<react_native_1.Text style={{
|
|
451
580
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
452
581
|
fontSize: 8.5,
|
|
453
|
-
color: isApp
|
|
582
|
+
color: isApp
|
|
583
|
+
? AppColors_1.AppColors.sky600
|
|
584
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
454
585
|
}} numberOfLines={1}>
|
|
455
|
-
{parsed.fileName}:
|
|
586
|
+
{parsed.fileName}:
|
|
587
|
+
{parsed.lineNumber || 1}:
|
|
588
|
+
{parsed.columnNumber || 1}
|
|
456
589
|
</react_native_1.Text>
|
|
457
590
|
</react_native_1.View>
|
|
458
591
|
{isApp && (<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600} size={10}/>)}
|
|
@@ -461,20 +594,20 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
461
594
|
</react_native_1.View>
|
|
462
595
|
</react_native_1.View>) : null}
|
|
463
596
|
|
|
464
|
-
{action.payload !== undefined && (<react_native_1.View style={{ marginBottom:
|
|
597
|
+
{action.payload !== undefined && (<react_native_1.View style={{ marginBottom: 12 }}>
|
|
465
598
|
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
466
|
-
{t('redux.actionPayload')}
|
|
599
|
+
{t('redux.actionPayload', 'Action Payload:')}
|
|
467
600
|
</react_native_1.Text>
|
|
468
|
-
<JsonViewer_1.default data={action.payload} search={detailSearch} forceOpen={true}/>
|
|
601
|
+
<JsonViewer_1.default data={action.payload} search={detailSearch} forceOpen={true} wrap={true}/>
|
|
469
602
|
</react_native_1.View>)}
|
|
470
603
|
|
|
471
604
|
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
472
|
-
{t('redux.stateChangesDiff')}
|
|
605
|
+
{t('redux.stateChangesDiff', 'State Changes (Diff):')}
|
|
473
606
|
</react_native_1.Text>
|
|
474
607
|
<DiffViewer_1.default oldData={action.prevState?.[selectedReduxSlice] || {}} newData={action.nextState?.[selectedReduxSlice] || {}} forceOpen={true}/>
|
|
475
608
|
</react_native_1.View>) : (<react_native_1.View style={reduxDetailStyles.collapsedPrompt}>
|
|
476
609
|
<react_native_1.Text style={reduxDetailStyles.collapsedPromptText}>
|
|
477
|
-
{t('redux.tapToInspectAction')}
|
|
610
|
+
{t('redux.tapToInspectAction', 'Tap to inspect action payload & diff changes')}
|
|
478
611
|
</react_native_1.Text>
|
|
479
612
|
<NetworkIcons_1.ForwardChevronIcon color={AppColors_1.AppColors.grayTextWeak} size={12}/>
|
|
480
613
|
</react_native_1.View>)}
|
|
@@ -489,7 +622,9 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
489
622
|
{ label: 'In-Memory State Size', value: (0, helpers_1.getSize)(sliceData) },
|
|
490
623
|
{
|
|
491
624
|
label: 'Persistence Status',
|
|
492
|
-
value: isPersisted
|
|
625
|
+
value: isPersisted
|
|
626
|
+
? `Persisted (${(0, helpers_1.getSize)(persistedData)})`
|
|
627
|
+
: 'Not Persisted (In-Memory)',
|
|
493
628
|
},
|
|
494
629
|
{
|
|
495
630
|
label: 'Dispatched Actions History',
|
|
@@ -520,12 +655,330 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
520
655
|
</react_native_1.Text>
|
|
521
656
|
</react_native_1.TouchableOpacity>)}
|
|
522
657
|
</react_native_1.View>
|
|
523
|
-
</react_native_1.ScrollView>) : (<react_native_1.
|
|
524
|
-
|
|
525
|
-
|
|
658
|
+
</react_native_1.ScrollView>) : sliceTab === 'persisted' ? (<react_native_1.View style={{ flex: 1, padding: 10 }}>
|
|
659
|
+
{isPersisted ? (<react_native_1.View style={{ flex: 1 }}>
|
|
660
|
+
<react_native_1.View style={reduxDetailStyles.persistedInfoCard}>
|
|
661
|
+
<react_native_1.View style={{
|
|
662
|
+
flexDirection: 'row',
|
|
663
|
+
alignItems: 'center',
|
|
664
|
+
justifyContent: 'space-between',
|
|
665
|
+
}}>
|
|
666
|
+
<react_native_1.View style={{
|
|
667
|
+
flexDirection: 'row',
|
|
668
|
+
alignItems: 'center',
|
|
669
|
+
gap: 6,
|
|
670
|
+
}}>
|
|
671
|
+
<NetworkIcons_1.StorageIcon color={AppColors_1.AppColors.emerald700} size={14}/>
|
|
672
|
+
<react_native_1.Text style={reduxDetailStyles.persistedInfoTitle}>
|
|
673
|
+
Stored in persistent storage ({(0, helpers_1.getSize)(persistedData)})
|
|
674
|
+
</react_native_1.Text>
|
|
675
|
+
</react_native_1.View>
|
|
676
|
+
<react_native_1.TouchableOpacity style={reduxDetailStyles.clearPersistMiniBtn} onPress={handleClearPersistence}>
|
|
677
|
+
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={12}/>
|
|
678
|
+
<react_native_1.Text style={reduxDetailStyles.clearPersistMiniText}>
|
|
679
|
+
Clear
|
|
680
|
+
</react_native_1.Text>
|
|
681
|
+
</react_native_1.TouchableOpacity>
|
|
682
|
+
</react_native_1.View>
|
|
683
|
+
</react_native_1.View>
|
|
684
|
+
<react_native_1.View style={{ flex: 1, marginTop: 8 }}>
|
|
685
|
+
<JsonViewer_1.default data={persistedData} search={detailSearch} forceOpen={detailSearch.length > 0 ? true : undefined} mode={viewMode} onModeChange={setViewMode} fullHeight={true} wrap={true}/>
|
|
686
|
+
</react_native_1.View>
|
|
687
|
+
</react_native_1.View>) : (<react_native_1.View style={reduxDetailStyles.emptyBox}>
|
|
688
|
+
<NetworkIcons_1.StorageIcon color={AppColors_1.AppColors.grayTextWeak} size={32}/>
|
|
689
|
+
<react_native_1.Text style={reduxDetailStyles.emptyBoxTitle}>
|
|
690
|
+
Not Persisted in Storage
|
|
691
|
+
</react_native_1.Text>
|
|
692
|
+
<react_native_1.Text style={reduxDetailStyles.emptyBoxText}>
|
|
693
|
+
This slice is not stored in AsyncStorage or redux-persist.
|
|
694
|
+
State exists purely in active JavaScript memory.
|
|
695
|
+
</react_native_1.Text>
|
|
696
|
+
</react_native_1.View>)}
|
|
697
|
+
</react_native_1.View>) : (
|
|
698
|
+
/* Live State JsonViewer: Direct flex: 1 with fullHeight to prevent nested scroll conflicts */
|
|
699
|
+
<react_native_1.View style={{ flex: 1, padding: 10 }}>
|
|
700
|
+
<JsonViewer_1.default data={sliceData} search={detailSearch} forceOpen={detailSearch.length > 0 ? true : undefined} mode={viewMode} onModeChange={setViewMode} fullHeight={true} wrap={true}/>
|
|
701
|
+
</react_native_1.View>)}
|
|
702
|
+
</react_native_1.View>);
|
|
703
|
+
}
|
|
704
|
+
// ══════════════════════════════════════════════════════════════════════════
|
|
705
|
+
// ── 2. RENDER ACTION DETAIL VIEW (when an action is selected directly) ────
|
|
706
|
+
// ══════════════════════════════════════════════════════════════════════════
|
|
707
|
+
if (selectedReduxAction != null) {
|
|
708
|
+
const originMeta = getOriginBadge(selectedReduxAction.originType);
|
|
709
|
+
const callerBasename = selectedReduxAction.callerFile
|
|
710
|
+
? selectedReduxAction.callerFile.split('/').pop()
|
|
711
|
+
: null;
|
|
712
|
+
const actionTabs = [
|
|
713
|
+
{
|
|
714
|
+
key: 'payload',
|
|
715
|
+
label: t('redux.payload', 'Payload'),
|
|
716
|
+
icon: (isActive) => (<NetworkIcons_1.CodeBracketsIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
key: 'diff',
|
|
720
|
+
label: t('redux.diff', 'State Diff'),
|
|
721
|
+
icon: (isActive) => (<NetworkIcons_1.TimelineIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
key: 'stack',
|
|
725
|
+
label: t('redux.callStack', 'Call Stack'),
|
|
726
|
+
icon: (isActive) => (<NetworkIcons_1.DocIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
key: 'raw',
|
|
730
|
+
label: 'Raw Action',
|
|
731
|
+
icon: (isActive) => (<NetworkIcons_1.LiveStateIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
732
|
+
},
|
|
733
|
+
];
|
|
734
|
+
return (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
735
|
+
{/* Top Info Bar */}
|
|
736
|
+
<react_native_1.View style={reduxDetailStyles.infoBar}>
|
|
737
|
+
<react_native_1.View style={reduxDetailStyles.infoTopRow}>
|
|
738
|
+
<react_native_1.View style={{
|
|
739
|
+
flexDirection: 'row',
|
|
740
|
+
alignItems: 'center',
|
|
741
|
+
gap: 6,
|
|
742
|
+
flexWrap: 'wrap',
|
|
743
|
+
flex: 1,
|
|
744
|
+
minWidth: 0,
|
|
745
|
+
}}>
|
|
746
|
+
<react_native_1.View style={reduxDetailStyles.actionBadge}>
|
|
747
|
+
<react_native_1.Text style={reduxDetailStyles.actionBadgeText}>
|
|
748
|
+
#{selectedReduxAction.id}
|
|
749
|
+
</react_native_1.Text>
|
|
750
|
+
</react_native_1.View>
|
|
751
|
+
{/* Origin Badge */}
|
|
752
|
+
<react_native_1.View style={{
|
|
753
|
+
flexDirection: 'row',
|
|
754
|
+
alignItems: 'center',
|
|
755
|
+
gap: 3,
|
|
756
|
+
backgroundColor: originMeta.bg,
|
|
757
|
+
paddingHorizontal: 5,
|
|
758
|
+
paddingVertical: 2,
|
|
759
|
+
borderRadius: 4,
|
|
760
|
+
borderWidth: 1,
|
|
761
|
+
borderColor: originMeta.border,
|
|
762
|
+
}}>
|
|
763
|
+
{originMeta.renderIcon(originMeta.text, 8.5)}
|
|
764
|
+
<react_native_1.Text style={{
|
|
765
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
766
|
+
fontSize: 8.5,
|
|
767
|
+
color: originMeta.text,
|
|
768
|
+
letterSpacing: 0.3,
|
|
769
|
+
}}>
|
|
770
|
+
{originMeta.label}
|
|
771
|
+
</react_native_1.Text>
|
|
772
|
+
</react_native_1.View>
|
|
773
|
+
<react_native_1.Text style={reduxDetailStyles.sliceNameText} numberOfLines={1}>
|
|
774
|
+
{selectedReduxAction.type}
|
|
775
|
+
</react_native_1.Text>
|
|
776
|
+
{selectedReduxAction.timestamp && (<react_native_1.View style={reduxDetailStyles.timePill}>
|
|
777
|
+
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.purple} size={10}/>
|
|
778
|
+
<react_native_1.Text style={reduxDetailStyles.timeText}>
|
|
779
|
+
{selectedReduxAction.timestamp}
|
|
780
|
+
</react_native_1.Text>
|
|
781
|
+
</react_native_1.View>)}
|
|
782
|
+
</react_native_1.View>
|
|
783
|
+
|
|
784
|
+
{/* Copy Button */}
|
|
785
|
+
<CopyButton_1.default value={() => selectedReduxAction} label="Copy Action"/>
|
|
786
|
+
</react_native_1.View>
|
|
787
|
+
|
|
788
|
+
{/* Sub Stats Row */}
|
|
789
|
+
<react_native_1.View style={reduxDetailStyles.subStatsRow}>
|
|
790
|
+
{selectedReduxAction.affectedSlices &&
|
|
791
|
+
selectedReduxAction.affectedSlices.length > 0 && (<react_native_1.View style={[
|
|
792
|
+
reduxDetailStyles.statPill,
|
|
793
|
+
{
|
|
794
|
+
backgroundColor: AppColors_1.AppColors.indigo50,
|
|
795
|
+
borderColor: AppColors_1.AppColors.indigo400,
|
|
796
|
+
},
|
|
797
|
+
]}>
|
|
798
|
+
<NetworkIcons_1.LayersIcon color={AppColors_1.AppColors.indigo600Alt} size={11}/>
|
|
799
|
+
<react_native_1.Text style={[
|
|
800
|
+
reduxDetailStyles.statLabel,
|
|
801
|
+
{ color: AppColors_1.AppColors.indigo600Alt },
|
|
802
|
+
]}>
|
|
803
|
+
Slices:
|
|
804
|
+
</react_native_1.Text>
|
|
805
|
+
<react_native_1.Text style={[
|
|
806
|
+
reduxDetailStyles.statValue,
|
|
807
|
+
{ color: AppColors_1.AppColors.indigo600Alt },
|
|
808
|
+
]}>
|
|
809
|
+
{selectedReduxAction.affectedSlices.join(', ')}
|
|
810
|
+
</react_native_1.Text>
|
|
811
|
+
</react_native_1.View>)}
|
|
812
|
+
<react_native_1.View style={[
|
|
813
|
+
reduxDetailStyles.statPill,
|
|
814
|
+
{
|
|
815
|
+
backgroundColor: AppColors_1.AppColors.sky100,
|
|
816
|
+
borderColor: AppColors_1.AppColors.sky400,
|
|
817
|
+
},
|
|
818
|
+
]}>
|
|
819
|
+
<react_native_1.Text style={[
|
|
820
|
+
reduxDetailStyles.statLabel,
|
|
821
|
+
{ color: AppColors_1.AppColors.sky600 },
|
|
822
|
+
]}>
|
|
823
|
+
Payload Size:
|
|
824
|
+
</react_native_1.Text>
|
|
825
|
+
<react_native_1.Text style={[
|
|
826
|
+
reduxDetailStyles.statValue,
|
|
827
|
+
{ color: AppColors_1.AppColors.sky600 },
|
|
828
|
+
]}>
|
|
829
|
+
{(0, helpers_1.getSize)(selectedReduxAction.payload)}
|
|
830
|
+
</react_native_1.Text>
|
|
831
|
+
</react_native_1.View>
|
|
832
|
+
</react_native_1.View>
|
|
833
|
+
|
|
834
|
+
{/* Triggered from caller preview row */}
|
|
835
|
+
{selectedReduxAction.callerFile && (<react_native_1.View style={{
|
|
836
|
+
flexDirection: 'row',
|
|
837
|
+
alignItems: 'center',
|
|
838
|
+
justifyContent: 'space-between',
|
|
839
|
+
marginTop: 8,
|
|
840
|
+
paddingHorizontal: 8,
|
|
841
|
+
paddingVertical: 4,
|
|
842
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
843
|
+
borderRadius: 6,
|
|
844
|
+
borderWidth: 1,
|
|
845
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
846
|
+
}}>
|
|
847
|
+
<react_native_1.View style={{
|
|
848
|
+
flexDirection: 'row',
|
|
849
|
+
alignItems: 'center',
|
|
850
|
+
gap: 5,
|
|
851
|
+
flex: 1,
|
|
852
|
+
minWidth: 0,
|
|
853
|
+
}}>
|
|
854
|
+
<NetworkIcons_1.DocIcon color={AppColors_1.AppColors.sky600} size={10}/>
|
|
855
|
+
<react_native_1.Text style={{
|
|
856
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
857
|
+
fontSize: 9.5,
|
|
858
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
859
|
+
}}>
|
|
860
|
+
Triggered from:
|
|
861
|
+
</react_native_1.Text>
|
|
862
|
+
<react_native_1.Text style={{
|
|
863
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
864
|
+
fontSize: 9.5,
|
|
865
|
+
color: AppColors_1.AppColors.sky600,
|
|
866
|
+
}} numberOfLines={1}>
|
|
867
|
+
{callerBasename}:{selectedReduxAction.callerLine || 1}
|
|
868
|
+
</react_native_1.Text>
|
|
869
|
+
</react_native_1.View>
|
|
870
|
+
|
|
871
|
+
<react_native_1.Pressable onPress={() => (0, helpers_1.openInVSCode)(selectedReduxAction.callerFile, selectedReduxAction.callerLine, selectedReduxAction.callerCol)} hitSlop={8} style={{
|
|
872
|
+
flexDirection: 'row',
|
|
873
|
+
alignItems: 'center',
|
|
874
|
+
gap: 3,
|
|
875
|
+
backgroundColor: AppColors_1.AppColors.sky100,
|
|
876
|
+
paddingHorizontal: 5,
|
|
877
|
+
paddingVertical: 2,
|
|
878
|
+
borderRadius: 4,
|
|
879
|
+
}}>
|
|
880
|
+
<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600} size={9}/>
|
|
881
|
+
<react_native_1.Text style={{
|
|
882
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
883
|
+
fontSize: 8.5,
|
|
884
|
+
color: AppColors_1.AppColors.sky600,
|
|
885
|
+
}}>
|
|
886
|
+
Open in Editor
|
|
887
|
+
</react_native_1.Text>
|
|
888
|
+
</react_native_1.Pressable>
|
|
889
|
+
</react_native_1.View>)}
|
|
890
|
+
|
|
891
|
+
{/* Sub-Tabs */}
|
|
892
|
+
<SegmentedTabs_1.default tabs={actionTabs} activeKey={actionTab} onChange={key => setActionTab(key)} style={{ marginTop: 10 }}/>
|
|
893
|
+
</react_native_1.View>
|
|
894
|
+
|
|
895
|
+
{/* Content Body */}
|
|
896
|
+
{actionTab === 'payload' ? (<react_native_1.View style={{ flex: 1, padding: 10 }}>
|
|
897
|
+
{selectedReduxAction.payload !== undefined ? (<JsonViewer_1.default data={selectedReduxAction.payload} search={detailSearch} forceOpen={true} fullHeight={true} wrap={true}/>) : (<react_native_1.View style={reduxDetailStyles.emptyBox}>
|
|
898
|
+
<react_native_1.Text style={reduxDetailStyles.emptyBoxText}>
|
|
899
|
+
This action has no payload dispatched.
|
|
900
|
+
</react_native_1.Text>
|
|
901
|
+
</react_native_1.View>)}
|
|
902
|
+
</react_native_1.View>) : actionTab === 'diff' ? (<react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 12, paddingBottom: 40 }} keyboardShouldPersistTaps="handled">
|
|
903
|
+
<DiffViewer_1.default oldData={selectedReduxAction.prevState || {}} newData={selectedReduxAction.nextState || {}} forceOpen={true}/>
|
|
904
|
+
</react_native_1.ScrollView>) : actionTab === 'stack' ? (<react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 12, paddingBottom: 40 }} keyboardShouldPersistTaps="handled">
|
|
905
|
+
{selectedReduxAction.stack ? (<react_native_1.View style={{
|
|
906
|
+
backgroundColor: AppColors_1.AppColors.white,
|
|
907
|
+
borderRadius: 10,
|
|
908
|
+
padding: 10,
|
|
909
|
+
borderWidth: 1,
|
|
910
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
911
|
+
}}>
|
|
912
|
+
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
913
|
+
Dispatched from call stack:
|
|
914
|
+
</react_native_1.Text>
|
|
915
|
+
{selectedReduxAction.stack
|
|
916
|
+
.split('\n')
|
|
917
|
+
.map(l => l.trim())
|
|
918
|
+
.filter(l => l.length > 0 &&
|
|
919
|
+
!l.includes('reduxLogger') &&
|
|
920
|
+
!l.includes('inspectorReduxMiddleware'))
|
|
921
|
+
.map((frameLine, fIdx) => {
|
|
922
|
+
const parsed = (0, helpers_1.parseStackLine)(frameLine, fIdx === 0);
|
|
923
|
+
const isApp = parsed.frameType === 'app';
|
|
924
|
+
return (<react_native_1.Pressable key={fIdx} onPress={() => {
|
|
925
|
+
if (parsed.fileName !== 'Unknown') {
|
|
926
|
+
(0, helpers_1.openInVSCode)(parsed.fullPath || parsed.fileName, parsed.lineNumber, parsed.columnNumber);
|
|
927
|
+
}
|
|
928
|
+
}} style={{
|
|
929
|
+
flexDirection: 'row',
|
|
930
|
+
alignItems: 'center',
|
|
931
|
+
justifyContent: 'space-between',
|
|
932
|
+
paddingVertical: 5,
|
|
933
|
+
borderBottomWidth: 0.5,
|
|
934
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
935
|
+
}}>
|
|
936
|
+
<react_native_1.View style={{ flex: 1, minWidth: 0 }}>
|
|
937
|
+
<react_native_1.Text style={{
|
|
938
|
+
fontFamily: isApp
|
|
939
|
+
? AppFonts_1.AppFonts.interBold
|
|
940
|
+
: AppFonts_1.AppFonts.interRegular,
|
|
941
|
+
fontSize: 10.5,
|
|
942
|
+
color: isApp
|
|
943
|
+
? AppColors_1.AppColors.primaryBlack
|
|
944
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
945
|
+
}} numberOfLines={1}>
|
|
946
|
+
{parsed.functionName || 'anonymous'}
|
|
947
|
+
</react_native_1.Text>
|
|
948
|
+
<react_native_1.Text style={{
|
|
949
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
950
|
+
fontSize: 9,
|
|
951
|
+
color: isApp
|
|
952
|
+
? AppColors_1.AppColors.sky600
|
|
953
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
954
|
+
}} numberOfLines={1}>
|
|
955
|
+
{parsed.fileName}:{parsed.lineNumber || 1}:
|
|
956
|
+
{parsed.columnNumber || 1}
|
|
957
|
+
</react_native_1.Text>
|
|
958
|
+
</react_native_1.View>
|
|
959
|
+
{isApp && (<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600} size={11}/>)}
|
|
960
|
+
</react_native_1.Pressable>);
|
|
961
|
+
})}
|
|
962
|
+
</react_native_1.View>) : (<react_native_1.View style={reduxDetailStyles.emptyBox}>
|
|
963
|
+
<react_native_1.Text style={reduxDetailStyles.emptyBoxText}>
|
|
964
|
+
No call stack trace captured for this action.
|
|
965
|
+
</react_native_1.Text>
|
|
966
|
+
</react_native_1.View>)}
|
|
967
|
+
</react_native_1.ScrollView>) : (<react_native_1.View style={{ flex: 1, padding: 10 }}>
|
|
968
|
+
<JsonViewer_1.default data={selectedReduxAction} forceOpen={true} fullHeight={true} wrap={true}/>
|
|
969
|
+
</react_native_1.View>)}
|
|
526
970
|
</react_native_1.View>);
|
|
527
971
|
}
|
|
528
|
-
return
|
|
972
|
+
return (<react_native_1.View style={reduxDetailStyles.emptyBox}>
|
|
973
|
+
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
974
|
+
<react_native_1.Text style={reduxDetailStyles.emptyBoxTitle}>
|
|
975
|
+
No Redux Slice Selected
|
|
976
|
+
</react_native_1.Text>
|
|
977
|
+
<react_native_1.Text style={reduxDetailStyles.emptyBoxText}>
|
|
978
|
+
Select a slice from the Redux tab to inspect its state and dispatched
|
|
979
|
+
actions.
|
|
980
|
+
</react_native_1.Text>
|
|
981
|
+
</react_native_1.View>);
|
|
529
982
|
});
|
|
530
983
|
const reduxDetailStyles = react_native_1.StyleSheet.create({
|
|
531
984
|
infoBar: {
|
|
@@ -541,20 +994,21 @@ const reduxDetailStyles = react_native_1.StyleSheet.create({
|
|
|
541
994
|
marginBottom: 8,
|
|
542
995
|
},
|
|
543
996
|
methodBadge: {
|
|
544
|
-
paddingHorizontal:
|
|
545
|
-
paddingVertical:
|
|
546
|
-
borderRadius:
|
|
997
|
+
paddingHorizontal: 7,
|
|
998
|
+
paddingVertical: 2.5,
|
|
999
|
+
borderRadius: 5,
|
|
547
1000
|
},
|
|
548
1001
|
methodBadgeText: {
|
|
549
1002
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
550
|
-
fontSize:
|
|
1003
|
+
fontSize: 9.5,
|
|
551
1004
|
color: AppColors_1.AppColors.white,
|
|
552
|
-
letterSpacing: 0.
|
|
1005
|
+
letterSpacing: 0.4,
|
|
553
1006
|
},
|
|
554
1007
|
sliceNameText: {
|
|
555
1008
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
556
1009
|
fontSize: 14,
|
|
557
1010
|
color: AppColors_1.AppColors.primaryBlack,
|
|
1011
|
+
flexShrink: 1,
|
|
558
1012
|
},
|
|
559
1013
|
persistedChip: {
|
|
560
1014
|
flexDirection: 'row',
|
|
@@ -639,6 +1093,11 @@ const reduxDetailStyles = react_native_1.StyleSheet.create({
|
|
|
639
1093
|
marginBottom: 8,
|
|
640
1094
|
borderWidth: 1,
|
|
641
1095
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1096
|
+
shadowColor: AppColors_1.AppColors.primaryBlack,
|
|
1097
|
+
shadowOffset: { width: 0, height: 1 },
|
|
1098
|
+
shadowOpacity: 0.03,
|
|
1099
|
+
shadowRadius: 3,
|
|
1100
|
+
elevation: 1,
|
|
642
1101
|
},
|
|
643
1102
|
timelineHeader: {
|
|
644
1103
|
flexDirection: 'row',
|
|
@@ -702,7 +1161,7 @@ const reduxDetailStyles = react_native_1.StyleSheet.create({
|
|
|
702
1161
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
703
1162
|
fontSize: 11,
|
|
704
1163
|
color: AppColors_1.AppColors.grayTextStrong,
|
|
705
|
-
marginBottom:
|
|
1164
|
+
marginBottom: 6,
|
|
706
1165
|
},
|
|
707
1166
|
metadataCard: {
|
|
708
1167
|
backgroundColor: AppColors_1.AppColors.white,
|
|
@@ -710,6 +1169,11 @@ const reduxDetailStyles = react_native_1.StyleSheet.create({
|
|
|
710
1169
|
padding: 12,
|
|
711
1170
|
borderWidth: 1,
|
|
712
1171
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1172
|
+
shadowColor: AppColors_1.AppColors.primaryBlack,
|
|
1173
|
+
shadowOffset: { width: 0, height: 1 },
|
|
1174
|
+
shadowOpacity: 0.03,
|
|
1175
|
+
shadowRadius: 3,
|
|
1176
|
+
elevation: 1,
|
|
713
1177
|
},
|
|
714
1178
|
metaRow: {
|
|
715
1179
|
flexDirection: 'row',
|
|
@@ -731,6 +1195,32 @@ const reduxDetailStyles = react_native_1.StyleSheet.create({
|
|
|
731
1195
|
maxWidth: '60%',
|
|
732
1196
|
textAlign: 'right',
|
|
733
1197
|
},
|
|
1198
|
+
persistedInfoCard: {
|
|
1199
|
+
backgroundColor: '#ECFDF5',
|
|
1200
|
+
borderRadius: 8,
|
|
1201
|
+
borderWidth: 1,
|
|
1202
|
+
borderColor: '#A7F3D0',
|
|
1203
|
+
padding: 10,
|
|
1204
|
+
},
|
|
1205
|
+
persistedInfoTitle: {
|
|
1206
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1207
|
+
fontSize: 11,
|
|
1208
|
+
color: '#047857',
|
|
1209
|
+
},
|
|
1210
|
+
clearPersistMiniBtn: {
|
|
1211
|
+
flexDirection: 'row',
|
|
1212
|
+
alignItems: 'center',
|
|
1213
|
+
gap: 3,
|
|
1214
|
+
backgroundColor: '#FEE2E2',
|
|
1215
|
+
paddingHorizontal: 6,
|
|
1216
|
+
paddingVertical: 2.5,
|
|
1217
|
+
borderRadius: 4,
|
|
1218
|
+
},
|
|
1219
|
+
clearPersistMiniText: {
|
|
1220
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1221
|
+
fontSize: 9.5,
|
|
1222
|
+
color: AppColors_1.AppColors.errorColor,
|
|
1223
|
+
},
|
|
734
1224
|
clearPersistBtn: {
|
|
735
1225
|
flexDirection: 'row',
|
|
736
1226
|
alignItems: 'center',
|
|
@@ -756,11 +1246,20 @@ const reduxDetailStyles = react_native_1.StyleSheet.create({
|
|
|
756
1246
|
justifyContent: 'center',
|
|
757
1247
|
borderWidth: 1,
|
|
758
1248
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1249
|
+
margin: 12,
|
|
1250
|
+
gap: 8,
|
|
1251
|
+
},
|
|
1252
|
+
emptyBoxTitle: {
|
|
1253
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1254
|
+
fontSize: 14,
|
|
1255
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
759
1256
|
},
|
|
760
1257
|
emptyBoxText: {
|
|
761
1258
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
762
|
-
fontSize: 12
|
|
1259
|
+
fontSize: 12,
|
|
763
1260
|
color: AppColors_1.AppColors.grayTextWeak,
|
|
1261
|
+
textAlign: 'center',
|
|
1262
|
+
lineHeight: 18,
|
|
764
1263
|
},
|
|
765
1264
|
highlight: {
|
|
766
1265
|
backgroundColor: '#FEF08A',
|