react-native-inapp-inspector 1.0.15 → 1.0.16
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/AnimatedEntrance.d.ts +12 -0
- package/dist/commonjs/components/AnimatedEntrance.js +72 -0
- package/dist/commonjs/components/ConsoleLogCard.js +114 -29
- package/dist/commonjs/components/EmptyState.js +56 -5
- package/dist/commonjs/components/ReduxTreeView.js +96 -27
- package/dist/commonjs/components/TouchableScale.js +18 -2
- package/dist/commonjs/index.js +100 -34
- package/dist/esm/components/AnimatedEntrance.d.ts +12 -0
- package/dist/esm/components/AnimatedEntrance.js +37 -0
- package/dist/esm/components/ConsoleLogCard.js +116 -31
- package/dist/esm/components/EmptyState.js +24 -6
- package/dist/esm/components/ReduxTreeView.js +95 -29
- package/dist/esm/components/TouchableScale.js +18 -2
- package/dist/esm/index.js +101 -35
- package/package.json +3 -2
package/dist/commonjs/index.js
CHANGED
|
@@ -59,6 +59,7 @@ const SourcePageCard_1 = __importDefault(require("./components/SourcePageCard"))
|
|
|
59
59
|
const ConsoleLogCard_1 = require("./components/ConsoleLogCard");
|
|
60
60
|
const HighlightText_1 = __importDefault(require("./components/HighlightText"));
|
|
61
61
|
const CodeSnippet_1 = __importDefault(require("./components/CodeSnippet"));
|
|
62
|
+
const AnimatedEntrance_1 = __importDefault(require("./components/AnimatedEntrance"));
|
|
62
63
|
// Helpers
|
|
63
64
|
const helpers_1 = require("./helpers");
|
|
64
65
|
// Assets
|
|
@@ -146,6 +147,9 @@ const NavigationTracker = ({ onStateChange }) => {
|
|
|
146
147
|
}, [navState, onStateChange]);
|
|
147
148
|
return null;
|
|
148
149
|
};
|
|
150
|
+
const animateNextLayout = () => {
|
|
151
|
+
react_native_1.LayoutAnimation.configureNext(react_native_1.LayoutAnimation.Presets.easeInEaseOut);
|
|
152
|
+
};
|
|
149
153
|
const NetworkInspector = ({ enabled = true, }) => {
|
|
150
154
|
const [isDark, setIsDark] = (0, react_1.useState)(false);
|
|
151
155
|
const [reduxState, setReduxState] = (0, react_1.useState)(null);
|
|
@@ -274,12 +278,18 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
274
278
|
const nextVal = !prev[key];
|
|
275
279
|
const newVisibility = { ...prev, [key]: nextVal };
|
|
276
280
|
if (!nextVal && activeTab === key) {
|
|
281
|
+
animateNextLayout();
|
|
277
282
|
setActiveTab('apis');
|
|
278
283
|
}
|
|
279
284
|
return newVisibility;
|
|
280
285
|
});
|
|
281
286
|
};
|
|
287
|
+
const switchActiveTab = (0, react_1.useCallback)((key) => {
|
|
288
|
+
animateNextLayout();
|
|
289
|
+
setActiveTab(key);
|
|
290
|
+
}, []);
|
|
282
291
|
const navigateFromDashboard = (key) => {
|
|
292
|
+
animateNextLayout();
|
|
283
293
|
setTabVisibility(prev => ({ ...prev, [key]: true }));
|
|
284
294
|
setActiveTab(key);
|
|
285
295
|
};
|
|
@@ -352,6 +362,11 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
352
362
|
const badgeAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
353
363
|
const activePulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0.4)).current;
|
|
354
364
|
const unreadPulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
365
|
+
(0, react_1.useEffect)(() => {
|
|
366
|
+
if (react_native_1.Platform.OS === 'android') {
|
|
367
|
+
react_native_1.UIManager.setLayoutAnimationEnabledExperimental?.(true);
|
|
368
|
+
}
|
|
369
|
+
}, []);
|
|
355
370
|
(0, react_1.useEffect)(() => {
|
|
356
371
|
const loop = react_native_1.Animated.loop(react_native_1.Animated.sequence([
|
|
357
372
|
react_native_1.Animated.timing(pulseAnim, {
|
|
@@ -811,6 +826,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
811
826
|
return Object.entries(freq).sort((a, b) => b[1] - a[1]);
|
|
812
827
|
}, [filteredAnalyticsEvents]);
|
|
813
828
|
function closeModal() {
|
|
829
|
+
animateNextLayout();
|
|
814
830
|
setVisible(false);
|
|
815
831
|
setSelected(null);
|
|
816
832
|
setSelectedEvent(null);
|
|
@@ -928,12 +944,14 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
928
944
|
return next;
|
|
929
945
|
});
|
|
930
946
|
}, []);
|
|
931
|
-
const renderItem = (0, react_1.useCallback)(({ item }) => {
|
|
947
|
+
const renderItem = (0, react_1.useCallback)(({ item, index }) => {
|
|
932
948
|
if (item.type === 'header') {
|
|
933
|
-
return (<
|
|
949
|
+
return (<AnimatedEntrance_1.default index={index} distance={8}>
|
|
950
|
+
<DomainHeader_1.default pageName={item.pageName} color={item.color} stats={item.stats} activeFilters={item.activeFilters} onToggleFilter={toggleSectionFilter} isCollapsed={item.isCollapsed} onToggleCollapse={toggleSectionCollapse} isFirst={item.isFirst} timestamp={item.timestamp}/>
|
|
951
|
+
</AnimatedEntrance_1.default>);
|
|
934
952
|
}
|
|
935
953
|
const { log, isLast, color } = item;
|
|
936
|
-
return (<
|
|
954
|
+
return (<AnimatedEntrance_1.default index={index} distance={8} style={styles_1.default.treeNodeRow}>
|
|
937
955
|
<react_native_1.View style={styles_1.default.treeLines}>
|
|
938
956
|
<react_native_1.View style={[
|
|
939
957
|
styles_1.default.modernTreeLine,
|
|
@@ -943,9 +961,12 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
943
961
|
{!isLast && (<react_native_1.View style={[styles_1.default.modernTreeBranch, { borderColor: color }]}/>)}
|
|
944
962
|
</react_native_1.View>
|
|
945
963
|
<react_native_1.View style={styles_1.default.treeCardWrapper}>
|
|
946
|
-
<LogCard_1.default item={log} isSelected={selectedLogs.has(log.id)} onToggleSelect={toggleSelect} onPress={() =>
|
|
964
|
+
<LogCard_1.default item={log} isSelected={selectedLogs.has(log.id)} onToggleSelect={toggleSelect} onPress={() => {
|
|
965
|
+
animateNextLayout();
|
|
966
|
+
setSelected(log);
|
|
967
|
+
}} timelineMinStart={minStart} timelineTotalRange={totalRange} isNew={newLogIds.has(log.id)} searchStr={search}/>
|
|
947
968
|
</react_native_1.View>
|
|
948
|
-
</
|
|
969
|
+
</AnimatedEntrance_1.default>);
|
|
949
970
|
}, [
|
|
950
971
|
minStart,
|
|
951
972
|
totalRange,
|
|
@@ -971,8 +992,9 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
971
992
|
<react_native_linear_gradient_1.default colors={[AppColors_1.AppColors.purple, '#6B4EFF']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }} style={styles_1.default.headerGradient}>
|
|
972
993
|
<react_native_1.View style={[styles_1.default.header, { paddingHorizontal: 16, gap: 12 }]}>
|
|
973
994
|
<TouchableScale_1.default onPress={() => {
|
|
995
|
+
animateNextLayout();
|
|
974
996
|
setSettingsPage(null);
|
|
975
|
-
|
|
997
|
+
switchActiveTab('apis');
|
|
976
998
|
}} hitSlop={12} style={{
|
|
977
999
|
padding: 8,
|
|
978
1000
|
borderRadius: 10,
|
|
@@ -1153,7 +1175,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1153
1175
|
</react_native_1.View>)}
|
|
1154
1176
|
|
|
1155
1177
|
{/* Settings gear icon next to label */}
|
|
1156
|
-
<TouchableScale_1.default onPress={() =>
|
|
1178
|
+
<TouchableScale_1.default onPress={() => {
|
|
1179
|
+
animateNextLayout();
|
|
1180
|
+
setSettingsPage(tab.key);
|
|
1181
|
+
}} hitSlop={8} style={{
|
|
1157
1182
|
marginLeft: 4,
|
|
1158
1183
|
padding: 4,
|
|
1159
1184
|
borderRadius: 6,
|
|
@@ -1288,7 +1313,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1288
1313
|
</react_native_1.ScrollView>
|
|
1289
1314
|
</react_native_1.View>);
|
|
1290
1315
|
}
|
|
1291
|
-
const goBackToMain = () =>
|
|
1316
|
+
const goBackToMain = () => {
|
|
1317
|
+
animateNextLayout();
|
|
1318
|
+
setSettingsPage('main');
|
|
1319
|
+
};
|
|
1292
1320
|
const renderSubHeader = (title, icon, rightInfo) => (<react_native_1.View style={{
|
|
1293
1321
|
flexDirection: 'row',
|
|
1294
1322
|
alignItems: 'center',
|
|
@@ -1885,7 +1913,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1885
1913
|
const webviewTotal = webViewNavHistory.length;
|
|
1886
1914
|
return (<react_native_1.View style={styles_1.default.dashboardContainer}>
|
|
1887
1915
|
{/* Module 1: APIs */}
|
|
1888
|
-
{tabVisibility.apis && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() =>
|
|
1916
|
+
{tabVisibility.apis && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('apis')}>
|
|
1889
1917
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1890
1918
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1891
1919
|
<NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={18}/>
|
|
@@ -1926,7 +1954,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1926
1954
|
</TouchableScale_1.default>)}
|
|
1927
1955
|
|
|
1928
1956
|
{/* Module 2: Logs */}
|
|
1929
|
-
{tabVisibility.logs && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() =>
|
|
1957
|
+
{tabVisibility.logs && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('logs')}>
|
|
1930
1958
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1931
1959
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1932
1960
|
<NetworkIcons_1.TerminalIcon color="#0D9488" size={18}/>
|
|
@@ -1967,7 +1995,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
1967
1995
|
</TouchableScale_1.default>)}
|
|
1968
1996
|
|
|
1969
1997
|
{/* Module 3: Analytics */}
|
|
1970
|
-
{tabVisibility.analytics && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() =>
|
|
1998
|
+
{tabVisibility.analytics && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('analytics')}>
|
|
1971
1999
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1972
2000
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1973
2001
|
<NetworkIcons_1.AnalyticsIcon color="#EA580C" size={18}/>
|
|
@@ -2004,7 +2032,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2004
2032
|
</TouchableScale_1.default>)}
|
|
2005
2033
|
|
|
2006
2034
|
{/* Module 4: WebView */}
|
|
2007
|
-
{tabVisibility.webview && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() =>
|
|
2035
|
+
{tabVisibility.webview && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('webview')}>
|
|
2008
2036
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
2009
2037
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
2010
2038
|
<NetworkIcons_1.GlobeIcon color="#2563EB" size={18}/>
|
|
@@ -2037,7 +2065,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2037
2065
|
</TouchableScale_1.default>)}
|
|
2038
2066
|
|
|
2039
2067
|
{/* Module 5: Redux Store */}
|
|
2040
|
-
{tabVisibility.redux && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() =>
|
|
2068
|
+
{tabVisibility.redux && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('redux')}>
|
|
2041
2069
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
2042
2070
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
2043
2071
|
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={18}/>
|
|
@@ -2188,7 +2216,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2188
2216
|
borderWidth: 1,
|
|
2189
2217
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
2190
2218
|
}}>
|
|
2191
|
-
<react_native_1.TouchableOpacity onPress={() =>
|
|
2219
|
+
<react_native_1.TouchableOpacity onPress={() => {
|
|
2220
|
+
animateNextLayout();
|
|
2221
|
+
setReduxActiveSubTab('timeline');
|
|
2222
|
+
}} style={{
|
|
2192
2223
|
flex: 1,
|
|
2193
2224
|
paddingVertical: 6,
|
|
2194
2225
|
alignItems: 'center',
|
|
@@ -2208,7 +2239,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2208
2239
|
⚡ Action Timeline
|
|
2209
2240
|
</react_native_1.Text>
|
|
2210
2241
|
</react_native_1.TouchableOpacity>
|
|
2211
|
-
<react_native_1.TouchableOpacity onPress={() =>
|
|
2242
|
+
<react_native_1.TouchableOpacity onPress={() => {
|
|
2243
|
+
animateNextLayout();
|
|
2244
|
+
setReduxActiveSubTab('tree');
|
|
2245
|
+
}} style={{
|
|
2212
2246
|
flex: 1,
|
|
2213
2247
|
paddingVertical: 6,
|
|
2214
2248
|
alignItems: 'center',
|
|
@@ -2304,6 +2338,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2304
2338
|
]}>
|
|
2305
2339
|
<TouchableScale_1.default onPress={() => {
|
|
2306
2340
|
requestAnimationFrame(() => {
|
|
2341
|
+
animateNextLayout();
|
|
2307
2342
|
setSelected(null);
|
|
2308
2343
|
setSelectedEvent(null);
|
|
2309
2344
|
});
|
|
@@ -2521,7 +2556,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2521
2556
|
consoleLogs.length > lastReadLogsCount;
|
|
2522
2557
|
return (<TouchableScale_1.default key={tab.key} onPress={() => {
|
|
2523
2558
|
requestAnimationFrame(() => {
|
|
2524
|
-
|
|
2559
|
+
switchActiveTab(tab.key);
|
|
2525
2560
|
});
|
|
2526
2561
|
}} style={[
|
|
2527
2562
|
styles_1.default.contentTabButton,
|
|
@@ -2620,7 +2655,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2620
2655
|
shadowOffset: { width: 0, height: 1 },
|
|
2621
2656
|
elevation: 2,
|
|
2622
2657
|
},
|
|
2623
|
-
]} onPress={() =>
|
|
2658
|
+
]} onPress={() => {
|
|
2659
|
+
animateNextLayout();
|
|
2660
|
+
setAnalyticsSubTab('ga_events');
|
|
2661
|
+
}}>
|
|
2624
2662
|
<react_native_1.Text style={[
|
|
2625
2663
|
{
|
|
2626
2664
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
@@ -2654,7 +2692,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2654
2692
|
shadowOffset: { width: 0, height: 1 },
|
|
2655
2693
|
elevation: 2,
|
|
2656
2694
|
},
|
|
2657
|
-
]} onPress={() =>
|
|
2695
|
+
]} onPress={() => {
|
|
2696
|
+
animateNextLayout();
|
|
2697
|
+
setAnalyticsSubTab('top_events');
|
|
2698
|
+
}}>
|
|
2658
2699
|
<react_native_1.Text style={[
|
|
2659
2700
|
{
|
|
2660
2701
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
@@ -2677,10 +2718,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2677
2718
|
</react_native_1.ScrollView>) : activeTab === 'analytics' ? (selectedEvent != null ? (<AnalyticsDetail_1.default event={selectedEvent}/>) : analyticsSubTab === 'top_events' ? (<react_native_1.FlatList data={topEventsArray} keyExtractor={item => item[0]} contentContainerStyle={[
|
|
2678
2719
|
styles_1.default.listContent,
|
|
2679
2720
|
{ paddingHorizontal: 16, paddingTop: 16 },
|
|
2680
|
-
]} renderItem={({ item: [name, count] }) => {
|
|
2721
|
+
]} renderItem={({ item: [name, count], index }) => {
|
|
2681
2722
|
const maxCount = topEventsArray[0]?.[1] || 1;
|
|
2682
2723
|
const color = (0, AnalyticsEventCard_1.getEventColor)(name);
|
|
2683
|
-
return (<
|
|
2724
|
+
return (<AnimatedEntrance_1.default index={index} distance={8} style={[
|
|
2684
2725
|
styles_1.default.analyticsTopEventsCard,
|
|
2685
2726
|
{ marginBottom: 12, paddingVertical: 16 },
|
|
2686
2727
|
]}>
|
|
@@ -2716,7 +2757,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2716
2757
|
{count}
|
|
2717
2758
|
</react_native_1.Text>
|
|
2718
2759
|
</react_native_1.View>
|
|
2719
|
-
</
|
|
2760
|
+
</AnimatedEntrance_1.default>);
|
|
2720
2761
|
}} ListEmptyComponent={<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
2721
2762
|
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
2722
2763
|
<NetworkIcons_1.EmptyRadarIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
@@ -2733,7 +2774,11 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2733
2774
|
? Math.floor(next.timestamp / 60000)
|
|
2734
2775
|
: -1;
|
|
2735
2776
|
const showTimestamp = index === 0 || thisMin !== nextMin;
|
|
2736
|
-
return (<
|
|
2777
|
+
return (<AnimatedEntrance_1.default index={index} distance={8}>
|
|
2778
|
+
<AnalyticsEventCard_1.default event={item} onPress={() => {
|
|
2779
|
+
animateNextLayout();
|
|
2780
|
+
setSelectedEvent(item);
|
|
2781
|
+
}} isNew={newEventIds.has(item.id)} searchStr={analyticsSearch} isFirst={index === 0} isLast={index === filteredAnalyticsEvents.length - 1} msSincePrev={msSincePrev} showTimestamp={showTimestamp} computedScreenName={(() => {
|
|
2737
2782
|
let screenName = item.screenName ||
|
|
2738
2783
|
item.screenClass ||
|
|
2739
2784
|
item.pageTitle ||
|
|
@@ -2751,7 +2796,8 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
2751
2796
|
}
|
|
2752
2797
|
}
|
|
2753
2798
|
return screenName;
|
|
2754
|
-
})()}/>
|
|
2799
|
+
})()}/>
|
|
2800
|
+
</AnimatedEntrance_1.default>);
|
|
2755
2801
|
}} initialNumToRender={20} maxToRenderPerBatch={20} windowSize={5} removeClippedSubviews ListEmptyComponent={<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
2756
2802
|
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
2757
2803
|
<NetworkIcons_1.EmptyRadarIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
@@ -3182,7 +3228,9 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
3182
3228
|
{filtered}/{total}) logs is showing
|
|
3183
3229
|
</react_native_1.Text>);
|
|
3184
3230
|
}
|
|
3185
|
-
})()} renderItem={({ item }) => (<
|
|
3231
|
+
})()} renderItem={({ item, index }) => (<AnimatedEntrance_1.default index={index} distance={8}>
|
|
3232
|
+
<ConsoleLogCard_1.ConsoleLogCard item={item} searchStr={logSearch}/>
|
|
3233
|
+
</AnimatedEntrance_1.default>)} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState_1.default isSearch={logSearch.length > 0 || logFilters.size > 0}/>} contentContainerStyle={[
|
|
3186
3234
|
styles_1.default.listContent,
|
|
3187
3235
|
filteredConsoleLogs.length === 0 && { flexGrow: 1 },
|
|
3188
3236
|
]} keyboardShouldPersistTaps="handled"/>
|
|
@@ -3302,7 +3350,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
3302
3350
|
backgroundColor: AppColors_1.AppColors.purple,
|
|
3303
3351
|
borderColor: AppColors_1.AppColors.purple,
|
|
3304
3352
|
},
|
|
3305
|
-
]} onPress={() =>
|
|
3353
|
+
]} onPress={() => {
|
|
3354
|
+
animateNextLayout();
|
|
3355
|
+
setWebViewSubTab('preview');
|
|
3356
|
+
}}>
|
|
3306
3357
|
<NetworkIcons_1.EyeIcon color={webViewSubTab === 'preview'
|
|
3307
3358
|
? '#FFFFFF'
|
|
3308
3359
|
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
@@ -3336,7 +3387,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
3336
3387
|
backgroundColor: AppColors_1.AppColors.purple,
|
|
3337
3388
|
borderColor: AppColors_1.AppColors.purple,
|
|
3338
3389
|
},
|
|
3339
|
-
]} onPress={() =>
|
|
3390
|
+
]} onPress={() => {
|
|
3391
|
+
animateNextLayout();
|
|
3392
|
+
setWebViewSubTab('html');
|
|
3393
|
+
}}>
|
|
3340
3394
|
<NetworkIcons_1.HtmlIcon color={webViewSubTab === 'html'
|
|
3341
3395
|
? '#FFFFFF'
|
|
3342
3396
|
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
@@ -3370,7 +3424,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
3370
3424
|
backgroundColor: AppColors_1.AppColors.purple,
|
|
3371
3425
|
borderColor: AppColors_1.AppColors.purple,
|
|
3372
3426
|
},
|
|
3373
|
-
]} onPress={() =>
|
|
3427
|
+
]} onPress={() => {
|
|
3428
|
+
animateNextLayout();
|
|
3429
|
+
setWebViewSubTab('navigation');
|
|
3430
|
+
}}>
|
|
3374
3431
|
<NetworkIcons_1.ClockIcon color={webViewSubTab === 'navigation'
|
|
3375
3432
|
? '#FFFFFF'
|
|
3376
3433
|
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
@@ -3404,7 +3461,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
3404
3461
|
backgroundColor: AppColors_1.AppColors.purple,
|
|
3405
3462
|
borderColor: AppColors_1.AppColors.purple,
|
|
3406
3463
|
},
|
|
3407
|
-
]} onPress={() =>
|
|
3464
|
+
]} onPress={() => {
|
|
3465
|
+
animateNextLayout();
|
|
3466
|
+
setWebViewSubTab('console');
|
|
3467
|
+
}}>
|
|
3408
3468
|
<NetworkIcons_1.TerminalIcon color={webViewSubTab === 'console'
|
|
3409
3469
|
? '#FFFFFF'
|
|
3410
3470
|
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
@@ -3493,7 +3553,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
3493
3553
|
: tab === 'css'
|
|
3494
3554
|
? '#2563EB' // Blue
|
|
3495
3555
|
: '#D97706'; // Dark Yellow/Amber
|
|
3496
|
-
return (<react_native_1.Pressable key={tab} onPress={() =>
|
|
3556
|
+
return (<react_native_1.Pressable key={tab} onPress={() => {
|
|
3557
|
+
animateNextLayout();
|
|
3558
|
+
setHtmlSubTab(tab);
|
|
3559
|
+
}} style={{
|
|
3497
3560
|
paddingVertical: 8,
|
|
3498
3561
|
paddingHorizontal: 4,
|
|
3499
3562
|
borderBottomWidth: 2,
|
|
@@ -3588,7 +3651,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
3588
3651
|
const d = new Date(ts);
|
|
3589
3652
|
return `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
|
|
3590
3653
|
};
|
|
3591
|
-
return (<
|
|
3654
|
+
return (<AnimatedEntrance_1.default index={index} distance={8} style={{
|
|
3592
3655
|
marginHorizontal: 16,
|
|
3593
3656
|
marginVertical: 6,
|
|
3594
3657
|
borderRadius: 12,
|
|
@@ -3681,7 +3744,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
3681
3744
|
</react_native_1.View>
|
|
3682
3745
|
</react_native_1.View>
|
|
3683
3746
|
<CopyButton_1.default value={item.url} label="URL"/>
|
|
3684
|
-
</
|
|
3747
|
+
</AnimatedEntrance_1.default>);
|
|
3685
3748
|
}} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState_1.default isSearch={webViewSearch.length > 0}/>} contentContainerStyle={[
|
|
3686
3749
|
styles_1.default.listContent,
|
|
3687
3750
|
filteredNavHistory.length === 0 && {
|
|
@@ -3726,7 +3789,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
3726
3789
|
: AppColors_1.AppColors.primaryLight;
|
|
3727
3790
|
const d = new Date(item.timestamp);
|
|
3728
3791
|
const timeStr = `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
|
|
3729
|
-
return (<
|
|
3792
|
+
return (<AnimatedEntrance_1.default index={item.id} distance={8} style={{
|
|
3730
3793
|
marginHorizontal: 12,
|
|
3731
3794
|
marginVertical: 3,
|
|
3732
3795
|
borderRadius: 8,
|
|
@@ -3775,7 +3838,7 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
3775
3838
|
{item.message}
|
|
3776
3839
|
</react_native_1.Text>
|
|
3777
3840
|
</react_native_1.View>
|
|
3778
|
-
</
|
|
3841
|
+
</AnimatedEntrance_1.default>);
|
|
3779
3842
|
}} initialNumToRender={20} maxToRenderPerBatch={20} windowSize={7} contentContainerStyle={[
|
|
3780
3843
|
styles_1.default.listContent,
|
|
3781
3844
|
webViewLogs.length === 0 && { flexGrow: 1 },
|
|
@@ -4050,7 +4113,10 @@ const NetworkInspector = ({ enabled = true, }) => {
|
|
|
4050
4113
|
return <NetworkIcons_1.RequestIcon color={iconColor}/>;
|
|
4051
4114
|
return <NetworkIcons_1.ResponseIcon color={iconColor}/>;
|
|
4052
4115
|
};
|
|
4053
|
-
return (<react_native_1.TouchableOpacity key={tab} onPress={() =>
|
|
4116
|
+
return (<react_native_1.TouchableOpacity key={tab} onPress={() => {
|
|
4117
|
+
animateNextLayout();
|
|
4118
|
+
setApiDetailActiveTab(tab);
|
|
4119
|
+
}} style={{
|
|
4054
4120
|
flex: 1,
|
|
4055
4121
|
paddingVertical: 6,
|
|
4056
4122
|
flexDirection: 'row',
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
interface AnimatedEntranceProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
delay?: number;
|
|
6
|
+
distance?: number;
|
|
7
|
+
duration?: number;
|
|
8
|
+
index?: number;
|
|
9
|
+
style?: ViewStyle | ViewStyle[];
|
|
10
|
+
}
|
|
11
|
+
declare const AnimatedEntrance: ({ children, delay, distance, duration, index, style, }: AnimatedEntranceProps) => React.JSX.Element;
|
|
12
|
+
export default AnimatedEntrance;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
const AnimatedEntrance = ({ children, delay = 0, distance = 10, duration = 220, index = 0, style, }) => {
|
|
4
|
+
const progress = useRef(new Animated.Value(0)).current;
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
progress.setValue(0);
|
|
7
|
+
Animated.timing(progress, {
|
|
8
|
+
toValue: 1,
|
|
9
|
+
duration,
|
|
10
|
+
delay: delay + Math.min(index, 12) * 18,
|
|
11
|
+
useNativeDriver: true,
|
|
12
|
+
}).start();
|
|
13
|
+
}, [delay, duration, index, progress]);
|
|
14
|
+
return (<Animated.View style={[
|
|
15
|
+
style,
|
|
16
|
+
{
|
|
17
|
+
opacity: progress,
|
|
18
|
+
transform: [
|
|
19
|
+
{
|
|
20
|
+
translateY: progress.interpolate({
|
|
21
|
+
inputRange: [0, 1],
|
|
22
|
+
outputRange: [distance, 0],
|
|
23
|
+
}),
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
scale: progress.interpolate({
|
|
27
|
+
inputRange: [0, 1],
|
|
28
|
+
outputRange: [0.985, 1],
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
]}>
|
|
34
|
+
{children}
|
|
35
|
+
</Animated.View>);
|
|
36
|
+
};
|
|
37
|
+
export default AnimatedEntrance;
|