react-native-inapp-inspector 1.1.16 → 1.1.18
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 +13 -0
- package/dist/commonjs/components/AnimatedEntrance.js +3 -0
- package/dist/commonjs/components/AppHeaderLogo.d.ts +8 -0
- package/dist/commonjs/components/AppHeaderLogo.js +85 -0
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +46 -0
- package/dist/commonjs/components/Inspector/BundleTab.js +2439 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +185 -52
- package/dist/commonjs/components/Inspector/MainScreen.js +93 -7
- package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +22 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +1143 -0
- package/dist/commonjs/components/Inspector/ReduxDetail.d.ts +3 -0
- package/dist/commonjs/components/Inspector/ReduxDetail.js +576 -0
- package/dist/commonjs/components/Inspector/ReduxTab.js +433 -49
- package/dist/commonjs/components/Inspector/SettingsPanel.js +13 -2
- package/dist/commonjs/components/Inspector/TabBar.js +16 -6
- package/dist/commonjs/components/JsonViewer.js +91 -30
- package/dist/commonjs/components/LogCard.js +3 -4
- package/dist/commonjs/components/NetworkIcons.d.ts +9 -0
- package/dist/commonjs/components/NetworkIcons.js +63 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/consoleLogger.js +37 -9
- package/dist/commonjs/customHooks/reduxLogger.js +4 -2
- package/dist/commonjs/helpers/index.js +6 -2
- package/dist/commonjs/index.js +18 -1
- package/dist/commonjs/styles/AppColors.js +163 -163
- package/dist/commonjs/styles/index.d.ts +14 -0
- package/dist/commonjs/styles/index.js +14 -0
- package/dist/commonjs/types/enums.d.ts +2 -2
- package/dist/commonjs/types/interfaces.d.ts +11 -0
- package/dist/esm/components/AnimatedEntrance.js +4 -1
- package/dist/esm/components/AppHeaderLogo.d.ts +8 -0
- package/dist/esm/components/AppHeaderLogo.js +45 -0
- package/dist/esm/components/Inspector/BundleTab.d.ts +46 -0
- package/dist/esm/components/Inspector/BundleTab.js +2401 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +151 -51
- package/dist/esm/components/Inspector/MainScreen.js +60 -7
- package/dist/esm/components/Inspector/PerformanceTab.d.ts +22 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +1105 -0
- package/dist/esm/components/Inspector/ReduxDetail.d.ts +3 -0
- package/dist/esm/components/Inspector/ReduxDetail.js +538 -0
- package/dist/esm/components/Inspector/ReduxTab.js +402 -51
- package/dist/esm/components/Inspector/SettingsPanel.js +14 -3
- package/dist/esm/components/Inspector/TabBar.js +17 -7
- package/dist/esm/components/JsonViewer.js +92 -31
- package/dist/esm/components/LogCard.js +3 -4
- package/dist/esm/components/NetworkIcons.d.ts +9 -0
- package/dist/esm/components/NetworkIcons.js +55 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/consoleLogger.js +37 -9
- package/dist/esm/customHooks/reduxLogger.js +4 -2
- package/dist/esm/helpers/index.js +6 -2
- package/dist/esm/index.js +18 -1
- package/dist/esm/styles/AppColors.js +163 -163
- package/dist/esm/styles/index.d.ts +14 -0
- package/dist/esm/styles/index.js +14 -0
- package/dist/esm/types/enums.d.ts +2 -2
- package/dist/esm/types/interfaces.d.ts +11 -0
- package/example/App.tsx +5 -1
- package/example/assets/app_icon.png +0 -0
- package/example/ios/Podfile.lock +3 -3
- package/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json +18 -9
- package/example/ios/example/Images.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
- package/example/package-lock.json +824 -10
- package/example/package.json +6 -2
- package/package.json +4 -2
|
@@ -1,75 +1,459 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 =
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
7
40
|
const react_native_1 = require("react-native");
|
|
8
41
|
const InspectorContext_1 = require("./InspectorContext");
|
|
9
|
-
const
|
|
42
|
+
const TouchableScale_1 = __importDefault(require("../TouchableScale"));
|
|
43
|
+
const AnimatedEntrance_1 = __importDefault(require("../AnimatedEntrance"));
|
|
44
|
+
const EmptyState_1 = __importDefault(require("../EmptyState"));
|
|
45
|
+
const EndOfListFooter_1 = __importDefault(require("../EndOfListFooter"));
|
|
46
|
+
const HighlightText_1 = __importDefault(require("../HighlightText"));
|
|
47
|
+
const helpers_1 = require("../../helpers");
|
|
10
48
|
const styles_1 = __importDefault(require("../../styles"));
|
|
11
49
|
const AppColors_1 = require("../../styles/AppColors");
|
|
12
50
|
const AppFonts_1 = require("../../styles/AppFonts");
|
|
13
51
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
14
52
|
const ReduxTab = react_1.default.memo(() => {
|
|
15
|
-
const { reduxState, reduxLastActionMap, reduxSearch, setReduxSearch, } = (0, InspectorContext_1.useInspector)();
|
|
53
|
+
const { reduxState, reduxLastActionMap, reduxSearch, setReduxSearch, setSelectedReduxSlice, } = (0, InspectorContext_1.useInspector)();
|
|
54
|
+
// Sort mode: 'latest' (newest updated first) vs 'alpha' (A-Z)
|
|
55
|
+
const [sortMode, setSortMode] = (0, react_1.useState)('latest');
|
|
56
|
+
// Total state size calculation
|
|
57
|
+
const totalStateSize = (0, react_1.useMemo)(() => {
|
|
58
|
+
return (0, helpers_1.getSize)(reduxState);
|
|
59
|
+
}, [reduxState]);
|
|
60
|
+
// Compute slice items with exact timestamps
|
|
61
|
+
const sliceItems = (0, react_1.useMemo)(() => {
|
|
62
|
+
if (!reduxState || typeof reduxState !== 'object')
|
|
63
|
+
return [];
|
|
64
|
+
const keys = Object.keys(reduxState);
|
|
65
|
+
return keys.map(key => {
|
|
66
|
+
const sliceVal = reduxState[key];
|
|
67
|
+
const keysCount = sliceVal && typeof sliceVal === 'object'
|
|
68
|
+
? Object.keys(sliceVal).length
|
|
69
|
+
: typeof sliceVal !== 'undefined'
|
|
70
|
+
? 1
|
|
71
|
+
: 0;
|
|
72
|
+
const lastAction = reduxLastActionMap[key];
|
|
73
|
+
const updatedAt = lastAction?.updatedAt || 0;
|
|
74
|
+
return {
|
|
75
|
+
id: `slice-${key}`,
|
|
76
|
+
name: key,
|
|
77
|
+
keysCount,
|
|
78
|
+
sizeStr: (0, helpers_1.getSize)(sliceVal),
|
|
79
|
+
lastAction,
|
|
80
|
+
updatedAt,
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
}, [reduxState, reduxLastActionMap]);
|
|
84
|
+
// Filter & Sort slices: by default, the most recently updated item is at the FIRST position
|
|
85
|
+
const filteredSlices = (0, react_1.useMemo)(() => {
|
|
86
|
+
let list = sliceItems;
|
|
87
|
+
if (reduxSearch.trim().length > 0) {
|
|
88
|
+
const q = reduxSearch.toLowerCase();
|
|
89
|
+
list = list.filter(item => item.name.toLowerCase().includes(q) ||
|
|
90
|
+
(item.lastAction && item.lastAction.type.toLowerCase().includes(q)));
|
|
91
|
+
}
|
|
92
|
+
return [...list].sort((a, b) => {
|
|
93
|
+
if (sortMode === 'latest') {
|
|
94
|
+
// Most recently updated item first
|
|
95
|
+
if (b.updatedAt !== a.updatedAt) {
|
|
96
|
+
return b.updatedAt - a.updatedAt;
|
|
97
|
+
}
|
|
98
|
+
return a.name.localeCompare(b.name);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
// Alphabetical A-Z
|
|
102
|
+
return a.name.localeCompare(b.name);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}, [sliceItems, reduxSearch, sortMode]);
|
|
106
|
+
const lastGlobalAction = (0, react_1.useMemo)(() => {
|
|
107
|
+
const actions = Object.values(reduxLastActionMap);
|
|
108
|
+
if (actions.length === 0)
|
|
109
|
+
return null;
|
|
110
|
+
return actions.reduce((latest, curr) => {
|
|
111
|
+
if (!latest)
|
|
112
|
+
return curr;
|
|
113
|
+
return (curr.updatedAt || 0) > (latest.updatedAt || 0) ? curr : latest;
|
|
114
|
+
}, null);
|
|
115
|
+
}, [reduxLastActionMap]);
|
|
116
|
+
const renderSliceItem = (0, react_1.useCallback)(({ item, index }) => {
|
|
117
|
+
const isRecentlyUpdated = item.updatedAt > 0 && Date.now() - item.updatedAt < 5000;
|
|
118
|
+
return (<AnimatedEntrance_1.default index={index} distance={8}>
|
|
119
|
+
<TouchableScale_1.default onPress={() => setSelectedReduxSlice(item.name)} style={[
|
|
120
|
+
reduxTabStyles.card,
|
|
121
|
+
isRecentlyUpdated && reduxTabStyles.cardRecentlyUpdated,
|
|
122
|
+
]}>
|
|
123
|
+
{/* Top row: Badge + Slice Name + Timestamp + Chevron */}
|
|
124
|
+
<react_native_1.View style={reduxTabStyles.cardHeader}>
|
|
125
|
+
<react_native_1.View style={reduxTabStyles.sliceBadge}>
|
|
126
|
+
<react_native_1.Text style={reduxTabStyles.sliceBadgeText}>SLICE</react_native_1.Text>
|
|
127
|
+
</react_native_1.View>
|
|
128
|
+
|
|
129
|
+
<HighlightText_1.default text={item.name} search={reduxSearch} style={reduxTabStyles.sliceName} highlightStyle={reduxTabStyles.highlight}/>
|
|
130
|
+
|
|
131
|
+
{item.lastAction?.timestamp && (<react_native_1.View style={reduxTabStyles.timePill}>
|
|
132
|
+
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.purple} size={10}/>
|
|
133
|
+
<react_native_1.Text style={reduxTabStyles.timeText}>
|
|
134
|
+
{item.lastAction.timestamp}
|
|
135
|
+
</react_native_1.Text>
|
|
136
|
+
</react_native_1.View>)}
|
|
137
|
+
|
|
138
|
+
<NetworkIcons_1.ForwardChevronIcon color={AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
139
|
+
</react_native_1.View>
|
|
140
|
+
|
|
141
|
+
{/* Middle row: Stats pills */}
|
|
142
|
+
<react_native_1.View style={reduxTabStyles.statsRow}>
|
|
143
|
+
<react_native_1.View style={reduxTabStyles.pill}>
|
|
144
|
+
<react_native_1.Text style={reduxTabStyles.pillLabel}>Keys:</react_native_1.Text>
|
|
145
|
+
<react_native_1.Text style={reduxTabStyles.pillValue}>{item.keysCount}</react_native_1.Text>
|
|
146
|
+
</react_native_1.View>
|
|
147
|
+
<react_native_1.View style={reduxTabStyles.pill}>
|
|
148
|
+
<react_native_1.Text style={reduxTabStyles.pillLabel}>Size:</react_native_1.Text>
|
|
149
|
+
<react_native_1.Text style={reduxTabStyles.pillValue}>{item.sizeStr}</react_native_1.Text>
|
|
150
|
+
</react_native_1.View>
|
|
151
|
+
<react_native_1.View style={reduxTabStyles.livePill}>
|
|
152
|
+
<react_native_1.View style={reduxTabStyles.liveDot}/>
|
|
153
|
+
<react_native_1.Text style={reduxTabStyles.livePillText}>Live</react_native_1.Text>
|
|
154
|
+
</react_native_1.View>
|
|
155
|
+
</react_native_1.View>
|
|
156
|
+
|
|
157
|
+
{/* Bottom row: Last Dispatched Action */}
|
|
158
|
+
{item.lastAction && (<react_native_1.View style={reduxTabStyles.lastActionRow}>
|
|
159
|
+
<react_native_1.Text style={reduxTabStyles.lastActionLabel}>Last Action:</react_native_1.Text>
|
|
160
|
+
<HighlightText_1.default text={item.lastAction.type} search={reduxSearch} style={reduxTabStyles.lastActionValue} highlightStyle={reduxTabStyles.highlight} numberOfLines={1}/>
|
|
161
|
+
</react_native_1.View>)}
|
|
162
|
+
</TouchableScale_1.default>
|
|
163
|
+
</AnimatedEntrance_1.default>);
|
|
164
|
+
}, [reduxSearch, setSelectedReduxSlice]);
|
|
16
165
|
if (!reduxState) {
|
|
17
166
|
return (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
18
167
|
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
19
168
|
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
20
169
|
</react_native_1.View>
|
|
21
|
-
<react_native_1.Text style={styles_1.default.emptyTitle}>No Redux Store</react_native_1.Text>
|
|
170
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>No Redux Store Connected</react_native_1.Text>
|
|
22
171
|
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
23
|
-
|
|
172
|
+
Call connectReduxStore(store) or use inspectorReduxMiddleware at app initialization.
|
|
24
173
|
</react_native_1.Text>
|
|
25
174
|
</react_native_1.View>);
|
|
26
175
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<react_native_1.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}}>
|
|
50
|
-
<react_native_1.TextInput placeholder="Search Redux keys or values..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={reduxSearch} onChangeText={setReduxSearch} style={{
|
|
51
|
-
flex: 1,
|
|
52
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
53
|
-
fontSize: 12,
|
|
54
|
-
color: AppColors_1.AppColors.grayTextStrong,
|
|
55
|
-
padding: 0,
|
|
56
|
-
}} autoCorrect={false} autoCapitalize="none"/>
|
|
57
|
-
{reduxSearch.length > 0 && (<react_native_1.Pressable onPress={() => setReduxSearch('')} hitSlop={10}>
|
|
58
|
-
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
59
|
-
</react_native_1.Pressable>)}
|
|
176
|
+
return (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
177
|
+
{/* ─── Top Stats Overview Card ─── */}
|
|
178
|
+
<react_native_1.View style={reduxTabStyles.overviewCard}>
|
|
179
|
+
<react_native_1.View style={reduxTabStyles.statCol}>
|
|
180
|
+
<react_native_1.Text style={reduxTabStyles.statHeading}>ACTIVE SLICES</react_native_1.Text>
|
|
181
|
+
<react_native_1.Text style={reduxTabStyles.statBigVal}>{sliceItems.length}</react_native_1.Text>
|
|
182
|
+
</react_native_1.View>
|
|
183
|
+
<react_native_1.View style={reduxTabStyles.statDivider}/>
|
|
184
|
+
<react_native_1.View style={reduxTabStyles.statCol}>
|
|
185
|
+
<react_native_1.Text style={reduxTabStyles.statHeading}>TOTAL STATE</react_native_1.Text>
|
|
186
|
+
<react_native_1.Text style={reduxTabStyles.statBigVal}>{totalStateSize}</react_native_1.Text>
|
|
187
|
+
</react_native_1.View>
|
|
188
|
+
<react_native_1.View style={reduxTabStyles.statDivider}/>
|
|
189
|
+
<react_native_1.View style={[reduxTabStyles.statCol, { flex: 1.5 }]}>
|
|
190
|
+
<react_native_1.Text style={reduxTabStyles.statHeading}>LAST ACTION</react_native_1.Text>
|
|
191
|
+
<react_native_1.Text style={reduxTabStyles.statLastAction} numberOfLines={1}>
|
|
192
|
+
{lastGlobalAction ? lastGlobalAction.type : 'Initial'}
|
|
193
|
+
</react_native_1.Text>
|
|
194
|
+
{lastGlobalAction?.timestamp && (<react_native_1.Text style={reduxTabStyles.statLastTime}>
|
|
195
|
+
{lastGlobalAction.timestamp}
|
|
196
|
+
</react_native_1.Text>)}
|
|
197
|
+
</react_native_1.View>
|
|
60
198
|
</react_native_1.View>
|
|
61
199
|
|
|
62
|
-
{/*
|
|
63
|
-
<react_native_1.View style={
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
200
|
+
{/* ─── Search & Sort Bar ─── */}
|
|
201
|
+
<react_native_1.View style={reduxTabStyles.toolbarContainer}>
|
|
202
|
+
<react_native_1.View style={reduxTabStyles.searchRow}>
|
|
203
|
+
<react_native_1.View style={styles_1.default.searchContainer}>
|
|
204
|
+
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak} size={15}/>
|
|
205
|
+
<react_native_1.TextInput placeholder="Search Redux slices or actions..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={reduxSearch} onChangeText={setReduxSearch} style={styles_1.default.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
206
|
+
{reduxSearch.length > 0 && (<react_native_1.Pressable onPress={() => setReduxSearch('')} hitSlop={10}>
|
|
207
|
+
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
208
|
+
</react_native_1.Pressable>)}
|
|
209
|
+
</react_native_1.View>
|
|
210
|
+
|
|
211
|
+
{/* Sort Button */}
|
|
212
|
+
<react_native_1.TouchableOpacity style={[
|
|
213
|
+
styles_1.default.toolbarBtn,
|
|
214
|
+
sortMode === 'latest' && { backgroundColor: `${AppColors_1.AppColors.brandPurple}1F`, borderColor: AppColors_1.AppColors.brandPurple },
|
|
215
|
+
]} onPress={() => setSortMode(prev => (prev === 'latest' ? 'alpha' : 'latest'))} hitSlop={6}>
|
|
216
|
+
<NetworkIcons_1.SortArrowIcon color={sortMode === 'latest' ? AppColors_1.AppColors.brandPurple : AppColors_1.AppColors.grayTextStrong} size={16}/>
|
|
217
|
+
</react_native_1.TouchableOpacity>
|
|
218
|
+
</react_native_1.View>
|
|
219
|
+
|
|
220
|
+
<react_native_1.View style={reduxTabStyles.headerSubRow}>
|
|
221
|
+
<react_native_1.Text style={reduxTabStyles.resultCount}>
|
|
222
|
+
Showing {filteredSlices.length} of {sliceItems.length} state slices
|
|
223
|
+
</react_native_1.Text>
|
|
224
|
+
<react_native_1.Text style={reduxTabStyles.sortLabel}>
|
|
225
|
+
{sortMode === 'latest' ? '⚡ Newest Updates First' : '🔤 Alphabetical (A-Z)'}
|
|
226
|
+
</react_native_1.Text>
|
|
227
|
+
</react_native_1.View>
|
|
72
228
|
</react_native_1.View>
|
|
73
|
-
|
|
229
|
+
|
|
230
|
+
{/* ─── FlatList of Slices ─── */}
|
|
231
|
+
<react_native_1.FlatList data={filteredSlices} keyExtractor={item => item.id} renderItem={renderSliceItem} initialNumToRender={15} maxToRenderPerBatch={10} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState_1.default isSearch={reduxSearch.length > 0}/>} ListFooterComponent={filteredSlices.length > 0 ? (<EndOfListFooter_1.default count={filteredSlices.length} label="slices"/>) : null} contentContainerStyle={[
|
|
232
|
+
reduxTabStyles.listContent,
|
|
233
|
+
filteredSlices.length === 0 && { flexGrow: 1 },
|
|
234
|
+
]} keyboardShouldPersistTaps="handled"/>
|
|
235
|
+
</react_native_1.View>);
|
|
236
|
+
});
|
|
237
|
+
const reduxTabStyles = react_native_1.StyleSheet.create({
|
|
238
|
+
overviewCard: {
|
|
239
|
+
flexDirection: 'row',
|
|
240
|
+
alignItems: 'center',
|
|
241
|
+
backgroundColor: AppColors_1.AppColors.white,
|
|
242
|
+
marginHorizontal: 12,
|
|
243
|
+
marginTop: 10,
|
|
244
|
+
borderRadius: 12,
|
|
245
|
+
padding: 12,
|
|
246
|
+
borderWidth: 1,
|
|
247
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
248
|
+
shadowColor: AppColors_1.AppColors.primaryBlack,
|
|
249
|
+
shadowOffset: { width: 0, height: 1 },
|
|
250
|
+
shadowOpacity: 0.03,
|
|
251
|
+
shadowRadius: 3,
|
|
252
|
+
elevation: 1,
|
|
253
|
+
},
|
|
254
|
+
statCol: {
|
|
255
|
+
flex: 1,
|
|
256
|
+
},
|
|
257
|
+
statDivider: {
|
|
258
|
+
width: 1,
|
|
259
|
+
height: 28,
|
|
260
|
+
backgroundColor: AppColors_1.AppColors.dividerColor,
|
|
261
|
+
marginHorizontal: 8,
|
|
262
|
+
},
|
|
263
|
+
statHeading: {
|
|
264
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
265
|
+
fontSize: 9,
|
|
266
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
267
|
+
letterSpacing: 0.5,
|
|
268
|
+
},
|
|
269
|
+
statBigVal: {
|
|
270
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
271
|
+
fontSize: 14,
|
|
272
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
273
|
+
marginTop: 2,
|
|
274
|
+
},
|
|
275
|
+
statLastAction: {
|
|
276
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
277
|
+
fontSize: 11,
|
|
278
|
+
color: AppColors_1.AppColors.purple,
|
|
279
|
+
marginTop: 2,
|
|
280
|
+
},
|
|
281
|
+
statLastTime: {
|
|
282
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
283
|
+
fontSize: 9.5,
|
|
284
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
285
|
+
},
|
|
286
|
+
toolbarContainer: {
|
|
287
|
+
backgroundColor: AppColors_1.AppColors.white,
|
|
288
|
+
borderBottomWidth: 1,
|
|
289
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
290
|
+
paddingHorizontal: 12,
|
|
291
|
+
paddingTop: 8,
|
|
292
|
+
paddingBottom: 6,
|
|
293
|
+
marginTop: 8,
|
|
294
|
+
},
|
|
295
|
+
searchRow: {
|
|
296
|
+
flexDirection: 'row',
|
|
297
|
+
alignItems: 'center',
|
|
298
|
+
gap: 8,
|
|
299
|
+
},
|
|
300
|
+
headerSubRow: {
|
|
301
|
+
flexDirection: 'row',
|
|
302
|
+
justifyContent: 'space-between',
|
|
303
|
+
alignItems: 'center',
|
|
304
|
+
marginTop: 6,
|
|
305
|
+
paddingHorizontal: 2,
|
|
306
|
+
},
|
|
307
|
+
resultCount: {
|
|
308
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
309
|
+
fontSize: 11,
|
|
310
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
311
|
+
},
|
|
312
|
+
sortLabel: {
|
|
313
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
314
|
+
fontSize: 10.5,
|
|
315
|
+
color: AppColors_1.AppColors.brandPurple,
|
|
316
|
+
},
|
|
317
|
+
listContent: {
|
|
318
|
+
padding: 12,
|
|
319
|
+
paddingBottom: 36,
|
|
320
|
+
},
|
|
321
|
+
card: {
|
|
322
|
+
backgroundColor: AppColors_1.AppColors.white,
|
|
323
|
+
borderRadius: 12,
|
|
324
|
+
padding: 12,
|
|
325
|
+
marginBottom: 10,
|
|
326
|
+
borderWidth: 1,
|
|
327
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
328
|
+
shadowColor: AppColors_1.AppColors.primaryBlack,
|
|
329
|
+
shadowOffset: { width: 0, height: 1 },
|
|
330
|
+
shadowOpacity: 0.04,
|
|
331
|
+
shadowRadius: 4,
|
|
332
|
+
elevation: 2,
|
|
333
|
+
},
|
|
334
|
+
cardRecentlyUpdated: {
|
|
335
|
+
borderColor: `${AppColors_1.AppColors.brandPurple}66`,
|
|
336
|
+
backgroundColor: '#FAFAFF',
|
|
337
|
+
},
|
|
338
|
+
cardHeader: {
|
|
339
|
+
flexDirection: 'row',
|
|
340
|
+
alignItems: 'center',
|
|
341
|
+
gap: 8,
|
|
342
|
+
marginBottom: 8,
|
|
343
|
+
},
|
|
344
|
+
sliceBadge: {
|
|
345
|
+
backgroundColor: '#EDE9FE',
|
|
346
|
+
paddingHorizontal: 6,
|
|
347
|
+
paddingVertical: 3,
|
|
348
|
+
borderRadius: 5,
|
|
349
|
+
borderWidth: 1,
|
|
350
|
+
borderColor: '#DDD6FE',
|
|
351
|
+
},
|
|
352
|
+
sliceBadgeText: {
|
|
353
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
354
|
+
fontSize: 9.5,
|
|
355
|
+
color: '#6D28D9',
|
|
356
|
+
letterSpacing: 0.4,
|
|
357
|
+
},
|
|
358
|
+
sliceName: {
|
|
359
|
+
flex: 1,
|
|
360
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
361
|
+
fontSize: 13.5,
|
|
362
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
363
|
+
},
|
|
364
|
+
timePill: {
|
|
365
|
+
flexDirection: 'row',
|
|
366
|
+
alignItems: 'center',
|
|
367
|
+
gap: 3,
|
|
368
|
+
backgroundColor: `${AppColors_1.AppColors.purple}14`,
|
|
369
|
+
paddingHorizontal: 6,
|
|
370
|
+
paddingVertical: 2,
|
|
371
|
+
borderRadius: 4,
|
|
372
|
+
borderWidth: 1,
|
|
373
|
+
borderColor: `${AppColors_1.AppColors.purple}2E`,
|
|
374
|
+
},
|
|
375
|
+
timeText: {
|
|
376
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
377
|
+
fontSize: 10,
|
|
378
|
+
color: AppColors_1.AppColors.purple,
|
|
379
|
+
},
|
|
380
|
+
statsRow: {
|
|
381
|
+
flexDirection: 'row',
|
|
382
|
+
alignItems: 'center',
|
|
383
|
+
gap: 6,
|
|
384
|
+
flexWrap: 'wrap',
|
|
385
|
+
marginBottom: 6,
|
|
386
|
+
},
|
|
387
|
+
pill: {
|
|
388
|
+
flexDirection: 'row',
|
|
389
|
+
alignItems: 'center',
|
|
390
|
+
gap: 4,
|
|
391
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
392
|
+
paddingHorizontal: 7,
|
|
393
|
+
paddingVertical: 3,
|
|
394
|
+
borderRadius: 5,
|
|
395
|
+
borderWidth: 1,
|
|
396
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
397
|
+
},
|
|
398
|
+
pillLabel: {
|
|
399
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
400
|
+
fontSize: 10.5,
|
|
401
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
402
|
+
},
|
|
403
|
+
pillValue: {
|
|
404
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
405
|
+
fontSize: 10.5,
|
|
406
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
407
|
+
},
|
|
408
|
+
livePill: {
|
|
409
|
+
flexDirection: 'row',
|
|
410
|
+
alignItems: 'center',
|
|
411
|
+
gap: 4,
|
|
412
|
+
backgroundColor: '#ECFDF5',
|
|
413
|
+
paddingHorizontal: 6,
|
|
414
|
+
paddingVertical: 3,
|
|
415
|
+
borderRadius: 5,
|
|
416
|
+
borderWidth: 1,
|
|
417
|
+
borderColor: '#A7F3D0',
|
|
418
|
+
},
|
|
419
|
+
liveDot: {
|
|
420
|
+
width: 6,
|
|
421
|
+
height: 6,
|
|
422
|
+
borderRadius: 3,
|
|
423
|
+
backgroundColor: '#10B981',
|
|
424
|
+
},
|
|
425
|
+
livePillText: {
|
|
426
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
427
|
+
fontSize: 10,
|
|
428
|
+
color: '#047857',
|
|
429
|
+
},
|
|
430
|
+
lastActionRow: {
|
|
431
|
+
flexDirection: 'row',
|
|
432
|
+
alignItems: 'center',
|
|
433
|
+
gap: 6,
|
|
434
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
435
|
+
borderRadius: 6,
|
|
436
|
+
paddingHorizontal: 8,
|
|
437
|
+
paddingVertical: 4,
|
|
438
|
+
marginTop: 2,
|
|
439
|
+
borderWidth: 1,
|
|
440
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
441
|
+
},
|
|
442
|
+
lastActionLabel: {
|
|
443
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
444
|
+
fontSize: 10.5,
|
|
445
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
446
|
+
},
|
|
447
|
+
lastActionValue: {
|
|
448
|
+
flex: 1,
|
|
449
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
450
|
+
fontSize: 11,
|
|
451
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
452
|
+
},
|
|
453
|
+
highlight: {
|
|
454
|
+
backgroundColor: '#FEF08A',
|
|
455
|
+
color: '#854D0E',
|
|
456
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
457
|
+
},
|
|
74
458
|
});
|
|
75
459
|
exports.default = ReduxTab;
|
|
@@ -53,6 +53,7 @@ const analyticsLogger_1 = require("../../customHooks/analyticsLogger");
|
|
|
53
53
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
54
54
|
const SettingsPanel = () => {
|
|
55
55
|
const { settingsPage, setSettingsPage, settingsActiveSubTab, setSettingsActiveSubTab, tabVisibility, toggleTabVisibility, defaultTab, setDefaultTab, isDark, setIsDark, modalHeightPercent, setModalHeightPercent, modalAnimationType, setModalAnimationType, showDuplicateLogs, setShowDuplicateLogs, showConsoleLevels, setShowConsoleLevels, resetToDefaults, storage, logs, consoleLogs, analyticsEvents, reduxState, maxNetworkLogs, setMaxNetworkLogs, maxConsoleLogs, setMaxConsoleLogs, reduxAutoRefresh, setReduxAutoRefreshState, reduxExpandDepth, setReduxExpandDepth, switchActiveTab, setSelected, setSelectedEvent, setReduxState, } = (0, InspectorContext_1.useInspector)();
|
|
56
|
+
const isPersistent = (0, settingsStore_1.isPersistentStorageAvailable)();
|
|
56
57
|
const headerTopPadding = react_native_1.Platform.OS === 'ios' && modalHeightPercent >= 95 ? 44 : 0;
|
|
57
58
|
if (settingsPage === 'main') {
|
|
58
59
|
const settingsTabs = [
|
|
@@ -60,6 +61,8 @@ const SettingsPanel = () => {
|
|
|
60
61
|
{ key: 'logs', label: 'Logs', icon: 'logs' },
|
|
61
62
|
{ key: 'analytics', label: 'Analytics', icon: 'analytics' },
|
|
62
63
|
{ key: 'redux', label: 'Redux', icon: 'redux' },
|
|
64
|
+
{ key: 'bundle', label: 'Bundle', icon: 'bundle' },
|
|
65
|
+
{ key: 'performance', label: 'Performance', icon: 'performance' },
|
|
63
66
|
];
|
|
64
67
|
return (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
65
68
|
{/* Settings Header with back button */}
|
|
@@ -261,7 +264,13 @@ const SettingsPanel = () => {
|
|
|
261
264
|
{tab.icon === 'analytics' && (<NetworkIcons_1.AnalyticsIcon color={isLocked
|
|
262
265
|
? AppColors_1.AppColors.grayTextWeak
|
|
263
266
|
: AppColors_1.AppColors.purple} size={11}/>)}
|
|
264
|
-
{tab.icon === 'redux' && (<NetworkIcons_1.
|
|
267
|
+
{tab.icon === 'redux' && (<NetworkIcons_1.ReduxIcon color={isLocked
|
|
268
|
+
? AppColors_1.AppColors.grayTextWeak
|
|
269
|
+
: AppColors_1.AppColors.purple} size={11}/>)}
|
|
270
|
+
{tab.icon === 'bundle' && (<NetworkIcons_1.PackageIcon color={isLocked
|
|
271
|
+
? AppColors_1.AppColors.grayTextWeak
|
|
272
|
+
: AppColors_1.AppColors.purple} size={11}/>)}
|
|
273
|
+
{tab.icon === 'performance' && (<NetworkIcons_1.PerformanceIcon color={isLocked
|
|
265
274
|
? AppColors_1.AppColors.grayTextWeak
|
|
266
275
|
: AppColors_1.AppColors.purple} size={11}/>)}
|
|
267
276
|
</react_native_1.View>
|
|
@@ -700,7 +709,9 @@ const SettingsPanel = () => {
|
|
|
700
709
|
{tab.icon === 'apis' && (<NetworkIcons_1.SignalIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple} size={11}/>)}
|
|
701
710
|
{tab.icon === 'logs' && (<NetworkIcons_1.TerminalIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple} size={11}/>)}
|
|
702
711
|
{tab.icon === 'analytics' && (<NetworkIcons_1.AnalyticsIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple} size={11}/>)}
|
|
703
|
-
{tab.icon === 'redux' && (<NetworkIcons_1.
|
|
712
|
+
{tab.icon === 'redux' && (<NetworkIcons_1.ReduxIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple} size={11}/>)}
|
|
713
|
+
{tab.icon === 'bundle' && (<NetworkIcons_1.PackageIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple} size={11}/>)}
|
|
714
|
+
{tab.icon === 'performance' && (<NetworkIcons_1.PerformanceIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple} size={11}/>)}
|
|
704
715
|
</react_native_1.View>
|
|
705
716
|
<react_native_1.Text style={{
|
|
706
717
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
@@ -39,6 +39,18 @@ const TabBar = react_1.default.memo(() => {
|
|
|
39
39
|
count: 0,
|
|
40
40
|
icon: 'redux',
|
|
41
41
|
},
|
|
42
|
+
{
|
|
43
|
+
key: 'bundle',
|
|
44
|
+
label: 'Bundle',
|
|
45
|
+
count: 0,
|
|
46
|
+
icon: 'bundle',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: 'performance',
|
|
50
|
+
label: 'Performance',
|
|
51
|
+
count: 0,
|
|
52
|
+
icon: 'performance',
|
|
53
|
+
},
|
|
42
54
|
]
|
|
43
55
|
.filter(tab => tabVisibility?.[tab.key])
|
|
44
56
|
.map(tab => {
|
|
@@ -51,11 +63,7 @@ const TabBar = react_1.default.memo(() => {
|
|
|
51
63
|
logs.length > lastReadApisCount;
|
|
52
64
|
const hasUnreadLogs = activeTab !== 'logs' &&
|
|
53
65
|
consoleLogs.length > lastReadLogsCount;
|
|
54
|
-
return (<TouchableScale_1.default key={tab.key} onPress={() => {
|
|
55
|
-
requestAnimationFrame(() => {
|
|
56
|
-
switchActiveTab(tab.key);
|
|
57
|
-
});
|
|
58
|
-
}} style={[
|
|
66
|
+
return (<TouchableScale_1.default key={tab.key} onPress={() => switchActiveTab(tab.key)} style={[
|
|
59
67
|
styles_1.default.contentTabButton,
|
|
60
68
|
isActive && styles_1.default.contentTabButtonActive,
|
|
61
69
|
]}>
|
|
@@ -67,7 +75,9 @@ const TabBar = react_1.default.memo(() => {
|
|
|
67
75
|
{tab.icon === 'apis' && (<NetworkIcons_1.SignalIcon color={iconColor} size={14}/>)}
|
|
68
76
|
{tab.icon === 'logs' && (<NetworkIcons_1.TerminalIcon color={iconColor} size={14}/>)}
|
|
69
77
|
{tab.icon === 'analytics' && (<NetworkIcons_1.AnalyticsIcon color={iconColor} size={14}/>)}
|
|
70
|
-
{tab.icon === 'redux' && (<NetworkIcons_1.
|
|
78
|
+
{tab.icon === 'redux' && (<NetworkIcons_1.ReduxIcon color={iconColor} size={14}/>)}
|
|
79
|
+
{tab.icon === 'bundle' && (<NetworkIcons_1.PackageIcon color={iconColor} size={14}/>)}
|
|
80
|
+
{tab.icon === 'performance' && (<NetworkIcons_1.PerformanceIcon color={iconColor} size={14}/>)}
|
|
71
81
|
<react_native_1.Text numberOfLines={1} ellipsizeMode="tail" style={[
|
|
72
82
|
styles_1.default.contentTabButtonText,
|
|
73
83
|
isActive &&
|