react-native-debug-toolkit 2.0.0 → 2.1.0

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.
Files changed (228) hide show
  1. package/README.md +72 -72
  2. package/README.zh-CN.md +209 -0
  3. package/lib/commonjs/components/ClipboardTab.js +15 -16
  4. package/lib/commonjs/components/ClipboardTab.js.map +1 -1
  5. package/lib/commonjs/components/ConsoleLogTab.js +69 -202
  6. package/lib/commonjs/components/ConsoleLogTab.js.map +1 -1
  7. package/lib/commonjs/components/DebugPanel.js +230 -0
  8. package/lib/commonjs/components/DebugPanel.js.map +1 -0
  9. package/lib/commonjs/components/DebugView.js +66 -0
  10. package/lib/commonjs/components/DebugView.js.map +1 -0
  11. package/lib/commonjs/components/EnvironmentTab.js +22 -23
  12. package/lib/commonjs/components/EnvironmentTab.js.map +1 -1
  13. package/lib/commonjs/components/FeatureTabBar.js +182 -0
  14. package/lib/commonjs/components/FeatureTabBar.js.map +1 -0
  15. package/lib/commonjs/components/FloatIcon.js +187 -0
  16. package/lib/commonjs/components/FloatIcon.js.map +1 -0
  17. package/lib/commonjs/components/FloatPanelView.js +140 -723
  18. package/lib/commonjs/components/FloatPanelView.js.map +1 -1
  19. package/lib/commonjs/components/NavigationLogTab.js +8 -8
  20. package/lib/commonjs/components/NavigationLogTab.js.map +1 -1
  21. package/lib/commonjs/components/NetworkLogTab.js +179 -350
  22. package/lib/commonjs/components/NetworkLogTab.js.map +1 -1
  23. package/lib/commonjs/components/ThirdPartyLibsTab.js +8 -8
  24. package/lib/commonjs/components/ThirdPartyLibsTab.js.map +1 -1
  25. package/lib/commonjs/components/TrackLogTab.js +106 -248
  26. package/lib/commonjs/components/TrackLogTab.js.map +1 -1
  27. package/lib/commonjs/components/ZustandLogTab.js +148 -288
  28. package/lib/commonjs/components/ZustandLogTab.js.map +1 -1
  29. package/lib/commonjs/components/shared/CollapsibleSection.js +4 -4
  30. package/lib/commonjs/components/shared/CollapsibleSection.js.map +1 -1
  31. package/lib/commonjs/components/shared/CopyButton.js +3 -3
  32. package/lib/commonjs/components/shared/CopyButton.js.map +1 -1
  33. package/lib/commonjs/components/shared/LogListScreen.js +174 -0
  34. package/lib/commonjs/components/shared/LogListScreen.js.map +1 -0
  35. package/lib/commonjs/core/DebugToolkit.js +92 -112
  36. package/lib/commonjs/core/DebugToolkit.js.map +1 -1
  37. package/lib/commonjs/core/DebugToolkitProvider.js +30 -28
  38. package/lib/commonjs/core/DebugToolkitProvider.js.map +1 -1
  39. package/lib/commonjs/features/ClipboardFeature.js +6 -2
  40. package/lib/commonjs/features/ClipboardFeature.js.map +1 -1
  41. package/lib/commonjs/features/ConsoleLogFeature.js +66 -49
  42. package/lib/commonjs/features/ConsoleLogFeature.js.map +1 -1
  43. package/lib/commonjs/features/EnvironmentFeature.js +5 -13
  44. package/lib/commonjs/features/EnvironmentFeature.js.map +1 -1
  45. package/lib/commonjs/features/NavigationLogFeature.js +17 -38
  46. package/lib/commonjs/features/NavigationLogFeature.js.map +1 -1
  47. package/lib/commonjs/features/NetworkFeature.js +35 -256
  48. package/lib/commonjs/features/NetworkFeature.js.map +1 -1
  49. package/lib/commonjs/features/TrackFeature.js +17 -38
  50. package/lib/commonjs/features/TrackFeature.js.map +1 -1
  51. package/lib/commonjs/features/ZustandLogFeature.js +21 -38
  52. package/lib/commonjs/features/ZustandLogFeature.js.map +1 -1
  53. package/lib/commonjs/hooks/useNavigationLogger.js.map +1 -1
  54. package/lib/commonjs/index.js +7 -20
  55. package/lib/commonjs/index.js.map +1 -1
  56. package/lib/commonjs/initialize.js +19 -96
  57. package/lib/commonjs/initialize.js.map +1 -1
  58. package/lib/commonjs/interceptors/networkInterceptor.js +466 -0
  59. package/lib/commonjs/interceptors/networkInterceptor.js.map +1 -0
  60. package/lib/commonjs/utils/colors.js +48 -0
  61. package/lib/commonjs/utils/colors.js.map +1 -0
  62. package/lib/commonjs/utils/createChannelFeature.js +48 -0
  63. package/lib/commonjs/utils/createChannelFeature.js.map +1 -0
  64. package/lib/commonjs/utils/layout.js +8 -0
  65. package/lib/commonjs/utils/layout.js.map +1 -0
  66. package/lib/commonjs/utils/urlRewriterRegistry.js +14 -0
  67. package/lib/commonjs/utils/urlRewriterRegistry.js.map +1 -0
  68. package/lib/module/components/ClipboardTab.js +8 -8
  69. package/lib/module/components/ClipboardTab.js.map +1 -1
  70. package/lib/module/components/ConsoleLogTab.js +66 -199
  71. package/lib/module/components/ConsoleLogTab.js.map +1 -1
  72. package/lib/module/components/DebugPanel.js +225 -0
  73. package/lib/module/components/DebugPanel.js.map +1 -0
  74. package/lib/module/components/DebugView.js +61 -0
  75. package/lib/module/components/DebugView.js.map +1 -0
  76. package/lib/module/components/EnvironmentTab.js +3 -3
  77. package/lib/module/components/EnvironmentTab.js.map +1 -1
  78. package/lib/module/components/FeatureTabBar.js +177 -0
  79. package/lib/module/components/FeatureTabBar.js.map +1 -0
  80. package/lib/module/components/FloatIcon.js +182 -0
  81. package/lib/module/components/FloatIcon.js.map +1 -0
  82. package/lib/module/components/FloatPanelView.js +141 -723
  83. package/lib/module/components/FloatPanelView.js.map +1 -1
  84. package/lib/module/components/NavigationLogTab.js +1 -1
  85. package/lib/module/components/NavigationLogTab.js.map +1 -1
  86. package/lib/module/components/NetworkLogTab.js +167 -338
  87. package/lib/module/components/NetworkLogTab.js.map +1 -1
  88. package/lib/module/components/ThirdPartyLibsTab.js +1 -1
  89. package/lib/module/components/ThirdPartyLibsTab.js.map +1 -1
  90. package/lib/module/components/TrackLogTab.js +94 -236
  91. package/lib/module/components/TrackLogTab.js.map +1 -1
  92. package/lib/module/components/ZustandLogTab.js +136 -276
  93. package/lib/module/components/ZustandLogTab.js.map +1 -1
  94. package/lib/module/components/shared/CollapsibleSection.js +1 -1
  95. package/lib/module/components/shared/CollapsibleSection.js.map +1 -1
  96. package/lib/module/components/shared/CopyButton.js +1 -1
  97. package/lib/module/components/shared/CopyButton.js.map +1 -1
  98. package/lib/module/components/shared/LogListScreen.js +169 -0
  99. package/lib/module/components/shared/LogListScreen.js.map +1 -0
  100. package/lib/module/core/DebugToolkit.js +92 -111
  101. package/lib/module/core/DebugToolkit.js.map +1 -1
  102. package/lib/module/core/DebugToolkitProvider.js +31 -29
  103. package/lib/module/core/DebugToolkitProvider.js.map +1 -1
  104. package/lib/module/features/ClipboardFeature.js +6 -2
  105. package/lib/module/features/ClipboardFeature.js.map +1 -1
  106. package/lib/module/features/ConsoleLogFeature.js +65 -49
  107. package/lib/module/features/ConsoleLogFeature.js.map +1 -1
  108. package/lib/module/features/EnvironmentFeature.js +5 -13
  109. package/lib/module/features/EnvironmentFeature.js.map +1 -1
  110. package/lib/module/features/NavigationLogFeature.js +16 -38
  111. package/lib/module/features/NavigationLogFeature.js.map +1 -1
  112. package/lib/module/features/NetworkFeature.js +34 -255
  113. package/lib/module/features/NetworkFeature.js.map +1 -1
  114. package/lib/module/features/TrackFeature.js +16 -38
  115. package/lib/module/features/TrackFeature.js.map +1 -1
  116. package/lib/module/features/ZustandLogFeature.js +22 -38
  117. package/lib/module/features/ZustandLogFeature.js.map +1 -1
  118. package/lib/module/hooks/useNavigationLogger.js.map +1 -1
  119. package/lib/module/index.js +2 -3
  120. package/lib/module/index.js.map +1 -1
  121. package/lib/module/initialize.js +19 -95
  122. package/lib/module/initialize.js.map +1 -1
  123. package/lib/module/interceptors/networkInterceptor.js +460 -0
  124. package/lib/module/interceptors/networkInterceptor.js.map +1 -0
  125. package/lib/module/utils/colors.js +43 -0
  126. package/lib/module/utils/colors.js.map +1 -0
  127. package/lib/module/utils/createChannelFeature.js +44 -0
  128. package/lib/module/utils/createChannelFeature.js.map +1 -0
  129. package/lib/module/utils/layout.js +4 -0
  130. package/lib/module/utils/layout.js.map +1 -0
  131. package/lib/module/utils/urlRewriterRegistry.js +10 -0
  132. package/lib/module/utils/urlRewriterRegistry.js.map +1 -0
  133. package/lib/typescript/src/components/ClipboardTab.d.ts.map +1 -1
  134. package/lib/typescript/src/components/ConsoleLogTab.d.ts.map +1 -1
  135. package/lib/typescript/src/components/DebugPanel.d.ts +9 -0
  136. package/lib/typescript/src/components/DebugPanel.d.ts.map +1 -0
  137. package/lib/typescript/src/components/DebugView.d.ts +19 -0
  138. package/lib/typescript/src/components/DebugView.d.ts.map +1 -0
  139. package/lib/typescript/src/components/EnvironmentTab.d.ts.map +1 -1
  140. package/lib/typescript/src/components/FeatureTabBar.d.ts +13 -0
  141. package/lib/typescript/src/components/FeatureTabBar.d.ts.map +1 -0
  142. package/lib/typescript/src/components/FloatIcon.d.ts +12 -0
  143. package/lib/typescript/src/components/FloatIcon.d.ts.map +1 -0
  144. package/lib/typescript/src/components/FloatPanelView.d.ts +4 -59
  145. package/lib/typescript/src/components/FloatPanelView.d.ts.map +1 -1
  146. package/lib/typescript/src/components/NetworkLogTab.d.ts.map +1 -1
  147. package/lib/typescript/src/components/ThirdPartyLibsTab.d.ts.map +1 -1
  148. package/lib/typescript/src/components/TrackLogTab.d.ts.map +1 -1
  149. package/lib/typescript/src/components/ZustandLogTab.d.ts.map +1 -1
  150. package/lib/typescript/src/components/shared/LogListScreen.d.ts +21 -0
  151. package/lib/typescript/src/components/shared/LogListScreen.d.ts.map +1 -0
  152. package/lib/typescript/src/core/DebugToolkit.d.ts +11 -18
  153. package/lib/typescript/src/core/DebugToolkit.d.ts.map +1 -1
  154. package/lib/typescript/src/core/DebugToolkitProvider.d.ts +2 -5
  155. package/lib/typescript/src/core/DebugToolkitProvider.d.ts.map +1 -1
  156. package/lib/typescript/src/features/ClipboardFeature.d.ts +4 -0
  157. package/lib/typescript/src/features/ClipboardFeature.d.ts.map +1 -1
  158. package/lib/typescript/src/features/ConsoleLogFeature.d.ts +2 -0
  159. package/lib/typescript/src/features/ConsoleLogFeature.d.ts.map +1 -1
  160. package/lib/typescript/src/features/EnvironmentFeature.d.ts.map +1 -1
  161. package/lib/typescript/src/features/NavigationLogFeature.d.ts +2 -0
  162. package/lib/typescript/src/features/NavigationLogFeature.d.ts.map +1 -1
  163. package/lib/typescript/src/features/NetworkFeature.d.ts +7 -20
  164. package/lib/typescript/src/features/NetworkFeature.d.ts.map +1 -1
  165. package/lib/typescript/src/features/TrackFeature.d.ts +2 -0
  166. package/lib/typescript/src/features/TrackFeature.d.ts.map +1 -1
  167. package/lib/typescript/src/features/ZustandLogFeature.d.ts +2 -0
  168. package/lib/typescript/src/features/ZustandLogFeature.d.ts.map +1 -1
  169. package/lib/typescript/src/hooks/useNavigationLogger.d.ts +1 -8
  170. package/lib/typescript/src/hooks/useNavigationLogger.d.ts.map +1 -1
  171. package/lib/typescript/src/index.d.ts +5 -5
  172. package/lib/typescript/src/index.d.ts.map +1 -1
  173. package/lib/typescript/src/initialize.d.ts +3 -22
  174. package/lib/typescript/src/initialize.d.ts.map +1 -1
  175. package/lib/typescript/src/interceptors/networkInterceptor.d.ts +18 -0
  176. package/lib/typescript/src/interceptors/networkInterceptor.d.ts.map +1 -0
  177. package/lib/typescript/src/types/index.d.ts +26 -29
  178. package/lib/typescript/src/types/index.d.ts.map +1 -1
  179. package/lib/typescript/src/utils/colors.d.ts +21 -0
  180. package/lib/typescript/src/utils/colors.d.ts.map +1 -0
  181. package/lib/typescript/src/utils/createChannelFeature.d.ts +18 -0
  182. package/lib/typescript/src/utils/createChannelFeature.d.ts.map +1 -0
  183. package/lib/typescript/src/utils/layout.d.ts +2 -0
  184. package/lib/typescript/src/utils/layout.d.ts.map +1 -0
  185. package/lib/typescript/src/utils/urlRewriterRegistry.d.ts +7 -0
  186. package/lib/typescript/src/utils/urlRewriterRegistry.d.ts.map +1 -0
  187. package/package.json +5 -1
  188. package/src/components/ClipboardTab.tsx +8 -8
  189. package/src/components/ConsoleLogTab.tsx +49 -163
  190. package/src/components/DebugPanel.tsx +215 -0
  191. package/src/components/DebugView.tsx +80 -0
  192. package/src/components/EnvironmentTab.tsx +3 -3
  193. package/src/components/FeatureTabBar.tsx +204 -0
  194. package/src/components/FloatIcon.tsx +171 -0
  195. package/src/components/FloatPanelView.tsx +135 -647
  196. package/src/components/NavigationLogTab.tsx +1 -1
  197. package/src/components/NetworkLogTab.tsx +128 -269
  198. package/src/components/ThirdPartyLibsTab.tsx +3 -3
  199. package/src/components/TrackLogTab.tsx +53 -188
  200. package/src/components/ZustandLogTab.tsx +79 -181
  201. package/src/components/shared/CollapsibleSection.tsx +1 -1
  202. package/src/components/shared/CopyButton.tsx +1 -1
  203. package/src/components/shared/LogListScreen.tsx +164 -0
  204. package/src/core/DebugToolkit.tsx +114 -138
  205. package/src/core/DebugToolkitProvider.tsx +32 -38
  206. package/src/features/ClipboardFeature.ts +6 -2
  207. package/src/features/ConsoleLogFeature.ts +66 -68
  208. package/src/features/EnvironmentFeature.ts +5 -13
  209. package/src/features/NavigationLogFeature.ts +12 -42
  210. package/src/features/NetworkFeature.ts +43 -405
  211. package/src/features/TrackFeature.ts +14 -49
  212. package/src/features/ZustandLogFeature.ts +16 -42
  213. package/src/hooks/useNavigationLogger.ts +1 -6
  214. package/src/index.ts +5 -9
  215. package/src/initialize.ts +28 -120
  216. package/src/interceptors/networkInterceptor.ts +646 -0
  217. package/src/types/index.ts +25 -36
  218. package/src/utils/colors.ts +38 -0
  219. package/src/utils/createChannelFeature.ts +55 -0
  220. package/src/utils/layout.ts +1 -0
  221. package/src/utils/urlRewriterRegistry.ts +10 -0
  222. package/lib/commonjs/utils/constants.js +0 -135
  223. package/lib/commonjs/utils/constants.js.map +0 -1
  224. package/lib/module/utils/constants.js +0 -130
  225. package/lib/module/utils/constants.js.map +0 -1
  226. package/lib/typescript/src/utils/constants.d.ts +0 -96
  227. package/lib/typescript/src/utils/constants.d.ts.map +0 -1
  228. package/src/utils/constants.ts +0 -91
@@ -1,393 +1,145 @@
1
1
  "use strict";
2
2
 
3
- import React, { Component } from 'react';
4
- import { View, Text, StyleSheet, Animated, PanResponder, Pressable, ScrollView, TouchableOpacity, Easing } from 'react-native';
5
- import { Layout, Colors } from '../utils/constants';
3
+ import React, { Component, useCallback, useEffect, useRef, useState } from 'react';
4
+ import { View, Text, StyleSheet, Animated, PanResponder, Easing } from 'react-native';
5
+ import { FloatIcon } from './FloatIcon';
6
+ import { DebugPanel } from './DebugPanel';
7
+ import { FeatureTabBar } from './FeatureTabBar';
8
+
9
+ // ─── Error Boundary ────────────────────────────────────
6
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
- export class FloatPanelView extends Component {
8
- tabScrollViewRef = /*#__PURE__*/React.createRef();
9
- unsubscribeFns = [];
10
- refreshTimeout = null;
11
- isDisposed = false;
12
- isSwitchingTab = false;
13
- underlineInitialized = false;
14
- tabScrollOffset = 0;
15
- tabViewportWidth = 0;
16
- tabContentWidth = 0;
17
- tabLayouts = [];
18
- constructor(props) {
19
- super(props);
20
- const initialPosition = {
21
- x: Layout.screenWidth - Layout.iconSize - 16,
22
- y: Layout.screenHeight / 2 - Layout.iconSize / 2
23
- };
24
- this.state = {
25
- isOpen: false,
26
- toFloat: true,
27
- pan: new Animated.ValueXY(initialPosition),
28
- scale: new Animated.Value(1),
29
- lastPosition: initialPosition,
30
- activeTab: 0,
31
- panelTranslateY: new Animated.Value(Layout.screenHeight),
32
- backdropOpacity: new Animated.Value(0),
33
- contentOpacity: new Animated.Value(1),
34
- contentTranslateX: new Animated.Value(0),
35
- underlineTranslateX: new Animated.Value(0),
36
- underlineWidth: 0
11
+ class DebugErrorBoundary extends Component {
12
+ state = {
13
+ hasError: false
14
+ };
15
+ static getDerivedStateFromError() {
16
+ return {
17
+ hasError: true
37
18
  };
38
- this.gestureResponder = PanResponder.create({
39
- onStartShouldSetPanResponder: () => true,
40
- onMoveShouldSetPanResponder: () => true,
41
- onPanResponderGrant: () => {
42
- this.setState({
43
- toFloat: true
44
- });
45
- Animated.spring(this.state.scale, {
46
- toValue: 0.9,
47
- friction: 5,
48
- useNativeDriver: true
49
- }).start();
50
- },
51
- onPanResponderMove: (_, gs) => {
52
- const {
53
- lastPosition
54
- } = this.state;
55
- const x = Math.max(0, Math.min(lastPosition.x + gs.dx, Layout.screenWidth - Layout.iconSize));
56
- const y = Math.max(0, Math.min(lastPosition.y + gs.dy, Layout.screenHeight - Layout.iconSize));
57
- this.state.pan.setValue({
58
- x,
59
- y
60
- });
61
- },
62
- onPanResponderRelease: (_, gs) => {
63
- if (Math.abs(gs.dx) < 5 && Math.abs(gs.dy) < 5) {
64
- Animated.spring(this.state.scale, {
65
- toValue: 1,
66
- friction: 5,
67
- useNativeDriver: true
68
- }).start();
69
- this.togglePanel();
70
- return;
71
- }
72
- Animated.spring(this.state.scale, {
73
- toValue: 1,
74
- friction: 5,
75
- useNativeDriver: true
76
- }).start();
77
- const {
78
- lastPosition
79
- } = this.state;
80
- const newPosition = {
81
- x: Math.max(0, Math.min(lastPosition.x + gs.dx, Layout.screenWidth - Layout.iconSize)),
82
- y: Math.max(0, Math.min(lastPosition.y + gs.dy, Layout.screenHeight - Layout.iconSize))
83
- };
84
- this.setState({
85
- lastPosition: newPosition,
86
- toFloat: true
87
- });
88
- },
89
- onPanResponderTerminate: (_, gs) => {
90
- const {
91
- lastPosition
92
- } = this.state;
93
- const newPosition = {
94
- x: Math.max(0, Math.min(lastPosition.x + gs.dx, Layout.screenWidth - Layout.iconSize)),
95
- y: Math.max(0, Math.min(lastPosition.y + gs.dy, Layout.screenHeight - Layout.iconSize))
96
- };
97
- this.setState({
98
- lastPosition: newPosition
99
- });
100
- }
101
- });
102
- this.panelResponder = PanResponder.create({
103
- onStartShouldSetPanResponder: () => true,
104
- onMoveShouldSetPanResponder: (_, gs) => gs.dy > 5,
105
- onPanResponderMove: (_, gs) => {
106
- if (gs.dy > 0) {
107
- this.state.panelTranslateY.setValue(gs.dy);
108
- this.state.backdropOpacity.setValue(Math.max(0, 1 - gs.dy / 200));
109
- }
110
- },
111
- onPanResponderRelease: (_, gs) => {
112
- if (gs.dy > 100) {
113
- this.closePanel();
114
- } else {
115
- Animated.spring(this.state.panelTranslateY, {
116
- toValue: 0,
117
- friction: 8,
118
- tension: 50,
119
- useNativeDriver: true
120
- }).start();
121
- Animated.timing(this.state.backdropOpacity, {
122
- toValue: 1,
123
- duration: 200,
124
- useNativeDriver: true
125
- }).start();
126
- }
127
- }
128
- });
129
-
130
- // Horizontal swipe for tab switching
131
- this.swipeResponder = PanResponder.create({
132
- onStartShouldSetPanResponder: () => false,
133
- onMoveShouldSetPanResponder: (_, gs) => {
134
- if (this.isSwitchingTab) return false;
135
- return Math.abs(gs.dx) > 25 && Math.abs(gs.dx) > Math.abs(gs.dy) * 2.5;
136
- },
137
- onPanResponderRelease: (_, gs) => {
138
- const tabs = this.getTabs();
139
- if (gs.dx < -40 && this.state.activeTab < tabs.length - 1) {
140
- this.switchTab(this.state.activeTab + 1);
141
- } else if (gs.dx > 40 && this.state.activeTab > 0) {
142
- this.switchTab(this.state.activeTab - 1);
143
- }
144
- },
145
- onPanResponderTerminationRequest: () => true
146
- });
147
- }
148
- componentDidMount() {
149
- this.isDisposed = false;
150
- this.subscribeToFeatures(this.props.features);
151
19
  }
152
- componentDidUpdate(prevProps) {
153
- if (prevProps.features !== this.props.features) {
154
- this.unsubscribeFromFeatures();
155
- this.subscribeToFeatures(this.props.features);
156
- if (this.state.activeTab >= this.props.features.length) {
157
- this.setState({
158
- activeTab: 0
159
- });
160
- }
161
- }
162
- }
163
- componentWillUnmount() {
164
- this.isDisposed = true;
165
- if (this.refreshTimeout) {
166
- clearTimeout(this.refreshTimeout);
167
- this.refreshTimeout = null;
168
- }
169
- this.unsubscribeFromFeatures();
170
- }
171
- scheduleRefresh() {
172
- if (this.isDisposed || this.refreshTimeout) return;
173
- this.refreshTimeout = setTimeout(() => {
174
- this.refreshTimeout = null;
175
- if (!this.isDisposed) this.forceUpdate();
176
- }, 0);
20
+ componentDidCatch(error, info) {
21
+ console.error('[DebugToolkit] Panel crashed:', error, info.componentStack);
22
+ this.props.onError();
177
23
  }
178
- subscribeToFeatures(features) {
179
- this.unsubscribeFns = features.map(feature => feature.subscribe?.(() => this.scheduleRefresh())).filter(unsubscribe => typeof unsubscribe === 'function');
180
- }
181
- unsubscribeFromFeatures() {
182
- this.unsubscribeFns.forEach(unsubscribe => unsubscribe());
183
- this.unsubscribeFns = [];
24
+ render() {
25
+ if (this.state.hasError) return null;
26
+ return this.props.children;
184
27
  }
185
- togglePanel = () => {
186
- if (this.state.isOpen) this.closePanel();else this.openPanel();
187
- };
188
- openPanel = () => {
189
- this.resetTabMeasurements();
190
- this.setState({
191
- isOpen: true,
192
- toFloat: false,
193
- underlineWidth: 0
194
- }, () => {
195
- Animated.parallel([Animated.spring(this.state.panelTranslateY, {
196
- toValue: 0,
197
- friction: 8,
198
- tension: 65,
199
- useNativeDriver: true
200
- }), Animated.timing(this.state.backdropOpacity, {
201
- toValue: 1,
202
- duration: 250,
203
- useNativeDriver: true
204
- })]).start();
205
- });
206
- };
207
- closePanel = () => {
208
- Animated.parallel([Animated.spring(this.state.panelTranslateY, {
209
- toValue: Layout.screenHeight,
210
- friction: 8,
211
- tension: 65,
212
- useNativeDriver: true
213
- }), Animated.timing(this.state.backdropOpacity, {
214
- toValue: 0,
215
- duration: 200,
216
- useNativeDriver: true
217
- })]).start(() => {
218
- this.setState({
219
- isOpen: false,
220
- toFloat: true
221
- });
28
+ }
29
+ export function FloatPanelView({
30
+ features,
31
+ onClearAll
32
+ }) {
33
+ const [isOpen, setIsOpen] = useState(false);
34
+ const [activeTab, setActiveTab] = useState(0);
35
+
36
+ // Content slide animation
37
+ const contentOpacity = useRef(new Animated.Value(1)).current;
38
+ const contentTranslateX = useRef(new Animated.Value(0)).current;
39
+ const isSwitchingTab = useRef(false);
40
+
41
+ // Refs to avoid stale closures in PanResponder
42
+ const activeTabRef = useRef(0);
43
+ activeTabRef.current = activeTab;
44
+ const featuresLengthRef = useRef(features.length);
45
+ featuresLengthRef.current = features.length;
46
+ const switchTabRef = useRef(() => {});
47
+
48
+ // Swipe-to-switch responder
49
+ const swipeResponder = useRef(PanResponder.create({
50
+ onStartShouldSetPanResponder: () => false,
51
+ onMoveShouldSetPanResponder: (_, gs) => {
52
+ if (isSwitchingTab.current) return false;
53
+ return Math.abs(gs.dx) > 25 && Math.abs(gs.dx) > Math.abs(gs.dy) * 2.5;
54
+ },
55
+ onPanResponderRelease: (_, gs) => {
56
+ const tab = activeTabRef.current;
57
+ if (gs.dx < -40 && tab < featuresLengthRef.current - 1) switchTabRef.current(tab + 1);else if (gs.dx > 40 && tab > 0) switchTabRef.current(tab - 1);
58
+ },
59
+ onPanResponderTerminationRequest: () => true
60
+ })).current;
61
+
62
+ // Feature subscription → re-render on data changes
63
+ const [, setTick] = useState(0);
64
+ const refreshQueued = useRef(false);
65
+ const scheduleRefresh = useCallback(() => {
66
+ if (refreshQueued.current) return;
67
+ refreshQueued.current = true;
68
+ requestAnimationFrame(() => {
69
+ refreshQueued.current = false;
70
+ setTick(t => t + 1);
222
71
  });
223
- };
224
- resetTabMeasurements() {
225
- this.underlineInitialized = false;
226
- this.tabScrollOffset = 0;
227
- this.tabViewportWidth = 0;
228
- this.tabContentWidth = 0;
229
- this.tabLayouts = [];
230
- this.state.underlineTranslateX.setValue(0);
231
- }
232
- switchTab = index => {
233
- if (this.isSwitchingTab || index === this.state.activeTab) return;
234
- this.isSwitchingTab = true;
235
- const direction = index > this.state.activeTab ? 1 : -1;
72
+ }, []);
73
+ useEffect(() => {
74
+ const unsubs = features.map(f => f.subscribe?.(() => scheduleRefresh())).filter(u => typeof u === 'function');
75
+ return () => unsubs.forEach(u => u());
76
+ }, [features, scheduleRefresh]);
236
77
 
237
- // Auto-scroll tab bar first, then animate underline
238
- const layout = this.tabLayouts[index];
239
- if (layout) {
240
- const targetScrollX = this.getTabScrollTarget(index);
241
- this.tabScrollOffset = targetScrollX;
242
- if (this.tabScrollViewRef.current) {
243
- this.tabScrollViewRef.current.scrollTo({
244
- x: targetScrollX,
245
- animated: true
246
- });
247
- }
248
- this.animateUnderline(index, targetScrollX);
249
- }
78
+ // Reset activeTab if features shrink
79
+ useEffect(() => {
80
+ if (activeTab >= features.length) setActiveTab(0);
81
+ }, [features.length, activeTab]);
250
82
 
251
- // Animate content: slide out + fade out
252
- Animated.parallel([Animated.timing(this.state.contentOpacity, {
83
+ // Tab switching with content animation
84
+ const switchTab = useCallback(index => {
85
+ if (isSwitchingTab.current || index === activeTabRef.current) return;
86
+ isSwitchingTab.current = true;
87
+ const direction = index > activeTabRef.current ? 1 : -1;
88
+ Animated.parallel([Animated.timing(contentOpacity, {
253
89
  toValue: 0,
254
90
  duration: 80,
255
91
  useNativeDriver: true
256
- }), Animated.timing(this.state.contentTranslateX, {
92
+ }), Animated.timing(contentTranslateX, {
257
93
  toValue: -direction * 40,
258
94
  duration: 80,
259
95
  useNativeDriver: true
260
96
  })]).start(() => {
261
- this.setState({
262
- activeTab: index
263
- }, () => {
264
- // Reset translateX to opposite side instantly, then slide in + fade in
265
- this.state.contentTranslateX.setValue(direction * 40);
266
- Animated.parallel([Animated.timing(this.state.contentOpacity, {
267
- toValue: 1,
268
- duration: 150,
269
- useNativeDriver: true
270
- }), Animated.timing(this.state.contentTranslateX, {
271
- toValue: 0,
272
- duration: 200,
273
- easing: Easing.out(Easing.cubic),
274
- useNativeDriver: true
275
- })]).start(() => {
276
- this.isSwitchingTab = false;
277
- });
278
- });
279
- });
280
- };
281
- animateUnderline(index, scrollOffset) {
282
- const layout = this.tabLayouts[index];
283
- if (!layout) {
284
- return;
285
- }
286
- const offsetX = this.getClampedTabScrollOffset(scrollOffset ?? this.tabScrollOffset);
287
- this.setState({
288
- underlineWidth: layout.width
289
- });
290
- Animated.spring(this.state.underlineTranslateX, {
291
- toValue: layout.x - offsetX,
292
- friction: 7,
293
- tension: 50,
294
- useNativeDriver: true
295
- }).start();
296
- }
297
- getMaxTabScrollOffset() {
298
- return Math.max(0, this.tabContentWidth - this.tabViewportWidth);
299
- }
300
- getClampedTabScrollOffset(offset) {
301
- return Math.min(Math.max(0, offset), this.getMaxTabScrollOffset());
302
- }
303
- getTabScrollTarget(index) {
304
- const layout = this.tabLayouts[index];
305
- if (!layout) {
306
- return this.getClampedTabScrollOffset(this.tabScrollOffset);
307
- }
308
- return this.getClampedTabScrollOffset(layout.x - 60);
309
- }
310
- tryInitializeTabBar() {
311
- if (this.underlineInitialized || this.tabViewportWidth <= 0 || this.tabContentWidth <= 0) {
312
- return;
313
- }
314
- const layout = this.tabLayouts[this.state.activeTab];
315
- if (!layout) {
316
- return;
317
- }
318
- const targetScrollX = this.getTabScrollTarget(this.state.activeTab);
319
- this.tabScrollOffset = targetScrollX;
320
- if (this.tabScrollViewRef.current) {
321
- this.tabScrollViewRef.current.scrollTo({
322
- x: targetScrollX,
323
- animated: false
97
+ setActiveTab(index);
98
+ contentTranslateX.setValue(direction * 40);
99
+ Animated.parallel([Animated.timing(contentOpacity, {
100
+ toValue: 1,
101
+ duration: 150,
102
+ useNativeDriver: true
103
+ }), Animated.timing(contentTranslateX, {
104
+ toValue: 0,
105
+ duration: 200,
106
+ easing: Easing.out(Easing.cubic),
107
+ useNativeDriver: true
108
+ })]).start(() => {
109
+ isSwitchingTab.current = false;
324
110
  });
325
- }
326
- this.state.underlineTranslateX.setValue(layout.x - targetScrollX);
327
- this.setState({
328
- underlineWidth: layout.width
329
111
  });
330
- this.underlineInitialized = true;
331
- }
332
- syncUnderlineToActiveTab() {
333
- const layout = this.tabLayouts[this.state.activeTab];
334
- if (!layout) {
335
- return;
336
- }
337
- const clampedOffset = this.getClampedTabScrollOffset(this.tabScrollOffset);
338
- if (clampedOffset !== this.tabScrollOffset) {
339
- this.tabScrollOffset = clampedOffset;
340
- }
341
- this.state.underlineTranslateX.setValue(layout.x - clampedOffset);
342
- if (this.state.underlineWidth !== layout.width) {
343
- this.setState({
344
- underlineWidth: layout.width
345
- });
346
- }
347
- }
348
- handleTabLayout = (index, event) => {
349
- const {
350
- x,
351
- width
352
- } = event.nativeEvent.layout;
353
- this.tabLayouts[index] = {
354
- x,
355
- width
356
- };
357
- if (index === this.state.activeTab) {
358
- this.tryInitializeTabBar();
359
- }
360
- };
361
- getTabs() {
362
- return this.props.features.map(f => ({
363
- label: f.label,
364
- id: f.name
365
- }));
366
- }
367
- renderFeatureContent() {
368
- const tabs = this.getTabs();
369
- if (tabs.length === 0) {
112
+ }, [contentOpacity, contentTranslateX]);
113
+
114
+ // Keep ref in sync
115
+ switchTabRef.current = switchTab;
116
+
117
+ // Badge (first feature that returns one)
118
+ const envBadge = features.map(f => f.badge?.()).find(b => b != null) ?? null;
119
+ const tabs = features.map(f => ({
120
+ label: f.label,
121
+ id: f.name
122
+ }));
123
+
124
+ // Render active feature content
125
+ const renderFeatureContent = () => {
126
+ if (features.length === 0) {
370
127
  return /*#__PURE__*/_jsx(Text, {
371
128
  style: styles.emptyText,
372
129
  children: "No debug features enabled"
373
130
  });
374
131
  }
375
- const featureId = tabs[this.state.activeTab]?.id;
376
- const feature = this.props.features.find(f => f.name === featureId);
377
- if (!feature) {
378
- return /*#__PURE__*/_jsx(Text, {
379
- style: styles.emptyText,
380
- children: "Feature not found"
381
- });
382
- }
132
+ const feature = features[activeTab];
133
+ if (!feature) return /*#__PURE__*/_jsx(Text, {
134
+ style: styles.emptyText,
135
+ children: "Feature not found"
136
+ });
383
137
  const data = feature.getData();
384
138
  const TabComponent = feature.renderContent;
385
- if (TabComponent) {
386
- return /*#__PURE__*/_jsx(TabComponent, {
387
- data: data,
388
- feature: feature
389
- });
390
- }
139
+ if (TabComponent) return /*#__PURE__*/_jsx(TabComponent, {
140
+ data: data,
141
+ feature: feature
142
+ });
391
143
  return /*#__PURE__*/_jsx(View, {
392
144
  style: styles.genericContent,
393
145
  children: /*#__PURE__*/_jsx(Text, {
@@ -395,185 +147,36 @@ export class FloatPanelView extends Component {
395
147
  children: JSON.stringify(data, null, 2)
396
148
  })
397
149
  });
398
- }
399
- render() {
400
- const {
401
- isOpen,
402
- toFloat,
403
- pan,
404
- scale,
405
- panelTranslateY,
406
- backdropOpacity,
407
- activeTab,
408
- contentOpacity
409
- } = this.state;
410
- const tabs = this.getTabs();
411
- return /*#__PURE__*/_jsxs(View, {
150
+ };
151
+ return /*#__PURE__*/_jsx(DebugErrorBoundary, {
152
+ onError: () => setIsOpen(false),
153
+ children: /*#__PURE__*/_jsxs(View, {
412
154
  style: styles.container,
413
155
  pointerEvents: "box-none",
414
- children: [!isOpen && toFloat && /*#__PURE__*/_jsx(Animated.View, {
415
- ...this.gestureResponder.panHandlers,
416
- style: [styles.floatBtn, {
417
- transform: [{
418
- translateX: pan.x
419
- }, {
420
- translateY: pan.y
421
- }, {
422
- scale
423
- }]
424
- }],
425
- children: /*#__PURE__*/_jsxs(Pressable, {
426
- onPress: this.togglePanel,
427
- style: styles.floatBtnInner,
428
- children: [/*#__PURE__*/_jsxs(View, {
429
- style: styles.iconGrid,
430
- children: [/*#__PURE__*/_jsxs(View, {
431
- style: styles.iconRow,
432
- children: [/*#__PURE__*/_jsx(View, {
433
- style: [styles.iconCell, {
434
- backgroundColor: Colors.primary
435
- }]
436
- }), /*#__PURE__*/_jsx(View, {
437
- style: [styles.iconCell, {
438
- backgroundColor: Colors.success
439
- }]
440
- })]
441
- }), /*#__PURE__*/_jsxs(View, {
442
- style: styles.iconRow,
443
- children: [/*#__PURE__*/_jsx(View, {
444
- style: [styles.iconCell, {
445
- backgroundColor: Colors.warning
446
- }]
447
- }), /*#__PURE__*/_jsx(View, {
448
- style: [styles.iconCell, {
449
- backgroundColor: Colors.purple
450
- }]
451
- })]
452
- })]
453
- }), (() => {
454
- const envBadge = this.props.features.map(f => f.badge?.()).find(b => b != null);
455
- if (!envBadge) return null;
456
- return /*#__PURE__*/_jsx(View, {
457
- style: [styles.envBadge, {
458
- backgroundColor: envBadge.color
459
- }],
460
- children: /*#__PURE__*/_jsx(Text, {
461
- style: styles.envBadgeText,
462
- children: envBadge.label
463
- })
464
- });
465
- })()]
466
- })
467
- }), isOpen && /*#__PURE__*/_jsxs(View, {
468
- style: styles.panelContainer,
469
- children: [/*#__PURE__*/_jsx(Animated.View, {
470
- style: [styles.backdrop, {
471
- opacity: backdropOpacity
472
- }],
473
- children: /*#__PURE__*/_jsx(Pressable, {
474
- style: styles.backdropPressable,
475
- onPress: this.closePanel
476
- })
477
- }), /*#__PURE__*/_jsxs(Animated.View, {
478
- style: [styles.panel, {
156
+ children: [/*#__PURE__*/_jsx(FloatIcon, {
157
+ visible: !isOpen,
158
+ onPress: () => setIsOpen(true),
159
+ badge: envBadge
160
+ }), isOpen && /*#__PURE__*/_jsxs(DebugPanel, {
161
+ onClose: () => setIsOpen(false),
162
+ onClearAll: onClearAll,
163
+ children: [/*#__PURE__*/_jsx(FeatureTabBar, {
164
+ tabs: tabs,
165
+ activeIndex: activeTab,
166
+ onSelectTab: switchTab
167
+ }), /*#__PURE__*/_jsx(Animated.View, {
168
+ style: [styles.contentContainer, {
169
+ opacity: contentOpacity,
479
170
  transform: [{
480
- translateY: panelTranslateY
171
+ translateX: contentTranslateX
481
172
  }]
482
173
  }],
483
- children: [/*#__PURE__*/_jsxs(View, {
484
- ...this.panelResponder.panHandlers,
485
- children: [/*#__PURE__*/_jsx(View, {
486
- style: styles.dragHandle,
487
- children: /*#__PURE__*/_jsx(View, {
488
- style: styles.dragIndicator
489
- })
490
- }), /*#__PURE__*/_jsxs(View, {
491
- style: styles.header,
492
- children: [/*#__PURE__*/_jsx(Text, {
493
- style: styles.headerTitle,
494
- children: "Debug Toolkit"
495
- }), /*#__PURE__*/_jsxs(View, {
496
- style: styles.headerButtons,
497
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
498
- onPress: () => {
499
- this.props.onClearAll();
500
- this.closePanel();
501
- },
502
- style: styles.clearAllButton,
503
- activeOpacity: 0.6,
504
- children: /*#__PURE__*/_jsx(Text, {
505
- style: styles.clearButtonText,
506
- children: "Clear"
507
- })
508
- }), /*#__PURE__*/_jsx(Pressable, {
509
- onPress: this.closePanel,
510
- style: styles.closeButton,
511
- children: /*#__PURE__*/_jsx(Text, {
512
- style: styles.closeButtonText,
513
- children: "\u2715"
514
- })
515
- })]
516
- })]
517
- })]
518
- }), /*#__PURE__*/_jsxs(View, {
519
- style: styles.panelContent,
520
- children: [/*#__PURE__*/_jsxs(View, {
521
- style: styles.tabBarContainer,
522
- children: [/*#__PURE__*/_jsx(ScrollView, {
523
- ref: this.tabScrollViewRef,
524
- horizontal: true,
525
- showsHorizontalScrollIndicator: false,
526
- contentContainerStyle: styles.tabsScrollContainer,
527
- onLayout: e => {
528
- this.tabViewportWidth = e.nativeEvent.layout.width;
529
- this.tryInitializeTabBar();
530
- },
531
- onContentSizeChange: width => {
532
- this.tabContentWidth = width;
533
- this.tryInitializeTabBar();
534
- },
535
- onScroll: e => {
536
- this.tabScrollOffset = this.getClampedTabScrollOffset(e.nativeEvent.contentOffset.x);
537
- // Keep underline aligned with active tab during manual scroll
538
- if (!this.isSwitchingTab) {
539
- this.syncUnderlineToActiveTab();
540
- }
541
- },
542
- scrollEventThrottle: 16,
543
- children: tabs.map((tab, index) => /*#__PURE__*/_jsx(TouchableOpacity, {
544
- style: styles.tab,
545
- onPress: () => this.switchTab(index),
546
- activeOpacity: 0.7,
547
- onLayout: e => this.handleTabLayout(index, e),
548
- children: /*#__PURE__*/_jsx(Text, {
549
- style: [styles.tabText, activeTab === index && styles.activeTabText],
550
- numberOfLines: 1,
551
- children: tab.label
552
- })
553
- }, tab.id))
554
- }), /*#__PURE__*/_jsx(Animated.View, {
555
- style: [styles.slidingUnderline, {
556
- width: this.state.underlineWidth,
557
- transform: [{
558
- translateX: this.state.underlineTranslateX
559
- }]
560
- }]
561
- })]
562
- }), /*#__PURE__*/_jsx(Animated.View, {
563
- style: [styles.contentContainer, {
564
- opacity: contentOpacity,
565
- transform: [{
566
- translateX: this.state.contentTranslateX
567
- }]
568
- }],
569
- ...this.swipeResponder.panHandlers,
570
- children: this.renderFeatureContent()
571
- })]
572
- })]
174
+ ...swipeResponder.panHandlers,
175
+ children: renderFeatureContent()
573
176
  })]
574
177
  })]
575
- });
576
- }
178
+ })
179
+ });
577
180
  }
578
181
  const styles = StyleSheet.create({
579
182
  container: {
@@ -584,198 +187,13 @@ const styles = StyleSheet.create({
584
187
  bottom: 0,
585
188
  zIndex: 999
586
189
  },
587
- // Float button
588
- floatBtn: {
589
- position: 'absolute',
590
- width: Layout.iconSize,
591
- height: Layout.iconSize,
592
- borderRadius: Layout.iconSize / 2,
593
- backgroundColor: '#FFFFFF',
594
- elevation: 6,
595
- shadowColor: '#000',
596
- shadowOffset: {
597
- width: 0,
598
- height: 2
599
- },
600
- shadowOpacity: 0.12,
601
- shadowRadius: 8
602
- },
603
- floatBtnInner: {
604
- width: '100%',
605
- height: '100%',
606
- alignItems: 'center',
607
- justifyContent: 'center'
608
- },
609
- iconGrid: {
610
- width: 22,
611
- height: 22,
612
- justifyContent: 'space-between'
613
- },
614
- iconRow: {
615
- flexDirection: 'row',
616
- justifyContent: 'space-between'
617
- },
618
- iconCell: {
619
- width: 8,
620
- height: 8,
621
- borderRadius: 2.5
622
- },
623
- envBadge: {
624
- position: 'absolute',
625
- top: -4,
626
- right: -4,
627
- minWidth: 20,
628
- height: 18,
629
- borderRadius: 9,
630
- paddingHorizontal: 5,
631
- alignItems: 'center',
632
- justifyContent: 'center',
633
- borderWidth: 2,
634
- borderColor: '#FFF',
635
- elevation: 4
636
- },
637
- envBadgeText: {
638
- color: '#FFF',
639
- fontSize: 9,
640
- fontWeight: '700'
641
- },
642
- // Panel
643
- panelContainer: {
644
- position: 'absolute',
645
- top: 0,
646
- left: 0,
647
- right: 0,
648
- bottom: 0,
649
- justifyContent: 'flex-end'
650
- },
651
- backdrop: {
652
- position: 'absolute',
653
- top: 0,
654
- left: 0,
655
- right: 0,
656
- bottom: 0,
657
- backgroundColor: 'rgba(0,0,0,0.35)'
658
- },
659
- backdropPressable: {
660
- flex: 1
661
- },
662
- panel: {
663
- width: '100%',
664
- height: '90%',
665
- backgroundColor: Colors.background,
666
- borderTopLeftRadius: 28,
667
- borderTopRightRadius: 28,
668
- overflow: 'hidden',
669
- elevation: 24,
670
- shadowColor: '#000',
671
- shadowOffset: {
672
- width: 0,
673
- height: -4
674
- },
675
- shadowOpacity: 0.08,
676
- shadowRadius: 12
677
- },
678
- dragHandle: {
679
- width: '100%',
680
- height: 20,
681
- alignItems: 'center',
682
- justifyContent: 'center',
683
- backgroundColor: Colors.surface
684
- },
685
- dragIndicator: {
686
- width: 40,
687
- height: 4,
688
- borderRadius: 2,
689
- backgroundColor: '#D1D1D6'
690
- },
691
- panelContent: {
692
- flex: 1
693
- },
694
190
  contentContainer: {
695
191
  flex: 1
696
192
  },
697
- // Header
698
- header: {
699
- flexDirection: 'row',
700
- justifyContent: 'space-between',
701
- alignItems: 'center',
702
- paddingHorizontal: 20,
703
- paddingTop: 6,
704
- paddingBottom: 10,
705
- backgroundColor: Colors.surface
706
- },
707
- headerTitle: {
708
- fontSize: 17,
709
- fontWeight: '600',
710
- color: Colors.text
711
- },
712
- headerButtons: {
713
- flexDirection: 'row',
714
- alignItems: 'center',
715
- gap: 12
716
- },
717
- clearAllButton: {
718
- paddingHorizontal: 12,
719
- paddingVertical: 6,
720
- borderRadius: 8,
721
- backgroundColor: 'rgba(255,59,48,0.06)'
722
- },
723
- clearButtonText: {
724
- color: Colors.error,
725
- fontSize: 14,
726
- fontWeight: '500'
727
- },
728
- closeButton: {
729
- width: 30,
730
- height: 30,
731
- borderRadius: 15,
732
- backgroundColor: Colors.background,
733
- alignItems: 'center',
734
- justifyContent: 'center'
735
- },
736
- closeButtonText: {
737
- fontSize: 16,
738
- fontWeight: '400',
739
- color: Colors.textSecondary,
740
- lineHeight: 16
741
- },
742
- // Tab bar - iOS 17 sliding underline style
743
- tabBarContainer: {
744
- backgroundColor: Colors.surface,
745
- borderBottomWidth: StyleSheet.hairlineWidth,
746
- borderBottomColor: Colors.border
747
- },
748
- tabsScrollContainer: {
749
- paddingHorizontal: 20,
750
- flexDirection: 'row'
751
- },
752
- tab: {
753
- paddingVertical: 10,
754
- paddingHorizontal: 14,
755
- marginRight: 8
756
- },
757
- tabText: {
758
- fontSize: 14,
759
- fontWeight: '500',
760
- color: Colors.textLight
761
- },
762
- activeTabText: {
763
- color: Colors.primary,
764
- fontWeight: '600'
765
- },
766
- slidingUnderline: {
767
- position: 'absolute',
768
- bottom: 0,
769
- left: 0,
770
- height: 2.5,
771
- borderRadius: 1.25,
772
- backgroundColor: Colors.primary
773
- },
774
- // Misc
775
193
  emptyText: {
776
194
  padding: 20,
777
195
  textAlign: 'center',
778
- color: Colors.textLight,
196
+ color: '#C7C7CC',
779
197
  fontSize: 13
780
198
  },
781
199
  genericContent: {
@@ -785,7 +203,7 @@ const styles = StyleSheet.create({
785
203
  jsonContent: {
786
204
  fontFamily: 'monospace',
787
205
  fontSize: 12,
788
- color: Colors.text
206
+ color: '#1C1C1E'
789
207
  }
790
208
  });
791
209
  //# sourceMappingURL=FloatPanelView.js.map