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.
- package/README.md +72 -72
- package/README.zh-CN.md +209 -0
- package/lib/commonjs/components/ClipboardTab.js +15 -16
- package/lib/commonjs/components/ClipboardTab.js.map +1 -1
- package/lib/commonjs/components/ConsoleLogTab.js +69 -202
- package/lib/commonjs/components/ConsoleLogTab.js.map +1 -1
- package/lib/commonjs/components/DebugPanel.js +230 -0
- package/lib/commonjs/components/DebugPanel.js.map +1 -0
- package/lib/commonjs/components/DebugView.js +66 -0
- package/lib/commonjs/components/DebugView.js.map +1 -0
- package/lib/commonjs/components/EnvironmentTab.js +22 -23
- package/lib/commonjs/components/EnvironmentTab.js.map +1 -1
- package/lib/commonjs/components/FeatureTabBar.js +182 -0
- package/lib/commonjs/components/FeatureTabBar.js.map +1 -0
- package/lib/commonjs/components/FloatIcon.js +187 -0
- package/lib/commonjs/components/FloatIcon.js.map +1 -0
- package/lib/commonjs/components/FloatPanelView.js +140 -723
- package/lib/commonjs/components/FloatPanelView.js.map +1 -1
- package/lib/commonjs/components/NavigationLogTab.js +8 -8
- package/lib/commonjs/components/NavigationLogTab.js.map +1 -1
- package/lib/commonjs/components/NetworkLogTab.js +179 -350
- package/lib/commonjs/components/NetworkLogTab.js.map +1 -1
- package/lib/commonjs/components/ThirdPartyLibsTab.js +8 -8
- package/lib/commonjs/components/ThirdPartyLibsTab.js.map +1 -1
- package/lib/commonjs/components/TrackLogTab.js +106 -248
- package/lib/commonjs/components/TrackLogTab.js.map +1 -1
- package/lib/commonjs/components/ZustandLogTab.js +148 -288
- package/lib/commonjs/components/ZustandLogTab.js.map +1 -1
- package/lib/commonjs/components/shared/CollapsibleSection.js +4 -4
- package/lib/commonjs/components/shared/CollapsibleSection.js.map +1 -1
- package/lib/commonjs/components/shared/CopyButton.js +3 -3
- package/lib/commonjs/components/shared/CopyButton.js.map +1 -1
- package/lib/commonjs/components/shared/LogListScreen.js +174 -0
- package/lib/commonjs/components/shared/LogListScreen.js.map +1 -0
- package/lib/commonjs/core/DebugToolkit.js +92 -112
- package/lib/commonjs/core/DebugToolkit.js.map +1 -1
- package/lib/commonjs/core/DebugToolkitProvider.js +30 -28
- package/lib/commonjs/core/DebugToolkitProvider.js.map +1 -1
- package/lib/commonjs/features/ClipboardFeature.js +6 -2
- package/lib/commonjs/features/ClipboardFeature.js.map +1 -1
- package/lib/commonjs/features/ConsoleLogFeature.js +66 -49
- package/lib/commonjs/features/ConsoleLogFeature.js.map +1 -1
- package/lib/commonjs/features/EnvironmentFeature.js +5 -13
- package/lib/commonjs/features/EnvironmentFeature.js.map +1 -1
- package/lib/commonjs/features/NavigationLogFeature.js +17 -38
- package/lib/commonjs/features/NavigationLogFeature.js.map +1 -1
- package/lib/commonjs/features/NetworkFeature.js +35 -256
- package/lib/commonjs/features/NetworkFeature.js.map +1 -1
- package/lib/commonjs/features/TrackFeature.js +17 -38
- package/lib/commonjs/features/TrackFeature.js.map +1 -1
- package/lib/commonjs/features/ZustandLogFeature.js +21 -38
- package/lib/commonjs/features/ZustandLogFeature.js.map +1 -1
- package/lib/commonjs/hooks/useNavigationLogger.js.map +1 -1
- package/lib/commonjs/index.js +7 -20
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/initialize.js +19 -96
- package/lib/commonjs/initialize.js.map +1 -1
- package/lib/commonjs/interceptors/networkInterceptor.js +466 -0
- package/lib/commonjs/interceptors/networkInterceptor.js.map +1 -0
- package/lib/commonjs/utils/colors.js +48 -0
- package/lib/commonjs/utils/colors.js.map +1 -0
- package/lib/commonjs/utils/createChannelFeature.js +48 -0
- package/lib/commonjs/utils/createChannelFeature.js.map +1 -0
- package/lib/commonjs/utils/layout.js +8 -0
- package/lib/commonjs/utils/layout.js.map +1 -0
- package/lib/commonjs/utils/urlRewriterRegistry.js +14 -0
- package/lib/commonjs/utils/urlRewriterRegistry.js.map +1 -0
- package/lib/module/components/ClipboardTab.js +8 -8
- package/lib/module/components/ClipboardTab.js.map +1 -1
- package/lib/module/components/ConsoleLogTab.js +66 -199
- package/lib/module/components/ConsoleLogTab.js.map +1 -1
- package/lib/module/components/DebugPanel.js +225 -0
- package/lib/module/components/DebugPanel.js.map +1 -0
- package/lib/module/components/DebugView.js +61 -0
- package/lib/module/components/DebugView.js.map +1 -0
- package/lib/module/components/EnvironmentTab.js +3 -3
- package/lib/module/components/EnvironmentTab.js.map +1 -1
- package/lib/module/components/FeatureTabBar.js +177 -0
- package/lib/module/components/FeatureTabBar.js.map +1 -0
- package/lib/module/components/FloatIcon.js +182 -0
- package/lib/module/components/FloatIcon.js.map +1 -0
- package/lib/module/components/FloatPanelView.js +141 -723
- package/lib/module/components/FloatPanelView.js.map +1 -1
- package/lib/module/components/NavigationLogTab.js +1 -1
- package/lib/module/components/NavigationLogTab.js.map +1 -1
- package/lib/module/components/NetworkLogTab.js +167 -338
- package/lib/module/components/NetworkLogTab.js.map +1 -1
- package/lib/module/components/ThirdPartyLibsTab.js +1 -1
- package/lib/module/components/ThirdPartyLibsTab.js.map +1 -1
- package/lib/module/components/TrackLogTab.js +94 -236
- package/lib/module/components/TrackLogTab.js.map +1 -1
- package/lib/module/components/ZustandLogTab.js +136 -276
- package/lib/module/components/ZustandLogTab.js.map +1 -1
- package/lib/module/components/shared/CollapsibleSection.js +1 -1
- package/lib/module/components/shared/CollapsibleSection.js.map +1 -1
- package/lib/module/components/shared/CopyButton.js +1 -1
- package/lib/module/components/shared/CopyButton.js.map +1 -1
- package/lib/module/components/shared/LogListScreen.js +169 -0
- package/lib/module/components/shared/LogListScreen.js.map +1 -0
- package/lib/module/core/DebugToolkit.js +92 -111
- package/lib/module/core/DebugToolkit.js.map +1 -1
- package/lib/module/core/DebugToolkitProvider.js +31 -29
- package/lib/module/core/DebugToolkitProvider.js.map +1 -1
- package/lib/module/features/ClipboardFeature.js +6 -2
- package/lib/module/features/ClipboardFeature.js.map +1 -1
- package/lib/module/features/ConsoleLogFeature.js +65 -49
- package/lib/module/features/ConsoleLogFeature.js.map +1 -1
- package/lib/module/features/EnvironmentFeature.js +5 -13
- package/lib/module/features/EnvironmentFeature.js.map +1 -1
- package/lib/module/features/NavigationLogFeature.js +16 -38
- package/lib/module/features/NavigationLogFeature.js.map +1 -1
- package/lib/module/features/NetworkFeature.js +34 -255
- package/lib/module/features/NetworkFeature.js.map +1 -1
- package/lib/module/features/TrackFeature.js +16 -38
- package/lib/module/features/TrackFeature.js.map +1 -1
- package/lib/module/features/ZustandLogFeature.js +22 -38
- package/lib/module/features/ZustandLogFeature.js.map +1 -1
- package/lib/module/hooks/useNavigationLogger.js.map +1 -1
- package/lib/module/index.js +2 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/initialize.js +19 -95
- package/lib/module/initialize.js.map +1 -1
- package/lib/module/interceptors/networkInterceptor.js +460 -0
- package/lib/module/interceptors/networkInterceptor.js.map +1 -0
- package/lib/module/utils/colors.js +43 -0
- package/lib/module/utils/colors.js.map +1 -0
- package/lib/module/utils/createChannelFeature.js +44 -0
- package/lib/module/utils/createChannelFeature.js.map +1 -0
- package/lib/module/utils/layout.js +4 -0
- package/lib/module/utils/layout.js.map +1 -0
- package/lib/module/utils/urlRewriterRegistry.js +10 -0
- package/lib/module/utils/urlRewriterRegistry.js.map +1 -0
- package/lib/typescript/src/components/ClipboardTab.d.ts.map +1 -1
- package/lib/typescript/src/components/ConsoleLogTab.d.ts.map +1 -1
- package/lib/typescript/src/components/DebugPanel.d.ts +9 -0
- package/lib/typescript/src/components/DebugPanel.d.ts.map +1 -0
- package/lib/typescript/src/components/DebugView.d.ts +19 -0
- package/lib/typescript/src/components/DebugView.d.ts.map +1 -0
- package/lib/typescript/src/components/EnvironmentTab.d.ts.map +1 -1
- package/lib/typescript/src/components/FeatureTabBar.d.ts +13 -0
- package/lib/typescript/src/components/FeatureTabBar.d.ts.map +1 -0
- package/lib/typescript/src/components/FloatIcon.d.ts +12 -0
- package/lib/typescript/src/components/FloatIcon.d.ts.map +1 -0
- package/lib/typescript/src/components/FloatPanelView.d.ts +4 -59
- package/lib/typescript/src/components/FloatPanelView.d.ts.map +1 -1
- package/lib/typescript/src/components/NetworkLogTab.d.ts.map +1 -1
- package/lib/typescript/src/components/ThirdPartyLibsTab.d.ts.map +1 -1
- package/lib/typescript/src/components/TrackLogTab.d.ts.map +1 -1
- package/lib/typescript/src/components/ZustandLogTab.d.ts.map +1 -1
- package/lib/typescript/src/components/shared/LogListScreen.d.ts +21 -0
- package/lib/typescript/src/components/shared/LogListScreen.d.ts.map +1 -0
- package/lib/typescript/src/core/DebugToolkit.d.ts +11 -18
- package/lib/typescript/src/core/DebugToolkit.d.ts.map +1 -1
- package/lib/typescript/src/core/DebugToolkitProvider.d.ts +2 -5
- package/lib/typescript/src/core/DebugToolkitProvider.d.ts.map +1 -1
- package/lib/typescript/src/features/ClipboardFeature.d.ts +4 -0
- package/lib/typescript/src/features/ClipboardFeature.d.ts.map +1 -1
- package/lib/typescript/src/features/ConsoleLogFeature.d.ts +2 -0
- package/lib/typescript/src/features/ConsoleLogFeature.d.ts.map +1 -1
- package/lib/typescript/src/features/EnvironmentFeature.d.ts.map +1 -1
- package/lib/typescript/src/features/NavigationLogFeature.d.ts +2 -0
- package/lib/typescript/src/features/NavigationLogFeature.d.ts.map +1 -1
- package/lib/typescript/src/features/NetworkFeature.d.ts +7 -20
- package/lib/typescript/src/features/NetworkFeature.d.ts.map +1 -1
- package/lib/typescript/src/features/TrackFeature.d.ts +2 -0
- package/lib/typescript/src/features/TrackFeature.d.ts.map +1 -1
- package/lib/typescript/src/features/ZustandLogFeature.d.ts +2 -0
- package/lib/typescript/src/features/ZustandLogFeature.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useNavigationLogger.d.ts +1 -8
- package/lib/typescript/src/hooks/useNavigationLogger.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +5 -5
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/initialize.d.ts +3 -22
- package/lib/typescript/src/initialize.d.ts.map +1 -1
- package/lib/typescript/src/interceptors/networkInterceptor.d.ts +18 -0
- package/lib/typescript/src/interceptors/networkInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +26 -29
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/colors.d.ts +21 -0
- package/lib/typescript/src/utils/colors.d.ts.map +1 -0
- package/lib/typescript/src/utils/createChannelFeature.d.ts +18 -0
- package/lib/typescript/src/utils/createChannelFeature.d.ts.map +1 -0
- package/lib/typescript/src/utils/layout.d.ts +2 -0
- package/lib/typescript/src/utils/layout.d.ts.map +1 -0
- package/lib/typescript/src/utils/urlRewriterRegistry.d.ts +7 -0
- package/lib/typescript/src/utils/urlRewriterRegistry.d.ts.map +1 -0
- package/package.json +5 -1
- package/src/components/ClipboardTab.tsx +8 -8
- package/src/components/ConsoleLogTab.tsx +49 -163
- package/src/components/DebugPanel.tsx +215 -0
- package/src/components/DebugView.tsx +80 -0
- package/src/components/EnvironmentTab.tsx +3 -3
- package/src/components/FeatureTabBar.tsx +204 -0
- package/src/components/FloatIcon.tsx +171 -0
- package/src/components/FloatPanelView.tsx +135 -647
- package/src/components/NavigationLogTab.tsx +1 -1
- package/src/components/NetworkLogTab.tsx +128 -269
- package/src/components/ThirdPartyLibsTab.tsx +3 -3
- package/src/components/TrackLogTab.tsx +53 -188
- package/src/components/ZustandLogTab.tsx +79 -181
- package/src/components/shared/CollapsibleSection.tsx +1 -1
- package/src/components/shared/CopyButton.tsx +1 -1
- package/src/components/shared/LogListScreen.tsx +164 -0
- package/src/core/DebugToolkit.tsx +114 -138
- package/src/core/DebugToolkitProvider.tsx +32 -38
- package/src/features/ClipboardFeature.ts +6 -2
- package/src/features/ConsoleLogFeature.ts +66 -68
- package/src/features/EnvironmentFeature.ts +5 -13
- package/src/features/NavigationLogFeature.ts +12 -42
- package/src/features/NetworkFeature.ts +43 -405
- package/src/features/TrackFeature.ts +14 -49
- package/src/features/ZustandLogFeature.ts +16 -42
- package/src/hooks/useNavigationLogger.ts +1 -6
- package/src/index.ts +5 -9
- package/src/initialize.ts +28 -120
- package/src/interceptors/networkInterceptor.ts +646 -0
- package/src/types/index.ts +25 -36
- package/src/utils/colors.ts +38 -0
- package/src/utils/createChannelFeature.ts +55 -0
- package/src/utils/layout.ts +1 -0
- package/src/utils/urlRewriterRegistry.ts +10 -0
- package/lib/commonjs/utils/constants.js +0 -135
- package/lib/commonjs/utils/constants.js.map +0 -1
- package/lib/module/utils/constants.js +0 -130
- package/lib/module/utils/constants.js.map +0 -1
- package/lib/typescript/src/utils/constants.d.ts +0 -96
- package/lib/typescript/src/utils/constants.d.ts.map +0 -1
- package/src/utils/constants.ts +0 -91
|
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.NetworkLogTab = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var
|
|
9
|
+
var _colors = require("../utils/colors");
|
|
10
10
|
var _CollapsibleSection = require("./shared/CollapsibleSection");
|
|
11
11
|
var _JsonView = require("./shared/JsonView");
|
|
12
12
|
var _CopyButton = require("./shared/CopyButton");
|
|
13
13
|
var _copyToComputer = require("../utils/copyToComputer");
|
|
14
|
+
var _LogListScreen = require("./shared/LogListScreen");
|
|
14
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
17
|
const formatSize = data => {
|
|
@@ -24,215 +25,46 @@ const formatSize = data => {
|
|
|
24
25
|
return '';
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (log.request.headers) {
|
|
37
|
-
Object.entries(log.request.headers).forEach(([k, v]) => c += ` \\\n -H '${k}: ${v}'`);
|
|
38
|
-
}
|
|
39
|
-
if (log.request.body) {
|
|
40
|
-
c += ` \\\n -d '${typeof log.request.body === 'string' ? log.request.body : JSON.stringify(log.request.body)}'`;
|
|
41
|
-
}
|
|
42
|
-
return c;
|
|
43
|
-
};
|
|
44
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
45
|
-
style: s.detailWrap,
|
|
46
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
47
|
-
style: s.detailHeader,
|
|
48
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
49
|
-
onPress: onBack,
|
|
50
|
-
style: s.backBtn,
|
|
51
|
-
activeOpacity: 0.6,
|
|
52
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
53
|
-
style: s.backIcon,
|
|
54
|
-
children: "\u2039"
|
|
55
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
56
|
-
style: s.backText,
|
|
57
|
-
children: "Back"
|
|
58
|
-
})]
|
|
59
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
60
|
-
style: s.detailHeaderCenter,
|
|
61
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
62
|
-
style: [s.methodBadge, {
|
|
63
|
-
backgroundColor: (0, _constants.getMethodColor)(log.request.method)
|
|
64
|
-
}],
|
|
65
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
66
|
-
style: s.methodBadgeText,
|
|
67
|
-
children: log.request.method
|
|
68
|
-
})
|
|
69
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
70
|
-
style: [s.statusPill, {
|
|
71
|
-
backgroundColor: statusColor
|
|
72
|
-
}],
|
|
73
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
74
|
-
style: s.statusPillText,
|
|
75
|
-
children: log.response?.status ?? 'ERR'
|
|
76
|
-
})
|
|
77
|
-
}), log.duration != null && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
78
|
-
style: s.durationText,
|
|
79
|
-
children: [log.duration, "ms"]
|
|
80
|
-
})]
|
|
81
|
-
})]
|
|
82
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
83
|
-
style: s.detailBody,
|
|
84
|
-
contentContainerStyle: s.detailBodyContent,
|
|
85
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
86
|
-
style: s.urlCard,
|
|
87
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
88
|
-
style: s.urlText,
|
|
89
|
-
selectable: true,
|
|
90
|
-
numberOfLines: 3,
|
|
91
|
-
children: log.request.url
|
|
92
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
93
|
-
text: log.request.url,
|
|
94
|
-
label: "URL"
|
|
95
|
-
})]
|
|
96
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
|
|
97
|
-
title: "Request Body",
|
|
98
|
-
initiallyExpanded: true,
|
|
99
|
-
children: log.request.body != null ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
100
|
-
style: s.sectionWithCopy,
|
|
101
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
102
|
-
text: (0, _copyToComputer.fmt)(log.request.body),
|
|
103
|
-
label: "Request Body"
|
|
104
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
|
|
105
|
-
data: log.request.body,
|
|
106
|
-
maxHeight: 250
|
|
107
|
-
})]
|
|
108
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
109
|
-
style: s.emptySection,
|
|
110
|
-
children: "No request body"
|
|
111
|
-
})
|
|
112
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
|
|
113
|
-
title: "Request Headers",
|
|
114
|
-
children: log.request.headers ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
115
|
-
style: s.sectionWithCopy,
|
|
116
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
117
|
-
text: (0, _copyToComputer.fmt)(log.request.headers),
|
|
118
|
-
label: "Request Headers"
|
|
119
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
|
|
120
|
-
data: log.request.headers,
|
|
121
|
-
maxHeight: 200
|
|
122
|
-
})]
|
|
123
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
124
|
-
style: s.emptySection,
|
|
125
|
-
children: "No headers"
|
|
126
|
-
})
|
|
127
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CollapsibleSection.CollapsibleSection, {
|
|
128
|
-
title: `Response ${formatSize(log.response?.data)}`,
|
|
129
|
-
initiallyExpanded: true,
|
|
130
|
-
children: [log.error && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
131
|
-
style: s.errorBox,
|
|
132
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
133
|
-
style: s.errorIcon,
|
|
134
|
-
children: "\u26A0"
|
|
135
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
136
|
-
style: s.errorText,
|
|
137
|
-
children: log.error
|
|
138
|
-
})]
|
|
139
|
-
}), log.response?.data != null ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
140
|
-
style: s.sectionWithCopy,
|
|
141
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
142
|
-
text: (0, _copyToComputer.fmt)(log.response.data),
|
|
143
|
-
label: "Response Body"
|
|
144
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
|
|
145
|
-
data: log.response.data,
|
|
146
|
-
maxHeight: 300
|
|
147
|
-
})]
|
|
148
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
149
|
-
style: s.emptySection,
|
|
150
|
-
children: "No response body"
|
|
151
|
-
})]
|
|
152
|
-
}), log.response?.headers && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
|
|
153
|
-
title: "Response Headers",
|
|
154
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
155
|
-
style: s.sectionWithCopy,
|
|
156
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
157
|
-
text: (0, _copyToComputer.fmt)(log.response.headers),
|
|
158
|
-
label: "Response Headers"
|
|
159
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
|
|
160
|
-
data: log.response.headers,
|
|
161
|
-
maxHeight: 200
|
|
162
|
-
})]
|
|
163
|
-
})
|
|
164
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
|
|
165
|
-
title: "cURL",
|
|
166
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
167
|
-
style: s.sectionWithCopy,
|
|
168
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
169
|
-
text: curl(),
|
|
170
|
-
label: "cURL"
|
|
171
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
172
|
-
style: s.codeBlock,
|
|
173
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
174
|
-
style: s.codeText,
|
|
175
|
-
selectable: true,
|
|
176
|
-
children: curl()
|
|
177
|
-
})
|
|
178
|
-
})]
|
|
179
|
-
})
|
|
180
|
-
})]
|
|
181
|
-
})]
|
|
182
|
-
});
|
|
28
|
+
const buildCurl = log => {
|
|
29
|
+
let c = `curl -X ${log.request.method} '${log.request.url}'`;
|
|
30
|
+
if (log.request.headers) {
|
|
31
|
+
Object.entries(log.request.headers).forEach(([k, v]) => c += ` \\\n -H '${k}: ${v}'`);
|
|
32
|
+
}
|
|
33
|
+
if (log.request.body) {
|
|
34
|
+
c += ` \\\n -d '${typeof log.request.body === 'string' ? log.request.body : JSON.stringify(log.request.body)}'`;
|
|
35
|
+
}
|
|
36
|
+
return c;
|
|
183
37
|
};
|
|
184
|
-
|
|
185
|
-
// --- List view ---
|
|
186
38
|
const NetworkLogTab = exports.NetworkLogTab = /*#__PURE__*/_react.default.memo(({
|
|
187
39
|
data
|
|
188
40
|
}) => {
|
|
189
|
-
const [selectedLog, setSelectedLog] = (0, _react.useState)(null);
|
|
190
41
|
const [search, setSearch] = (0, _react.useState)('');
|
|
191
|
-
const slideAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
192
|
-
const listSlideAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
193
|
-
(0, _react.useEffect)(() => {
|
|
194
|
-
if (selectedLog) {
|
|
195
|
-
listSlideAnim.setValue(0);
|
|
196
|
-
_reactNative.Animated.parallel([_reactNative.Animated.spring(slideAnim, {
|
|
197
|
-
toValue: 1,
|
|
198
|
-
friction: 9,
|
|
199
|
-
tension: 60,
|
|
200
|
-
useNativeDriver: true
|
|
201
|
-
}), _reactNative.Animated.spring(listSlideAnim, {
|
|
202
|
-
toValue: 1,
|
|
203
|
-
friction: 9,
|
|
204
|
-
tension: 60,
|
|
205
|
-
useNativeDriver: true
|
|
206
|
-
})]).start();
|
|
207
|
-
} else {
|
|
208
|
-
slideAnim.setValue(0);
|
|
209
|
-
listSlideAnim.setValue(0);
|
|
210
|
-
}
|
|
211
|
-
}, [selectedLog]);
|
|
212
|
-
const detailTranslateX = slideAnim.interpolate({
|
|
213
|
-
inputRange: [0, 1],
|
|
214
|
-
outputRange: [300, 0]
|
|
215
|
-
});
|
|
216
|
-
const listTranslateX = listSlideAnim.interpolate({
|
|
217
|
-
inputRange: [0, 1],
|
|
218
|
-
outputRange: [0, -60]
|
|
219
|
-
});
|
|
220
|
-
const listOpacity = listSlideAnim.interpolate({
|
|
221
|
-
inputRange: [0, 1],
|
|
222
|
-
outputRange: [1, 0]
|
|
223
|
-
});
|
|
224
42
|
const filtered = search ? data.filter(l => l.request.url.toLowerCase().includes(search.toLowerCase()) || l.request.method.toLowerCase().includes(search.toLowerCase())) : data;
|
|
225
43
|
const sorted = [...filtered].sort((a, b) => b.timestamp - a.timestamp);
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
style: s.card,
|
|
233
|
-
onPress: () => setSelectedLog(item),
|
|
234
|
-
activeOpacity: 0.6,
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_LogListScreen.LogListScreen, {
|
|
45
|
+
data: sorted,
|
|
46
|
+
reversed: false,
|
|
47
|
+
emptyText: "No HTTP requests logged",
|
|
48
|
+
renderListHeader: () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
49
|
+
style: s.searchContainer,
|
|
235
50
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
51
|
+
style: s.searchBar,
|
|
52
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
53
|
+
style: s.searchIcon,
|
|
54
|
+
children: "\u2315"
|
|
55
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
56
|
+
style: s.search,
|
|
57
|
+
placeholder: "Search URLs...",
|
|
58
|
+
placeholderTextColor: _colors.Colors.textLight,
|
|
59
|
+
value: search,
|
|
60
|
+
onChangeText: setSearch
|
|
61
|
+
})]
|
|
62
|
+
})
|
|
63
|
+
}),
|
|
64
|
+
renderRow: item => {
|
|
65
|
+
const ok = !item.error && (!item.response || item.response.status < 400);
|
|
66
|
+
const sc = ok ? _colors.Colors.success : _colors.Colors.error;
|
|
67
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
236
68
|
style: s.cardRow,
|
|
237
69
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
238
70
|
style: [s.statusIndicator, {
|
|
@@ -244,7 +76,7 @@ const NetworkLogTab = exports.NetworkLogTab = /*#__PURE__*/_react.default.memo((
|
|
|
244
76
|
style: s.cardMeta,
|
|
245
77
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
246
78
|
style: [s.methodText, {
|
|
247
|
-
color: (0,
|
|
79
|
+
color: (0, _colors.getMethodColor)(item.request.method)
|
|
248
80
|
}],
|
|
249
81
|
children: item.request.method
|
|
250
82
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
@@ -261,7 +93,7 @@ const NetworkLogTab = exports.NetworkLogTab = /*#__PURE__*/_react.default.memo((
|
|
|
261
93
|
})]
|
|
262
94
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
263
95
|
style: [s.url, !ok && {
|
|
264
|
-
color:
|
|
96
|
+
color: _colors.Colors.error
|
|
265
97
|
}],
|
|
266
98
|
numberOfLines: 2,
|
|
267
99
|
children: item.request.url
|
|
@@ -270,129 +102,167 @@ const NetworkLogTab = exports.NetworkLogTab = /*#__PURE__*/_react.default.memo((
|
|
|
270
102
|
children: new Date(item.timestamp).toLocaleTimeString()
|
|
271
103
|
})]
|
|
272
104
|
})]
|
|
273
|
-
})
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
style: s.
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
renderDetailHeader: log => {
|
|
108
|
+
const statusColor = log.error || log.response && log.response.status >= 400 ? _colors.Colors.error : _colors.Colors.success;
|
|
109
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
110
|
+
style: s.detailHeaderCenter,
|
|
111
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
112
|
+
style: [s.methodBadge, {
|
|
113
|
+
backgroundColor: (0, _colors.getMethodColor)(log.request.method)
|
|
114
|
+
}],
|
|
115
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
116
|
+
style: s.methodBadgeText,
|
|
117
|
+
children: log.request.method
|
|
118
|
+
})
|
|
119
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
120
|
+
style: [s.statusPill, {
|
|
121
|
+
backgroundColor: statusColor
|
|
122
|
+
}],
|
|
123
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
124
|
+
style: s.statusPillText,
|
|
125
|
+
children: log.response?.status ?? 'ERR'
|
|
126
|
+
})
|
|
127
|
+
}), log.duration != null && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
128
|
+
style: s.durationText,
|
|
129
|
+
children: [log.duration, "ms"]
|
|
130
|
+
})]
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
renderDetailBody: log => {
|
|
134
|
+
const curlStr = buildCurl(log);
|
|
135
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
136
|
+
style: s.detailBody,
|
|
137
|
+
contentContainerStyle: s.detailBodyContent,
|
|
138
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
139
|
+
style: s.urlCard,
|
|
289
140
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
290
|
-
style: s.
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
onChangeText: setSearch
|
|
141
|
+
style: s.urlText,
|
|
142
|
+
selectable: true,
|
|
143
|
+
numberOfLines: 3,
|
|
144
|
+
children: log.request.url
|
|
145
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
146
|
+
text: log.request.url,
|
|
147
|
+
label: "URL"
|
|
298
148
|
})]
|
|
299
|
-
})
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
149
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
|
|
150
|
+
title: "Request Body",
|
|
151
|
+
initiallyExpanded: true,
|
|
152
|
+
children: log.request.body != null ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
153
|
+
style: s.sectionWithCopy,
|
|
154
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
155
|
+
text: (0, _copyToComputer.fmt)(log.request.body),
|
|
156
|
+
label: "Request Body"
|
|
157
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
|
|
158
|
+
data: log.request.body,
|
|
159
|
+
maxHeight: 250
|
|
160
|
+
})]
|
|
161
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
162
|
+
style: s.emptySection,
|
|
163
|
+
children: "No request body"
|
|
164
|
+
})
|
|
165
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
|
|
166
|
+
title: "Request Headers",
|
|
167
|
+
children: log.request.headers ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
168
|
+
style: s.sectionWithCopy,
|
|
169
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
170
|
+
text: (0, _copyToComputer.fmt)(log.request.headers),
|
|
171
|
+
label: "Request Headers"
|
|
172
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
|
|
173
|
+
data: log.request.headers,
|
|
174
|
+
maxHeight: 200
|
|
175
|
+
})]
|
|
176
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
177
|
+
style: s.emptySection,
|
|
178
|
+
children: "No headers"
|
|
179
|
+
})
|
|
180
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CollapsibleSection.CollapsibleSection, {
|
|
181
|
+
title: `Response ${formatSize(log.response?.data)}`,
|
|
182
|
+
initiallyExpanded: true,
|
|
183
|
+
children: [log.error && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
184
|
+
style: s.errorBox,
|
|
185
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
186
|
+
style: s.errorIcon,
|
|
187
|
+
children: "\u26A0"
|
|
188
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
189
|
+
style: s.errorText,
|
|
190
|
+
children: log.error
|
|
191
|
+
})]
|
|
192
|
+
}), log.response?.data != null ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
193
|
+
style: s.sectionWithCopy,
|
|
194
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
195
|
+
text: (0, _copyToComputer.fmt)(log.response.data),
|
|
196
|
+
label: "Response Body"
|
|
197
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
|
|
198
|
+
data: log.response.data,
|
|
199
|
+
maxHeight: 300
|
|
200
|
+
})]
|
|
201
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
202
|
+
style: s.emptySection,
|
|
203
|
+
children: "No response body"
|
|
204
|
+
})]
|
|
205
|
+
}), log.response?.headers && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
|
|
206
|
+
title: "Response Headers",
|
|
207
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
208
|
+
style: s.sectionWithCopy,
|
|
209
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
210
|
+
text: (0, _copyToComputer.fmt)(log.response.headers),
|
|
211
|
+
label: "Response Headers"
|
|
212
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JsonView.JsonView, {
|
|
213
|
+
data: log.response.headers,
|
|
214
|
+
maxHeight: 200
|
|
215
|
+
})]
|
|
216
|
+
})
|
|
217
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollapsibleSection.CollapsibleSection, {
|
|
218
|
+
title: "cURL",
|
|
219
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
220
|
+
style: s.sectionWithCopy,
|
|
221
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
|
|
222
|
+
text: curlStr,
|
|
223
|
+
label: "cURL"
|
|
224
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
225
|
+
style: s.codeBlock,
|
|
226
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
227
|
+
style: s.codeText,
|
|
228
|
+
selectable: true,
|
|
229
|
+
children: curlStr
|
|
230
|
+
})
|
|
231
|
+
})]
|
|
232
|
+
})
|
|
308
233
|
})]
|
|
309
|
-
})
|
|
310
|
-
|
|
311
|
-
renderItem: renderItem,
|
|
312
|
-
keyExtractor: item => item.id,
|
|
313
|
-
contentContainerStyle: s.listContent,
|
|
314
|
-
initialNumToRender: 20,
|
|
315
|
-
maxToRenderPerBatch: 10,
|
|
316
|
-
windowSize: 5,
|
|
317
|
-
removeClippedSubviews: true
|
|
318
|
-
})]
|
|
319
|
-
}), selectedLog && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
320
|
-
style: [s.detailOverlay, {
|
|
321
|
-
transform: [{
|
|
322
|
-
translateX: detailTranslateX
|
|
323
|
-
}]
|
|
324
|
-
}],
|
|
325
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(NetworkLogDetail, {
|
|
326
|
-
log: selectedLog,
|
|
327
|
-
onBack: () => setSelectedLog(null)
|
|
328
|
-
})
|
|
329
|
-
})]
|
|
234
|
+
});
|
|
235
|
+
}
|
|
330
236
|
});
|
|
331
237
|
});
|
|
332
238
|
const s = _reactNative.StyleSheet.create({
|
|
333
|
-
container: {
|
|
334
|
-
flex: 1,
|
|
335
|
-
backgroundColor: _constants.Colors.background
|
|
336
|
-
},
|
|
337
|
-
listWrap: {
|
|
338
|
-
position: 'absolute',
|
|
339
|
-
top: 0,
|
|
340
|
-
left: 0,
|
|
341
|
-
right: 0,
|
|
342
|
-
bottom: 0
|
|
343
|
-
},
|
|
344
239
|
// Search
|
|
345
240
|
searchContainer: {
|
|
346
241
|
paddingHorizontal: 12,
|
|
347
242
|
paddingTop: 10,
|
|
348
243
|
paddingBottom: 6,
|
|
349
|
-
backgroundColor:
|
|
244
|
+
backgroundColor: _colors.Colors.background
|
|
350
245
|
},
|
|
351
246
|
searchBar: {
|
|
352
247
|
flexDirection: 'row',
|
|
353
248
|
alignItems: 'center',
|
|
354
|
-
backgroundColor:
|
|
249
|
+
backgroundColor: _colors.Colors.surface,
|
|
355
250
|
borderRadius: 10,
|
|
356
251
|
paddingHorizontal: 10,
|
|
357
252
|
height: 38
|
|
358
253
|
},
|
|
359
254
|
searchIcon: {
|
|
360
255
|
fontSize: 16,
|
|
361
|
-
color:
|
|
256
|
+
color: _colors.Colors.textLight,
|
|
362
257
|
marginRight: 6
|
|
363
258
|
},
|
|
364
259
|
search: {
|
|
365
260
|
flex: 1,
|
|
366
261
|
fontSize: 14,
|
|
367
|
-
color:
|
|
262
|
+
color: _colors.Colors.text,
|
|
368
263
|
padding: 0
|
|
369
264
|
},
|
|
370
|
-
//
|
|
371
|
-
emptyContainer: {
|
|
372
|
-
flex: 1,
|
|
373
|
-
alignItems: 'center',
|
|
374
|
-
justifyContent: 'center'
|
|
375
|
-
},
|
|
376
|
-
emptyIcon: {
|
|
377
|
-
fontSize: 40,
|
|
378
|
-
color: _constants.Colors.textLight,
|
|
379
|
-
marginBottom: 4
|
|
380
|
-
},
|
|
381
|
-
empty: {
|
|
382
|
-
textAlign: 'center',
|
|
383
|
-
color: _constants.Colors.textLight,
|
|
384
|
-
fontSize: 14
|
|
385
|
-
},
|
|
386
|
-
// List
|
|
387
|
-
listContent: {
|
|
388
|
-
padding: 12
|
|
389
|
-
},
|
|
390
|
-
card: {
|
|
391
|
-
backgroundColor: _constants.Colors.surface,
|
|
392
|
-
borderRadius: 12,
|
|
393
|
-
marginBottom: 8,
|
|
394
|
-
overflow: 'hidden'
|
|
395
|
-
},
|
|
265
|
+
// Row
|
|
396
266
|
cardRow: {
|
|
397
267
|
flexDirection: 'row',
|
|
398
268
|
padding: 14
|
|
@@ -427,61 +297,20 @@ const s = _reactNative.StyleSheet.create({
|
|
|
427
297
|
},
|
|
428
298
|
durationText: {
|
|
429
299
|
fontSize: 12,
|
|
430
|
-
color:
|
|
300
|
+
color: _colors.Colors.textSecondary,
|
|
431
301
|
fontWeight: '500'
|
|
432
302
|
},
|
|
433
303
|
url: {
|
|
434
304
|
fontSize: 13,
|
|
435
|
-
color:
|
|
305
|
+
color: _colors.Colors.textSecondary,
|
|
436
306
|
marginBottom: 4,
|
|
437
307
|
lineHeight: 18
|
|
438
308
|
},
|
|
439
309
|
time: {
|
|
440
310
|
fontSize: 11,
|
|
441
|
-
color:
|
|
442
|
-
},
|
|
443
|
-
// Detail overlay
|
|
444
|
-
detailOverlay: {
|
|
445
|
-
position: 'absolute',
|
|
446
|
-
top: 0,
|
|
447
|
-
left: 0,
|
|
448
|
-
right: 0,
|
|
449
|
-
bottom: 0,
|
|
450
|
-
backgroundColor: _constants.Colors.background
|
|
451
|
-
},
|
|
452
|
-
detailWrap: {
|
|
453
|
-
flex: 1,
|
|
454
|
-
backgroundColor: _constants.Colors.background
|
|
455
|
-
},
|
|
456
|
-
detailHeader: {
|
|
457
|
-
flexDirection: 'row',
|
|
458
|
-
alignItems: 'center',
|
|
459
|
-
paddingHorizontal: 8,
|
|
460
|
-
paddingVertical: 10,
|
|
461
|
-
backgroundColor: _constants.Colors.surface,
|
|
462
|
-
borderBottomWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
463
|
-
borderBottomColor: _constants.Colors.border
|
|
464
|
-
},
|
|
465
|
-
backBtn: {
|
|
466
|
-
flexDirection: 'row',
|
|
467
|
-
alignItems: 'center',
|
|
468
|
-
paddingHorizontal: 6,
|
|
469
|
-
paddingVertical: 4,
|
|
470
|
-
borderRadius: 8,
|
|
471
|
-
marginRight: 8
|
|
472
|
-
},
|
|
473
|
-
backIcon: {
|
|
474
|
-
fontSize: 24,
|
|
475
|
-
fontWeight: '300',
|
|
476
|
-
color: _constants.Colors.primary,
|
|
477
|
-
marginTop: -2,
|
|
478
|
-
marginRight: 2
|
|
479
|
-
},
|
|
480
|
-
backText: {
|
|
481
|
-
fontSize: 16,
|
|
482
|
-
color: _constants.Colors.primary,
|
|
483
|
-
fontWeight: '500'
|
|
311
|
+
color: _colors.Colors.textLight
|
|
484
312
|
},
|
|
313
|
+
// Detail header
|
|
485
314
|
detailHeaderCenter: {
|
|
486
315
|
flexDirection: 'row',
|
|
487
316
|
alignItems: 'center',
|
|
@@ -508,6 +337,7 @@ const s = _reactNative.StyleSheet.create({
|
|
|
508
337
|
fontSize: 11,
|
|
509
338
|
fontWeight: '700'
|
|
510
339
|
},
|
|
340
|
+
// Detail body
|
|
511
341
|
detailBody: {
|
|
512
342
|
flex: 1
|
|
513
343
|
},
|
|
@@ -515,11 +345,10 @@ const s = _reactNative.StyleSheet.create({
|
|
|
515
345
|
padding: 12,
|
|
516
346
|
paddingBottom: 40
|
|
517
347
|
},
|
|
518
|
-
// Detail content
|
|
519
348
|
urlCard: {
|
|
520
349
|
flexDirection: 'row',
|
|
521
350
|
alignItems: 'center',
|
|
522
|
-
backgroundColor:
|
|
351
|
+
backgroundColor: _colors.Colors.surface,
|
|
523
352
|
borderRadius: 12,
|
|
524
353
|
padding: 14,
|
|
525
354
|
marginBottom: 8,
|
|
@@ -528,7 +357,7 @@ const s = _reactNative.StyleSheet.create({
|
|
|
528
357
|
urlText: {
|
|
529
358
|
flex: 1,
|
|
530
359
|
fontSize: 13,
|
|
531
|
-
color:
|
|
360
|
+
color: _colors.Colors.textSecondary,
|
|
532
361
|
lineHeight: 18
|
|
533
362
|
},
|
|
534
363
|
sectionWithCopy: {
|
|
@@ -536,7 +365,7 @@ const s = _reactNative.StyleSheet.create({
|
|
|
536
365
|
},
|
|
537
366
|
emptySection: {
|
|
538
367
|
fontSize: 13,
|
|
539
|
-
color:
|
|
368
|
+
color: _colors.Colors.textLight,
|
|
540
369
|
paddingVertical: 4
|
|
541
370
|
},
|
|
542
371
|
errorBox: {
|
|
@@ -552,12 +381,12 @@ const s = _reactNative.StyleSheet.create({
|
|
|
552
381
|
},
|
|
553
382
|
errorIcon: {
|
|
554
383
|
fontSize: 14,
|
|
555
|
-
color:
|
|
384
|
+
color: _colors.Colors.error
|
|
556
385
|
},
|
|
557
386
|
errorText: {
|
|
558
387
|
flex: 1,
|
|
559
388
|
fontSize: 13,
|
|
560
|
-
color:
|
|
389
|
+
color: _colors.Colors.error,
|
|
561
390
|
lineHeight: 18
|
|
562
391
|
},
|
|
563
392
|
codeBlock: {
|