react-native-inapp-inspector 1.1.29 → 1.1.32
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/AnalyticsDetail.js +668 -108
- package/dist/commonjs/components/AppHeaderLogo.js +5 -2
- package/dist/commonjs/components/ConsoleLogCard.js +81 -59
- package/dist/commonjs/components/DomainHeader.js +21 -17
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +297 -200
- package/dist/commonjs/components/Inspector/ConsoleTab.js +162 -56
- package/dist/commonjs/components/Inspector/InspectorHeader.js +56 -119
- package/dist/commonjs/components/Inspector/LogDetail.js +45 -12
- package/dist/commonjs/components/Inspector/NetworkTab.js +4 -1
- package/dist/commonjs/components/Inspector/ReduxDetail.js +237 -42
- package/dist/commonjs/components/Inspector/ReduxTab.js +456 -35
- package/dist/commonjs/components/JsonViewer.js +1 -1
- package/dist/commonjs/components/NetworkIcons.js +19 -10
- package/dist/commonjs/components/TreeNode.js +12 -2
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/reduxLogger.js +128 -5
- package/dist/commonjs/helpers/index.d.ts +1 -1
- package/dist/commonjs/helpers/index.js +32 -16
- package/dist/commonjs/i18n/locales/en.json +45 -2
- package/dist/commonjs/styles/AppColors.d.ts +6 -0
- package/dist/commonjs/styles/AppColors.js +6 -0
- package/dist/commonjs/styles/index.d.ts +22 -1
- package/dist/commonjs/styles/index.js +25 -4
- package/dist/commonjs/types/interfaces.d.ts +7 -0
- package/dist/esm/components/AnalyticsDetail.js +670 -110
- package/dist/esm/components/AppHeaderLogo.js +5 -2
- package/dist/esm/components/ConsoleLogCard.js +81 -59
- package/dist/esm/components/DomainHeader.js +21 -17
- package/dist/esm/components/Inspector/AnalyticsTab.js +298 -201
- package/dist/esm/components/Inspector/ConsoleTab.js +163 -57
- package/dist/esm/components/Inspector/InspectorHeader.js +57 -120
- package/dist/esm/components/Inspector/LogDetail.js +45 -12
- package/dist/esm/components/Inspector/NetworkTab.js +4 -1
- package/dist/esm/components/Inspector/ReduxDetail.js +239 -44
- package/dist/esm/components/Inspector/ReduxTab.js +458 -37
- package/dist/esm/components/JsonViewer.js +1 -1
- package/dist/esm/components/NetworkIcons.js +19 -10
- package/dist/esm/components/TreeNode.js +12 -2
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/reduxLogger.js +128 -5
- package/dist/esm/helpers/index.d.ts +1 -1
- package/dist/esm/helpers/index.js +32 -16
- package/dist/esm/i18n/locales/en.json +45 -2
- package/dist/esm/styles/AppColors.d.ts +6 -0
- package/dist/esm/styles/AppColors.js +6 -0
- package/dist/esm/styles/index.d.ts +22 -1
- package/dist/esm/styles/index.js +25 -4
- package/dist/esm/types/interfaces.d.ts +7 -0
- package/package.json +11 -11
|
@@ -118,27 +118,60 @@ const LogDetail = react_1.default.memo(() => {
|
|
|
118
118
|
return null;
|
|
119
119
|
const isDark = AppColors_1.AppColors.primaryLight !== AppColors_1.AppColors.white;
|
|
120
120
|
const getTypeColors = () => {
|
|
121
|
-
|
|
121
|
+
const type = (selectedLog.type || 'log').toLowerCase();
|
|
122
|
+
const method = (selectedLog.sourceMethod || type).toLowerCase();
|
|
123
|
+
if (type === 'error' || method === 'error') {
|
|
122
124
|
return {
|
|
123
|
-
border: AppColors_1.AppColors.
|
|
124
|
-
badgeBg:
|
|
125
|
-
badgeText: AppColors_1.AppColors.
|
|
125
|
+
border: AppColors_1.AppColors.red500,
|
|
126
|
+
badgeBg: AppColors_1.AppColors.red100,
|
|
127
|
+
badgeText: AppColors_1.AppColors.redErrorText,
|
|
126
128
|
label: 'ERROR',
|
|
129
|
+
methodBorder: AppColors_1.AppColors.errorBorder,
|
|
130
|
+
methodBg: AppColors_1.AppColors.red100,
|
|
131
|
+
methodText: AppColors_1.AppColors.redErrorText,
|
|
127
132
|
};
|
|
128
133
|
}
|
|
129
|
-
if (
|
|
134
|
+
if (type === 'warn' || method === 'warn') {
|
|
130
135
|
return {
|
|
131
|
-
border: AppColors_1.AppColors.
|
|
132
|
-
badgeBg:
|
|
133
|
-
badgeText: AppColors_1.AppColors.
|
|
136
|
+
border: AppColors_1.AppColors.amber500,
|
|
137
|
+
badgeBg: AppColors_1.AppColors.amber100,
|
|
138
|
+
badgeText: AppColors_1.AppColors.amber800Warm,
|
|
134
139
|
label: 'WARN',
|
|
140
|
+
methodBorder: AppColors_1.AppColors.amber200,
|
|
141
|
+
methodBg: AppColors_1.AppColors.amber100,
|
|
142
|
+
methodText: AppColors_1.AppColors.amber800Warm,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
if (type === 'debug' || method === 'debug') {
|
|
146
|
+
return {
|
|
147
|
+
border: AppColors_1.AppColors.violet500,
|
|
148
|
+
badgeBg: AppColors_1.AppColors.purple100,
|
|
149
|
+
badgeText: AppColors_1.AppColors.violet600,
|
|
150
|
+
label: 'DEBUG',
|
|
151
|
+
methodBorder: AppColors_1.AppColors.purple200,
|
|
152
|
+
methodBg: AppColors_1.AppColors.purple100,
|
|
153
|
+
methodText: AppColors_1.AppColors.violet600,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (type === 'info' || method === 'info') {
|
|
157
|
+
return {
|
|
158
|
+
border: AppColors_1.AppColors.sky500,
|
|
159
|
+
badgeBg: AppColors_1.AppColors.sky100,
|
|
160
|
+
badgeText: AppColors_1.AppColors.sky600,
|
|
161
|
+
label: 'INFO',
|
|
162
|
+
methodBorder: AppColors_1.AppColors.sky400,
|
|
163
|
+
methodBg: AppColors_1.AppColors.sky100,
|
|
164
|
+
methodText: AppColors_1.AppColors.sky600,
|
|
135
165
|
};
|
|
136
166
|
}
|
|
137
167
|
return {
|
|
138
|
-
border: AppColors_1.AppColors.
|
|
139
|
-
badgeBg:
|
|
140
|
-
badgeText: AppColors_1.AppColors.
|
|
141
|
-
label: '
|
|
168
|
+
border: AppColors_1.AppColors.indigo500,
|
|
169
|
+
badgeBg: AppColors_1.AppColors.indigo50,
|
|
170
|
+
badgeText: AppColors_1.AppColors.indigo600Alt,
|
|
171
|
+
label: 'LOG',
|
|
172
|
+
methodBorder: AppColors_1.AppColors.indigo400,
|
|
173
|
+
methodBg: AppColors_1.AppColors.indigo50,
|
|
174
|
+
methodText: AppColors_1.AppColors.indigo600Alt,
|
|
142
175
|
};
|
|
143
176
|
};
|
|
144
177
|
const typeColors = getTypeColors();
|
|
@@ -105,7 +105,10 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
105
105
|
</AnimatedEntrance_1.default>);
|
|
106
106
|
}
|
|
107
107
|
const { log, isLast, color } = item;
|
|
108
|
-
return (<AnimatedEntrance_1.default index={index} distance={8} style={
|
|
108
|
+
return (<AnimatedEntrance_1.default index={index} distance={8} style={[
|
|
109
|
+
styles_1.default.treeNodeRow,
|
|
110
|
+
isLast && styles_1.default.treeNodeRowLast,
|
|
111
|
+
]}>
|
|
109
112
|
<react_native_1.View style={styles_1.default.treeLines}>
|
|
110
113
|
<react_native_1.View style={[
|
|
111
114
|
styles_1.default.modernTreeLine,
|
|
@@ -53,6 +53,50 @@ const settingsStore_1 = require("../../helpers/settingsStore");
|
|
|
53
53
|
const AppColors_1 = require("../../styles/AppColors");
|
|
54
54
|
const AppFonts_1 = require("../../styles/AppFonts");
|
|
55
55
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
56
|
+
const getOriginBadge = (originType) => {
|
|
57
|
+
switch (originType) {
|
|
58
|
+
case 'saga':
|
|
59
|
+
return {
|
|
60
|
+
label: 'SAGA',
|
|
61
|
+
icon: '⚡',
|
|
62
|
+
bg: AppColors_1.AppColors.purple100,
|
|
63
|
+
text: AppColors_1.AppColors.brandPurple,
|
|
64
|
+
border: AppColors_1.AppColors.purple200,
|
|
65
|
+
};
|
|
66
|
+
case 'thunk':
|
|
67
|
+
return {
|
|
68
|
+
label: 'THUNK',
|
|
69
|
+
icon: '⚛️',
|
|
70
|
+
bg: AppColors_1.AppColors.amber100,
|
|
71
|
+
text: AppColors_1.AppColors.amber800Warm,
|
|
72
|
+
border: AppColors_1.AppColors.amber200,
|
|
73
|
+
};
|
|
74
|
+
case 'ui':
|
|
75
|
+
return {
|
|
76
|
+
label: 'UI',
|
|
77
|
+
icon: '📱',
|
|
78
|
+
bg: AppColors_1.AppColors.sky100,
|
|
79
|
+
text: AppColors_1.AppColors.sky600,
|
|
80
|
+
border: AppColors_1.AppColors.sky400,
|
|
81
|
+
};
|
|
82
|
+
case 'listener':
|
|
83
|
+
return {
|
|
84
|
+
label: 'LISTENER',
|
|
85
|
+
icon: '👂',
|
|
86
|
+
bg: AppColors_1.AppColors.teal100,
|
|
87
|
+
text: AppColors_1.AppColors.teal700,
|
|
88
|
+
border: AppColors_1.AppColors.teal400,
|
|
89
|
+
};
|
|
90
|
+
default:
|
|
91
|
+
return {
|
|
92
|
+
label: 'DIRECT',
|
|
93
|
+
icon: '⚡',
|
|
94
|
+
bg: AppColors_1.AppColors.slate100,
|
|
95
|
+
text: AppColors_1.AppColors.slate700,
|
|
96
|
+
border: AppColors_1.AppColors.slate200,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
};
|
|
56
100
|
const ReduxDetail = react_1.default.memo(() => {
|
|
57
101
|
const { t } = (0, i18n_1.useTranslation)();
|
|
58
102
|
const { reduxState, reduxLastActionMap, selectedReduxSlice, selectedReduxAction, setSelectedReduxSlice, setSelectedReduxAction, } = (0, InspectorContext_1.useInspector)();
|
|
@@ -174,29 +218,46 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
174
218
|
: 0;
|
|
175
219
|
const lastAction = reduxLastActionMap[selectedReduxSlice];
|
|
176
220
|
const sliceTabs = [
|
|
177
|
-
{
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
221
|
+
{
|
|
222
|
+
key: 'live',
|
|
223
|
+
label: t('redux.liveState'),
|
|
224
|
+
icon: (isActive) => (<NetworkIcons_1.LiveStateIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
key: 'timeline',
|
|
228
|
+
label: `${t('redux.timeline')} (${sliceActions.length})`,
|
|
229
|
+
icon: (isActive) => (<NetworkIcons_1.TimelineIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
key: 'persisted',
|
|
233
|
+
label: isPersisted ? t('redux.persisted') : t('redux.storage'),
|
|
234
|
+
icon: (isActive) => (<NetworkIcons_1.StorageIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
key: 'metadata',
|
|
238
|
+
label: t('redux.metadata'),
|
|
239
|
+
icon: (isActive) => (<NetworkIcons_1.MetadataIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={12}/>),
|
|
240
|
+
},
|
|
181
241
|
];
|
|
182
242
|
return (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
183
243
|
{/* Info Header Bar */}
|
|
184
244
|
<react_native_1.View style={reduxDetailStyles.infoBar}>
|
|
185
245
|
<react_native_1.View style={reduxDetailStyles.infoTopRow}>
|
|
186
246
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, flexWrap: 'wrap', flex: 1 }}>
|
|
187
|
-
<react_native_1.View style={[reduxDetailStyles.methodBadge, { backgroundColor: AppColors_1.AppColors.
|
|
188
|
-
<react_native_1.Text style={reduxDetailStyles.methodBadgeText}>
|
|
247
|
+
<react_native_1.View style={[reduxDetailStyles.methodBadge, { backgroundColor: AppColors_1.AppColors.indigo600Alt }]}>
|
|
248
|
+
<react_native_1.Text style={reduxDetailStyles.methodBadgeText}>{t('redux.slice')}</react_native_1.Text>
|
|
189
249
|
</react_native_1.View>
|
|
190
250
|
<react_native_1.Text style={reduxDetailStyles.sliceNameText}>
|
|
191
251
|
{selectedReduxSlice}
|
|
192
252
|
</react_native_1.Text>
|
|
193
253
|
{isPersisted ? (<react_native_1.View style={reduxDetailStyles.persistedChip}>
|
|
194
|
-
<
|
|
254
|
+
<NetworkIcons_1.StorageIcon color={AppColors_1.AppColors.emerald700} size={10}/>
|
|
255
|
+
<react_native_1.Text style={reduxDetailStyles.persistedChipText}>{t('redux.persisted').toUpperCase()}</react_native_1.Text>
|
|
195
256
|
</react_native_1.View>) : (<react_native_1.View style={reduxDetailStyles.inMemoryChip}>
|
|
196
|
-
<react_native_1.Text style={reduxDetailStyles.inMemoryChipText}>
|
|
257
|
+
<react_native_1.Text style={reduxDetailStyles.inMemoryChipText}>{t('redux.inMemory').toUpperCase()}</react_native_1.Text>
|
|
197
258
|
</react_native_1.View>)}
|
|
198
259
|
{lastAction?.timestamp && (<react_native_1.View style={reduxDetailStyles.timePill}>
|
|
199
|
-
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.
|
|
260
|
+
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.violet600} size={10}/>
|
|
200
261
|
<react_native_1.Text style={reduxDetailStyles.timeText}>
|
|
201
262
|
{lastAction.timestamp}
|
|
202
263
|
</react_native_1.Text>
|
|
@@ -204,26 +265,29 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
204
265
|
</react_native_1.View>
|
|
205
266
|
|
|
206
267
|
{/* Copy Button */}
|
|
207
|
-
<CopyButton_1.default value={() => (sliceTab === 'live' ? sliceData : persistedData)} label=
|
|
268
|
+
<CopyButton_1.default value={() => (sliceTab === 'live' ? sliceData : persistedData)} label={t('redux.sliceJson')}/>
|
|
208
269
|
</react_native_1.View>
|
|
209
270
|
|
|
210
271
|
{/* Sub Stats Row */}
|
|
211
272
|
<react_native_1.View style={reduxDetailStyles.subStatsRow}>
|
|
212
|
-
<react_native_1.View style={reduxDetailStyles.statPill}>
|
|
213
|
-
<
|
|
214
|
-
<react_native_1.Text style={reduxDetailStyles.
|
|
273
|
+
<react_native_1.View style={[reduxDetailStyles.statPill, { backgroundColor: AppColors_1.AppColors.indigo50, borderColor: AppColors_1.AppColors.indigo400 }]}>
|
|
274
|
+
<NetworkIcons_1.LayersIcon color={AppColors_1.AppColors.indigo600Alt} size={11}/>
|
|
275
|
+
<react_native_1.Text style={[reduxDetailStyles.statLabel, { color: AppColors_1.AppColors.indigo600Alt }]}>{t('redux.keys')}:</react_native_1.Text>
|
|
276
|
+
<react_native_1.Text style={[reduxDetailStyles.statValue, { color: AppColors_1.AppColors.indigo600Alt }]}>{fieldsCount}</react_native_1.Text>
|
|
215
277
|
</react_native_1.View>
|
|
216
|
-
<react_native_1.View style={reduxDetailStyles.statPill}>
|
|
217
|
-
<react_native_1.Text style={reduxDetailStyles.statLabel}>
|
|
218
|
-
<react_native_1.Text style={reduxDetailStyles.statValue}>{(0, helpers_1.getSize)(sliceData)}</react_native_1.Text>
|
|
278
|
+
<react_native_1.View style={[reduxDetailStyles.statPill, { backgroundColor: AppColors_1.AppColors.sky100, borderColor: AppColors_1.AppColors.sky400 }]}>
|
|
279
|
+
<react_native_1.Text style={[reduxDetailStyles.statLabel, { color: AppColors_1.AppColors.sky600 }]}>{t('redux.size')}:</react_native_1.Text>
|
|
280
|
+
<react_native_1.Text style={[reduxDetailStyles.statValue, { color: AppColors_1.AppColors.sky600 }]}>{(0, helpers_1.getSize)(sliceData)}</react_native_1.Text>
|
|
219
281
|
</react_native_1.View>
|
|
220
|
-
<react_native_1.View style={reduxDetailStyles.statPill}>
|
|
221
|
-
<
|
|
222
|
-
<react_native_1.Text style={reduxDetailStyles.
|
|
282
|
+
<react_native_1.View style={[reduxDetailStyles.statPill, { backgroundColor: AppColors_1.AppColors.purple100, borderColor: AppColors_1.AppColors.purple200 }]}>
|
|
283
|
+
<NetworkIcons_1.TimelineIcon color={AppColors_1.AppColors.violet600} size={11}/>
|
|
284
|
+
<react_native_1.Text style={[reduxDetailStyles.statLabel, { color: AppColors_1.AppColors.brandPurple }]}>{t('redux.timeline')}:</react_native_1.Text>
|
|
285
|
+
<react_native_1.Text style={[reduxDetailStyles.statValue, { color: AppColors_1.AppColors.brandPurple }]}>{sliceActions.length}</react_native_1.Text>
|
|
223
286
|
</react_native_1.View>
|
|
224
|
-
{lastAction && (<react_native_1.View style={[reduxDetailStyles.statPill, { flex: 1, minWidth: 140 }]}>
|
|
225
|
-
<
|
|
226
|
-
<react_native_1.Text style={reduxDetailStyles.
|
|
287
|
+
{lastAction && (<react_native_1.View style={[reduxDetailStyles.statPill, { backgroundColor: AppColors_1.AppColors.amber100, borderColor: AppColors_1.AppColors.amber200, flex: 1, minWidth: 140 }]}>
|
|
288
|
+
<NetworkIcons_1.BoltIcon color={AppColors_1.AppColors.amber800Warm} size={11}/>
|
|
289
|
+
<react_native_1.Text style={[reduxDetailStyles.statLabel, { color: AppColors_1.AppColors.amber800Warm }]}>{t('redux.last')}:</react_native_1.Text>
|
|
290
|
+
<react_native_1.Text style={[reduxDetailStyles.statValue, { color: AppColors_1.AppColors.amber800Warm }]} numberOfLines={1}>
|
|
227
291
|
{lastAction.type}
|
|
228
292
|
</react_native_1.Text>
|
|
229
293
|
</react_native_1.View>)}
|
|
@@ -250,15 +314,45 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
250
314
|
</react_native_1.Text>
|
|
251
315
|
</react_native_1.View>) : (sliceActions.map((action, aIdx) => {
|
|
252
316
|
const isExpanded = expandedActionId === action.id;
|
|
317
|
+
const originMeta = getOriginBadge(action.originType);
|
|
318
|
+
const callerBasename = action.callerFile
|
|
319
|
+
? action.callerFile.split('/').pop()
|
|
320
|
+
: null;
|
|
253
321
|
return (<AnimatedEntrance_1.default key={action.id} index={aIdx} distance={6}>
|
|
254
322
|
<TouchableScale_1.default onPress={() => setExpandedActionId(isExpanded ? null : action.id)} style={reduxDetailStyles.timelineCard}>
|
|
255
323
|
<react_native_1.View style={reduxDetailStyles.timelineHeader}>
|
|
256
|
-
<react_native_1.View style={
|
|
257
|
-
<react_native_1.
|
|
258
|
-
|
|
259
|
-
|
|
324
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, flex: 1, minWidth: 0, flexWrap: 'wrap' }}>
|
|
325
|
+
<react_native_1.View style={reduxDetailStyles.actionBadge}>
|
|
326
|
+
<react_native_1.Text style={reduxDetailStyles.actionBadgeText}>
|
|
327
|
+
#{action.id}
|
|
328
|
+
</react_native_1.Text>
|
|
329
|
+
</react_native_1.View>
|
|
330
|
+
{/* Origin Badge */}
|
|
331
|
+
<react_native_1.View style={{
|
|
332
|
+
flexDirection: 'row',
|
|
333
|
+
alignItems: 'center',
|
|
334
|
+
gap: 3,
|
|
335
|
+
backgroundColor: originMeta.bg,
|
|
336
|
+
paddingHorizontal: 6,
|
|
337
|
+
paddingVertical: 2,
|
|
338
|
+
borderRadius: 4,
|
|
339
|
+
borderWidth: 1,
|
|
340
|
+
borderColor: originMeta.border,
|
|
341
|
+
}}>
|
|
342
|
+
<react_native_1.Text style={{ fontSize: 9 }}>{originMeta.icon}</react_native_1.Text>
|
|
343
|
+
<react_native_1.Text style={{
|
|
344
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
345
|
+
fontSize: 8.5,
|
|
346
|
+
color: originMeta.text,
|
|
347
|
+
letterSpacing: 0.3,
|
|
348
|
+
}}>
|
|
349
|
+
{originMeta.label}
|
|
350
|
+
</react_native_1.Text>
|
|
351
|
+
</react_native_1.View>
|
|
352
|
+
|
|
353
|
+
<HighlightText_1.default text={action.type} search={detailSearch} style={reduxDetailStyles.actionTitle} highlightStyle={reduxDetailStyles.highlight}/>
|
|
260
354
|
</react_native_1.View>
|
|
261
|
-
|
|
355
|
+
|
|
262
356
|
<react_native_1.View style={reduxDetailStyles.timePill}>
|
|
263
357
|
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.purple} size={10}/>
|
|
264
358
|
<react_native_1.Text style={reduxDetailStyles.timeText}>
|
|
@@ -267,22 +361,120 @@ const ReduxDetail = react_1.default.memo(() => {
|
|
|
267
361
|
</react_native_1.View>
|
|
268
362
|
</react_native_1.View>
|
|
269
363
|
|
|
270
|
-
{/*
|
|
364
|
+
{/* Trigger caller preview row */}
|
|
365
|
+
{action.callerFile && (<react_native_1.View style={{
|
|
366
|
+
flexDirection: 'row',
|
|
367
|
+
alignItems: 'center',
|
|
368
|
+
justifyContent: 'space-between',
|
|
369
|
+
marginTop: 5,
|
|
370
|
+
marginBottom: 2,
|
|
371
|
+
paddingHorizontal: 7,
|
|
372
|
+
paddingVertical: 3,
|
|
373
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
374
|
+
borderRadius: 5,
|
|
375
|
+
borderWidth: 1,
|
|
376
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
377
|
+
}}>
|
|
378
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 4, flex: 1, minWidth: 0 }}>
|
|
379
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interMedium, fontSize: 9.5, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
380
|
+
{t('redux.triggeredFrom')}
|
|
381
|
+
</react_native_1.Text>
|
|
382
|
+
<react_native_1.Text style={{
|
|
383
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
384
|
+
fontSize: 9.5,
|
|
385
|
+
color: AppColors_1.AppColors.sky600,
|
|
386
|
+
}} numberOfLines={1}>
|
|
387
|
+
{callerBasename}:{action.callerLine || 1}
|
|
388
|
+
</react_native_1.Text>
|
|
389
|
+
</react_native_1.View>
|
|
390
|
+
|
|
391
|
+
<react_native_1.Pressable onPress={() => (0, helpers_1.openInVSCode)(action.callerFile, action.callerLine, action.callerCol)} hitSlop={8} style={{
|
|
392
|
+
flexDirection: 'row',
|
|
393
|
+
alignItems: 'center',
|
|
394
|
+
gap: 3,
|
|
395
|
+
backgroundColor: AppColors_1.AppColors.sky100,
|
|
396
|
+
paddingHorizontal: 5,
|
|
397
|
+
paddingVertical: 1.5,
|
|
398
|
+
borderRadius: 3,
|
|
399
|
+
}}>
|
|
400
|
+
<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600} size={9}/>
|
|
401
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 8.5, color: AppColors_1.AppColors.sky600 }}>
|
|
402
|
+
{t('redux.openInEditor')}
|
|
403
|
+
</react_native_1.Text>
|
|
404
|
+
</react_native_1.Pressable>
|
|
405
|
+
</react_native_1.View>)}
|
|
406
|
+
|
|
407
|
+
{/* Expanded Payload, Diff Viewer & Call Stack */}
|
|
271
408
|
{isExpanded ? (<react_native_1.View style={reduxDetailStyles.expandedContent}>
|
|
409
|
+
{/* Call Stack Trace Box */}
|
|
410
|
+
{action.stack ? (<react_native_1.View style={{ marginBottom: 10 }}>
|
|
411
|
+
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
412
|
+
{t('redux.callStack')}:
|
|
413
|
+
</react_native_1.Text>
|
|
414
|
+
<react_native_1.View style={{
|
|
415
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
416
|
+
borderRadius: 8,
|
|
417
|
+
padding: 8,
|
|
418
|
+
borderWidth: 1,
|
|
419
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
420
|
+
gap: 4,
|
|
421
|
+
}}>
|
|
422
|
+
{action.stack
|
|
423
|
+
.split('\n')
|
|
424
|
+
.map(l => l.trim())
|
|
425
|
+
.filter(l => l.length > 0 && !l.includes('reduxLogger') && !l.includes('inspectorReduxMiddleware'))
|
|
426
|
+
.slice(0, 8)
|
|
427
|
+
.map((frameLine, fIdx) => {
|
|
428
|
+
const parsed = (0, helpers_1.parseStackLine)(frameLine, fIdx === 0);
|
|
429
|
+
const isApp = parsed.frameType === 'app';
|
|
430
|
+
return (<react_native_1.Pressable key={fIdx} onPress={() => {
|
|
431
|
+
if (parsed.fileName !== 'Unknown') {
|
|
432
|
+
(0, helpers_1.openInVSCode)(parsed.fullPath || parsed.fileName, parsed.lineNumber, parsed.columnNumber);
|
|
433
|
+
}
|
|
434
|
+
}} style={{
|
|
435
|
+
flexDirection: 'row',
|
|
436
|
+
alignItems: 'center',
|
|
437
|
+
justifyContent: 'space-between',
|
|
438
|
+
paddingVertical: 2.5,
|
|
439
|
+
borderBottomWidth: fIdx < 7 ? 0.5 : 0,
|
|
440
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
441
|
+
}}>
|
|
442
|
+
<react_native_1.View style={{ flex: 1, minWidth: 0 }}>
|
|
443
|
+
<react_native_1.Text style={{
|
|
444
|
+
fontFamily: isApp ? AppFonts_1.AppFonts.interBold : AppFonts_1.AppFonts.interRegular,
|
|
445
|
+
fontSize: 9.5,
|
|
446
|
+
color: isApp ? AppColors_1.AppColors.primaryBlack : AppColors_1.AppColors.grayTextWeak,
|
|
447
|
+
}} numberOfLines={1}>
|
|
448
|
+
{parsed.functionName || 'anonymous'}
|
|
449
|
+
</react_native_1.Text>
|
|
450
|
+
<react_native_1.Text style={{
|
|
451
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
452
|
+
fontSize: 8.5,
|
|
453
|
+
color: isApp ? AppColors_1.AppColors.sky600 : AppColors_1.AppColors.grayTextWeak,
|
|
454
|
+
}} numberOfLines={1}>
|
|
455
|
+
{parsed.fileName}:{parsed.lineNumber || 1}:{parsed.columnNumber || 1}
|
|
456
|
+
</react_native_1.Text>
|
|
457
|
+
</react_native_1.View>
|
|
458
|
+
{isApp && (<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600} size={10}/>)}
|
|
459
|
+
</react_native_1.Pressable>);
|
|
460
|
+
})}
|
|
461
|
+
</react_native_1.View>
|
|
462
|
+
</react_native_1.View>) : null}
|
|
463
|
+
|
|
272
464
|
{action.payload !== undefined && (<react_native_1.View style={{ marginBottom: 10 }}>
|
|
273
465
|
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
274
|
-
|
|
466
|
+
{t('redux.actionPayload')}
|
|
275
467
|
</react_native_1.Text>
|
|
276
468
|
<JsonViewer_1.default data={action.payload} search={detailSearch} forceOpen={true}/>
|
|
277
469
|
</react_native_1.View>)}
|
|
278
470
|
|
|
279
471
|
<react_native_1.Text style={reduxDetailStyles.expandedSectionTitle}>
|
|
280
|
-
|
|
472
|
+
{t('redux.stateChangesDiff')}
|
|
281
473
|
</react_native_1.Text>
|
|
282
474
|
<DiffViewer_1.default oldData={action.prevState?.[selectedReduxSlice] || {}} newData={action.nextState?.[selectedReduxSlice] || {}} forceOpen={true}/>
|
|
283
475
|
</react_native_1.View>) : (<react_native_1.View style={reduxDetailStyles.collapsedPrompt}>
|
|
284
476
|
<react_native_1.Text style={reduxDetailStyles.collapsedPromptText}>
|
|
285
|
-
|
|
477
|
+
{t('redux.tapToInspectAction')}
|
|
286
478
|
</react_native_1.Text>
|
|
287
479
|
<NetworkIcons_1.ForwardChevronIcon color={AppColors_1.AppColors.grayTextWeak} size={12}/>
|
|
288
480
|
</react_native_1.View>)}
|
|
@@ -365,12 +557,15 @@ const reduxDetailStyles = react_native_1.StyleSheet.create({
|
|
|
365
557
|
color: AppColors_1.AppColors.primaryBlack,
|
|
366
558
|
},
|
|
367
559
|
persistedChip: {
|
|
368
|
-
|
|
560
|
+
flexDirection: 'row',
|
|
561
|
+
alignItems: 'center',
|
|
562
|
+
gap: 3.5,
|
|
563
|
+
backgroundColor: '#ECFDF5',
|
|
369
564
|
paddingHorizontal: 6,
|
|
370
565
|
paddingVertical: 2,
|
|
371
566
|
borderRadius: 4,
|
|
372
567
|
borderWidth: 1,
|
|
373
|
-
borderColor:
|
|
568
|
+
borderColor: '#A7F3D0',
|
|
374
569
|
},
|
|
375
570
|
persistedChipText: {
|
|
376
571
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
@@ -378,22 +573,22 @@ const reduxDetailStyles = react_native_1.StyleSheet.create({
|
|
|
378
573
|
color: '#047857',
|
|
379
574
|
},
|
|
380
575
|
inMemoryChip: {
|
|
381
|
-
backgroundColor: '#
|
|
576
|
+
backgroundColor: '#EEF2FF',
|
|
382
577
|
paddingHorizontal: 6,
|
|
383
578
|
paddingVertical: 2,
|
|
384
579
|
borderRadius: 4,
|
|
385
580
|
borderWidth: 1,
|
|
386
|
-
borderColor: '#
|
|
581
|
+
borderColor: '#C7D2FE',
|
|
387
582
|
},
|
|
388
583
|
inMemoryChipText: {
|
|
389
584
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
390
585
|
fontSize: 9,
|
|
391
|
-
color: '#
|
|
586
|
+
color: '#4338CA',
|
|
392
587
|
},
|
|
393
588
|
subStatsRow: {
|
|
394
589
|
flexDirection: 'row',
|
|
395
590
|
alignItems: 'center',
|
|
396
|
-
gap:
|
|
591
|
+
gap: 6,
|
|
397
592
|
flexWrap: 'wrap',
|
|
398
593
|
},
|
|
399
594
|
statPill: {
|
|
@@ -401,20 +596,20 @@ const reduxDetailStyles = react_native_1.StyleSheet.create({
|
|
|
401
596
|
alignItems: 'center',
|
|
402
597
|
gap: 4,
|
|
403
598
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
404
|
-
paddingHorizontal:
|
|
405
|
-
paddingVertical:
|
|
599
|
+
paddingHorizontal: 7,
|
|
600
|
+
paddingVertical: 3.5,
|
|
406
601
|
borderRadius: 6,
|
|
407
602
|
borderWidth: 1,
|
|
408
603
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
409
604
|
},
|
|
410
605
|
statLabel: {
|
|
411
|
-
fontFamily: AppFonts_1.AppFonts.
|
|
412
|
-
fontSize: 10
|
|
606
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
607
|
+
fontSize: 10,
|
|
413
608
|
color: AppColors_1.AppColors.grayTextWeak,
|
|
414
609
|
},
|
|
415
610
|
statValue: {
|
|
416
611
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
417
|
-
fontSize:
|
|
612
|
+
fontSize: 10.5,
|
|
418
613
|
color: AppColors_1.AppColors.primaryBlack,
|
|
419
614
|
},
|
|
420
615
|
searchContainer: {
|