react-native-inapp-inspector 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -40
- package/dist/commonjs/components/ReduxTreeView.d.ts +4 -0
- package/dist/commonjs/components/ReduxTreeView.js +35 -5
- package/dist/commonjs/constants/index.d.ts +1 -0
- package/dist/commonjs/constants/index.js +5 -1
- package/dist/commonjs/constants/version.d.ts +1 -0
- package/dist/commonjs/constants/version.js +6 -0
- package/dist/commonjs/customHooks/reduxLogger.js +9 -1
- package/dist/commonjs/index.js +488 -40
- package/dist/esm/components/ReduxTreeView.d.ts +4 -0
- package/dist/esm/components/ReduxTreeView.js +30 -4
- package/dist/esm/constants/index.d.ts +1 -0
- package/dist/esm/constants/index.js +3 -0
- package/dist/esm/constants/version.d.ts +1 -0
- package/dist/esm/constants/version.js +3 -0
- package/dist/esm/customHooks/reduxLogger.js +9 -1
- package/dist/esm/index.js +490 -42
- package/example/ios/example.xcodeproj/project.pbxproj +10 -0
- package/package.json +2 -1
package/dist/commonjs/index.js
CHANGED
|
@@ -153,6 +153,12 @@ const animateNextLayout = () => {
|
|
|
153
153
|
const NetworkInspector = ({ enabled = true, }) => {
|
|
154
154
|
const [isDark, setIsDark] = (0, react_1.useState)(false);
|
|
155
155
|
const [reduxState, setReduxState] = (0, react_1.useState)(null);
|
|
156
|
+
// Action timeline + per-reducer last action are kept in component state so the
|
|
157
|
+
// Redux tab re-renders live on every dispatch, independent of the state tree ref.
|
|
158
|
+
const [reduxActionHistory, setReduxActionHistory] = (0, react_1.useState)([]);
|
|
159
|
+
const [reduxLastActionMap, setReduxLastActionMap] = (0, react_1.useState)({});
|
|
160
|
+
// Inspector panel height as a percentage of the screen (configurable in Settings).
|
|
161
|
+
const [modalHeightPercent, setModalHeightPercent] = (0, react_1.useState)(90);
|
|
156
162
|
const [expandedReducers, setExpandedReducers] = (0, react_1.useState)({});
|
|
157
163
|
const [logs, setLogs] = (0, react_1.useState)([]);
|
|
158
164
|
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
@@ -519,8 +525,14 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
519
525
|
}, 200);
|
|
520
526
|
});
|
|
521
527
|
setReduxState((0, reduxLogger_1.getReduxState)());
|
|
528
|
+
setReduxActionHistory([...(0, reduxLogger_1.getActionHistory)()]);
|
|
529
|
+
setReduxLastActionMap({ ...(0, reduxLogger_1.getLastActionForReducer)() });
|
|
522
530
|
const unsubscribeRedux = (0, reduxLogger_1.subscribeReduxState)(() => {
|
|
531
|
+
// New references each time guarantee the Redux tab updates live, even when
|
|
532
|
+
// the root state object reference is unchanged or auto-refresh is paused.
|
|
523
533
|
setReduxState((0, reduxLogger_1.getReduxState)());
|
|
534
|
+
setReduxActionHistory([...(0, reduxLogger_1.getActionHistory)()]);
|
|
535
|
+
setReduxLastActionMap({ ...(0, reduxLogger_1.getLastActionForReducer)() });
|
|
524
536
|
});
|
|
525
537
|
return () => {
|
|
526
538
|
unsubscribe();
|
|
@@ -1034,7 +1046,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1034
1046
|
fontSize: 10.5,
|
|
1035
1047
|
color: '#FFFFFF',
|
|
1036
1048
|
}}>
|
|
1037
|
-
|
|
1049
|
+
v{constants_1.LIB_VERSION}
|
|
1038
1050
|
</react_native_1.Text>
|
|
1039
1051
|
</react_native_1.View>
|
|
1040
1052
|
</react_native_1.View>
|
|
@@ -1202,24 +1214,50 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1202
1214
|
width: 38,
|
|
1203
1215
|
height: 22,
|
|
1204
1216
|
borderRadius: 11,
|
|
1205
|
-
backgroundColor:
|
|
1206
|
-
? AppColors_1.AppColors.
|
|
1207
|
-
:
|
|
1217
|
+
backgroundColor: isLocked
|
|
1218
|
+
? AppColors_1.AppColors.grayBackground
|
|
1219
|
+
: isVisible
|
|
1220
|
+
? AppColors_1.AppColors.purple
|
|
1221
|
+
: AppColors_1.AppColors.grayBorderSecondary,
|
|
1222
|
+
borderWidth: isLocked ? 1.5 : 0,
|
|
1223
|
+
borderColor: isLocked
|
|
1224
|
+
? AppColors_1.AppColors.grayBorderSecondary
|
|
1225
|
+
: 'transparent',
|
|
1226
|
+
borderStyle: isLocked ? 'dashed' : 'solid',
|
|
1208
1227
|
padding: 2,
|
|
1209
1228
|
justifyContent: 'center',
|
|
1210
1229
|
alignItems: isVisible ? 'flex-end' : 'flex-start',
|
|
1230
|
+
opacity: isLocked ? 0.9 : 1,
|
|
1211
1231
|
}}>
|
|
1212
1232
|
<react_native_1.View style={{
|
|
1213
1233
|
width: 18,
|
|
1214
1234
|
height: 18,
|
|
1215
1235
|
borderRadius: 9,
|
|
1216
|
-
backgroundColor:
|
|
1236
|
+
backgroundColor: isLocked
|
|
1237
|
+
? AppColors_1.AppColors.grayBorderSecondary
|
|
1238
|
+
: '#FFFFFF',
|
|
1239
|
+
alignItems: 'center',
|
|
1240
|
+
justifyContent: 'center',
|
|
1217
1241
|
shadowColor: '#000',
|
|
1218
|
-
shadowOpacity: 0.15,
|
|
1242
|
+
shadowOpacity: isLocked ? 0 : 0.15,
|
|
1219
1243
|
shadowRadius: 1.5,
|
|
1220
1244
|
shadowOffset: { width: 0, height: 1 },
|
|
1221
|
-
}}
|
|
1245
|
+
}}>
|
|
1246
|
+
{isLocked && (<react_native_svg_1.default width={10} height={10} viewBox="0 0 24 24" fill="none">
|
|
1247
|
+
<react_native_svg_1.Path d="M7 10V7a5 5 0 0 1 10 0v3" stroke={AppColors_1.AppColors.grayText} strokeWidth="2.2" strokeLinecap="round"/>
|
|
1248
|
+
<react_native_svg_1.Path d="M5 10h14v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z" fill={AppColors_1.AppColors.grayText}/>
|
|
1249
|
+
</react_native_svg_1.default>)}
|
|
1250
|
+
</react_native_1.View>
|
|
1222
1251
|
</TouchableScale_1.default>
|
|
1252
|
+
{isLocked && (<react_native_1.Text style={{
|
|
1253
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1254
|
+
fontSize: 8,
|
|
1255
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
1256
|
+
letterSpacing: 0.4,
|
|
1257
|
+
marginTop: 3,
|
|
1258
|
+
}}>
|
|
1259
|
+
REQUIRED
|
|
1260
|
+
</react_native_1.Text>)}
|
|
1223
1261
|
</react_native_1.View>
|
|
1224
1262
|
</react_native_1.View>);
|
|
1225
1263
|
})}
|
|
@@ -1308,6 +1346,86 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1308
1346
|
}}/>
|
|
1309
1347
|
</TouchableScale_1.default>
|
|
1310
1348
|
</react_native_1.View>
|
|
1349
|
+
|
|
1350
|
+
{/* Divider */}
|
|
1351
|
+
<react_native_1.View style={{
|
|
1352
|
+
height: 1,
|
|
1353
|
+
backgroundColor: AppColors_1.AppColors.dividerColor,
|
|
1354
|
+
}}/>
|
|
1355
|
+
|
|
1356
|
+
{/* Modal Height */}
|
|
1357
|
+
<react_native_1.View style={{
|
|
1358
|
+
paddingVertical: 12,
|
|
1359
|
+
paddingHorizontal: 14,
|
|
1360
|
+
}}>
|
|
1361
|
+
<react_native_1.View style={{
|
|
1362
|
+
flexDirection: 'row',
|
|
1363
|
+
alignItems: 'center',
|
|
1364
|
+
gap: 8,
|
|
1365
|
+
}}>
|
|
1366
|
+
<react_native_1.View style={{
|
|
1367
|
+
width: 20,
|
|
1368
|
+
height: 20,
|
|
1369
|
+
borderRadius: 6,
|
|
1370
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1371
|
+
borderWidth: 1,
|
|
1372
|
+
borderColor: 'rgba(104,75,155,0.2)',
|
|
1373
|
+
alignItems: 'center',
|
|
1374
|
+
justifyContent: 'center',
|
|
1375
|
+
}}>
|
|
1376
|
+
<NetworkIcons_1.ScreenIcon color={AppColors_1.AppColors.purple} size={11}/>
|
|
1377
|
+
</react_native_1.View>
|
|
1378
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
1379
|
+
<react_native_1.Text style={{
|
|
1380
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1381
|
+
fontSize: 13,
|
|
1382
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
1383
|
+
}}>
|
|
1384
|
+
Modal Height
|
|
1385
|
+
</react_native_1.Text>
|
|
1386
|
+
<react_native_1.Text style={{
|
|
1387
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
1388
|
+
fontSize: 11,
|
|
1389
|
+
color: AppColors_1.AppColors.grayText,
|
|
1390
|
+
marginTop: 1,
|
|
1391
|
+
}}>
|
|
1392
|
+
Height of the inspector panel relative to the screen
|
|
1393
|
+
</react_native_1.Text>
|
|
1394
|
+
</react_native_1.View>
|
|
1395
|
+
</react_native_1.View>
|
|
1396
|
+
|
|
1397
|
+
{/* Segmented picker */}
|
|
1398
|
+
<react_native_1.View style={{
|
|
1399
|
+
flexDirection: 'row',
|
|
1400
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
1401
|
+
borderRadius: 8,
|
|
1402
|
+
padding: 2.5,
|
|
1403
|
+
marginTop: 10,
|
|
1404
|
+
borderWidth: 1,
|
|
1405
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1406
|
+
}}>
|
|
1407
|
+
{[50, 70, 90, 100].map(opt => {
|
|
1408
|
+
const isActive = modalHeightPercent === opt;
|
|
1409
|
+
return (<TouchableScale_1.default key={opt} onPress={() => setModalHeightPercent(opt)} style={{
|
|
1410
|
+
flex: 1,
|
|
1411
|
+
paddingVertical: 6,
|
|
1412
|
+
alignItems: 'center',
|
|
1413
|
+
borderRadius: 6,
|
|
1414
|
+
backgroundColor: isActive
|
|
1415
|
+
? AppColors_1.AppColors.purple
|
|
1416
|
+
: 'transparent',
|
|
1417
|
+
}}>
|
|
1418
|
+
<react_native_1.Text style={{
|
|
1419
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1420
|
+
fontSize: 11,
|
|
1421
|
+
color: isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText,
|
|
1422
|
+
}}>
|
|
1423
|
+
{opt}%
|
|
1424
|
+
</react_native_1.Text>
|
|
1425
|
+
</TouchableScale_1.default>);
|
|
1426
|
+
})}
|
|
1427
|
+
</react_native_1.View>
|
|
1428
|
+
</react_native_1.View>
|
|
1311
1429
|
</react_native_1.View>
|
|
1312
1430
|
</react_native_1.View>
|
|
1313
1431
|
</react_native_1.ScrollView>
|
|
@@ -1442,11 +1560,13 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1442
1560
|
fontSize: 11,
|
|
1443
1561
|
color: isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText,
|
|
1444
1562
|
}}>
|
|
1445
|
-
{
|
|
1446
|
-
opt
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1563
|
+
{opts.picker.formatLabel
|
|
1564
|
+
? opts.picker.formatLabel(opt)
|
|
1565
|
+
: typeof opt === 'number' &&
|
|
1566
|
+
opt >= 500 &&
|
|
1567
|
+
settingsPage === 'insights'
|
|
1568
|
+
? `${opt}ms`
|
|
1569
|
+
: opt}
|
|
1450
1570
|
</react_native_1.Text>
|
|
1451
1571
|
</TouchableScale_1.default>);
|
|
1452
1572
|
})}
|
|
@@ -1911,7 +2031,187 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1911
2031
|
e.name === 'page_view' ||
|
|
1912
2032
|
e.name === 'firebase_screen_class').length;
|
|
1913
2033
|
const webviewTotal = webViewNavHistory.length;
|
|
2034
|
+
// --- Richer insights metrics ---
|
|
2035
|
+
const slowestTime = durations.length > 0 ? Math.max(...durations) : null;
|
|
2036
|
+
const fastestTime = durations.length > 0 ? Math.min(...durations) : null;
|
|
2037
|
+
const slowCount = durations.filter(d => d >= slowRequestThreshold).length;
|
|
2038
|
+
const status2xx = logs.filter(l => l.status != null && l.status >= 200 && l.status < 300).length;
|
|
2039
|
+
const status3xx = logs.filter(l => l.status != null && l.status >= 300 && l.status < 400).length;
|
|
2040
|
+
const status4xx = logs.filter(l => l.status != null && l.status >= 400 && l.status < 500).length;
|
|
2041
|
+
const status5xx = logs.filter(l => l.status != null && l.status >= 500).length;
|
|
2042
|
+
const totalSignals = apiTotal + logTotal + analyticsTotal + webviewTotal;
|
|
2043
|
+
const totalIssues = apiErrors + logErrors;
|
|
2044
|
+
const activeModules = [
|
|
2045
|
+
tabVisibility.apis,
|
|
2046
|
+
tabVisibility.logs,
|
|
2047
|
+
tabVisibility.analytics,
|
|
2048
|
+
tabVisibility.webview,
|
|
2049
|
+
tabVisibility.redux,
|
|
2050
|
+
].filter(Boolean).length;
|
|
2051
|
+
// Composite health score: success rate penalised by error volume and slow requests.
|
|
2052
|
+
const healthScore = totalSignals === 0
|
|
2053
|
+
? 100
|
|
2054
|
+
: Math.max(0, Math.min(100, Math.round(apiSuccessRate -
|
|
2055
|
+
(logErrors > 0 ? Math.min(15, logErrors * 3) : 0) -
|
|
2056
|
+
(slowCount > 0 ? Math.min(10, slowCount * 2) : 0))));
|
|
2057
|
+
const healthColor = healthScore >= 90
|
|
2058
|
+
? AppColors_1.AppColors.greenColor
|
|
2059
|
+
: healthScore >= 70
|
|
2060
|
+
? AppColors_1.AppColors.warningIconGold
|
|
2061
|
+
: AppColors_1.AppColors.errorColor;
|
|
2062
|
+
const healthLabel = healthScore >= 90
|
|
2063
|
+
? 'Healthy'
|
|
2064
|
+
: healthScore >= 70
|
|
2065
|
+
? 'Needs attention'
|
|
2066
|
+
: 'Degraded';
|
|
1914
2067
|
return (<react_native_1.View style={styles_1.default.dashboardContainer}>
|
|
2068
|
+
{/* Overview hero card */}
|
|
2069
|
+
<react_native_1.View style={{
|
|
2070
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
2071
|
+
borderRadius: 14,
|
|
2072
|
+
borderWidth: 1,
|
|
2073
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
2074
|
+
padding: 16,
|
|
2075
|
+
marginBottom: 12,
|
|
2076
|
+
}}>
|
|
2077
|
+
<react_native_1.View style={{
|
|
2078
|
+
flexDirection: 'row',
|
|
2079
|
+
alignItems: 'center',
|
|
2080
|
+
gap: 14,
|
|
2081
|
+
}}>
|
|
2082
|
+
{/* Health ring stand-in */}
|
|
2083
|
+
<react_native_1.View style={{
|
|
2084
|
+
width: 64,
|
|
2085
|
+
height: 64,
|
|
2086
|
+
borderRadius: 32,
|
|
2087
|
+
borderWidth: 4,
|
|
2088
|
+
borderColor: healthColor,
|
|
2089
|
+
alignItems: 'center',
|
|
2090
|
+
justifyContent: 'center',
|
|
2091
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
2092
|
+
}}>
|
|
2093
|
+
<react_native_1.Text style={{
|
|
2094
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2095
|
+
fontSize: 18,
|
|
2096
|
+
color: healthColor,
|
|
2097
|
+
}}>
|
|
2098
|
+
{healthScore}
|
|
2099
|
+
</react_native_1.Text>
|
|
2100
|
+
<react_native_1.Text style={{
|
|
2101
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2102
|
+
fontSize: 7.5,
|
|
2103
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2104
|
+
letterSpacing: 0.4,
|
|
2105
|
+
}}>
|
|
2106
|
+
HEALTH
|
|
2107
|
+
</react_native_1.Text>
|
|
2108
|
+
</react_native_1.View>
|
|
2109
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
2110
|
+
<react_native_1.Text style={{
|
|
2111
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2112
|
+
fontSize: 15,
|
|
2113
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2114
|
+
}}>
|
|
2115
|
+
Session Overview
|
|
2116
|
+
</react_native_1.Text>
|
|
2117
|
+
<react_native_1.View style={{
|
|
2118
|
+
flexDirection: 'row',
|
|
2119
|
+
alignItems: 'center',
|
|
2120
|
+
gap: 6,
|
|
2121
|
+
marginTop: 3,
|
|
2122
|
+
}}>
|
|
2123
|
+
<react_native_1.View style={{
|
|
2124
|
+
width: 7,
|
|
2125
|
+
height: 7,
|
|
2126
|
+
borderRadius: 3.5,
|
|
2127
|
+
backgroundColor: healthColor,
|
|
2128
|
+
}}/>
|
|
2129
|
+
<react_native_1.Text style={{
|
|
2130
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2131
|
+
fontSize: 11.5,
|
|
2132
|
+
color: healthColor,
|
|
2133
|
+
}}>
|
|
2134
|
+
{healthLabel}
|
|
2135
|
+
</react_native_1.Text>
|
|
2136
|
+
<react_native_1.Text style={{
|
|
2137
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2138
|
+
fontSize: 11.5,
|
|
2139
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2140
|
+
}}>
|
|
2141
|
+
• {activeModules} modules active
|
|
2142
|
+
</react_native_1.Text>
|
|
2143
|
+
</react_native_1.View>
|
|
2144
|
+
</react_native_1.View>
|
|
2145
|
+
</react_native_1.View>
|
|
2146
|
+
|
|
2147
|
+
{/* Quick totals strip */}
|
|
2148
|
+
<react_native_1.View style={{
|
|
2149
|
+
flexDirection: 'row',
|
|
2150
|
+
marginTop: 14,
|
|
2151
|
+
borderTopWidth: 1,
|
|
2152
|
+
borderTopColor: AppColors_1.AppColors.dividerColor,
|
|
2153
|
+
paddingTop: 12,
|
|
2154
|
+
}}>
|
|
2155
|
+
<react_native_1.View style={{ flex: 1, alignItems: 'center' }}>
|
|
2156
|
+
<react_native_1.Text style={{
|
|
2157
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2158
|
+
fontSize: 16,
|
|
2159
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2160
|
+
}}>
|
|
2161
|
+
{totalSignals}
|
|
2162
|
+
</react_native_1.Text>
|
|
2163
|
+
<react_native_1.Text style={{
|
|
2164
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2165
|
+
fontSize: 10,
|
|
2166
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2167
|
+
marginTop: 1,
|
|
2168
|
+
}}>
|
|
2169
|
+
Signals
|
|
2170
|
+
</react_native_1.Text>
|
|
2171
|
+
</react_native_1.View>
|
|
2172
|
+
<react_native_1.View style={{ width: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
2173
|
+
<react_native_1.View style={{ flex: 1, alignItems: 'center' }}>
|
|
2174
|
+
<react_native_1.Text style={{
|
|
2175
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2176
|
+
fontSize: 16,
|
|
2177
|
+
color: totalIssues > 0
|
|
2178
|
+
? AppColors_1.AppColors.errorColor
|
|
2179
|
+
: AppColors_1.AppColors.primaryBlack,
|
|
2180
|
+
}}>
|
|
2181
|
+
{totalIssues}
|
|
2182
|
+
</react_native_1.Text>
|
|
2183
|
+
<react_native_1.Text style={{
|
|
2184
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2185
|
+
fontSize: 10,
|
|
2186
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2187
|
+
marginTop: 1,
|
|
2188
|
+
}}>
|
|
2189
|
+
Issues
|
|
2190
|
+
</react_native_1.Text>
|
|
2191
|
+
</react_native_1.View>
|
|
2192
|
+
<react_native_1.View style={{ width: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
2193
|
+
<react_native_1.View style={{ flex: 1, alignItems: 'center' }}>
|
|
2194
|
+
<react_native_1.Text style={{
|
|
2195
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2196
|
+
fontSize: 16,
|
|
2197
|
+
color: slowCount > 0
|
|
2198
|
+
? AppColors_1.AppColors.warningIconGold
|
|
2199
|
+
: AppColors_1.AppColors.primaryBlack,
|
|
2200
|
+
}}>
|
|
2201
|
+
{slowCount}
|
|
2202
|
+
</react_native_1.Text>
|
|
2203
|
+
<react_native_1.Text style={{
|
|
2204
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2205
|
+
fontSize: 10,
|
|
2206
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2207
|
+
marginTop: 1,
|
|
2208
|
+
}}>
|
|
2209
|
+
Slow ({slowRequestThreshold}ms+)
|
|
2210
|
+
</react_native_1.Text>
|
|
2211
|
+
</react_native_1.View>
|
|
2212
|
+
</react_native_1.View>
|
|
2213
|
+
</react_native_1.View>
|
|
2214
|
+
|
|
1915
2215
|
{/* Module 1: APIs */}
|
|
1916
2216
|
{tabVisibility.apis && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('apis')}>
|
|
1917
2217
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
@@ -1951,9 +2251,75 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1951
2251
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Avg Latency</react_native_1.Text>
|
|
1952
2252
|
</react_native_1.View>
|
|
1953
2253
|
</react_native_1.View>
|
|
1954
|
-
</TouchableScale_1.default>)}
|
|
1955
2254
|
|
|
1956
|
-
|
|
2255
|
+
{/* Status-class breakdown + latency range */}
|
|
2256
|
+
<react_native_1.View style={{
|
|
2257
|
+
marginTop: 10,
|
|
2258
|
+
paddingTop: 10,
|
|
2259
|
+
borderTopWidth: 1,
|
|
2260
|
+
borderTopColor: AppColors_1.AppColors.dividerColor,
|
|
2261
|
+
flexDirection: 'row',
|
|
2262
|
+
alignItems: 'center',
|
|
2263
|
+
flexWrap: 'wrap',
|
|
2264
|
+
gap: 6,
|
|
2265
|
+
}}>
|
|
2266
|
+
{[
|
|
2267
|
+
{ label: '2xx', value: status2xx, color: AppColors_1.AppColors.greenColor },
|
|
2268
|
+
{ label: '3xx', value: status3xx, color: AppColors_1.AppColors.skyBlue },
|
|
2269
|
+
{
|
|
2270
|
+
label: '4xx',
|
|
2271
|
+
value: status4xx,
|
|
2272
|
+
color: AppColors_1.AppColors.warningIconGold,
|
|
2273
|
+
},
|
|
2274
|
+
{ label: '5xx', value: status5xx, color: AppColors_1.AppColors.errorColor },
|
|
2275
|
+
].map(s => (<react_native_1.View key={s.label} style={{
|
|
2276
|
+
flexDirection: 'row',
|
|
2277
|
+
alignItems: 'center',
|
|
2278
|
+
gap: 4,
|
|
2279
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
2280
|
+
borderRadius: 6,
|
|
2281
|
+
borderWidth: 1,
|
|
2282
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
2283
|
+
paddingHorizontal: 7,
|
|
2284
|
+
paddingVertical: 3,
|
|
2285
|
+
}}>
|
|
2286
|
+
<react_native_1.View style={{
|
|
2287
|
+
width: 6,
|
|
2288
|
+
height: 6,
|
|
2289
|
+
borderRadius: 3,
|
|
2290
|
+
backgroundColor: s.color,
|
|
2291
|
+
}}/>
|
|
2292
|
+
<react_native_1.Text style={{
|
|
2293
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2294
|
+
fontSize: 10,
|
|
2295
|
+
color: AppColors_1.AppColors.grayTextStrong,
|
|
2296
|
+
}}>
|
|
2297
|
+
{s.label} {s.value}
|
|
2298
|
+
</react_native_1.Text>
|
|
2299
|
+
</react_native_1.View>))}
|
|
2300
|
+
{slowestTime != null && (<react_native_1.View style={{
|
|
2301
|
+
marginLeft: 'auto',
|
|
2302
|
+
flexDirection: 'row',
|
|
2303
|
+
alignItems: 'center',
|
|
2304
|
+
gap: 4,
|
|
2305
|
+
}}>
|
|
2306
|
+
<react_native_1.Text style={{
|
|
2307
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2308
|
+
fontSize: 10,
|
|
2309
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2310
|
+
}}>
|
|
2311
|
+
Range
|
|
2312
|
+
</react_native_1.Text>
|
|
2313
|
+
<react_native_1.Text style={{
|
|
2314
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2315
|
+
fontSize: 10,
|
|
2316
|
+
color: AppColors_1.AppColors.grayTextStrong,
|
|
2317
|
+
}}>
|
|
2318
|
+
{fastestTime}–{slowestTime}ms
|
|
2319
|
+
</react_native_1.Text>
|
|
2320
|
+
</react_native_1.View>)}
|
|
2321
|
+
</react_native_1.View>
|
|
2322
|
+
</TouchableScale_1.default>)}
|
|
1957
2323
|
{tabVisibility.logs && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('logs')}>
|
|
1958
2324
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1959
2325
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
@@ -2157,9 +2523,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2157
2523
|
<react_native_1.Text style={styles_1.default.emptySub}>Connected store state is empty.</react_native_1.Text>
|
|
2158
2524
|
</react_native_1.View>);
|
|
2159
2525
|
}
|
|
2160
|
-
// Build hierarchical tree: Store -> Reducers -> Action -> Data
|
|
2161
|
-
|
|
2162
|
-
const
|
|
2526
|
+
// Build hierarchical tree: Store -> Reducers -> Action -> Data.
|
|
2527
|
+
// These come from component state (refreshed on every dispatch) so the view stays live.
|
|
2528
|
+
const lastActionMap = reduxLastActionMap;
|
|
2529
|
+
const actionHistory = reduxActionHistory;
|
|
2163
2530
|
return (<react_native_1.ScrollView style={styles_1.default.detailScroll} contentContainerStyle={{ paddingBottom: 24 }}>
|
|
2164
2531
|
{/* Top Summary Card */}
|
|
2165
2532
|
<react_native_1.View style={{
|
|
@@ -2229,15 +2596,25 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2229
2596
|
? AppColors_1.AppColors.purple
|
|
2230
2597
|
: 'transparent',
|
|
2231
2598
|
}}>
|
|
2232
|
-
<react_native_1.
|
|
2599
|
+
<react_native_1.View style={{
|
|
2600
|
+
flexDirection: 'row',
|
|
2601
|
+
alignItems: 'center',
|
|
2602
|
+
justifyContent: 'center',
|
|
2603
|
+
gap: 6,
|
|
2604
|
+
}}>
|
|
2605
|
+
<ReduxTreeView_1.ReduxTimelineIcon color={reduxActiveSubTab === 'timeline'
|
|
2606
|
+
? '#FFFFFF'
|
|
2607
|
+
: AppColors_1.AppColors.grayText} size={13}/>
|
|
2608
|
+
<react_native_1.Text style={{
|
|
2233
2609
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2234
2610
|
fontSize: 11,
|
|
2235
2611
|
color: reduxActiveSubTab === 'timeline'
|
|
2236
2612
|
? '#FFFFFF'
|
|
2237
2613
|
: AppColors_1.AppColors.grayText,
|
|
2238
2614
|
}}>
|
|
2239
|
-
|
|
2240
|
-
|
|
2615
|
+
Action Timeline
|
|
2616
|
+
</react_native_1.Text>
|
|
2617
|
+
</react_native_1.View>
|
|
2241
2618
|
</react_native_1.TouchableOpacity>
|
|
2242
2619
|
<react_native_1.TouchableOpacity onPress={() => {
|
|
2243
2620
|
animateNextLayout();
|
|
@@ -2250,13 +2627,23 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2250
2627
|
borderRadius: 8,
|
|
2251
2628
|
backgroundColor: reduxActiveSubTab === 'tree' ? AppColors_1.AppColors.purple : 'transparent',
|
|
2252
2629
|
}}>
|
|
2253
|
-
<react_native_1.
|
|
2630
|
+
<react_native_1.View style={{
|
|
2631
|
+
flexDirection: 'row',
|
|
2632
|
+
alignItems: 'center',
|
|
2633
|
+
justifyContent: 'center',
|
|
2634
|
+
gap: 6,
|
|
2635
|
+
}}>
|
|
2636
|
+
<ReduxTreeView_1.ReduxTreeIcon color={reduxActiveSubTab === 'tree' ? '#FFFFFF' : AppColors_1.AppColors.grayText} size={13}/>
|
|
2637
|
+
<react_native_1.Text style={{
|
|
2254
2638
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2255
2639
|
fontSize: 11,
|
|
2256
|
-
color: reduxActiveSubTab === 'tree'
|
|
2640
|
+
color: reduxActiveSubTab === 'tree'
|
|
2641
|
+
? '#FFFFFF'
|
|
2642
|
+
: AppColors_1.AppColors.grayText,
|
|
2257
2643
|
}}>
|
|
2258
|
-
|
|
2259
|
-
|
|
2644
|
+
Store Tree
|
|
2645
|
+
</react_native_1.Text>
|
|
2646
|
+
</react_native_1.View>
|
|
2260
2647
|
</react_native_1.TouchableOpacity>
|
|
2261
2648
|
</react_native_1.View>
|
|
2262
2649
|
|
|
@@ -2322,7 +2709,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2322
2709
|
{visible && (<ErrorBoundary_1.default onClose={closeModal}>
|
|
2323
2710
|
<react_native_1.View style={styles_1.default.modalBackdrop}>
|
|
2324
2711
|
<react_native_1.Pressable style={styles_1.default.modalBackdropPressable} onPress={closeModal}/>
|
|
2325
|
-
<react_native_1.View style={
|
|
2712
|
+
<react_native_1.View style={[
|
|
2713
|
+
styles_1.default.modalContentCard,
|
|
2714
|
+
{ height: `${modalHeightPercent}%` },
|
|
2715
|
+
]}>
|
|
2326
2716
|
<react_native_1.StatusBar translucent backgroundColor="transparent" barStyle="light-content"/>
|
|
2327
2717
|
|
|
2328
2718
|
<react_native_linear_gradient_1.default colors={[AppColors_1.AppColors.purple, '#6B4EFF']} style={styles_1.default.headerGradient}>
|
|
@@ -2382,25 +2772,83 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2382
2772
|
<react_native_1.View style={{
|
|
2383
2773
|
flexDirection: 'row',
|
|
2384
2774
|
alignItems: 'center',
|
|
2385
|
-
gap:
|
|
2775
|
+
gap: 6,
|
|
2386
2776
|
}}>
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2777
|
+
{/* OS chip */}
|
|
2778
|
+
<react_native_1.View style={{
|
|
2779
|
+
flexDirection: 'row',
|
|
2780
|
+
alignItems: 'center',
|
|
2781
|
+
borderRadius: 6,
|
|
2782
|
+
overflow: 'hidden',
|
|
2783
|
+
borderWidth: 1,
|
|
2784
|
+
borderColor: 'rgba(255,255,255,0.18)',
|
|
2785
|
+
}}>
|
|
2786
|
+
<react_native_1.View style={{
|
|
2787
|
+
paddingHorizontal: 5,
|
|
2788
|
+
paddingVertical: 2,
|
|
2789
|
+
backgroundColor: 'rgba(255,255,255,0.28)',
|
|
2790
|
+
}}>
|
|
2791
|
+
<react_native_1.Text style={{
|
|
2792
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2793
|
+
fontSize: 9,
|
|
2794
|
+
color: '#FFFFFF',
|
|
2795
|
+
letterSpacing: 0.3,
|
|
2796
|
+
}}>
|
|
2797
|
+
{react_native_1.Platform.OS === 'ios' ? 'iOS' : 'Android'}
|
|
2798
|
+
</react_native_1.Text>
|
|
2799
|
+
</react_native_1.View>
|
|
2800
|
+
<react_native_1.View style={{
|
|
2801
|
+
paddingHorizontal: 5,
|
|
2802
|
+
paddingVertical: 2,
|
|
2803
|
+
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
2804
|
+
}}>
|
|
2805
|
+
<react_native_1.Text style={{
|
|
2395
2806
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2396
|
-
fontSize:
|
|
2397
|
-
color: 'rgba(255,255,255,0.
|
|
2807
|
+
fontSize: 9.5,
|
|
2808
|
+
color: 'rgba(255,255,255,0.92)',
|
|
2809
|
+
}}>
|
|
2810
|
+
{String(react_native_1.Platform.Version)}
|
|
2811
|
+
</react_native_1.Text>
|
|
2812
|
+
</react_native_1.View>
|
|
2813
|
+
</react_native_1.View>
|
|
2814
|
+
|
|
2815
|
+
{/* npm chip */}
|
|
2816
|
+
<react_native_1.View style={{
|
|
2817
|
+
flexDirection: 'row',
|
|
2818
|
+
alignItems: 'center',
|
|
2819
|
+
borderRadius: 6,
|
|
2820
|
+
overflow: 'hidden',
|
|
2821
|
+
borderWidth: 1,
|
|
2822
|
+
borderColor: 'rgba(255,255,255,0.18)',
|
|
2823
|
+
}}>
|
|
2824
|
+
<react_native_1.View style={{
|
|
2825
|
+
paddingHorizontal: 5,
|
|
2826
|
+
paddingVertical: 2,
|
|
2827
|
+
backgroundColor: 'rgba(255,255,255,0.28)',
|
|
2828
|
+
}}>
|
|
2829
|
+
<react_native_1.Text style={{
|
|
2830
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2831
|
+
fontSize: 9,
|
|
2832
|
+
color: '#FFFFFF',
|
|
2398
2833
|
letterSpacing: 0.3,
|
|
2399
2834
|
}}>
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2835
|
+
npm
|
|
2836
|
+
</react_native_1.Text>
|
|
2837
|
+
</react_native_1.View>
|
|
2838
|
+
<react_native_1.View style={{
|
|
2839
|
+
paddingHorizontal: 5,
|
|
2840
|
+
paddingVertical: 2,
|
|
2841
|
+
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
2842
|
+
}}>
|
|
2843
|
+
<react_native_1.Text style={{
|
|
2844
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2845
|
+
fontSize: 9.5,
|
|
2846
|
+
color: 'rgba(255,255,255,0.92)',
|
|
2847
|
+
}}>
|
|
2848
|
+
v{constants_1.LIB_VERSION}
|
|
2849
|
+
</react_native_1.Text>
|
|
2850
|
+
</react_native_1.View>
|
|
2851
|
+
</react_native_1.View>
|
|
2404
2852
|
</react_native_1.View>
|
|
2405
2853
|
</react_native_1.View>
|
|
2406
2854
|
</react_native_1.View>) : null}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export declare const ReduxStoreIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
3
|
+
export declare const ReduxBoltIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
4
|
+
export declare const ReduxTimelineIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
5
|
+
export declare const ReduxTreeIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
2
6
|
export declare const ReduxTreeView: ({ state, lastActionMap, search, }: {
|
|
3
7
|
state: any;
|
|
4
8
|
lastActionMap: Record<string, any>;
|