react-native-in-app-debugger 1.0.52 → 1.0.54
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/Text.jsx +1 -1
- package/index.jsx +8 -7
- package/package.json +1 -1
- package/useAnimation.ts +1 -1
package/Text.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text, Platform } from 'react-native';
|
|
3
3
|
|
|
4
|
-
export default ({ style = {}, ...props }) => <Text {...props} style={[{ fontFamily: Platform.OS === 'android' ? 'Roboto' : 'San Francisco' }, style]} />;
|
|
4
|
+
export default ({ style = {}, ...props }) => <Text selectable {...props} style={[{ fontFamily: Platform.OS === 'android' ? 'Roboto' : 'San Francisco' }, style]} />;
|
package/index.jsx
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
TouchableOpacity,
|
|
6
6
|
View,
|
|
7
7
|
SafeAreaView,
|
|
8
|
-
|
|
8
|
+
useWindowDimensions,
|
|
9
9
|
} from "react-native";
|
|
10
10
|
import Text from "./Text";
|
|
11
11
|
import X from "./X";
|
|
@@ -31,7 +31,7 @@ import Api from "./Api";
|
|
|
31
31
|
import useApiInterceptor from "./useApiInterceptor";
|
|
32
32
|
import useStateRef from "./useStateRef";
|
|
33
33
|
|
|
34
|
-
const
|
|
34
|
+
const fontSize = 7;
|
|
35
35
|
|
|
36
36
|
let v = "";
|
|
37
37
|
let modelOs;
|
|
@@ -63,6 +63,7 @@ export default ({
|
|
|
63
63
|
tabs = [],
|
|
64
64
|
}) => {
|
|
65
65
|
const [blacklists, setB, blacklistRef] = useStateRef([]);
|
|
66
|
+
const dimension = useWindowDimensions();
|
|
66
67
|
|
|
67
68
|
const setBlacklists = (d) => {
|
|
68
69
|
if (!d) {
|
|
@@ -103,7 +104,7 @@ export default ({
|
|
|
103
104
|
|
|
104
105
|
const errors = apis.filter((a) => a.response?.error).length;
|
|
105
106
|
const numPendingApiCalls = apis.filter((a) => !a.response).length;
|
|
106
|
-
let badgeHeight =
|
|
107
|
+
let badgeHeight = fontSize + 7;
|
|
107
108
|
|
|
108
109
|
const displayLabels = [
|
|
109
110
|
(!!env || !!version) && (env || "") + (env ? " " : "") + version,
|
|
@@ -114,7 +115,7 @@ export default ({
|
|
|
114
115
|
...labels,
|
|
115
116
|
].filter(Boolean);
|
|
116
117
|
|
|
117
|
-
displayLabels.forEach(() => (badgeHeight +=
|
|
118
|
+
displayLabels.forEach(() => (badgeHeight += fontSize + 1));
|
|
118
119
|
|
|
119
120
|
const {
|
|
120
121
|
translateX,
|
|
@@ -151,14 +152,14 @@ export default ({
|
|
|
151
152
|
<View style={styles.badgeContainer}>
|
|
152
153
|
{!!numPendingApiCalls && (
|
|
153
154
|
<View style={[styles.badge, { backgroundColor: "orange" }]}>
|
|
154
|
-
<Text style={{ fontSize
|
|
155
|
+
<Text style={{ fontSize, color: "white" }}>
|
|
155
156
|
{numPendingApiCalls}
|
|
156
157
|
</Text>
|
|
157
158
|
</View>
|
|
158
159
|
)}
|
|
159
160
|
{!!errors && (
|
|
160
161
|
<View style={[styles.badge, { backgroundColor: "red" }]}>
|
|
161
|
-
<Text style={{ fontSize
|
|
162
|
+
<Text style={{ fontSize, color: "white" }}>{errors}</Text>
|
|
162
163
|
</View>
|
|
163
164
|
)}
|
|
164
165
|
</View>
|
|
@@ -230,7 +231,7 @@ const styles = StyleSheet.create({
|
|
|
230
231
|
width: "100%",
|
|
231
232
|
height: "100%",
|
|
232
233
|
},
|
|
233
|
-
label: { color: "white", textAlign: "center", fontSize:
|
|
234
|
+
label: { color: "white", textAlign: "center", fontSize: fontSize + 1 },
|
|
234
235
|
badgeContainer: {
|
|
235
236
|
gap: 3,
|
|
236
237
|
flexDirection: "row",
|
package/package.json
CHANGED
package/useAnimation.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Animated, Keyboard, PanResponder, useWindowDimensions } from 'react-native';
|
|
3
3
|
|
|
4
|
-
const defaultBadgeWidth =
|
|
4
|
+
const defaultBadgeWidth = 110;
|
|
5
5
|
const defaultBorderRadius = 10;
|
|
6
6
|
const und = { useNativeDriver: false };
|
|
7
7
|
const touchThreshold = 10;
|