react-native-inapp-inspector 2.3.11 → 2.3.13
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/HeadersSection.js +3 -2
- package/dist/commonjs/components/Inspector/BundleTab.js +4 -4
- package/dist/commonjs/components/Inspector/DebuggingTab.js +29 -16
- package/dist/commonjs/components/Inspector/NetworkDetail.js +2 -2
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +18 -12
- package/dist/commonjs/components/Inspector/StorageTab.js +10 -4
- package/dist/commonjs/components/JsonViewer.js +3 -2
- package/dist/commonjs/components/NetworkIcons.d.ts +4 -1
- package/dist/commonjs/components/NetworkIcons.js +26 -3
- package/dist/commonjs/components/QRCodeView.js +15 -12
- package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
- package/dist/commonjs/constants/telemetryConfig.js +3 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/qrGenerator.js +31 -157
- package/dist/esm/components/HeadersSection.js +3 -2
- package/dist/esm/components/Inspector/BundleTab.js +5 -5
- package/dist/esm/components/Inspector/DebuggingTab.js +30 -17
- package/dist/esm/components/Inspector/NetworkDetail.js +2 -2
- package/dist/esm/components/Inspector/NetworkFilterModal.js +19 -13
- package/dist/esm/components/Inspector/StorageTab.js +11 -5
- package/dist/esm/components/JsonViewer.js +4 -3
- package/dist/esm/components/NetworkIcons.d.ts +4 -1
- package/dist/esm/components/NetworkIcons.js +22 -2
- package/dist/esm/components/QRCodeView.js +15 -12
- package/dist/esm/constants/telemetryConfig.d.ts +3 -3
- package/dist/esm/constants/telemetryConfig.js +3 -3
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/qrGenerator.js +28 -157
- package/package.json +4 -2
- package/src/components/HeadersSection.tsx +7 -2
- package/src/components/Inspector/BundleTab.tsx +9 -4
- package/src/components/Inspector/DebuggingTab.tsx +37 -17
- package/src/components/Inspector/NetworkDetail.tsx +2 -2
- package/src/components/Inspector/NetworkFilterModal.tsx +32 -12
- package/src/components/Inspector/StorageTab.tsx +15 -4
- package/src/components/JsonViewer.tsx +8 -3
- package/src/components/NetworkIcons.tsx +71 -1
- package/src/components/QRCodeView.tsx +21 -17
- package/src/constants/telemetryConfig.ts +3 -5
- package/src/constants/version.ts +1 -1
- package/src/helpers/qrGenerator.ts +34 -169
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build/reports/problems/problems-report.html +0 -659
|
@@ -42,10 +42,11 @@ const HeaderRow = React.memo(function HeaderRow({ headerKey, value, isLast, inde
|
|
|
42
42
|
<Text style={styles.htValue} selectable numberOfLines={expanded ? undefined : 3}>
|
|
43
43
|
{value}
|
|
44
44
|
</Text>
|
|
45
|
-
{isLong && (<View style={styles.htExpandRow}>
|
|
45
|
+
{isLong && (<View style={[styles.htExpandRow, { flexDirection: 'row', alignItems: 'center', gap: 4 }]}>
|
|
46
46
|
<Text style={styles.htExpandText}>
|
|
47
|
-
{expanded ? '
|
|
47
|
+
{expanded ? 'less' : 'more'}
|
|
48
48
|
</Text>
|
|
49
|
+
<ChevronIcon direction={expanded ? 'up' : 'down'} color={AppColors.purple} size={10}/>
|
|
49
50
|
</View>)}
|
|
50
51
|
</Pressable>
|
|
51
52
|
<TouchableScale onPress={() => copyToClipboard(value, headerKey)} hitSlop={8} style={styles.htCopyBtn}>
|
|
@@ -8,7 +8,7 @@ import FeatureUnderDevNotice from './FeatureUnderDevNotice';
|
|
|
8
8
|
import { AppColors } from '../../styles/AppColors';
|
|
9
9
|
import { AppFonts } from '../../styles/AppFonts';
|
|
10
10
|
import { copyToClipboard } from '../../helpers';
|
|
11
|
-
import { PackageIcon, SearchIcon, ClearIcon, CircleAlertIcon, LayersIcon, TimelineIcon, LiveStateIcon, StorageIcon, MetadataIcon, FolderIcon, FolderOpenIcon, TrashIcon, LightbulbIcon, SparkleIcon, ClockIcon, RefreshCcwIcon, ExternalLinkIcon, DownloadIcon, } from '../NetworkIcons';
|
|
11
|
+
import { PackageIcon, SearchIcon, ClearIcon, CircleAlertIcon, LayersIcon, TimelineIcon, LiveStateIcon, StorageIcon, MetadataIcon, FolderIcon, FolderOpenIcon, TrashIcon, LightbulbIcon, SparkleIcon, ClockIcon, RefreshCcwIcon, ExternalLinkIcon, DownloadIcon, ChevronIcon, } from '../NetworkIcons';
|
|
12
12
|
import Svg, { Path, Rect, Circle, Ellipse, G, Defs, LinearGradient, Stop, } from 'react-native-svg';
|
|
13
13
|
import { analyzeHostAppBundle, getCachedBundleAnalysis, getInitialBundleAnalysis, getHostScriptURL, } from '../../customHooks/bundleAnalyzer';
|
|
14
14
|
const PackageLogoRenderer = ({ name, size = 28 }) => {
|
|
@@ -378,9 +378,9 @@ const BundleTreeNodeView = ({ node, level, search, totalBundleKb, expandedFolder
|
|
|
378
378
|
? `${(node.sizeKb / 1024).toFixed(2)} MB`
|
|
379
379
|
: `${node.sizeKb} KB`}`} accessibilityState={{ expanded: isExpanded }} accessibilityHint="Double tap to expand or collapse folder" onPress={() => toggleFolder(node.fullPath)} style={[bundleStyles.treeFolderRow, { paddingLeft: indentLeft }]}>
|
|
380
380
|
<View style={bundleStyles.treeRowLeft}>
|
|
381
|
-
<
|
|
382
|
-
{isCollapsed ? '
|
|
383
|
-
</
|
|
381
|
+
<View style={{ marginRight: 4 }}>
|
|
382
|
+
<ChevronIcon direction={isCollapsed ? 'right' : 'down'} size={12} color={AppColors.grayTextWeak}/>
|
|
383
|
+
</View>
|
|
384
384
|
{isCollapsed ? (<FolderIcon color={AppColors.amber500} size={15}/>) : (<FolderOpenIcon color={AppColors.amber500} size={15}/>)}
|
|
385
385
|
<HighlightText text={node.name + '/'} search={search} style={bundleStyles.treeFolderName} highlightStyle={bundleStyles.searchHighlight}/>
|
|
386
386
|
<View style={bundleStyles.treeCountBadge}>
|
|
@@ -836,7 +836,7 @@ const BundleTab = React.memo(() => {
|
|
|
836
836
|
letterSpacing: 0.3,
|
|
837
837
|
textTransform: 'uppercase',
|
|
838
838
|
}}>
|
|
839
|
-
Live Metro URL
|
|
839
|
+
Live Metro URL
|
|
840
840
|
</Text>
|
|
841
841
|
</View>
|
|
842
842
|
<Text style={{
|
|
@@ -7,7 +7,7 @@ import TouchableScale from '../TouchableScale';
|
|
|
7
7
|
import { copyToClipboard } from '../../helpers';
|
|
8
8
|
import { showToast } from '../../helpers/toast';
|
|
9
9
|
import { useTranslation } from '../../i18n';
|
|
10
|
-
import { BoltIcon, SmartphoneIcon, PackageIcon, RepeatIcon, } from '../NetworkIcons';
|
|
10
|
+
import { BoltIcon, SmartphoneIcon, PackageIcon, RepeatIcon, InfoCircleIcon, } from '../NetworkIcons';
|
|
11
11
|
const COMMON_PORTS = [8081, 8082, 8083, 19000];
|
|
12
12
|
export const DebuggingTab = () => {
|
|
13
13
|
const { t } = useTranslation();
|
|
@@ -90,6 +90,7 @@ export const DebuggingTab = () => {
|
|
|
90
90
|
probePorts();
|
|
91
91
|
}, [probePorts]);
|
|
92
92
|
const metroBundleUrl = `http://${hostIp}:${selectedPort}/index.bundle?platform=android&dev=true`;
|
|
93
|
+
const directServerUrl = `http://${hostIp}:${selectedPort}`;
|
|
93
94
|
const apkDownloadUrl = `http://${hostIp}:${selectedPort}/${apkPath}`;
|
|
94
95
|
const devSettingsHost = `${hostIp}:${selectedPort}`;
|
|
95
96
|
const currentQrValue = useMemo(() => {
|
|
@@ -97,8 +98,8 @@ export const DebuggingTab = () => {
|
|
|
97
98
|
return apkDownloadUrl;
|
|
98
99
|
if (activeQrTab === 'host')
|
|
99
100
|
return devSettingsHost;
|
|
100
|
-
return
|
|
101
|
-
}, [activeQrTab, apkDownloadUrl, devSettingsHost,
|
|
101
|
+
return directServerUrl;
|
|
102
|
+
}, [activeQrTab, apkDownloadUrl, devSettingsHost, directServerUrl]);
|
|
102
103
|
const activePortInfo = portsStatus[selectedPort];
|
|
103
104
|
return (<ScrollView style={styles.container} contentContainerStyle={styles.content} showsVerticalScrollIndicator={false}>
|
|
104
105
|
|
|
@@ -124,10 +125,10 @@ export const DebuggingTab = () => {
|
|
|
124
125
|
</View>
|
|
125
126
|
<Text style={styles.serverSubtitle}>
|
|
126
127
|
{activePortInfo?.status === 'active'
|
|
127
|
-
?
|
|
128
|
+
? `Active & Bundling (${activePortInfo.latencyMs}ms)`
|
|
128
129
|
: activePortInfo?.status === 'checking'
|
|
129
|
-
? '
|
|
130
|
-
: '
|
|
130
|
+
? 'Probing Metro Ports...'
|
|
131
|
+
: 'Standby / Select active port'}
|
|
131
132
|
</Text>
|
|
132
133
|
</View>
|
|
133
134
|
</View>
|
|
@@ -192,9 +193,12 @@ export const DebuggingTab = () => {
|
|
|
192
193
|
<TextInput style={styles.input} value={hostIp} onChangeText={setHostIp} placeholder="192.168.1.15" placeholderTextColor={AppColors.grayTextWeak} autoCapitalize="none" autoCorrect={false}/>
|
|
193
194
|
<Text style={styles.inputSuffix}>:{selectedPort}</Text>
|
|
194
195
|
</View>
|
|
195
|
-
<
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, marginTop: 6 }}>
|
|
197
|
+
<InfoCircleIcon size={13} color={AppColors.grayTextWeak}/>
|
|
198
|
+
<Text style={[styles.inputHint, { marginTop: 0, flex: 1 }]}>
|
|
199
|
+
Ensure your physical Android device and Mac are connected to the same Wi-Fi network.
|
|
200
|
+
</Text>
|
|
201
|
+
</View>
|
|
198
202
|
</View>
|
|
199
203
|
|
|
200
204
|
|
|
@@ -246,13 +250,16 @@ export const DebuggingTab = () => {
|
|
|
246
250
|
<QRCodeView value={currentQrValue} size={190} color={AppColors.primaryBlack} backgroundColor={AppColors.white}/>
|
|
247
251
|
|
|
248
252
|
<View style={styles.qrInfoBox}>
|
|
249
|
-
<
|
|
250
|
-
{activeQrTab === 'apk'
|
|
251
|
-
|
|
253
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 5, marginBottom: 2 }}>
|
|
254
|
+
{activeQrTab === 'apk' ? (<PackageIcon size={14} color={AppColors.purple}/>) : activeQrTab === 'host' ? (<SmartphoneIcon size={14} color={AppColors.purple}/>) : (<BoltIcon size={14} color={AppColors.amber500}/>)}
|
|
255
|
+
<Text style={styles.qrTargetTitle}>
|
|
256
|
+
{activeQrTab === 'apk'
|
|
257
|
+
? 'Direct APK Download URL'
|
|
252
258
|
: activeQrTab === 'host'
|
|
253
|
-
? '
|
|
254
|
-
: '
|
|
255
|
-
|
|
259
|
+
? 'Dev Settings Bundle Host'
|
|
260
|
+
: 'Live Metro Fast-Refresh Endpoint'}
|
|
261
|
+
</Text>
|
|
262
|
+
</View>
|
|
256
263
|
<Text style={styles.qrTargetUrl} numberOfLines={2} ellipsizeMode="middle">
|
|
257
264
|
{currentQrValue}
|
|
258
265
|
</Text>
|
|
@@ -278,7 +285,10 @@ export const DebuggingTab = () => {
|
|
|
278
285
|
|
|
279
286
|
|
|
280
287
|
<View style={styles.guideCard}>
|
|
281
|
-
<
|
|
288
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, marginBottom: 12 }}>
|
|
289
|
+
<SmartphoneIcon size={15} color={AppColors.primaryLight}/>
|
|
290
|
+
<Text style={[styles.guideHeading, { marginBottom: 0 }]}>HOW TO CONNECT ANDROID DEVICE:</Text>
|
|
291
|
+
</View>
|
|
282
292
|
|
|
283
293
|
<View style={styles.stepRow}>
|
|
284
294
|
<View style={styles.stepNumberBadge}>
|
|
@@ -309,7 +319,10 @@ export const DebuggingTab = () => {
|
|
|
309
319
|
<Text style={styles.stepNumberText}>3</Text>
|
|
310
320
|
</View>
|
|
311
321
|
<View style={{ flex: 1 }}>
|
|
312
|
-
<
|
|
322
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
323
|
+
<Text style={styles.stepTitle}>Simultaneous Live Fast-Refresh</Text>
|
|
324
|
+
<BoltIcon size={13} color={AppColors.amber500}/>
|
|
325
|
+
</View>
|
|
313
326
|
<Text style={styles.stepDesc}>
|
|
314
327
|
Any changes saved in VS Code will immediately update <Text style={{ fontWeight: '700' }}>both the iOS Simulator and physical Android phone</Text> in real-time!
|
|
315
328
|
</Text>
|
|
@@ -298,7 +298,7 @@ const NetworkDetail = React.memo(() => {
|
|
|
298
298
|
letterSpacing: 0.4,
|
|
299
299
|
textTransform: 'uppercase',
|
|
300
300
|
}}>
|
|
301
|
-
ENDPOINT URL
|
|
301
|
+
ENDPOINT URL
|
|
302
302
|
</Text>
|
|
303
303
|
</View>
|
|
304
304
|
|
|
@@ -333,7 +333,7 @@ const NetworkDetail = React.memo(() => {
|
|
|
333
333
|
fontSize: 9,
|
|
334
334
|
color: AppColors.sky600,
|
|
335
335
|
}}>
|
|
336
|
-
Open
|
|
336
|
+
Open
|
|
337
337
|
</Text>
|
|
338
338
|
</View>
|
|
339
339
|
</View>
|
|
@@ -5,7 +5,7 @@ import { AppColors } from '../../styles/AppColors';
|
|
|
5
5
|
import { AppFonts } from '../../styles/AppFonts';
|
|
6
6
|
import { useTranslation } from '../../i18n';
|
|
7
7
|
import { METHOD_COLORS } from '../../constants';
|
|
8
|
-
import { FilterIcon, CloseWhite, CircleCheckIcon, CircleAlertIcon, CircleXIcon, LayersIcon, RepeatIcon, ShieldAlertIcon, } from '../NetworkIcons';
|
|
8
|
+
import { FilterIcon, CloseWhite, ClockIcon, CircleCheckIcon, CircleAlertIcon, CircleXIcon, LayersIcon, RepeatIcon, ShieldAlertIcon, BoltIcon, GlobeIcon, LockIcon, UnlockIcon, RocketIcon, TurtleIcon, HourglassIcon, PackageIcon, } from '../NetworkIcons';
|
|
9
9
|
import TouchableScale from '../TouchableScale';
|
|
10
10
|
export const DEFAULT_NETWORK_FILTERS = {
|
|
11
11
|
statusCodes: new Set(['all']),
|
|
@@ -330,12 +330,13 @@ export const NetworkFilterModal = ({ visible, onClose, filters, onApply, searchQ
|
|
|
330
330
|
<Text style={styles.sectionTitle}>LATENCY & SPEED</Text>
|
|
331
331
|
<View style={styles.chipsWrap}>
|
|
332
332
|
{[
|
|
333
|
-
{ key: 'all', label: 'All Speeds', color: AppColors.purple },
|
|
334
|
-
{ key: 'fast', label: '
|
|
335
|
-
{ key: 'normal', label: '
|
|
336
|
-
{ key: 'slow', label: '
|
|
333
|
+
{ key: 'all', label: 'All Speeds', color: AppColors.purple, icon: LayersIcon },
|
|
334
|
+
{ key: 'fast', label: 'Fast (<200ms)', color: AppColors.greenColor, icon: BoltIcon, count: counts.fastCount },
|
|
335
|
+
{ key: 'normal', label: 'Normal (200-500ms)', color: AppColors.skyBlue, icon: ClockIcon, count: counts.normalCount },
|
|
336
|
+
{ key: 'slow', label: 'Slow (>500ms)', color: AppColors.errorColor, icon: CircleAlertIcon, count: counts.slowCount },
|
|
337
337
|
].map(item => {
|
|
338
338
|
const isSelected = draft.latency === item.key;
|
|
339
|
+
const IconComp = item.icon;
|
|
339
340
|
return (<TouchableOpacity key={item.key} activeOpacity={0.7} onPress={() => setDraft(prev => ({ ...prev, latency: item.key }))} style={[
|
|
340
341
|
styles.chip,
|
|
341
342
|
isSelected && {
|
|
@@ -343,6 +344,7 @@ export const NetworkFilterModal = ({ visible, onClose, filters, onApply, searchQ
|
|
|
343
344
|
borderColor: item.color,
|
|
344
345
|
},
|
|
345
346
|
]}>
|
|
347
|
+
<IconComp size={13} color={isSelected ? item.color : AppColors.grayTextWeak}/>
|
|
346
348
|
<Text style={[
|
|
347
349
|
styles.chipLabel,
|
|
348
350
|
isSelected && { color: item.color, fontFamily: AppFonts.interBold },
|
|
@@ -364,11 +366,12 @@ export const NetworkFilterModal = ({ visible, onClose, filters, onApply, searchQ
|
|
|
364
366
|
<Text style={styles.sectionTitle}>PROTOCOL</Text>
|
|
365
367
|
<View style={styles.chipsWrap}>
|
|
366
368
|
{[
|
|
367
|
-
{ key: 'all', label: 'All Protocols', color: AppColors.purple },
|
|
368
|
-
{ key: 'https', label: '
|
|
369
|
-
{ key: 'http', label: '
|
|
369
|
+
{ key: 'all', label: 'All Protocols', color: AppColors.purple, icon: GlobeIcon },
|
|
370
|
+
{ key: 'https', label: 'HTTPS Secure', color: AppColors.mintGreenText, icon: LockIcon, count: counts.httpsCount },
|
|
371
|
+
{ key: 'http', label: 'HTTP Insecure', color: AppColors.amber700, icon: UnlockIcon, count: counts.httpCount },
|
|
370
372
|
].map(item => {
|
|
371
373
|
const isSelected = draft.protocol === item.key;
|
|
374
|
+
const IconComp = item.icon;
|
|
372
375
|
return (<TouchableOpacity key={item.key} activeOpacity={0.7} onPress={() => setDraft(prev => ({ ...prev, protocol: item.key }))} style={[
|
|
373
376
|
styles.chip,
|
|
374
377
|
isSelected && {
|
|
@@ -376,6 +379,7 @@ export const NetworkFilterModal = ({ visible, onClose, filters, onApply, searchQ
|
|
|
376
379
|
borderColor: item.color,
|
|
377
380
|
},
|
|
378
381
|
]}>
|
|
382
|
+
<IconComp size={13} color={isSelected ? item.color : AppColors.grayTextWeak}/>
|
|
379
383
|
<Text style={[
|
|
380
384
|
styles.chipLabel,
|
|
381
385
|
isSelected && { color: item.color, fontFamily: AppFonts.interBold },
|
|
@@ -397,13 +401,14 @@ export const NetworkFilterModal = ({ visible, onClose, filters, onApply, searchQ
|
|
|
397
401
|
<Text style={styles.sectionTitle}>SORT BY</Text>
|
|
398
402
|
<View style={styles.chipsWrap}>
|
|
399
403
|
{[
|
|
400
|
-
{ key: 'time_desc', label: '
|
|
401
|
-
{ key: 'time_asc', label: '
|
|
402
|
-
{ key: 'duration_desc', label: '
|
|
403
|
-
{ key: 'duration_asc', label: '
|
|
404
|
-
{ key: 'size_desc', label: '
|
|
404
|
+
{ key: 'time_desc', label: 'Newest First (Default)', icon: ClockIcon },
|
|
405
|
+
{ key: 'time_asc', label: 'Oldest First', icon: HourglassIcon },
|
|
406
|
+
{ key: 'duration_desc', label: 'Slowest Response', icon: TurtleIcon },
|
|
407
|
+
{ key: 'duration_asc', label: 'Fastest Response', icon: RocketIcon },
|
|
408
|
+
{ key: 'size_desc', label: 'Largest Response Size', icon: PackageIcon },
|
|
405
409
|
].map(item => {
|
|
406
410
|
const isSelected = draft.sortBy === item.key;
|
|
411
|
+
const IconComp = item.icon;
|
|
407
412
|
return (<TouchableOpacity key={item.key} activeOpacity={0.7} onPress={() => setDraft(prev => ({ ...prev, sortBy: item.key }))} style={[
|
|
408
413
|
styles.chip,
|
|
409
414
|
isSelected && {
|
|
@@ -411,6 +416,7 @@ export const NetworkFilterModal = ({ visible, onClose, filters, onApply, searchQ
|
|
|
411
416
|
borderColor: AppColors.purple,
|
|
412
417
|
},
|
|
413
418
|
]}>
|
|
419
|
+
<IconComp size={13} color={isSelected ? AppColors.purple : AppColors.grayTextWeak}/>
|
|
414
420
|
<Text style={[
|
|
415
421
|
styles.chipLabel,
|
|
416
422
|
isSelected && { color: AppColors.purple, fontFamily: AppFonts.interBold },
|
|
@@ -5,7 +5,7 @@ import globalStyles from '../../styles';
|
|
|
5
5
|
import { AppColors } from '../../styles/AppColors';
|
|
6
6
|
import { AppFonts } from '../../styles/AppFonts';
|
|
7
7
|
import { useTranslation } from '../../i18n';
|
|
8
|
-
import { DatabaseIcon, SearchIcon, ClearIcon, PlusIcon, PencilIcon, TrashIcon, CopyIcon, CheckIcon, LayersIcon, ResetIcon, ChevronIcon, } from '../NetworkIcons';
|
|
8
|
+
import { DatabaseIcon, SearchIcon, ClearIcon, PlusIcon, PencilIcon, TrashIcon, CopyIcon, CheckIcon, LayersIcon, ResetIcon, ChevronIcon, WarningTriangleIcon, } from '../NetworkIcons';
|
|
9
9
|
import { fetchStorageEntries, setStorageEntry, removeStorageEntry, clearStorageDriver, isAsyncStorageConnected, isMMKVConnected, getRegisteredMMKVInstanceIds, subscribeToStorageChanges, } from '../../customHooks/storageInspector';
|
|
10
10
|
import { copyToClipboard } from '../../helpers';
|
|
11
11
|
import { showToast } from '../../helpers/toast';
|
|
@@ -88,9 +88,12 @@ const StorageEntryCard = React.memo(function StorageEntryCard({ entry, isExpande
|
|
|
88
88
|
<Text style={styles.valuePreviewText} numberOfLines={isExpanded ? undefined : 3} selectable={isExpanded}>
|
|
89
89
|
{displayValue}
|
|
90
90
|
</Text>
|
|
91
|
-
{entry.value.length > 80 && (<
|
|
92
|
-
{
|
|
93
|
-
|
|
91
|
+
{entry.value.length > 80 && (<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4, marginTop: 4 }}>
|
|
92
|
+
<Text style={styles.expandHint}>
|
|
93
|
+
{isExpanded ? 'Collapse' : 'Expand'}
|
|
94
|
+
</Text>
|
|
95
|
+
<ChevronIcon direction={isExpanded ? 'up' : 'down'} size={10} color={AppColors.purple}/>
|
|
96
|
+
</View>)}
|
|
94
97
|
</TouchableScale>
|
|
95
98
|
</View>);
|
|
96
99
|
});
|
|
@@ -465,7 +468,10 @@ export const StorageTab = React.memo(() => {
|
|
|
465
468
|
: editType === 'boolean'
|
|
466
469
|
? 'true'
|
|
467
470
|
: 'String value...'} placeholderTextColor={AppColors.grayTextWeak} style={[styles.textInput, styles.textAreaInput]} multiline textAlignVertical="top" autoCapitalize="none"/>
|
|
468
|
-
{jsonError && (<
|
|
471
|
+
{jsonError && (<View style={{ flexDirection: 'row', alignItems: 'center', gap: 5, marginTop: 4 }}>
|
|
472
|
+
<WarningTriangleIcon size={12} color={AppColors.errorColor}/>
|
|
473
|
+
<Text style={styles.errorText}>{jsonError}</Text>
|
|
474
|
+
</View>)}
|
|
469
475
|
</View>
|
|
470
476
|
|
|
471
477
|
|
|
@@ -5,7 +5,7 @@ import TreeNode from './TreeNode';
|
|
|
5
5
|
import SegmentedTabs from './SegmentedTabs';
|
|
6
6
|
import HighlightText from './HighlightText';
|
|
7
7
|
import CopyButton from './CopyButton';
|
|
8
|
-
import { PrettyIcon, RawIcon, TableIcon } from './NetworkIcons';
|
|
8
|
+
import { PrettyIcon, RawIcon, TableIcon, ChevronIcon } from './NetworkIcons';
|
|
9
9
|
import { AppColors } from '../styles/AppColors';
|
|
10
10
|
import { AppFonts } from '../styles/AppFonts';
|
|
11
11
|
import styles from '../styles';
|
|
@@ -44,10 +44,11 @@ const JsonTableRow = React.memo(({ itemKey, val, search, }) => {
|
|
|
44
44
|
localStyles.tableCellValue,
|
|
45
45
|
isObject && localStyles.tableCellRawCode,
|
|
46
46
|
]} highlightStyle={localStyles.highlight} numberOfLines={expanded ? undefined : 3} selectable={true}/>
|
|
47
|
-
{isMultiline && (<TouchableOpacity onPress={() => setExpanded(prev => !prev)} hitSlop={6} style={localStyles.showMoreBtn}>
|
|
47
|
+
{isMultiline && (<TouchableOpacity onPress={() => setExpanded(prev => !prev)} hitSlop={6} style={[localStyles.showMoreBtn, { flexDirection: 'row', alignItems: 'center', gap: 4 }]}>
|
|
48
48
|
<Text style={localStyles.showMoreText}>
|
|
49
|
-
{expanded ? 'Show less
|
|
49
|
+
{expanded ? 'Show less' : 'Show more'}
|
|
50
50
|
</Text>
|
|
51
|
+
<ChevronIcon direction={expanded ? 'up' : 'down'} size={10} color={AppColors.purple}/>
|
|
51
52
|
</TouchableOpacity>)}
|
|
52
53
|
</View>
|
|
53
54
|
</View>);
|
|
@@ -37,7 +37,7 @@ export declare const SignalIcon: ({ color, size, }: IconProps) => React.JSX.Elem
|
|
|
37
37
|
export declare const DiffIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
38
38
|
export declare const GlobeIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
39
39
|
export declare const SortArrowIcon: ({ color, size, direction, }: IconProps) => React.JSX.Element;
|
|
40
|
-
export declare const ChevronIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
40
|
+
export declare const ChevronIcon: ({ color, size, direction, }: IconProps) => React.JSX.Element;
|
|
41
41
|
export declare const FilterIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
42
42
|
export declare const DownloadIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
43
43
|
export declare const CloseWhite: ({ color, size }: IconProps) => React.JSX.Element;
|
|
@@ -135,3 +135,6 @@ export declare const PencilIcon: ({ color, size, }: IconProps) => React.JSX.Elem
|
|
|
135
135
|
export declare const PlusIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
136
136
|
export declare const LockIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
137
137
|
export declare const QrCodeIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
138
|
+
export declare const UnlockIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
139
|
+
export declare const RocketIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
140
|
+
export declare const TurtleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
@@ -167,9 +167,16 @@ export const SortArrowIcon = ({ color = AppColors.primaryLight, size = 20, direc
|
|
|
167
167
|
</>)}
|
|
168
168
|
</Svg>);
|
|
169
169
|
};
|
|
170
|
-
export const ChevronIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => {
|
|
170
|
+
export const ChevronIcon = ({ color = AppColors.grayTextWeak, size = 14, direction = 'down', }) => {
|
|
171
|
+
let path = 'M6 9l6 6 6-6';
|
|
172
|
+
if (direction === 'up')
|
|
173
|
+
path = 'M18 15l-6-6-6 6';
|
|
174
|
+
else if (direction === 'right')
|
|
175
|
+
path = 'M9 18l6-6-6-6';
|
|
176
|
+
else if (direction === 'left')
|
|
177
|
+
path = 'M15 18l-6-6 6-6';
|
|
171
178
|
return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
172
|
-
<Path d=
|
|
179
|
+
<Path d={path} stroke={color} strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"/>
|
|
173
180
|
</Svg>);
|
|
174
181
|
};
|
|
175
182
|
export const FilterIcon = ({ color = AppColors.grayTextWeak, size = 18, }) => {
|
|
@@ -740,3 +747,16 @@ export const QrCodeIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<
|
|
|
740
747
|
<Rect x="3" y="14" width="7" height="7" rx="1.5" stroke={color} strokeWidth="2"/>
|
|
741
748
|
<Path d="M14 14h3v3h-3zM18 18h3v3h-3zM14 19h3v2h-3zM19 14h2v3h-2z" fill={color}/>
|
|
742
749
|
</Svg>);
|
|
750
|
+
export const UnlockIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
751
|
+
<Rect x="3" y="11" width="18" height="11" rx="2" ry="2" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
752
|
+
<Path d="M7 11V7a5 5 0 0 1 9.9-1" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
753
|
+
</Svg>);
|
|
754
|
+
export const RocketIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
755
|
+
<Path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09zM12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6.05 11a22.35 22.35 0 0 1-3.95 2z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
756
|
+
<Path d="M9 12l-4 4M15 6l-3 3" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
757
|
+
</Svg>);
|
|
758
|
+
export const TurtleIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
759
|
+
<Ellipse cx="12" cy="14" rx="7" ry="5" stroke={color} strokeWidth="2"/>
|
|
760
|
+
<Circle cx="12" cy="6" r="3" stroke={color} strokeWidth="2"/>
|
|
761
|
+
<Path d="M5 12l-2-2M19 12l2-2M6 18l-2 2M18 18l2 2" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
762
|
+
</Svg>);
|
|
@@ -3,24 +3,27 @@ import { View, StyleSheet } from 'react-native';
|
|
|
3
3
|
import Svg, { Rect, G } from 'react-native-svg';
|
|
4
4
|
import { generateQRMatrix } from '../helpers/qrGenerator';
|
|
5
5
|
import { AppColors } from '../styles/AppColors';
|
|
6
|
-
export const QRCodeView = ({ value, size =
|
|
7
|
-
const matrix = useMemo(() => generateQRMatrix(value), [value]);
|
|
8
|
-
const numCells = matrix.length;
|
|
9
|
-
const
|
|
6
|
+
export const QRCodeView = ({ value, size = 200, color = '#000000', backgroundColor = '#FFFFFF', }) => {
|
|
7
|
+
const matrix = useMemo(() => generateQRMatrix(value || 'http://localhost:8081'), [value]);
|
|
8
|
+
const numCells = matrix.length || 21;
|
|
9
|
+
const margin = 3;
|
|
10
|
+
const totalCells = numCells + margin * 2;
|
|
11
|
+
const cellSize = size / totalCells;
|
|
10
12
|
return (<View style={[
|
|
11
13
|
styles.container,
|
|
12
14
|
{
|
|
13
|
-
width: size +
|
|
14
|
-
height: size +
|
|
15
|
+
width: size + 20,
|
|
16
|
+
height: size + 20,
|
|
15
17
|
backgroundColor,
|
|
16
18
|
},
|
|
17
19
|
]}>
|
|
18
20
|
<Svg width={size} height={size} viewBox={`0 0 ${size} ${size}`}>
|
|
21
|
+
<Rect width={size} height={size} fill={backgroundColor}/>
|
|
19
22
|
<G>
|
|
20
23
|
{matrix.map((row, r) => row.map((cell, c) => {
|
|
21
24
|
if (!cell)
|
|
22
25
|
return null;
|
|
23
|
-
return (<Rect key={`${r}-${c}`} x={c * cellSize} y={r * cellSize} width={cellSize + 0.
|
|
26
|
+
return (<Rect key={`${r}-${c}`} x={(c + margin) * cellSize} y={(r + margin) * cellSize} width={cellSize + 0.3} height={cellSize + 0.3} fill={color}/>);
|
|
24
27
|
}))}
|
|
25
28
|
</G>
|
|
26
29
|
</Svg>
|
|
@@ -28,15 +31,15 @@ export const QRCodeView = ({ value, size = 180, color = AppColors.primaryBlack,
|
|
|
28
31
|
};
|
|
29
32
|
const styles = StyleSheet.create({
|
|
30
33
|
container: {
|
|
31
|
-
padding:
|
|
34
|
+
padding: 10,
|
|
32
35
|
borderRadius: 14,
|
|
33
36
|
alignItems: 'center',
|
|
34
37
|
justifyContent: 'center',
|
|
35
38
|
shadowColor: AppColors.black,
|
|
36
|
-
shadowOffset: { width: 0, height:
|
|
37
|
-
shadowOpacity: 0.
|
|
38
|
-
shadowRadius:
|
|
39
|
-
elevation:
|
|
39
|
+
shadowOffset: { width: 0, height: 3 },
|
|
40
|
+
shadowOpacity: 0.15,
|
|
41
|
+
shadowRadius: 8,
|
|
42
|
+
elevation: 4,
|
|
40
43
|
},
|
|
41
44
|
});
|
|
42
45
|
export default QRCodeView;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ENC_MID = "
|
|
2
|
-
export declare const ENC_SEC = "
|
|
3
|
-
export declare const TELEMETRY_SALT = "
|
|
1
|
+
export declare const ENC_MID = "";
|
|
2
|
+
export declare const ENC_SEC = "";
|
|
3
|
+
export declare const TELEMETRY_SALT = "";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const ENC_MID = '
|
|
2
|
-
export const ENC_SEC = '
|
|
3
|
-
export const TELEMETRY_SALT = '
|
|
1
|
+
export const ENC_MID = '';
|
|
2
|
+
export const ENC_SEC = '';
|
|
3
|
+
export const TELEMETRY_SALT = '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.3.
|
|
1
|
+
export declare const LIB_VERSION = "2.3.13";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = '2.3.
|
|
1
|
+
export const LIB_VERSION = '2.3.13';
|