react-native-xenon 0.2.0 → 0.3.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.
- package/README.md +8 -0
- package/lib/commonjs/assets/icons/bug.png +0 -0
- package/lib/commonjs/assets/icons/record.png +0 -0
- package/lib/commonjs/colors.js +14 -0
- package/lib/commonjs/colors.js.map +1 -0
- package/lib/commonjs/contexts/index.js +1 -1
- package/lib/commonjs/hooks/index.js +2 -9
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/useConsoleInterceptor.js +6 -6
- package/lib/commonjs/hooks/useConsoleInterceptor.js.map +1 -1
- package/lib/commonjs/hooks/useNetworkInterceptor.js +16 -16
- package/lib/commonjs/hooks/useNetworkInterceptor.js.map +1 -1
- package/lib/commonjs/icons.js +15 -0
- package/lib/commonjs/icons.js.map +1 -0
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/interceptors/ConsoleInterceptor.js +12 -13
- package/lib/commonjs/interceptors/ConsoleInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/FetchInterceptor.js +12 -13
- package/lib/commonjs/interceptors/FetchInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/HttpInterceptor.js +18 -36
- package/lib/commonjs/interceptors/HttpInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/Interceptor.js +16 -4
- package/lib/commonjs/interceptors/Interceptor.js.map +1 -1
- package/lib/commonjs/interceptors/NetworkInterceptor.js +1 -1
- package/lib/commonjs/interceptors/NetworkInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/WebSocketInterceptor.js +40 -64
- package/lib/commonjs/interceptors/WebSocketInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/XHRInterceptor.js +10 -11
- package/lib/commonjs/interceptors/XHRInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/index.js +4 -4
- package/lib/commonjs/types/index.js +4 -4
- package/lib/commonjs/ui/Xenon.js +23 -16
- package/lib/commonjs/ui/Xenon.js.map +1 -1
- package/lib/commonjs/ui/components/bubble/Bubble.js +10 -6
- package/lib/commonjs/ui/components/bubble/Bubble.js.map +1 -1
- package/lib/commonjs/ui/components/details/DetailsViewer.js +7 -7
- package/lib/commonjs/ui/components/details/DetailsViewer.js.map +1 -1
- package/lib/commonjs/ui/components/details/LogMessageDetails.js +4 -2
- package/lib/commonjs/ui/components/details/LogMessageDetails.js.map +1 -1
- package/lib/commonjs/ui/components/details/NetworkRequestDetails.js +14 -19
- package/lib/commonjs/ui/components/details/NetworkRequestDetails.js.map +1 -1
- package/lib/commonjs/ui/components/headers/DebuggerHeader.js +17 -15
- package/lib/commonjs/ui/components/headers/DebuggerHeader.js.map +1 -1
- package/lib/commonjs/ui/components/headers/NetworkPanelHeader.js +13 -9
- package/lib/commonjs/ui/components/headers/NetworkPanelHeader.js.map +1 -1
- package/lib/commonjs/ui/components/headers/NetworkRequestDetailsHeader.js +1 -1
- package/lib/commonjs/ui/components/index.js +5 -5
- package/lib/commonjs/ui/components/items/ConsolePanelItem.js +4 -2
- package/lib/commonjs/ui/components/items/ConsolePanelItem.js.map +1 -1
- package/lib/commonjs/ui/components/items/DebuggerHeaderItem.js +17 -10
- package/lib/commonjs/ui/components/items/DebuggerHeaderItem.js.map +1 -1
- package/lib/commonjs/ui/components/items/NetworkPanelItem.js +11 -7
- package/lib/commonjs/ui/components/items/NetworkPanelItem.js.map +1 -1
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsHeaderItem.js +4 -2
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsHeaderItem.js.map +1 -1
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsItem.js +4 -2
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsItem.js.map +1 -1
- package/lib/commonjs/ui/components/panels/ConsolePanel.js +9 -10
- package/lib/commonjs/ui/components/panels/ConsolePanel.js.map +1 -1
- package/lib/commonjs/ui/components/panels/NetworkPanel.js +18 -18
- package/lib/commonjs/ui/components/panels/NetworkPanel.js.map +1 -1
- package/lib/commonjs/utils.js +8 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/assets/icons/bug.png +0 -0
- package/lib/module/assets/icons/record.png +0 -0
- package/lib/module/colors.js +14 -0
- package/lib/module/colors.js.map +1 -0
- package/lib/module/constants.js +5 -1
- package/lib/module/constants.js.map +1 -1
- package/lib/module/contexts/MainContext.js +7 -3
- package/lib/module/contexts/MainContext.js.map +1 -1
- package/lib/module/contexts/index.js +11 -1
- package/lib/module/contexts/index.js.map +1 -1
- package/lib/module/hooks/index.js +18 -3
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useConsoleInterceptor.js +18 -14
- package/lib/module/hooks/useConsoleInterceptor.js.map +1 -1
- package/lib/module/hooks/useNetworkInterceptor.js +33 -29
- package/lib/module/hooks/useNetworkInterceptor.js.map +1 -1
- package/lib/module/icons.js +15 -0
- package/lib/module/icons.js.map +1 -0
- package/lib/module/index.js +11 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/interceptors/ConsoleInterceptor.js +16 -10
- package/lib/module/interceptors/ConsoleInterceptor.js.map +1 -1
- package/lib/module/interceptors/FetchInterceptor.js +20 -15
- package/lib/module/interceptors/FetchInterceptor.js.map +1 -1
- package/lib/module/interceptors/HttpInterceptor.js +24 -37
- package/lib/module/interceptors/HttpInterceptor.js.map +1 -1
- package/lib/module/interceptors/Interceptor.js +20 -3
- package/lib/module/interceptors/Interceptor.js.map +1 -1
- package/lib/module/interceptors/NetworkInterceptor.js +8 -2
- package/lib/module/interceptors/NetworkInterceptor.js.map +1 -1
- package/lib/module/interceptors/WebSocketInterceptor.js +60 -78
- package/lib/module/interceptors/WebSocketInterceptor.js.map +1 -1
- package/lib/module/interceptors/XHRInterceptor.js +16 -11
- package/lib/module/interceptors/XHRInterceptor.js.map +1 -1
- package/lib/module/interceptors/index.js +32 -4
- package/lib/module/interceptors/index.js.map +1 -1
- package/lib/module/types/common.js +6 -2
- package/lib/module/types/common.js.map +1 -1
- package/lib/module/types/http.js +3 -1
- package/lib/module/types/index.js +47 -4
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/websocket.js +3 -1
- package/lib/module/ui/Xenon.js +47 -35
- package/lib/module/ui/Xenon.js.map +1 -1
- package/lib/module/ui/components/bubble/Bubble.js +24 -16
- package/lib/module/ui/components/bubble/Bubble.js.map +1 -1
- package/lib/module/ui/components/details/DetailsViewer.js +17 -12
- package/lib/module/ui/components/details/DetailsViewer.js.map +1 -1
- package/lib/module/ui/components/details/LogMessageDetails.js +15 -9
- package/lib/module/ui/components/details/LogMessageDetails.js.map +1 -1
- package/lib/module/ui/components/details/NetworkRequestDetails.js +51 -51
- package/lib/module/ui/components/details/NetworkRequestDetails.js.map +1 -1
- package/lib/module/ui/components/headers/DebuggerHeader.js +37 -30
- package/lib/module/ui/components/headers/DebuggerHeader.js.map +1 -1
- package/lib/module/ui/components/headers/NetworkPanelHeader.js +33 -25
- package/lib/module/ui/components/headers/NetworkPanelHeader.js.map +1 -1
- package/lib/module/ui/components/headers/NetworkRequestDetailsHeader.js +14 -9
- package/lib/module/ui/components/headers/NetworkRequestDetailsHeader.js.map +1 -1
- package/lib/module/ui/components/index.js +39 -5
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/items/ConsolePanelItem.js +15 -9
- package/lib/module/ui/components/items/ConsolePanelItem.js.map +1 -1
- package/lib/module/ui/components/items/DebuggerHeaderItem.js +26 -15
- package/lib/module/ui/components/items/DebuggerHeaderItem.js.map +1 -1
- package/lib/module/ui/components/items/NetworkPanelItem.js +35 -27
- package/lib/module/ui/components/items/NetworkPanelItem.js.map +1 -1
- package/lib/module/ui/components/items/NetworkRequestDetailsHeaderItem.js +14 -8
- package/lib/module/ui/components/items/NetworkRequestDetailsHeaderItem.js.map +1 -1
- package/lib/module/ui/components/items/NetworkRequestDetailsItem.js +15 -9
- package/lib/module/ui/components/items/NetworkRequestDetailsItem.js.map +1 -1
- package/lib/module/ui/components/panels/ConsolePanel.js +23 -19
- package/lib/module/ui/components/panels/ConsolePanel.js.map +1 -1
- package/lib/module/ui/components/panels/NetworkPanel.js +31 -26
- package/lib/module/ui/components/panels/NetworkPanel.js.map +1 -1
- package/lib/module/utils.js +27 -8
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/commonjs/src/colors.d.ts +8 -0
- package/lib/typescript/commonjs/src/colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/index.d.ts +0 -1
- package/lib/typescript/commonjs/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useNetworkInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/icons.d.ts +9 -0
- package/lib/typescript/commonjs/src/icons.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/interceptors/ConsoleInterceptor.d.ts +4 -4
- package/lib/typescript/commonjs/src/interceptors/ConsoleInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/FetchInterceptor.d.ts +1 -1
- package/lib/typescript/commonjs/src/interceptors/FetchInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/HttpInterceptor.d.ts +8 -17
- package/lib/typescript/commonjs/src/interceptors/HttpInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/Interceptor.d.ts +6 -2
- package/lib/typescript/commonjs/src/interceptors/Interceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/NetworkInterceptor.d.ts +1 -1
- package/lib/typescript/commonjs/src/interceptors/NetworkInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/WebSocketInterceptor.d.ts +8 -20
- package/lib/typescript/commonjs/src/interceptors/WebSocketInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/XHRInterceptor.d.ts +1 -1
- package/lib/typescript/commonjs/src/interceptors/XHRInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/console.d.ts +3 -0
- package/lib/typescript/commonjs/src/types/console.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/http.d.ts +13 -5
- package/lib/typescript/commonjs/src/types/http.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/websocket.d.ts +17 -7
- package/lib/typescript/commonjs/src/types/websocket.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/Xenon.d.ts +3 -2
- package/lib/typescript/commonjs/src/ui/Xenon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/bubble/Bubble.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/details/LogMessageDetails.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/details/NetworkRequestDetails.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/headers/DebuggerHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/headers/NetworkPanelHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/ConsolePanelItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/DebuggerHeaderItem.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/DebuggerHeaderItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/NetworkPanelItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/NetworkRequestDetailsHeaderItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/NetworkRequestDetailsItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/panels/ConsolePanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/panels/NetworkPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils.d.ts +1 -0
- package/lib/typescript/commonjs/src/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/colors.d.ts +8 -0
- package/lib/typescript/module/src/colors.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/index.d.ts +0 -1
- package/lib/typescript/module/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useNetworkInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/icons.d.ts +9 -0
- package/lib/typescript/module/src/icons.d.ts.map +1 -0
- package/lib/typescript/module/src/interceptors/ConsoleInterceptor.d.ts +4 -4
- package/lib/typescript/module/src/interceptors/ConsoleInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/FetchInterceptor.d.ts +1 -1
- package/lib/typescript/module/src/interceptors/FetchInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/HttpInterceptor.d.ts +8 -17
- package/lib/typescript/module/src/interceptors/HttpInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/Interceptor.d.ts +6 -2
- package/lib/typescript/module/src/interceptors/Interceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/NetworkInterceptor.d.ts +1 -1
- package/lib/typescript/module/src/interceptors/NetworkInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/WebSocketInterceptor.d.ts +8 -20
- package/lib/typescript/module/src/interceptors/WebSocketInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/XHRInterceptor.d.ts +1 -1
- package/lib/typescript/module/src/interceptors/XHRInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/types/console.d.ts +3 -0
- package/lib/typescript/module/src/types/console.d.ts.map +1 -1
- package/lib/typescript/module/src/types/http.d.ts +13 -5
- package/lib/typescript/module/src/types/http.d.ts.map +1 -1
- package/lib/typescript/module/src/types/websocket.d.ts +17 -7
- package/lib/typescript/module/src/types/websocket.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/Xenon.d.ts +3 -2
- package/lib/typescript/module/src/ui/Xenon.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/bubble/Bubble.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/details/LogMessageDetails.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/details/NetworkRequestDetails.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/headers/DebuggerHeader.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/headers/NetworkPanelHeader.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/ConsolePanelItem.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/DebuggerHeaderItem.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/items/DebuggerHeaderItem.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/NetworkPanelItem.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/NetworkRequestDetailsHeaderItem.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/NetworkRequestDetailsItem.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/panels/ConsolePanel.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/panels/NetworkPanel.d.ts.map +1 -1
- package/lib/typescript/module/src/utils.d.ts +1 -0
- package/lib/typescript/module/src/utils.d.ts.map +1 -1
- package/package.json +8 -4
- package/src/assets/icons/bug.png +0 -0
- package/src/assets/icons/record.png +0 -0
- package/src/colors.ts +8 -0
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useConsoleInterceptor.ts +4 -4
- package/src/hooks/useNetworkInterceptor.ts +34 -44
- package/src/icons.ts +9 -0
- package/src/interceptors/ConsoleInterceptor.ts +14 -13
- package/src/interceptors/FetchInterceptor.ts +7 -8
- package/src/interceptors/HttpInterceptor.ts +19 -48
- package/src/interceptors/Interceptor.ts +20 -2
- package/src/interceptors/NetworkInterceptor.ts +1 -1
- package/src/interceptors/WebSocketInterceptor.ts +39 -83
- package/src/interceptors/XHRInterceptor.ts +8 -7
- package/src/types/console.ts +4 -0
- package/src/types/http.ts +13 -5
- package/src/types/websocket.ts +17 -9
- package/src/ui/Xenon.tsx +104 -98
- package/src/ui/components/bubble/Bubble.tsx +6 -8
- package/src/ui/components/details/LogMessageDetails.tsx +2 -1
- package/src/ui/components/details/NetworkRequestDetails.tsx +10 -13
- package/src/ui/components/headers/DebuggerHeader.tsx +9 -13
- package/src/ui/components/headers/NetworkPanelHeader.tsx +12 -9
- package/src/ui/components/items/ConsolePanelItem.tsx +2 -1
- package/src/ui/components/items/DebuggerHeaderItem.tsx +18 -12
- package/src/ui/components/items/NetworkPanelItem.tsx +9 -6
- package/src/ui/components/items/NetworkRequestDetailsHeaderItem.tsx +3 -2
- package/src/ui/components/items/NetworkRequestDetailsItem.tsx +3 -2
- package/src/ui/components/panels/ConsolePanel.tsx +6 -8
- package/src/ui/components/panels/NetworkPanel.tsx +15 -14
- package/src/utils.ts +6 -0
- package/lib/commonjs/assets/code.png +0 -0
- package/lib/commonjs/assets/record.png +0 -0
- package/lib/commonjs/hooks/useScrollToBottom.js +0 -23
- package/lib/commonjs/hooks/useScrollToBottom.js.map +0 -1
- package/lib/module/assets/code.png +0 -0
- package/lib/module/assets/record.png +0 -0
- package/lib/module/hooks/useScrollToBottom.js +0 -19
- package/lib/module/hooks/useScrollToBottom.js.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useScrollToBottom.d.ts +0 -3
- package/lib/typescript/commonjs/src/hooks/useScrollToBottom.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useScrollToBottom.d.ts +0 -3
- package/lib/typescript/module/src/hooks/useScrollToBottom.d.ts.map +0 -1
- package/src/assets/code.png +0 -0
- package/src/assets/record.png +0 -0
- package/src/hooks/useScrollToBottom.ts +0 -23
- /package/lib/commonjs/assets/{delete.png → icons/delete.png} +0 -0
- /package/lib/commonjs/assets/{hide.png → icons/hide.png} +0 -0
- /package/lib/commonjs/assets/{move.png → icons/move.png} +0 -0
- /package/lib/module/assets/{delete.png → icons/delete.png} +0 -0
- /package/lib/module/assets/{hide.png → icons/hide.png} +0 -0
- /package/lib/module/assets/{move.png → icons/move.png} +0 -0
- /package/src/assets/{delete.png → icons/delete.png} +0 -0
- /package/src/assets/{hide.png → icons/hide.png} +0 -0
- /package/src/assets/{move.png → icons/move.png} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import { NetworkType } from '../types';
|
2
|
-
import { getHttpInterceptorId } from '../utils';
|
2
|
+
import { frozen, getHttpInterceptorId } from '../utils';
|
3
3
|
import HttpInterceptor from './HttpInterceptor';
|
4
4
|
|
5
5
|
const originalXHROpen = XMLHttpRequest.prototype.open;
|
@@ -7,12 +7,13 @@ const originalXHRSend = XMLHttpRequest.prototype.send;
|
|
7
7
|
const originalXHRSetRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
|
8
8
|
|
9
9
|
export default class XHRInterceptor extends HttpInterceptor {
|
10
|
-
static instance = new XHRInterceptor();
|
10
|
+
static readonly instance = new XHRInterceptor();
|
11
11
|
|
12
12
|
private constructor() {
|
13
13
|
super();
|
14
14
|
}
|
15
15
|
|
16
|
+
@frozen
|
16
17
|
enableInterception() {
|
17
18
|
if (this.isInterceptorEnabled) return;
|
18
19
|
|
@@ -52,12 +53,11 @@ export default class XHRInterceptor extends HttpInterceptor {
|
|
52
53
|
const contentTypeString = this.getResponseHeader('Content-Type');
|
53
54
|
const contentLengthString = this.getResponseHeader('Content-Length');
|
54
55
|
|
55
|
-
|
56
|
-
|
56
|
+
const responseContentType = contentTypeString
|
57
|
+
? contentTypeString.split(';')[0]
|
58
|
+
: undefined;
|
57
59
|
|
58
|
-
|
59
|
-
|
60
|
-
if (contentLengthString) responseSize = parseInt(contentLengthString, 10);
|
60
|
+
const responseSize = contentLengthString ? parseInt(contentLengthString, 10) : undefined;
|
61
61
|
|
62
62
|
headerReceivedCallback?.(
|
63
63
|
this._interceptionId,
|
@@ -89,6 +89,7 @@ export default class XHRInterceptor extends HttpInterceptor {
|
|
89
89
|
this.isInterceptorEnabled = true;
|
90
90
|
}
|
91
91
|
|
92
|
+
@frozen
|
92
93
|
disableInterception() {
|
93
94
|
if (!this.isInterceptorEnabled) return;
|
94
95
|
|
package/src/types/console.ts
CHANGED
package/src/types/http.ts
CHANGED
@@ -14,15 +14,15 @@ export interface HttpRequest extends NetworkRequest {
|
|
14
14
|
responseType?: string;
|
15
15
|
}
|
16
16
|
|
17
|
-
|
17
|
+
type HttpOpenCallback =
|
18
18
|
| ((id: ID, type: HttpRequest['type'], method: string, url: string) => void)
|
19
19
|
| null;
|
20
20
|
|
21
|
-
|
21
|
+
type HttpRequestHeaderCallback = ((id: ID, header: string, value: string) => void) | null;
|
22
22
|
|
23
|
-
|
23
|
+
type HttpSendCallback = ((id: ID, data?: any) => void) | null;
|
24
24
|
|
25
|
-
|
25
|
+
type HttpHeaderReceivedCallback =
|
26
26
|
| ((
|
27
27
|
id: ID,
|
28
28
|
responseContentType: string | undefined,
|
@@ -31,7 +31,7 @@ export type HttpHeaderReceivedCallback =
|
|
31
31
|
) => void)
|
32
32
|
| null;
|
33
33
|
|
34
|
-
|
34
|
+
type HttpResponseCallback =
|
35
35
|
| ((
|
36
36
|
id: ID,
|
37
37
|
status: number | undefined,
|
@@ -42,3 +42,11 @@ export type HttpResponseCallback =
|
|
42
42
|
responseType: string | undefined,
|
43
43
|
) => void)
|
44
44
|
| null;
|
45
|
+
|
46
|
+
export interface HttpHandlers {
|
47
|
+
open: HttpOpenCallback;
|
48
|
+
requestHeader: HttpRequestHeaderCallback;
|
49
|
+
send: HttpSendCallback;
|
50
|
+
headerReceived: HttpHeaderReceivedCallback;
|
51
|
+
response: HttpResponseCallback;
|
52
|
+
}
|
package/src/types/websocket.ts
CHANGED
@@ -13,7 +13,7 @@ export interface WebSocketRequest extends NetworkRequest {
|
|
13
13
|
serverClose?: { code?: number; reason?: string };
|
14
14
|
}
|
15
15
|
|
16
|
-
|
16
|
+
type WebSocketConnectCallback =
|
17
17
|
| ((
|
18
18
|
url: string,
|
19
19
|
protocols?: WebSocketRequest['protocols'],
|
@@ -22,20 +22,28 @@ export type WebSocketConnectCallback =
|
|
22
22
|
) => void)
|
23
23
|
| null;
|
24
24
|
|
25
|
-
|
25
|
+
type WebSocketSendCallback = ((data: string, socketId: number) => void) | null;
|
26
26
|
|
27
|
-
|
28
|
-
| ((code: number, reason: string, socketId: number) => void)
|
29
|
-
| null;
|
27
|
+
type WebSocketCloseCallback = ((code: number, reason: string, socketId: number) => void) | null;
|
30
28
|
|
31
|
-
|
29
|
+
type WebSocketOnOpenCallback = ((socketId: number, duration: number) => void) | null;
|
32
30
|
|
33
|
-
|
31
|
+
type WebSocketOnMessageCallback = ((socketId: number, message: any) => void) | null;
|
34
32
|
|
35
|
-
|
33
|
+
type WebSocketOnErrorCallback =
|
36
34
|
| ((socketId: number, error: WebSocketRequest['serverError']) => void)
|
37
35
|
| null;
|
38
36
|
|
39
|
-
|
37
|
+
type WebSocketOnCloseCallback =
|
40
38
|
| ((socketId: number, data: WebSocketRequest['serverClose']) => void)
|
41
39
|
| null;
|
40
|
+
|
41
|
+
export interface WebSocketHandlers {
|
42
|
+
connect: WebSocketConnectCallback;
|
43
|
+
send: WebSocketSendCallback;
|
44
|
+
close: WebSocketCloseCallback;
|
45
|
+
onOpen: WebSocketOnOpenCallback;
|
46
|
+
onMessage: WebSocketOnMessageCallback;
|
47
|
+
onError: WebSocketOnErrorCallback;
|
48
|
+
onClose: WebSocketOnCloseCallback;
|
49
|
+
}
|
package/src/ui/Xenon.tsx
CHANGED
@@ -1,12 +1,21 @@
|
|
1
1
|
import { enableMapSet } from 'immer';
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
createRef,
|
4
|
+
memo,
|
5
|
+
useImperativeHandle,
|
6
|
+
useRef,
|
7
|
+
useState,
|
8
|
+
type NamedExoticComponent,
|
9
|
+
} from 'react';
|
3
10
|
import { Animated, SafeAreaView, StyleSheet, useWindowDimensions, View } from 'react-native';
|
11
|
+
import colors from '../colors';
|
4
12
|
import MainContext, { type MainContextValue } from '../contexts/MainContext';
|
5
13
|
import { useConsoleInterceptor, useNetworkInterceptor } from '../hooks';
|
6
14
|
import { DebuggerPanel, type DebuggerPosition, type DebuggerVisibility } from '../types';
|
7
15
|
import { Bubble, ConsolePanel, DebuggerHeader, DetailsViewer, NetworkPanel } from './components';
|
8
16
|
|
9
17
|
interface XenonComponentMethods {
|
18
|
+
isVisible(): boolean;
|
10
19
|
show(): void;
|
11
20
|
hide(): void;
|
12
21
|
}
|
@@ -18,107 +27,101 @@ interface XenonComponentProps {
|
|
18
27
|
}
|
19
28
|
|
20
29
|
interface ReactNativeXenon extends XenonComponentMethods {
|
21
|
-
Component
|
30
|
+
Component: NamedExoticComponent<XenonComponentProps>;
|
22
31
|
}
|
23
32
|
|
24
33
|
enableMapSet();
|
25
|
-
const rootRef = createRef<XenonComponentMethods>();
|
26
|
-
|
27
|
-
function XenonComponent({
|
28
|
-
autoInspectNetworkEnabled = true,
|
29
|
-
autoInspectConsoleEnabled = true,
|
30
|
-
bubbleSize = 40,
|
31
|
-
}: XenonComponentProps) {
|
32
|
-
const { width: screenWidth, height: screenHeight } = useWindowDimensions();
|
33
|
-
const verticalSafeMargin = screenHeight / 8;
|
34
|
-
|
35
|
-
const pan = useRef(new Animated.ValueXY({ x: 0, y: verticalSafeMargin }));
|
36
|
-
|
37
|
-
const detailsData: MainContextValue['detailsData'] = useRef(null);
|
38
|
-
|
39
|
-
const [debuggerVisibility, setDebuggerVisibility] = useState<DebuggerVisibility>('hidden');
|
40
|
-
|
41
|
-
const [debuggerPosition, setDebuggerPosition] = useState<DebuggerPosition>('bottom');
|
42
|
-
|
43
|
-
const [panelSelected, setPanelSelected] = useState<DebuggerPanel | null>(DebuggerPanel.Network);
|
44
|
-
|
45
|
-
const networkInterceptor = useNetworkInterceptor({
|
46
|
-
autoEnabled: autoInspectNetworkEnabled,
|
47
|
-
});
|
48
|
-
|
49
|
-
const logInterceptor = useConsoleInterceptor({
|
50
|
-
autoEnabled: autoInspectConsoleEnabled,
|
51
|
-
});
|
52
34
|
|
53
|
-
|
54
|
-
rootRef,
|
55
|
-
() => ({
|
56
|
-
show() {
|
57
|
-
setDebuggerVisibility('bubble');
|
58
|
-
},
|
59
|
-
hide() {
|
60
|
-
setDebuggerVisibility('hidden');
|
61
|
-
},
|
62
|
-
}),
|
63
|
-
[],
|
64
|
-
);
|
65
|
-
|
66
|
-
let content;
|
67
|
-
|
68
|
-
switch (debuggerVisibility) {
|
69
|
-
case 'bubble':
|
70
|
-
content = (
|
71
|
-
<View style={styles.bubbleBackdrop}>
|
72
|
-
<Bubble bubbleSize={bubbleSize} pan={pan} />
|
73
|
-
</View>
|
74
|
-
);
|
75
|
-
break;
|
76
|
-
case 'panel':
|
77
|
-
content = (
|
78
|
-
<SafeAreaView
|
79
|
-
style={[
|
80
|
-
styles.container,
|
81
|
-
// eslint-disable-next-line react-native/no-inline-styles
|
82
|
-
{
|
83
|
-
[debuggerPosition]: 0,
|
84
|
-
height: Math.min(screenWidth, screenHeight) * 0.75,
|
85
|
-
},
|
86
|
-
]}
|
87
|
-
>
|
88
|
-
<DebuggerHeader />
|
89
|
-
|
90
|
-
{panelSelected === DebuggerPanel.Network && <NetworkPanel />}
|
91
|
-
{panelSelected === DebuggerPanel.Console && <ConsolePanel />}
|
92
|
-
|
93
|
-
{!panelSelected && !!detailsData.current && <DetailsViewer />}
|
94
|
-
</SafeAreaView>
|
95
|
-
);
|
96
|
-
break;
|
97
|
-
default:
|
98
|
-
content = null;
|
99
|
-
}
|
35
|
+
const rootRef = createRef<XenonComponentMethods>();
|
100
36
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
37
|
+
const XenonComponent = memo<XenonComponentProps>(
|
38
|
+
({ autoInspectNetworkEnabled = true, autoInspectConsoleEnabled = true, bubbleSize = 40 }) => {
|
39
|
+
const { width: screenWidth, height: screenHeight } = useWindowDimensions();
|
40
|
+
const verticalSafeMargin = screenHeight / 8;
|
41
|
+
const pan = useRef(new Animated.ValueXY({ x: 0, y: verticalSafeMargin }));
|
42
|
+
const detailsData: MainContextValue['detailsData'] = useRef(null);
|
43
|
+
const [debuggerVisibility, setDebuggerVisibility] = useState<DebuggerVisibility>('hidden');
|
44
|
+
const [debuggerPosition, setDebuggerPosition] = useState<DebuggerPosition>('bottom');
|
45
|
+
const [panelSelected, setPanelSelected] = useState<DebuggerPanel | null>(DebuggerPanel.Network);
|
46
|
+
|
47
|
+
const networkInterceptor = useNetworkInterceptor({
|
48
|
+
autoEnabled: autoInspectNetworkEnabled,
|
49
|
+
});
|
50
|
+
|
51
|
+
const logInterceptor = useConsoleInterceptor({
|
52
|
+
autoEnabled: autoInspectConsoleEnabled,
|
53
|
+
});
|
54
|
+
|
55
|
+
useImperativeHandle(
|
56
|
+
rootRef,
|
57
|
+
() => ({
|
58
|
+
isVisible() {
|
59
|
+
return debuggerVisibility !== 'hidden';
|
60
|
+
},
|
61
|
+
show() {
|
62
|
+
if (!this.isVisible()) setDebuggerVisibility('bubble');
|
63
|
+
},
|
64
|
+
hide() {
|
65
|
+
if (this.isVisible()) setDebuggerVisibility('hidden');
|
66
|
+
},
|
67
|
+
}),
|
68
|
+
[debuggerVisibility],
|
69
|
+
);
|
70
|
+
|
71
|
+
let content;
|
72
|
+
switch (debuggerVisibility) {
|
73
|
+
case 'bubble':
|
74
|
+
content = (
|
75
|
+
<View style={styles.bubbleBackdrop}>
|
76
|
+
<Bubble bubbleSize={bubbleSize} pan={pan} />
|
77
|
+
</View>
|
78
|
+
);
|
79
|
+
break;
|
80
|
+
case 'panel':
|
81
|
+
content = (
|
82
|
+
<SafeAreaView
|
83
|
+
style={[
|
84
|
+
styles.container,
|
85
|
+
// eslint-disable-next-line react-native/no-inline-styles
|
86
|
+
{
|
87
|
+
[debuggerPosition]: 0,
|
88
|
+
height: Math.min(screenWidth, screenHeight) * 0.75,
|
89
|
+
},
|
90
|
+
]}
|
91
|
+
>
|
92
|
+
<DebuggerHeader />
|
93
|
+
{panelSelected === DebuggerPanel.Network && <NetworkPanel />}
|
94
|
+
{panelSelected === DebuggerPanel.Console && <ConsolePanel />}
|
95
|
+
{!panelSelected && !!detailsData.current && <DetailsViewer />}
|
96
|
+
</SafeAreaView>
|
97
|
+
);
|
98
|
+
break;
|
99
|
+
default:
|
100
|
+
content = null;
|
101
|
+
}
|
102
|
+
|
103
|
+
return (
|
104
|
+
<MainContext.Provider
|
105
|
+
value={{
|
106
|
+
debuggerVisibility,
|
107
|
+
setDebuggerVisibility,
|
108
|
+
debuggerPosition,
|
109
|
+
setDebuggerPosition,
|
110
|
+
panelSelected,
|
111
|
+
setPanelSelected,
|
112
|
+
networkInterceptor,
|
113
|
+
logInterceptor,
|
114
|
+
detailsData,
|
115
|
+
screenWidth,
|
116
|
+
screenHeight,
|
117
|
+
verticalSafeMargin,
|
118
|
+
}}
|
119
|
+
>
|
120
|
+
{content}
|
121
|
+
</MainContext.Provider>
|
122
|
+
);
|
123
|
+
},
|
124
|
+
);
|
122
125
|
|
123
126
|
const styles = StyleSheet.create({
|
124
127
|
container: {
|
@@ -127,7 +130,7 @@ const styles = StyleSheet.create({
|
|
127
130
|
top: undefined,
|
128
131
|
bottom: undefined,
|
129
132
|
zIndex: 9999,
|
130
|
-
backgroundColor:
|
133
|
+
backgroundColor: colors.lightGray,
|
131
134
|
},
|
132
135
|
bubbleBackdrop: {
|
133
136
|
flex: 1,
|
@@ -139,6 +142,9 @@ const styles = StyleSheet.create({
|
|
139
142
|
XenonComponent.displayName = 'Xenon';
|
140
143
|
|
141
144
|
const Xenon: ReactNativeXenon = {
|
145
|
+
isVisible() {
|
146
|
+
return rootRef.current?.isVisible() ?? false;
|
147
|
+
},
|
142
148
|
show() {
|
143
149
|
rootRef.current?.show();
|
144
150
|
},
|
@@ -7,6 +7,8 @@ import {
|
|
7
7
|
type PanResponderGestureState,
|
8
8
|
} from 'react-native';
|
9
9
|
import { MainContext } from '../../../contexts';
|
10
|
+
import icons from '../../../icons';
|
11
|
+
import colors from '../../../colors';
|
10
12
|
|
11
13
|
interface BubbleProps {
|
12
14
|
bubbleSize: number;
|
@@ -14,6 +16,8 @@ interface BubbleProps {
|
|
14
16
|
}
|
15
17
|
|
16
18
|
export default function Bubble({ bubbleSize, pan }: BubbleProps) {
|
19
|
+
const iconSize = bubbleSize * 0.65;
|
20
|
+
|
17
21
|
const { setDebuggerVisibility, screenWidth, screenHeight, verticalSafeMargin } =
|
18
22
|
useContext(MainContext)!;
|
19
23
|
|
@@ -72,20 +76,14 @@ export default function Bubble({ bubbleSize, pan }: BubbleProps) {
|
|
72
76
|
},
|
73
77
|
]}
|
74
78
|
>
|
75
|
-
<Image
|
76
|
-
source={require('../../../assets/code.png')}
|
77
|
-
style={{
|
78
|
-
width: bubbleSize * 0.75,
|
79
|
-
height: bubbleSize * 0.75,
|
80
|
-
}}
|
81
|
-
/>
|
79
|
+
<Image source={icons.bug} style={{ width: iconSize, height: iconSize }} />
|
82
80
|
</Animated.View>
|
83
81
|
);
|
84
82
|
}
|
85
83
|
|
86
84
|
const styles = StyleSheet.create({
|
87
85
|
bubble: {
|
88
|
-
backgroundColor:
|
86
|
+
backgroundColor: colors.lightGray,
|
89
87
|
position: 'absolute',
|
90
88
|
justifyContent: 'center',
|
91
89
|
alignItems: 'center',
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ScrollView, StyleSheet, Text } from 'react-native';
|
2
2
|
import type { LogMessage } from '../../../types';
|
3
3
|
import { formatLogMessage } from '../../../utils';
|
4
|
+
import colors from '../../../colors';
|
4
5
|
|
5
6
|
interface LogMessageDetailsProps {
|
6
7
|
item: LogMessage;
|
@@ -21,6 +22,6 @@ const styles = StyleSheet.create({
|
|
21
22
|
},
|
22
23
|
divider: {
|
23
24
|
height: 1,
|
24
|
-
backgroundColor:
|
25
|
+
backgroundColor: colors.gray,
|
25
26
|
},
|
26
27
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { useRef, useState, type JSX } from 'react';
|
1
|
+
import { useRef, useState, type JSX, type ReactNode } from 'react';
|
2
2
|
import { ScrollView, StyleSheet } from 'react-native';
|
3
3
|
import { URL } from 'react-native-url-polyfill';
|
4
4
|
import {
|
@@ -16,6 +16,7 @@ import {
|
|
16
16
|
} from '../../../utils';
|
17
17
|
import NetworkDetailsHeader from '../headers/NetworkRequestDetailsHeader';
|
18
18
|
import NetworkRequestDetailsItem from '../items/NetworkRequestDetailsItem';
|
19
|
+
import colors from '../../../colors';
|
19
20
|
|
20
21
|
interface NetworkRequestDetailsProps {
|
21
22
|
item: HttpRequest | WebSocketRequest;
|
@@ -87,19 +88,15 @@ export default function NetworkRequestDetails({ item }: NetworkRequestDetailsPro
|
|
87
88
|
}
|
88
89
|
|
89
90
|
if (queryStringParametersShown && !content.current.queryStringParameters) {
|
90
|
-
const queryStringParameters:
|
91
|
+
const queryStringParameters: ReactNode[] = [];
|
91
92
|
|
92
93
|
requestUrl.searchParams.forEach((value, name) => {
|
93
|
-
queryStringParameters.push(
|
94
|
+
queryStringParameters.push(
|
95
|
+
<NetworkRequestDetailsItem key={name} label={name} content={value} />,
|
96
|
+
);
|
94
97
|
});
|
95
98
|
|
96
|
-
content.current.queryStringParameters =
|
97
|
-
<>
|
98
|
-
{queryStringParameters.map(({ name, value }, index) => (
|
99
|
-
<NetworkRequestDetailsItem key={index} label={name} content={value} />
|
100
|
-
))}
|
101
|
-
</>
|
102
|
-
);
|
99
|
+
content.current.queryStringParameters = <>{queryStringParameters}</>;
|
103
100
|
}
|
104
101
|
|
105
102
|
if (bodyShown && !content.current.body) {
|
@@ -137,15 +134,15 @@ const styles = StyleSheet.create({
|
|
137
134
|
},
|
138
135
|
divider: {
|
139
136
|
height: 1,
|
140
|
-
backgroundColor:
|
137
|
+
backgroundColor: colors.gray,
|
141
138
|
},
|
142
139
|
text: {
|
143
140
|
fontSize: 14,
|
144
|
-
color:
|
141
|
+
color: colors.black,
|
145
142
|
},
|
146
143
|
label: {
|
147
144
|
fontSize: 14,
|
148
145
|
fontWeight: 'bold',
|
149
|
-
color:
|
146
|
+
color: colors.black,
|
150
147
|
},
|
151
148
|
});
|
@@ -3,6 +3,8 @@ import { ScrollView, StyleSheet, View } from 'react-native';
|
|
3
3
|
import { MainContext } from '../../../contexts';
|
4
4
|
import { DebuggerPanel } from '../../../types';
|
5
5
|
import DebuggerHeaderItem from '../items/DebuggerHeaderItem';
|
6
|
+
import icons from '../../../icons';
|
7
|
+
import colors from '../../../colors';
|
6
8
|
|
7
9
|
export default function DebuggerHeader() {
|
8
10
|
const {
|
@@ -49,12 +51,9 @@ export default function DebuggerHeader() {
|
|
49
51
|
contentContainerStyle={styles.contentContainer}
|
50
52
|
showsHorizontalScrollIndicator={false}
|
51
53
|
>
|
52
|
-
<DebuggerHeaderItem onPress={hideDebugger} content={
|
54
|
+
<DebuggerHeaderItem onPress={hideDebugger} content={icons.hide} />
|
53
55
|
|
54
|
-
<DebuggerHeaderItem
|
55
|
-
onPress={toggleDebuggerPosition}
|
56
|
-
content={require('../../../assets/move.png')}
|
57
|
-
/>
|
56
|
+
<DebuggerHeaderItem onPress={toggleDebuggerPosition} content={icons.move} />
|
58
57
|
|
59
58
|
<DebuggerHeaderItem
|
60
59
|
isLabel
|
@@ -66,12 +65,12 @@ export default function DebuggerHeader() {
|
|
66
65
|
<DebuggerHeaderItem
|
67
66
|
onPress={toggleNetworkInterception}
|
68
67
|
isActive={networkInterceptor.isInterceptorEnabled}
|
69
|
-
content={
|
68
|
+
content={icons.record}
|
70
69
|
/>
|
71
70
|
|
72
71
|
<DebuggerHeaderItem
|
73
72
|
onPress={networkInterceptor.clearAllNetworkRequests}
|
74
|
-
content={
|
73
|
+
content={icons.delete}
|
75
74
|
/>
|
76
75
|
|
77
76
|
<View style={styles.divider} />
|
@@ -86,13 +85,10 @@ export default function DebuggerHeader() {
|
|
86
85
|
<DebuggerHeaderItem
|
87
86
|
onPress={toggleLogInterception}
|
88
87
|
isActive={logInterceptor.isInterceptorEnabled}
|
89
|
-
content={
|
88
|
+
content={icons.record}
|
90
89
|
/>
|
91
90
|
|
92
|
-
<DebuggerHeaderItem
|
93
|
-
onPress={logInterceptor.clearAllLogMessages}
|
94
|
-
content={require('../../../assets/delete.png')}
|
95
|
-
/>
|
91
|
+
<DebuggerHeaderItem onPress={logInterceptor.clearAllLogMessages} content={icons.delete} />
|
96
92
|
</ScrollView>
|
97
93
|
);
|
98
94
|
}
|
@@ -107,6 +103,6 @@ const styles = StyleSheet.create({
|
|
107
103
|
},
|
108
104
|
divider: {
|
109
105
|
width: 1,
|
110
|
-
backgroundColor:
|
106
|
+
backgroundColor: colors.gray,
|
111
107
|
},
|
112
108
|
});
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { StyleSheet, Text, View } from 'react-native';
|
2
|
+
import colors from '../../../colors';
|
2
3
|
|
3
4
|
export default function NetworkPanelHeader() {
|
4
5
|
return (
|
@@ -11,7 +12,7 @@ export default function NetworkPanelHeader() {
|
|
11
12
|
|
12
13
|
<View style={styles.divider} />
|
13
14
|
|
14
|
-
<View style={[styles.headerColumn, styles.
|
15
|
+
<View style={[styles.headerColumn, styles.headerNameColumn]}>
|
15
16
|
<Text numberOfLines={1} style={styles.itemText}>
|
16
17
|
Name
|
17
18
|
</Text>
|
@@ -19,7 +20,7 @@ export default function NetworkPanelHeader() {
|
|
19
20
|
|
20
21
|
<View style={styles.divider} />
|
21
22
|
|
22
|
-
<View style={styles.headerColumn}>
|
23
|
+
<View style={[styles.headerColumn, styles.headerDurationColumn]}>
|
23
24
|
<Text numberOfLines={1} style={styles.itemText}>
|
24
25
|
Duration
|
25
26
|
</Text>
|
@@ -38,15 +39,17 @@ export default function NetworkPanelHeader() {
|
|
38
39
|
|
39
40
|
const styles = StyleSheet.create({
|
40
41
|
container: {
|
41
|
-
|
42
|
+
marginHorizontal: 8,
|
42
43
|
flexDirection: 'row',
|
43
44
|
alignItems: 'center',
|
44
|
-
backgroundColor:
|
45
|
+
backgroundColor: colors.gray,
|
45
46
|
borderRadius: 4,
|
46
47
|
},
|
47
|
-
|
48
|
-
flex: 5
|
49
|
-
|
48
|
+
headerNameColumn: {
|
49
|
+
flex: 5,
|
50
|
+
},
|
51
|
+
headerDurationColumn: {
|
52
|
+
flex: 2,
|
50
53
|
},
|
51
54
|
headerColumn: {
|
52
55
|
flex: 1.5,
|
@@ -57,10 +60,10 @@ const styles = StyleSheet.create({
|
|
57
60
|
divider: {
|
58
61
|
height: 16,
|
59
62
|
width: 1,
|
60
|
-
backgroundColor:
|
63
|
+
backgroundColor: colors.gray,
|
61
64
|
},
|
62
65
|
itemText: {
|
63
66
|
fontSize: 14,
|
64
|
-
color:
|
67
|
+
color: colors.black,
|
65
68
|
},
|
66
69
|
});
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { StyleSheet, Text, TouchableOpacity } from 'react-native';
|
2
2
|
import type { LogMessage } from '../../../types';
|
3
3
|
import { formatLogMessage } from '../../../utils';
|
4
|
+
import colors from '../../../colors';
|
4
5
|
|
5
6
|
interface ConsolePanelItemProps extends LogMessage {
|
6
7
|
onPress: () => void;
|
@@ -22,7 +23,7 @@ const styles = StyleSheet.create({
|
|
22
23
|
padding: 8,
|
23
24
|
},
|
24
25
|
text: {
|
25
|
-
color:
|
26
|
+
color: colors.black,
|
26
27
|
fontSize: 14,
|
27
28
|
},
|
28
29
|
});
|