react-native-inapp-inspector 2.3.10 → 2.3.12
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/dist/commonjs/components/Inspector/DebuggingTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/DebuggingTab.js +683 -0
- package/dist/commonjs/components/Inspector/MainScreen.js +2 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +12 -0
- package/dist/commonjs/components/Inspector/TabBar.js +9 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +1 -0
- package/dist/commonjs/components/NetworkIcons.js +8 -1
- package/dist/commonjs/components/QRCodeView.d.ts +9 -0
- package/dist/commonjs/components/QRCodeView.js +82 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/qrGenerator.d.ts +2 -0
- package/dist/commonjs/helpers/qrGenerator.js +44 -0
- package/dist/commonjs/index.js +2 -0
- package/dist/commonjs/types/enums.d.ts +2 -0
- package/dist/commonjs/types/enums.js +2 -0
- package/dist/esm/components/Inspector/DebuggingTab.d.ts +3 -0
- package/dist/esm/components/Inspector/DebuggingTab.js +643 -0
- package/dist/esm/components/Inspector/MainScreen.js +2 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +13 -1
- package/dist/esm/components/Inspector/TabBar.js +10 -1
- package/dist/esm/components/NetworkIcons.d.ts +1 -0
- package/dist/esm/components/NetworkIcons.js +6 -0
- package/dist/esm/components/QRCodeView.d.ts +9 -0
- package/dist/esm/components/QRCodeView.js +45 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/qrGenerator.d.ts +2 -0
- package/dist/esm/helpers/qrGenerator.js +38 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/types/enums.d.ts +2 -0
- package/dist/esm/types/enums.js +2 -0
- package/package.json +4 -2
- package/src/components/Inspector/DebuggingTab.tsx +756 -0
- package/src/components/Inspector/MainScreen.tsx +2 -0
- package/src/components/Inspector/SettingsPanel.tsx +20 -0
- package/src/components/Inspector/TabBar.tsx +11 -0
- package/src/components/NetworkIcons.tsx +39 -0
- package/src/components/QRCodeView.tsx +75 -0
- package/src/constants/version.ts +1 -1
- package/src/helpers/qrGenerator.ts +49 -0
- package/src/index.tsx +2 -0
- package/src/types/enums.ts +2 -0
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.DebuggingTab = void 0;
|
|
40
|
+
const react_1 = __importStar(require("react"));
|
|
41
|
+
const react_native_1 = require("react-native");
|
|
42
|
+
const AppColors_1 = require("../../styles/AppColors");
|
|
43
|
+
const AppFonts_1 = require("../../styles/AppFonts");
|
|
44
|
+
const QRCodeView_1 = __importDefault(require("../QRCodeView"));
|
|
45
|
+
const TouchableScale_1 = __importDefault(require("../TouchableScale"));
|
|
46
|
+
const helpers_1 = require("../../helpers");
|
|
47
|
+
const toast_1 = require("../../helpers/toast");
|
|
48
|
+
const i18n_1 = require("../../i18n");
|
|
49
|
+
const NetworkIcons_1 = require("../NetworkIcons");
|
|
50
|
+
const COMMON_PORTS = [8081, 8082, 8083, 19000];
|
|
51
|
+
const DebuggingTab = () => {
|
|
52
|
+
const { t } = (0, i18n_1.useTranslation)();
|
|
53
|
+
const detectedConfig = (0, react_1.useMemo)(() => {
|
|
54
|
+
const scriptURL = react_native_1.NativeModules.SourceCode?.scriptURL || '';
|
|
55
|
+
let host = 'localhost';
|
|
56
|
+
let port = 8081;
|
|
57
|
+
try {
|
|
58
|
+
if (scriptURL.includes('://')) {
|
|
59
|
+
const urlWithoutScheme = scriptURL.split('://')[1];
|
|
60
|
+
const hostAndPort = urlWithoutScheme.split('/')[0];
|
|
61
|
+
if (hostAndPort.includes(':')) {
|
|
62
|
+
const parts = hostAndPort.split(':');
|
|
63
|
+
host = parts[0];
|
|
64
|
+
const parsedPort = parseInt(parts[1], 10);
|
|
65
|
+
if (!isNaN(parsedPort))
|
|
66
|
+
port = parsedPort;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
host = hostAndPort;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch { }
|
|
74
|
+
return { host, port, scriptURL };
|
|
75
|
+
}, []);
|
|
76
|
+
const [hostIp, setHostIp] = (0, react_1.useState)(() => {
|
|
77
|
+
if (detectedConfig.host === 'localhost' ||
|
|
78
|
+
detectedConfig.host === '127.0.0.1' ||
|
|
79
|
+
detectedConfig.host === '10.0.2.2') {
|
|
80
|
+
return '192.168.1.15';
|
|
81
|
+
}
|
|
82
|
+
return detectedConfig.host;
|
|
83
|
+
});
|
|
84
|
+
const [selectedPort, setSelectedPort] = (0, react_1.useState)(detectedConfig.port);
|
|
85
|
+
const [apkPath, setApkPath] = (0, react_1.useState)('app-debug.apk');
|
|
86
|
+
const [activeQrTab, setActiveQrTab] = (0, react_1.useState)('metro');
|
|
87
|
+
const [isAutoDetecting, setIsAutoDetecting] = (0, react_1.useState)(false);
|
|
88
|
+
const [portsStatus, setPortsStatus] = (0, react_1.useState)({});
|
|
89
|
+
const probePorts = (0, react_1.useCallback)(async () => {
|
|
90
|
+
setIsAutoDetecting(true);
|
|
91
|
+
const results = {};
|
|
92
|
+
for (const p of COMMON_PORTS) {
|
|
93
|
+
results[p] = { port: p, status: 'checking' };
|
|
94
|
+
}
|
|
95
|
+
setPortsStatus({ ...results });
|
|
96
|
+
let foundActivePort = null;
|
|
97
|
+
for (const p of COMMON_PORTS) {
|
|
98
|
+
const startTime = Date.now();
|
|
99
|
+
try {
|
|
100
|
+
const controller = new AbortController();
|
|
101
|
+
const timeoutId = setTimeout(() => controller.abort(), 1500);
|
|
102
|
+
const res = await fetch(`http://localhost:${p}/status`, {
|
|
103
|
+
signal: controller.signal,
|
|
104
|
+
});
|
|
105
|
+
clearTimeout(timeoutId);
|
|
106
|
+
const text = await res.text();
|
|
107
|
+
const latency = Date.now() - startTime;
|
|
108
|
+
if (res.ok && text.includes('packager-status:running')) {
|
|
109
|
+
results[p] = { port: p, status: 'active', latencyMs: latency };
|
|
110
|
+
if (!foundActivePort)
|
|
111
|
+
foundActivePort = p;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
results[p] = { port: p, status: 'inactive' };
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
results[p] = { port: p, status: 'inactive' };
|
|
119
|
+
}
|
|
120
|
+
setPortsStatus({ ...results });
|
|
121
|
+
}
|
|
122
|
+
if (foundActivePort) {
|
|
123
|
+
setSelectedPort(foundActivePort);
|
|
124
|
+
(0, toast_1.showToast)(`Detected Metro running on Port ${foundActivePort}!`);
|
|
125
|
+
}
|
|
126
|
+
setIsAutoDetecting(false);
|
|
127
|
+
}, []);
|
|
128
|
+
(0, react_1.useEffect)(() => {
|
|
129
|
+
probePorts();
|
|
130
|
+
}, [probePorts]);
|
|
131
|
+
const metroBundleUrl = `http://${hostIp}:${selectedPort}/index.bundle?platform=android&dev=true`;
|
|
132
|
+
const directServerUrl = `http://${hostIp}:${selectedPort}`;
|
|
133
|
+
const apkDownloadUrl = `http://${hostIp}:${selectedPort}/${apkPath}`;
|
|
134
|
+
const devSettingsHost = `${hostIp}:${selectedPort}`;
|
|
135
|
+
const currentQrValue = (0, react_1.useMemo)(() => {
|
|
136
|
+
if (activeQrTab === 'apk')
|
|
137
|
+
return apkDownloadUrl;
|
|
138
|
+
if (activeQrTab === 'host')
|
|
139
|
+
return devSettingsHost;
|
|
140
|
+
return directServerUrl;
|
|
141
|
+
}, [activeQrTab, apkDownloadUrl, devSettingsHost, directServerUrl]);
|
|
142
|
+
const activePortInfo = portsStatus[selectedPort];
|
|
143
|
+
return (<react_native_1.ScrollView style={styles.container} contentContainerStyle={styles.content} showsVerticalScrollIndicator={false}>
|
|
144
|
+
|
|
145
|
+
<react_native_1.View style={styles.serverCard}>
|
|
146
|
+
<react_native_1.View style={styles.serverCardTop}>
|
|
147
|
+
<react_native_1.View style={styles.serverStatusLeft}>
|
|
148
|
+
<react_native_1.View style={[
|
|
149
|
+
styles.statusDot,
|
|
150
|
+
{
|
|
151
|
+
backgroundColor: activePortInfo?.status === 'active'
|
|
152
|
+
? AppColors_1.AppColors.greenColor
|
|
153
|
+
: activePortInfo?.status === 'checking'
|
|
154
|
+
? AppColors_1.AppColors.warningIconGold
|
|
155
|
+
: AppColors_1.AppColors.errorColor,
|
|
156
|
+
},
|
|
157
|
+
]}/>
|
|
158
|
+
<react_native_1.View>
|
|
159
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
160
|
+
<react_native_1.Text style={styles.serverTitle}>Metro Dev Server</react_native_1.Text>
|
|
161
|
+
<react_native_1.View style={styles.portPill}>
|
|
162
|
+
<react_native_1.Text style={styles.portPillText}>Port {selectedPort}</react_native_1.Text>
|
|
163
|
+
</react_native_1.View>
|
|
164
|
+
</react_native_1.View>
|
|
165
|
+
<react_native_1.Text style={styles.serverSubtitle}>
|
|
166
|
+
{activePortInfo?.status === 'active'
|
|
167
|
+
? `🟢 Active & Bundling (${activePortInfo.latencyMs}ms)`
|
|
168
|
+
: activePortInfo?.status === 'checking'
|
|
169
|
+
? '🟡 Probing Metro Ports...'
|
|
170
|
+
: '🔴 Standby / Select active port'}
|
|
171
|
+
</react_native_1.Text>
|
|
172
|
+
</react_native_1.View>
|
|
173
|
+
</react_native_1.View>
|
|
174
|
+
|
|
175
|
+
<TouchableScale_1.default onPress={probePorts} style={styles.scanBtn} hitSlop={8}>
|
|
176
|
+
<NetworkIcons_1.RepeatIcon size={12} color={AppColors_1.AppColors.purple}/>
|
|
177
|
+
<react_native_1.Text style={styles.scanBtnText}>Re-scan</react_native_1.Text>
|
|
178
|
+
</TouchableScale_1.default>
|
|
179
|
+
</react_native_1.View>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<react_native_1.View style={styles.portsRow}>
|
|
183
|
+
{COMMON_PORTS.map(p => {
|
|
184
|
+
const isSelected = selectedPort === p;
|
|
185
|
+
const pInfo = portsStatus[p];
|
|
186
|
+
const isActive = pInfo?.status === 'active';
|
|
187
|
+
return (<react_native_1.TouchableOpacity key={p} activeOpacity={0.7} onPress={() => setSelectedPort(p)} style={[
|
|
188
|
+
styles.portChip,
|
|
189
|
+
isSelected && styles.portChipSelected,
|
|
190
|
+
isActive && { borderColor: AppColors_1.AppColors.greenColor },
|
|
191
|
+
]}>
|
|
192
|
+
<react_native_1.View style={[
|
|
193
|
+
styles.portMiniDot,
|
|
194
|
+
{
|
|
195
|
+
backgroundColor: isActive
|
|
196
|
+
? AppColors_1.AppColors.greenColor
|
|
197
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
198
|
+
},
|
|
199
|
+
]}/>
|
|
200
|
+
<react_native_1.Text style={[
|
|
201
|
+
styles.portChipText,
|
|
202
|
+
isSelected && styles.portChipTextSelected,
|
|
203
|
+
]}>
|
|
204
|
+
{p}
|
|
205
|
+
</react_native_1.Text>
|
|
206
|
+
{isActive && (<react_native_1.View style={styles.liveBadge}>
|
|
207
|
+
<react_native_1.Text style={styles.liveBadgeText}>LIVE</react_native_1.Text>
|
|
208
|
+
</react_native_1.View>)}
|
|
209
|
+
</react_native_1.TouchableOpacity>);
|
|
210
|
+
})}
|
|
211
|
+
</react_native_1.View>
|
|
212
|
+
</react_native_1.View>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
<react_native_1.View style={styles.card}>
|
|
216
|
+
<react_native_1.View style={styles.cardHeader}>
|
|
217
|
+
<react_native_1.Text style={styles.cardTitle}>HOST IP & BUNDLE LOCATION</react_native_1.Text>
|
|
218
|
+
<react_native_1.TouchableOpacity onPress={() => {
|
|
219
|
+
if (detectedConfig.host !== 'localhost' &&
|
|
220
|
+
detectedConfig.host !== '127.0.0.1' &&
|
|
221
|
+
detectedConfig.host !== '10.0.2.2') {
|
|
222
|
+
setHostIp(detectedConfig.host);
|
|
223
|
+
(0, toast_1.showToast)(`Reset to detected IP: ${detectedConfig.host}`);
|
|
224
|
+
}
|
|
225
|
+
}}>
|
|
226
|
+
<react_native_1.Text style={styles.headerActionText}>Reset to Detected</react_native_1.Text>
|
|
227
|
+
</react_native_1.TouchableOpacity>
|
|
228
|
+
</react_native_1.View>
|
|
229
|
+
|
|
230
|
+
<react_native_1.View style={styles.inputContainer}>
|
|
231
|
+
<react_native_1.Text style={styles.inputPrefix}>http://</react_native_1.Text>
|
|
232
|
+
<react_native_1.TextInput style={styles.input} value={hostIp} onChangeText={setHostIp} placeholder="192.168.1.15" placeholderTextColor={AppColors_1.AppColors.grayTextWeak} autoCapitalize="none" autoCorrect={false}/>
|
|
233
|
+
<react_native_1.Text style={styles.inputSuffix}>:{selectedPort}</react_native_1.Text>
|
|
234
|
+
</react_native_1.View>
|
|
235
|
+
<react_native_1.Text style={styles.inputHint}>
|
|
236
|
+
💡 Ensure your physical Android device and Mac are connected to the same Wi-Fi network.
|
|
237
|
+
</react_native_1.Text>
|
|
238
|
+
</react_native_1.View>
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
<react_native_1.View style={styles.qrCard}>
|
|
242
|
+
|
|
243
|
+
<react_native_1.View style={styles.qrTabsRow}>
|
|
244
|
+
<react_native_1.TouchableOpacity activeOpacity={0.7} onPress={() => setActiveQrTab('metro')} style={[
|
|
245
|
+
styles.qrTab,
|
|
246
|
+
activeQrTab === 'metro' && styles.qrTabActive,
|
|
247
|
+
]}>
|
|
248
|
+
<NetworkIcons_1.BoltIcon size={13} color={activeQrTab === 'metro' ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText}/>
|
|
249
|
+
<react_native_1.Text style={[
|
|
250
|
+
styles.qrTabText,
|
|
251
|
+
activeQrTab === 'metro' && styles.qrTabTextActive,
|
|
252
|
+
]}>
|
|
253
|
+
Metro Live Reload
|
|
254
|
+
</react_native_1.Text>
|
|
255
|
+
</react_native_1.TouchableOpacity>
|
|
256
|
+
|
|
257
|
+
<react_native_1.TouchableOpacity activeOpacity={0.7} onPress={() => setActiveQrTab('apk')} style={[
|
|
258
|
+
styles.qrTab,
|
|
259
|
+
activeQrTab === 'apk' && styles.qrTabActive,
|
|
260
|
+
]}>
|
|
261
|
+
<NetworkIcons_1.PackageIcon size={13} color={activeQrTab === 'apk' ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText}/>
|
|
262
|
+
<react_native_1.Text style={[
|
|
263
|
+
styles.qrTabText,
|
|
264
|
+
activeQrTab === 'apk' && styles.qrTabTextActive,
|
|
265
|
+
]}>
|
|
266
|
+
Install Debug APK
|
|
267
|
+
</react_native_1.Text>
|
|
268
|
+
</react_native_1.TouchableOpacity>
|
|
269
|
+
|
|
270
|
+
<react_native_1.TouchableOpacity activeOpacity={0.7} onPress={() => setActiveQrTab('host')} style={[
|
|
271
|
+
styles.qrTab,
|
|
272
|
+
activeQrTab === 'host' && styles.qrTabActive,
|
|
273
|
+
]}>
|
|
274
|
+
<NetworkIcons_1.SmartphoneIcon size={13} color={activeQrTab === 'host' ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText}/>
|
|
275
|
+
<react_native_1.Text style={[
|
|
276
|
+
styles.qrTabText,
|
|
277
|
+
activeQrTab === 'host' && styles.qrTabTextActive,
|
|
278
|
+
]}>
|
|
279
|
+
Dev Host Info
|
|
280
|
+
</react_native_1.Text>
|
|
281
|
+
</react_native_1.TouchableOpacity>
|
|
282
|
+
</react_native_1.View>
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
<react_native_1.View style={styles.qrWrapper}>
|
|
286
|
+
<QRCodeView_1.default value={currentQrValue} size={190} color={AppColors_1.AppColors.primaryBlack} backgroundColor={AppColors_1.AppColors.white}/>
|
|
287
|
+
|
|
288
|
+
<react_native_1.View style={styles.qrInfoBox}>
|
|
289
|
+
<react_native_1.Text style={styles.qrTargetTitle}>
|
|
290
|
+
{activeQrTab === 'apk'
|
|
291
|
+
? '📦 Direct APK Download URL'
|
|
292
|
+
: activeQrTab === 'host'
|
|
293
|
+
? '📱 Dev Settings Bundle Host'
|
|
294
|
+
: '⚡ Live Metro Fast-Refresh Endpoint'}
|
|
295
|
+
</react_native_1.Text>
|
|
296
|
+
<react_native_1.Text style={styles.qrTargetUrl} numberOfLines={2} ellipsizeMode="middle">
|
|
297
|
+
{currentQrValue}
|
|
298
|
+
</react_native_1.Text>
|
|
299
|
+
</react_native_1.View>
|
|
300
|
+
</react_native_1.View>
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
<react_native_1.View style={styles.qrActionsRow}>
|
|
304
|
+
<TouchableScale_1.default onPress={() => (0, helpers_1.copyToClipboard)(currentQrValue, 'QR Link')} style={styles.actionBtn}>
|
|
305
|
+
<react_native_1.Text style={styles.actionBtnText}>Copy Link</react_native_1.Text>
|
|
306
|
+
</TouchableScale_1.default>
|
|
307
|
+
|
|
308
|
+
<TouchableScale_1.default onPress={() => {
|
|
309
|
+
react_native_1.Share.share({
|
|
310
|
+
message: currentQrValue,
|
|
311
|
+
title: 'Metro Debug Link',
|
|
312
|
+
});
|
|
313
|
+
}} style={[styles.actionBtn, styles.actionBtnPrimary]}>
|
|
314
|
+
<react_native_1.Text style={styles.actionBtnPrimaryText}>Share to Device</react_native_1.Text>
|
|
315
|
+
</TouchableScale_1.default>
|
|
316
|
+
</react_native_1.View>
|
|
317
|
+
</react_native_1.View>
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
<react_native_1.View style={styles.guideCard}>
|
|
321
|
+
<react_native_1.Text style={styles.guideHeading}>📱 HOW TO CONNECT ANDROID DEVICE:</react_native_1.Text>
|
|
322
|
+
|
|
323
|
+
<react_native_1.View style={styles.stepRow}>
|
|
324
|
+
<react_native_1.View style={styles.stepNumberBadge}>
|
|
325
|
+
<react_native_1.Text style={styles.stepNumberText}>1</react_native_1.Text>
|
|
326
|
+
</react_native_1.View>
|
|
327
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
328
|
+
<react_native_1.Text style={styles.stepTitle}>Connect to Same Wi-Fi</react_native_1.Text>
|
|
329
|
+
<react_native_1.Text style={styles.stepDesc}>
|
|
330
|
+
Make sure your Android phone is connected to the same Wi-Fi router or Mac Mobile Hotspot.
|
|
331
|
+
</react_native_1.Text>
|
|
332
|
+
</react_native_1.View>
|
|
333
|
+
</react_native_1.View>
|
|
334
|
+
|
|
335
|
+
<react_native_1.View style={styles.stepRow}>
|
|
336
|
+
<react_native_1.View style={styles.stepNumberBadge}>
|
|
337
|
+
<react_native_1.Text style={styles.stepNumberText}>2</react_native_1.Text>
|
|
338
|
+
</react_native_1.View>
|
|
339
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
340
|
+
<react_native_1.Text style={styles.stepTitle}>Scan to Install / Connect</react_native_1.Text>
|
|
341
|
+
<react_native_1.Text style={styles.stepDesc}>
|
|
342
|
+
Open Android Camera or browser, scan the QR code above to download the APK or connect Metro.
|
|
343
|
+
</react_native_1.Text>
|
|
344
|
+
</react_native_1.View>
|
|
345
|
+
</react_native_1.View>
|
|
346
|
+
|
|
347
|
+
<react_native_1.View style={styles.stepRow}>
|
|
348
|
+
<react_native_1.View style={styles.stepNumberBadge}>
|
|
349
|
+
<react_native_1.Text style={styles.stepNumberText}>3</react_native_1.Text>
|
|
350
|
+
</react_native_1.View>
|
|
351
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
352
|
+
<react_native_1.Text style={styles.stepTitle}>Simultaneous Live Fast-Refresh ⚡</react_native_1.Text>
|
|
353
|
+
<react_native_1.Text style={styles.stepDesc}>
|
|
354
|
+
Any changes saved in VS Code will immediately update <react_native_1.Text style={{ fontWeight: '700' }}>both the iOS Simulator and physical Android phone</react_native_1.Text> in real-time!
|
|
355
|
+
</react_native_1.Text>
|
|
356
|
+
</react_native_1.View>
|
|
357
|
+
</react_native_1.View>
|
|
358
|
+
</react_native_1.View>
|
|
359
|
+
</react_native_1.ScrollView>);
|
|
360
|
+
};
|
|
361
|
+
exports.DebuggingTab = DebuggingTab;
|
|
362
|
+
const styles = react_native_1.StyleSheet.create({
|
|
363
|
+
container: {
|
|
364
|
+
flex: 1,
|
|
365
|
+
backgroundColor: AppColors_1.AppColors.contentBg,
|
|
366
|
+
},
|
|
367
|
+
content: {
|
|
368
|
+
padding: 12,
|
|
369
|
+
gap: 12,
|
|
370
|
+
paddingBottom: 40,
|
|
371
|
+
},
|
|
372
|
+
serverCard: {
|
|
373
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
374
|
+
borderRadius: 14,
|
|
375
|
+
padding: 14,
|
|
376
|
+
borderWidth: 1,
|
|
377
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
378
|
+
shadowColor: AppColors_1.AppColors.black,
|
|
379
|
+
shadowOffset: { width: 0, height: 2 },
|
|
380
|
+
shadowOpacity: 0.05,
|
|
381
|
+
shadowRadius: 4,
|
|
382
|
+
elevation: 2,
|
|
383
|
+
gap: 12,
|
|
384
|
+
},
|
|
385
|
+
serverCardTop: {
|
|
386
|
+
flexDirection: 'row',
|
|
387
|
+
alignItems: 'center',
|
|
388
|
+
justifyContent: 'space-between',
|
|
389
|
+
},
|
|
390
|
+
serverStatusLeft: {
|
|
391
|
+
flexDirection: 'row',
|
|
392
|
+
alignItems: 'center',
|
|
393
|
+
gap: 10,
|
|
394
|
+
flex: 1,
|
|
395
|
+
},
|
|
396
|
+
statusDot: {
|
|
397
|
+
width: 12,
|
|
398
|
+
height: 12,
|
|
399
|
+
borderRadius: 6,
|
|
400
|
+
},
|
|
401
|
+
serverTitle: {
|
|
402
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
403
|
+
fontSize: 15,
|
|
404
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
405
|
+
},
|
|
406
|
+
serverSubtitle: {
|
|
407
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
408
|
+
fontSize: 11,
|
|
409
|
+
color: AppColors_1.AppColors.grayText,
|
|
410
|
+
marginTop: 2,
|
|
411
|
+
},
|
|
412
|
+
portPill: {
|
|
413
|
+
backgroundColor: `${AppColors_1.AppColors.purple}18`,
|
|
414
|
+
paddingHorizontal: 6,
|
|
415
|
+
paddingVertical: 2,
|
|
416
|
+
borderRadius: 6,
|
|
417
|
+
},
|
|
418
|
+
portPillText: {
|
|
419
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
420
|
+
fontSize: 10,
|
|
421
|
+
color: AppColors_1.AppColors.purple,
|
|
422
|
+
},
|
|
423
|
+
scanBtn: {
|
|
424
|
+
flexDirection: 'row',
|
|
425
|
+
alignItems: 'center',
|
|
426
|
+
gap: 4,
|
|
427
|
+
paddingHorizontal: 8,
|
|
428
|
+
paddingVertical: 4,
|
|
429
|
+
borderRadius: 6,
|
|
430
|
+
backgroundColor: `${AppColors_1.AppColors.purple}14`,
|
|
431
|
+
borderWidth: 1,
|
|
432
|
+
borderColor: `${AppColors_1.AppColors.purple}30`,
|
|
433
|
+
},
|
|
434
|
+
scanBtnText: {
|
|
435
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
436
|
+
fontSize: 11,
|
|
437
|
+
color: AppColors_1.AppColors.purple,
|
|
438
|
+
},
|
|
439
|
+
portsRow: {
|
|
440
|
+
flexDirection: 'row',
|
|
441
|
+
gap: 8,
|
|
442
|
+
},
|
|
443
|
+
portChip: {
|
|
444
|
+
flex: 1,
|
|
445
|
+
flexDirection: 'row',
|
|
446
|
+
alignItems: 'center',
|
|
447
|
+
justifyContent: 'center',
|
|
448
|
+
gap: 4,
|
|
449
|
+
paddingVertical: 7,
|
|
450
|
+
borderRadius: 8,
|
|
451
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
452
|
+
borderWidth: 1,
|
|
453
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
454
|
+
},
|
|
455
|
+
portChipSelected: {
|
|
456
|
+
backgroundColor: `${AppColors_1.AppColors.purple}18`,
|
|
457
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
458
|
+
},
|
|
459
|
+
portMiniDot: {
|
|
460
|
+
width: 5,
|
|
461
|
+
height: 5,
|
|
462
|
+
borderRadius: 2.5,
|
|
463
|
+
},
|
|
464
|
+
portChipText: {
|
|
465
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
466
|
+
fontSize: 11,
|
|
467
|
+
color: AppColors_1.AppColors.grayTextStrong,
|
|
468
|
+
},
|
|
469
|
+
portChipTextSelected: {
|
|
470
|
+
color: AppColors_1.AppColors.purple,
|
|
471
|
+
},
|
|
472
|
+
liveBadge: {
|
|
473
|
+
backgroundColor: AppColors_1.AppColors.greenColor,
|
|
474
|
+
paddingHorizontal: 3,
|
|
475
|
+
paddingVertical: 0.5,
|
|
476
|
+
borderRadius: 3,
|
|
477
|
+
},
|
|
478
|
+
liveBadgeText: {
|
|
479
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
480
|
+
fontSize: 7.5,
|
|
481
|
+
color: AppColors_1.AppColors.white,
|
|
482
|
+
},
|
|
483
|
+
card: {
|
|
484
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
485
|
+
borderRadius: 14,
|
|
486
|
+
padding: 14,
|
|
487
|
+
borderWidth: 1,
|
|
488
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
489
|
+
shadowColor: AppColors_1.AppColors.black,
|
|
490
|
+
shadowOffset: { width: 0, height: 2 },
|
|
491
|
+
shadowOpacity: 0.05,
|
|
492
|
+
shadowRadius: 4,
|
|
493
|
+
elevation: 2,
|
|
494
|
+
gap: 8,
|
|
495
|
+
},
|
|
496
|
+
cardHeader: {
|
|
497
|
+
flexDirection: 'row',
|
|
498
|
+
alignItems: 'center',
|
|
499
|
+
justifyContent: 'space-between',
|
|
500
|
+
},
|
|
501
|
+
cardTitle: {
|
|
502
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
503
|
+
fontSize: 11,
|
|
504
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
505
|
+
letterSpacing: 0.6,
|
|
506
|
+
},
|
|
507
|
+
headerActionText: {
|
|
508
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
509
|
+
fontSize: 11,
|
|
510
|
+
color: AppColors_1.AppColors.purple,
|
|
511
|
+
},
|
|
512
|
+
inputContainer: {
|
|
513
|
+
flexDirection: 'row',
|
|
514
|
+
alignItems: 'center',
|
|
515
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
516
|
+
borderRadius: 10,
|
|
517
|
+
borderWidth: 1,
|
|
518
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
519
|
+
paddingHorizontal: 10,
|
|
520
|
+
height: 40,
|
|
521
|
+
},
|
|
522
|
+
inputPrefix: {
|
|
523
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
524
|
+
fontSize: 12.5,
|
|
525
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
526
|
+
},
|
|
527
|
+
input: {
|
|
528
|
+
flex: 1,
|
|
529
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
530
|
+
fontSize: 13,
|
|
531
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
532
|
+
paddingVertical: 0,
|
|
533
|
+
},
|
|
534
|
+
inputSuffix: {
|
|
535
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
536
|
+
fontSize: 12.5,
|
|
537
|
+
color: AppColors_1.AppColors.purple,
|
|
538
|
+
},
|
|
539
|
+
inputHint: {
|
|
540
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
541
|
+
fontSize: 11,
|
|
542
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
543
|
+
lineHeight: 15,
|
|
544
|
+
},
|
|
545
|
+
qrCard: {
|
|
546
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
547
|
+
borderRadius: 14,
|
|
548
|
+
padding: 14,
|
|
549
|
+
borderWidth: 1,
|
|
550
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
551
|
+
shadowColor: AppColors_1.AppColors.black,
|
|
552
|
+
shadowOffset: { width: 0, height: 2 },
|
|
553
|
+
shadowOpacity: 0.05,
|
|
554
|
+
shadowRadius: 4,
|
|
555
|
+
elevation: 2,
|
|
556
|
+
alignItems: 'center',
|
|
557
|
+
gap: 14,
|
|
558
|
+
},
|
|
559
|
+
qrTabsRow: {
|
|
560
|
+
flexDirection: 'row',
|
|
561
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
562
|
+
borderRadius: 10,
|
|
563
|
+
padding: 3,
|
|
564
|
+
width: '100%',
|
|
565
|
+
gap: 4,
|
|
566
|
+
},
|
|
567
|
+
qrTab: {
|
|
568
|
+
flex: 1,
|
|
569
|
+
flexDirection: 'row',
|
|
570
|
+
alignItems: 'center',
|
|
571
|
+
justifyContent: 'center',
|
|
572
|
+
gap: 4,
|
|
573
|
+
paddingVertical: 7,
|
|
574
|
+
borderRadius: 8,
|
|
575
|
+
},
|
|
576
|
+
qrTabActive: {
|
|
577
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
578
|
+
},
|
|
579
|
+
qrTabText: {
|
|
580
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
581
|
+
fontSize: 11,
|
|
582
|
+
color: AppColors_1.AppColors.grayText,
|
|
583
|
+
},
|
|
584
|
+
qrTabTextActive: {
|
|
585
|
+
color: AppColors_1.AppColors.white,
|
|
586
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
587
|
+
},
|
|
588
|
+
qrWrapper: {
|
|
589
|
+
alignItems: 'center',
|
|
590
|
+
gap: 12,
|
|
591
|
+
},
|
|
592
|
+
qrInfoBox: {
|
|
593
|
+
alignItems: 'center',
|
|
594
|
+
maxWidth: 280,
|
|
595
|
+
gap: 2,
|
|
596
|
+
},
|
|
597
|
+
qrTargetTitle: {
|
|
598
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
599
|
+
fontSize: 11.5,
|
|
600
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
601
|
+
},
|
|
602
|
+
qrTargetUrl: {
|
|
603
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
604
|
+
fontSize: 10.5,
|
|
605
|
+
color: AppColors_1.AppColors.skyBlue,
|
|
606
|
+
textAlign: 'center',
|
|
607
|
+
},
|
|
608
|
+
qrActionsRow: {
|
|
609
|
+
flexDirection: 'row',
|
|
610
|
+
gap: 10,
|
|
611
|
+
width: '100%',
|
|
612
|
+
},
|
|
613
|
+
actionBtn: {
|
|
614
|
+
flex: 1,
|
|
615
|
+
paddingVertical: 10,
|
|
616
|
+
borderRadius: 10,
|
|
617
|
+
borderWidth: 1,
|
|
618
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
619
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
620
|
+
alignItems: 'center',
|
|
621
|
+
justifyContent: 'center',
|
|
622
|
+
},
|
|
623
|
+
actionBtnText: {
|
|
624
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
625
|
+
fontSize: 12,
|
|
626
|
+
color: AppColors_1.AppColors.grayTextStrong,
|
|
627
|
+
},
|
|
628
|
+
actionBtnPrimary: {
|
|
629
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
630
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
631
|
+
},
|
|
632
|
+
actionBtnPrimaryText: {
|
|
633
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
634
|
+
fontSize: 12,
|
|
635
|
+
color: AppColors_1.AppColors.white,
|
|
636
|
+
},
|
|
637
|
+
guideCard: {
|
|
638
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
639
|
+
borderRadius: 14,
|
|
640
|
+
padding: 14,
|
|
641
|
+
borderWidth: 1,
|
|
642
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
643
|
+
gap: 10,
|
|
644
|
+
},
|
|
645
|
+
guideHeading: {
|
|
646
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
647
|
+
fontSize: 11,
|
|
648
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
649
|
+
letterSpacing: 0.6,
|
|
650
|
+
},
|
|
651
|
+
stepRow: {
|
|
652
|
+
flexDirection: 'row',
|
|
653
|
+
alignItems: 'flex-start',
|
|
654
|
+
gap: 10,
|
|
655
|
+
},
|
|
656
|
+
stepNumberBadge: {
|
|
657
|
+
width: 22,
|
|
658
|
+
height: 22,
|
|
659
|
+
borderRadius: 11,
|
|
660
|
+
backgroundColor: `${AppColors_1.AppColors.purple}18`,
|
|
661
|
+
alignItems: 'center',
|
|
662
|
+
justifyContent: 'center',
|
|
663
|
+
marginTop: 1,
|
|
664
|
+
},
|
|
665
|
+
stepNumberText: {
|
|
666
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
667
|
+
fontSize: 11,
|
|
668
|
+
color: AppColors_1.AppColors.purple,
|
|
669
|
+
},
|
|
670
|
+
stepTitle: {
|
|
671
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
672
|
+
fontSize: 12.5,
|
|
673
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
674
|
+
},
|
|
675
|
+
stepDesc: {
|
|
676
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
677
|
+
fontSize: 11,
|
|
678
|
+
color: AppColors_1.AppColors.grayText,
|
|
679
|
+
lineHeight: 16,
|
|
680
|
+
marginTop: 1,
|
|
681
|
+
},
|
|
682
|
+
});
|
|
683
|
+
exports.default = exports.DebuggingTab;
|