react-native-debug-toolkit 0.2.0 → 0.2.2
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/lib/views/FloatPanelView.js +13 -15
- package/package.json +4 -3
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
Dimensions,
|
|
9
9
|
Pressable,
|
|
10
10
|
SafeAreaView,
|
|
11
|
-
Settings,
|
|
12
11
|
} from 'react-native'
|
|
12
|
+
// import AsyncStorage from '@react-native-async-storage/async-storage'
|
|
13
13
|
import { IconRadius, DebugColors } from '../utils/DebugConst'
|
|
14
14
|
import SubViewHTTPLogs from './SubViewHTTPLogs'
|
|
15
15
|
import SubViewPerformance from './SubViewPerformance'
|
|
@@ -85,20 +85,20 @@ export default class FloatPanelView extends Component {
|
|
|
85
85
|
|
|
86
86
|
async componentDidMount() {
|
|
87
87
|
try {
|
|
88
|
-
const savedPosition =
|
|
88
|
+
// const savedPosition = await AsyncStorage.getItem('@debug_toolkit_position')
|
|
89
89
|
|
|
90
|
-
if (savedPosition) {
|
|
91
|
-
|
|
90
|
+
// if (savedPosition) {
|
|
91
|
+
// const position = JSON.parse(savedPosition)
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
// // Ensure position is within bounds
|
|
94
|
+
// const boundedPosition = {
|
|
95
|
+
// x: Math.max(0, Math.min(position.x, screenWidth - IconRadius)),
|
|
96
|
+
// y: Math.max(0, Math.min(position.y, screenHeight - IconRadius)),
|
|
97
|
+
// }
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
99
|
+
// this.setState({ lastPosition: boundedPosition })
|
|
100
|
+
// this.state.pan.setValue(boundedPosition)
|
|
101
|
+
// }
|
|
102
102
|
} catch (error) {
|
|
103
103
|
console.error('Failed to load debug toolkit position:', error)
|
|
104
104
|
}
|
|
@@ -156,9 +156,7 @@ export default class FloatPanelView extends Component {
|
|
|
156
156
|
|
|
157
157
|
// Save position
|
|
158
158
|
try {
|
|
159
|
-
|
|
160
|
-
'@debug_toolkit_position': JSON.stringify(newPosition),
|
|
161
|
-
})
|
|
159
|
+
// await AsyncStorage.setItem('@debug_toolkit_position', JSON.stringify(newPosition))
|
|
162
160
|
} catch (error) {
|
|
163
161
|
console.error('Failed to save debug toolkit position:', error)
|
|
164
162
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-debug-toolkit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "A simple yet powerful debugging toolkit for React Native with a convenient floating UI for development",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
"author": "zcj",
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"react-native-
|
|
26
|
+
"@react-native-async-storage/async-storage": "^2.1.2",
|
|
27
27
|
"react-native-json-tree": "^1.5.0",
|
|
28
|
-
"react-native-performance": "5.1.2"
|
|
28
|
+
"react-native-performance": "5.1.2",
|
|
29
|
+
"react-native-root-siblings": "^4.0.0"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"react": "*",
|