react-native-inapp-inspector 1.1.34 → 1.1.35
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/ConsoleLogCard.js +57 -56
- package/dist/commonjs/components/CopyButton.js +7 -1
- package/dist/commonjs/components/Inspector/BundleTab.js +19 -19
- package/dist/commonjs/components/Inspector/CrashDetail.js +16 -12
- package/dist/commonjs/components/Inspector/InspectorHeader.js +16 -16
- package/dist/commonjs/components/Inspector/MainScreen.js +6 -2
- package/dist/commonjs/components/Inspector/NetworkTab.js +97 -1
- package/dist/commonjs/components/Inspector/ReduxDetail.js +24 -19
- package/dist/commonjs/components/Inspector/ReduxTab.js +12 -8
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1243 -673
- package/dist/commonjs/components/LogCard.js +27 -9
- package/dist/commonjs/components/MetaAccordion.js +42 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +9 -0
- package/dist/commonjs/components/NetworkIcons.js +48 -1
- package/dist/commonjs/components/Toast.js +3 -3
- package/dist/commonjs/components/TouchableScale.d.ts +4 -2
- package/dist/commonjs/components/TouchableScale.js +4 -4
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +10 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +2 -0
- package/dist/commonjs/customHooks/bundleAnalyzer.js +26 -17
- package/dist/commonjs/customHooks/consoleLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/consoleLogger.js +10 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +2 -0
- package/dist/commonjs/customHooks/crashHandler.js +10 -1
- package/dist/commonjs/customHooks/networkLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/networkLogger.js +12 -1
- package/dist/commonjs/customHooks/performanceTracker.d.ts +3 -1
- package/dist/commonjs/customHooks/performanceTracker.js +18 -4
- package/dist/commonjs/customHooks/reduxLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/reduxLogger.js +10 -1
- package/dist/commonjs/i18n/locales/en.json +96 -28
- package/dist/commonjs/index.js +78 -34
- package/dist/commonjs/styles/AppColors.d.ts +28 -0
- package/dist/commonjs/styles/AppColors.js +30 -0
- package/dist/esm/components/ConsoleLogCard.js +58 -57
- package/dist/esm/components/CopyButton.js +7 -1
- package/dist/esm/components/Inspector/BundleTab.js +19 -19
- package/dist/esm/components/Inspector/CrashDetail.js +16 -12
- package/dist/esm/components/Inspector/InspectorHeader.js +16 -16
- package/dist/esm/components/Inspector/MainScreen.js +6 -2
- package/dist/esm/components/Inspector/NetworkTab.js +99 -3
- package/dist/esm/components/Inspector/ReduxDetail.js +24 -19
- package/dist/esm/components/Inspector/ReduxTab.js +12 -8
- package/dist/esm/components/Inspector/SettingsPanel.js +1246 -676
- package/dist/esm/components/LogCard.js +27 -9
- package/dist/esm/components/MetaAccordion.js +42 -0
- package/dist/esm/components/NetworkIcons.d.ts +9 -0
- package/dist/esm/components/NetworkIcons.js +38 -0
- package/dist/esm/components/Toast.js +3 -3
- package/dist/esm/components/TouchableScale.d.ts +4 -2
- package/dist/esm/components/TouchableScale.js +4 -4
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.d.ts +2 -0
- package/dist/esm/customHooks/analyticsLogger.js +7 -0
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +2 -0
- package/dist/esm/customHooks/bundleAnalyzer.js +23 -16
- package/dist/esm/customHooks/consoleLogger.d.ts +2 -0
- package/dist/esm/customHooks/consoleLogger.js +7 -0
- package/dist/esm/customHooks/crashHandler.d.ts +2 -0
- package/dist/esm/customHooks/crashHandler.js +7 -0
- package/dist/esm/customHooks/networkLogger.d.ts +2 -0
- package/dist/esm/customHooks/networkLogger.js +9 -0
- package/dist/esm/customHooks/performanceTracker.d.ts +3 -1
- package/dist/esm/customHooks/performanceTracker.js +15 -3
- package/dist/esm/customHooks/reduxLogger.d.ts +2 -0
- package/dist/esm/customHooks/reduxLogger.js +7 -0
- package/dist/esm/i18n/locales/en.json +96 -28
- package/dist/esm/index.js +64 -20
- package/dist/esm/styles/AppColors.d.ts +28 -0
- package/dist/esm/styles/AppColors.js +30 -0
- package/package.json +3 -2
|
@@ -26,44 +26,45 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
|
|
|
26
26
|
const getTagDecorator = (tag) => {
|
|
27
27
|
const clean = tag.replace(/[\[\]]/g, '').trim().toUpperCase();
|
|
28
28
|
if (clean === 'AXIOS') {
|
|
29
|
-
return { color: AppColors_1.AppColors.emerald600,
|
|
29
|
+
return { color: AppColors_1.AppColors.emerald600, Icon: NetworkIcons_1.ZapIcon, label: 'AXIOS' };
|
|
30
30
|
}
|
|
31
31
|
if (clean === 'API' || clean === 'FETCH' || clean === 'HTTP' || clean === 'NETWORK') {
|
|
32
|
-
return { color: AppColors_1.AppColors.sky600,
|
|
32
|
+
return { color: AppColors_1.AppColors.sky600, Icon: NetworkIcons_1.GlobeIcon, label: clean };
|
|
33
33
|
}
|
|
34
34
|
if (clean === 'SAMPLE' || clean === 'BATCH') {
|
|
35
|
-
return { color: AppColors_1.AppColors.indigo600Alt,
|
|
35
|
+
return { color: AppColors_1.AppColors.indigo600Alt, Icon: NetworkIcons_1.DiceIcon, label: clean };
|
|
36
36
|
}
|
|
37
37
|
if (clean === 'REDUX' || clean === 'STORE' || clean === 'STATE') {
|
|
38
|
-
return { color: AppColors_1.AppColors.violet600,
|
|
38
|
+
return { color: AppColors_1.AppColors.violet600, Icon: NetworkIcons_1.AtomIcon, label: clean };
|
|
39
39
|
}
|
|
40
40
|
if (clean === 'ANALYTICS' || clean === 'FIREBASE' || clean === 'GA4' || clean === 'GA') {
|
|
41
|
-
return { color: AppColors_1.AppColors.teal600,
|
|
41
|
+
return { color: AppColors_1.AppColors.teal600, Icon: NetworkIcons_1.BarChartIcon, label: clean };
|
|
42
42
|
}
|
|
43
43
|
if (clean === 'AUTH' || clean === 'TOKEN' || clean === 'SESSION') {
|
|
44
|
-
return { color: AppColors_1.AppColors.amber600,
|
|
44
|
+
return { color: AppColors_1.AppColors.amber600, Icon: NetworkIcons_1.KeyIcon, label: clean };
|
|
45
45
|
}
|
|
46
46
|
if (clean === 'APP') {
|
|
47
|
-
return { color: AppColors_1.AppColors.indigo600Alt,
|
|
47
|
+
return { color: AppColors_1.AppColors.indigo600Alt, Icon: NetworkIcons_1.SmartphoneIcon, label: 'APP' };
|
|
48
48
|
}
|
|
49
49
|
if (clean === 'TEST') {
|
|
50
|
-
return { color: AppColors_1.AppColors.emerald500,
|
|
50
|
+
return { color: AppColors_1.AppColors.emerald500, Icon: NetworkIcons_1.FlaskIcon, label: 'TEST' };
|
|
51
51
|
}
|
|
52
52
|
if (clean === 'WARN' || clean === 'WARNING') {
|
|
53
|
-
return { color: AppColors_1.AppColors.amber600,
|
|
53
|
+
return { color: AppColors_1.AppColors.amber600, Icon: NetworkIcons_1.AlertTriangleIcon, label: 'WARN' };
|
|
54
54
|
}
|
|
55
55
|
if (clean === 'ERROR' || clean === 'CRASH' || clean === 'BUG') {
|
|
56
|
-
return { color: AppColors_1.AppColors.red600,
|
|
56
|
+
return { color: AppColors_1.AppColors.red600, Icon: NetworkIcons_1.BugIcon, label: 'ERROR' };
|
|
57
57
|
}
|
|
58
58
|
if (clean === 'PERF' || clean === 'RENDER') {
|
|
59
|
-
return { color: AppColors_1.AppColors.violet500,
|
|
59
|
+
return { color: AppColors_1.AppColors.violet500, Icon: NetworkIcons_1.ZapIcon, label: clean };
|
|
60
60
|
}
|
|
61
|
-
return { color: AppColors_1.AppColors.slate600,
|
|
61
|
+
return { color: AppColors_1.AppColors.slate600, Icon: NetworkIcons_1.TagIcon, label: clean };
|
|
62
62
|
};
|
|
63
63
|
return (<react_native_1.View style={{ flexDirection: 'column', gap: 6 }}>
|
|
64
64
|
<react_native_1.View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 5 }}>
|
|
65
65
|
{tags.map((tag, i) => {
|
|
66
66
|
const dec = getTagDecorator(tag);
|
|
67
|
+
const IconComp = dec.Icon;
|
|
67
68
|
return (<react_native_1.View key={i} style={[
|
|
68
69
|
styles.prefixTag,
|
|
69
70
|
{
|
|
@@ -71,7 +72,7 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
|
|
|
71
72
|
borderColor: `${dec.color}35`,
|
|
72
73
|
},
|
|
73
74
|
]}>
|
|
74
|
-
<
|
|
75
|
+
<IconComp color={dec.color} size={10}/>
|
|
75
76
|
<react_native_1.Text style={[styles.prefixTagText, { color: dec.color }]}>
|
|
76
77
|
{dec.label}
|
|
77
78
|
</react_native_1.Text>
|
|
@@ -99,67 +100,67 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
99
100
|
const method = (item.sourceMethod || type).toLowerCase();
|
|
100
101
|
if (isAnalyticsError || type === 'error' || method === 'error') {
|
|
101
102
|
return {
|
|
102
|
-
border:
|
|
103
|
-
badgeBg:
|
|
104
|
-
badgeText:
|
|
103
|
+
border: AppColors_1.AppColors.errorColor,
|
|
104
|
+
badgeBg: AppColors_1.AppColors.errorCardBg,
|
|
105
|
+
badgeText: AppColors_1.AppColors.rose600,
|
|
105
106
|
label: 'ERROR',
|
|
106
|
-
cardBg:
|
|
107
|
-
methodBorder:
|
|
108
|
-
methodBg:
|
|
109
|
-
methodText:
|
|
110
|
-
textColor:
|
|
107
|
+
cardBg: AppColors_1.AppColors.errorCardBg,
|
|
108
|
+
methodBorder: AppColors_1.AppColors.errorBorder,
|
|
109
|
+
methodBg: AppColors_1.AppColors.errorCardBg,
|
|
110
|
+
methodText: AppColors_1.AppColors.rose600,
|
|
111
|
+
textColor: AppColors_1.AppColors.redErrorText,
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
if (type === 'warn' || method === 'warn') {
|
|
114
115
|
return {
|
|
115
|
-
border:
|
|
116
|
-
badgeBg:
|
|
117
|
-
badgeText:
|
|
116
|
+
border: AppColors_1.AppColors.amber600,
|
|
117
|
+
badgeBg: AppColors_1.AppColors.amberBg,
|
|
118
|
+
badgeText: AppColors_1.AppColors.amber700,
|
|
118
119
|
label: 'WARN',
|
|
119
|
-
cardBg:
|
|
120
|
-
methodBorder:
|
|
121
|
-
methodBg:
|
|
122
|
-
methodText:
|
|
123
|
-
textColor:
|
|
120
|
+
cardBg: AppColors_1.AppColors.amberWarmBg,
|
|
121
|
+
methodBorder: AppColors_1.AppColors.amberWarmBorder,
|
|
122
|
+
methodBg: AppColors_1.AppColors.amberBg,
|
|
123
|
+
methodText: AppColors_1.AppColors.amber700,
|
|
124
|
+
textColor: AppColors_1.AppColors.amberWarmText,
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
127
|
if (type === 'debug' || method === 'debug') {
|
|
127
128
|
return {
|
|
128
|
-
border:
|
|
129
|
-
badgeBg:
|
|
130
|
-
badgeText:
|
|
129
|
+
border: AppColors_1.AppColors.purple500,
|
|
130
|
+
badgeBg: AppColors_1.AppColors.violetSoftBg,
|
|
131
|
+
badgeText: AppColors_1.AppColors.violetSoftText,
|
|
131
132
|
label: 'DEBUG',
|
|
132
|
-
cardBg:
|
|
133
|
-
methodBorder:
|
|
134
|
-
methodBg:
|
|
135
|
-
methodText:
|
|
136
|
-
textColor:
|
|
133
|
+
cardBg: AppColors_1.AppColors.purpleShade50,
|
|
134
|
+
methodBorder: AppColors_1.AppColors.violetSoftBorder,
|
|
135
|
+
methodBg: AppColors_1.AppColors.violetSoftBg,
|
|
136
|
+
methodText: AppColors_1.AppColors.violetSoftText,
|
|
137
|
+
textColor: AppColors_1.AppColors.purpleText,
|
|
137
138
|
};
|
|
138
139
|
}
|
|
139
140
|
if (type === 'info' || method === 'info') {
|
|
140
141
|
return {
|
|
141
|
-
border:
|
|
142
|
-
badgeBg:
|
|
143
|
-
badgeText:
|
|
142
|
+
border: AppColors_1.AppColors.sky500,
|
|
143
|
+
badgeBg: AppColors_1.AppColors.skySoftBg,
|
|
144
|
+
badgeText: AppColors_1.AppColors.skySoftText,
|
|
144
145
|
label: 'INFO',
|
|
145
|
-
cardBg:
|
|
146
|
-
methodBorder:
|
|
147
|
-
methodBg:
|
|
148
|
-
methodText:
|
|
149
|
-
textColor:
|
|
146
|
+
cardBg: AppColors_1.AppColors.blueBg,
|
|
147
|
+
methodBorder: AppColors_1.AppColors.skySoftBorder,
|
|
148
|
+
methodBg: AppColors_1.AppColors.skySoftBg,
|
|
149
|
+
methodText: AppColors_1.AppColors.skySoftText,
|
|
150
|
+
textColor: AppColors_1.AppColors.blue800,
|
|
150
151
|
};
|
|
151
152
|
}
|
|
152
153
|
// Default / Standard console.log
|
|
153
154
|
return {
|
|
154
|
-
border:
|
|
155
|
-
badgeBg:
|
|
156
|
-
badgeText:
|
|
155
|
+
border: AppColors_1.AppColors.indigo500,
|
|
156
|
+
badgeBg: AppColors_1.AppColors.indigo50,
|
|
157
|
+
badgeText: AppColors_1.AppColors.indigo600Alt,
|
|
157
158
|
label: 'LOG',
|
|
158
|
-
cardBg:
|
|
159
|
-
methodBorder:
|
|
160
|
-
methodBg:
|
|
161
|
-
methodText:
|
|
162
|
-
textColor:
|
|
159
|
+
cardBg: AppColors_1.AppColors.primaryLight,
|
|
160
|
+
methodBorder: AppColors_1.AppColors.dividerColor,
|
|
161
|
+
methodBg: AppColors_1.AppColors.indigo50,
|
|
162
|
+
methodText: AppColors_1.AppColors.indigo600Alt,
|
|
163
|
+
textColor: AppColors_1.AppColors.primaryBlack,
|
|
163
164
|
};
|
|
164
165
|
};
|
|
165
166
|
const colors = getLogColors();
|
|
@@ -204,11 +205,11 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
204
205
|
{jsonContent && (<react_native_1.View style={[
|
|
205
206
|
styles.metaChip,
|
|
206
207
|
{
|
|
207
|
-
backgroundColor:
|
|
208
|
-
borderColor:
|
|
208
|
+
backgroundColor: AppColors_1.AppColors.mintGreenBg,
|
|
209
|
+
borderColor: AppColors_1.AppColors.mintGreenBorder,
|
|
209
210
|
},
|
|
210
211
|
]}>
|
|
211
|
-
<react_native_1.Text style={[styles.metaChipText, { color:
|
|
212
|
+
<react_native_1.Text style={[styles.metaChipText, { color: AppColors_1.AppColors.mintGreenText, fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
212
213
|
{Array.isArray(jsonContent.data)
|
|
213
214
|
? `Array[${jsonContent.data.length}]`
|
|
214
215
|
: `Object{${Object.keys(jsonContent.data).length}}`}
|
|
@@ -77,7 +77,13 @@ const CopyButton = react_1.default.memo(({ value, label, iconType = 'copy' }) =>
|
|
|
77
77
|
: iconType === 'fetch'
|
|
78
78
|
? NetworkIcons_1.FetchIcon
|
|
79
79
|
: NetworkIcons_1.CopyIcon;
|
|
80
|
-
return (<TouchableScale_1.default
|
|
80
|
+
return (<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel={label
|
|
81
|
+
? copied
|
|
82
|
+
? `${label} copied`
|
|
83
|
+
: `Copy ${label}`
|
|
84
|
+
: copied
|
|
85
|
+
? 'Copied to clipboard'
|
|
86
|
+
: 'Copy to clipboard'} accessibilityHint="Double tap to copy, long press to share" onPress={handlePress} onLongPress={handleLongPress} hitSlop={12} style={containerStyle}>
|
|
81
87
|
{copied ? (<NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.greenColor} size={14}/>) : (<IconComponent color={AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
82
88
|
</TouchableScale_1.default>);
|
|
83
89
|
});
|
|
@@ -419,7 +419,7 @@ const BundleTreeNodeView = ({ node, level, search, totalBundleKb, expandedFolder
|
|
|
419
419
|
const indentLeft = level * 16 + 10;
|
|
420
420
|
if (node.isFolder) {
|
|
421
421
|
return (<react_native_1.View style={bundleStyles.treeFolderBlock}>
|
|
422
|
-
<TouchableScale_1.default onPress={() => toggleFolder(node.fullPath)} style={[
|
|
422
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel={`Folder ${node.name}, ${node.fileCount} ${node.fileCount === 1 ? 'file' : 'files'}, ${node.sizeKb >= 1024 ? `${(node.sizeKb / 1024).toFixed(2)} MB` : `${node.sizeKb} KB`}`} accessibilityState={{ expanded: isExpanded }} accessibilityHint="Double tap to expand or collapse folder" onPress={() => toggleFolder(node.fullPath)} style={[
|
|
423
423
|
bundleStyles.treeFolderRow,
|
|
424
424
|
{ paddingLeft: indentLeft },
|
|
425
425
|
]}>
|
|
@@ -493,7 +493,7 @@ const BundleTreeNodeView = ({ node, level, search, totalBundleKb, expandedFolder
|
|
|
493
493
|
</react_native_1.View>
|
|
494
494
|
|
|
495
495
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 5 }}>
|
|
496
|
-
{onDownload && (<TouchableScale_1.default onPress={() => onDownload(file)} style={bundleStyles.treeActionBtn} hitSlop={8}>
|
|
496
|
+
{onDownload && (<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel={`Download source code for ${file.name}`} accessibilityHint="Fetches module source code from Metro dev server" onPress={() => onDownload(file)} style={bundleStyles.treeActionBtn} hitSlop={8}>
|
|
497
497
|
<NetworkIcons_1.DownloadIcon size={13} color={AppColors_1.AppColors.sky500}/>
|
|
498
498
|
</TouchableScale_1.default>)}
|
|
499
499
|
|
|
@@ -786,7 +786,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
786
786
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={{ flex: 1 }} contentContainerStyle={bundleStyles.subTabsScroll}>
|
|
787
787
|
{subTabs.map(tab => {
|
|
788
788
|
const isActive = activeSubTab === tab.key;
|
|
789
|
-
return (<TouchableScale_1.default key={tab.key} onPress={() => setActiveSubTab(tab.key)} style={[
|
|
789
|
+
return (<TouchableScale_1.default key={tab.key} accessible={true} accessibilityRole="tab" accessibilityLabel={`${tab.label} tab`} accessibilityState={{ selected: isActive }} accessibilityHint={`Switches to ${tab.label} tab`} onPress={() => setActiveSubTab(tab.key)} style={[
|
|
790
790
|
bundleStyles.subTabPill,
|
|
791
791
|
isActive && bundleStyles.subTabPillActive,
|
|
792
792
|
]}>
|
|
@@ -800,7 +800,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
800
800
|
</TouchableScale_1.default>);
|
|
801
801
|
})}
|
|
802
802
|
</react_native_1.ScrollView>
|
|
803
|
-
<TouchableScale_1.default onPress={refreshAnalysis} style={bundleStyles.reloadButton} hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}>
|
|
803
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel={isAnalyzing ? "Analyzing Metro bundle" : "Reload bundle analysis"} accessibilityHint="Re-probes Metro dev server and refreshes bundle statistics" onPress={refreshAnalysis} style={bundleStyles.reloadButton} hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}>
|
|
804
804
|
{isAnalyzing ? (<react_native_1.ActivityIndicator size="small" color={AppColors_1.AppColors.brandPurple}/>) : (<NetworkIcons_1.RefreshCcwIcon color={AppColors_1.AppColors.brandPurple} size={14}/>)}
|
|
805
805
|
</TouchableScale_1.default>
|
|
806
806
|
</react_native_1.View>
|
|
@@ -822,7 +822,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
822
822
|
<react_native_1.Text style={bundleStyles.heroSubtitle}>
|
|
823
823
|
{t('bundle.heroSubtitle')}
|
|
824
824
|
</react_native_1.Text>
|
|
825
|
-
<react_native_1.Pressable style={{
|
|
825
|
+
<react_native_1.Pressable accessible={true} accessibilityRole="link" accessibilityLabel={`Live Metro bundle URL: ${analysis.scriptURL}`} accessibilityHint="Opens Metro bundle script in browser" style={{
|
|
826
826
|
backgroundColor: `${AppColors_1.AppColors.skyBlue}10`,
|
|
827
827
|
borderColor: `${AppColors_1.AppColors.skyBlue}30`,
|
|
828
828
|
borderWidth: 1,
|
|
@@ -1032,7 +1032,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1032
1032
|
<CopyButton_1.default value={() => summary} label={t('bundle.categoriesJson')}/>
|
|
1033
1033
|
</react_native_1.View>
|
|
1034
1034
|
|
|
1035
|
-
{summary.categories.map((cat, cIdx) => (<react_native_1.Pressable key={cIdx} style={({ pressed }) => [
|
|
1035
|
+
{summary.categories.map((cat, cIdx) => (<react_native_1.Pressable key={cIdx} accessible={true} accessibilityRole="button" accessibilityLabel={`${cat.title}, ${cat.sizeKb >= 1024 ? `${cat.sizeMb} MB` : `${cat.sizeKb} KB`}, ${cat.pct}% of bundle`} accessibilityHint={`Double tap to view ${cat.title} details`} style={({ pressed }) => [
|
|
1036
1036
|
bundleStyles.catRowCard,
|
|
1037
1037
|
pressed && { opacity: 0.85, transform: [{ scale: 0.99 }] },
|
|
1038
1038
|
]} onPress={() => setActiveSubTab(cat.targetTab)}>
|
|
@@ -1290,7 +1290,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1290
1290
|
{ key: 'androidApk', label: 'Universal APK (.apk)', badge: `${analysis?.production.androidApk.totalInstallMb || 364.0} MB` },
|
|
1291
1291
|
].map(tab => {
|
|
1292
1292
|
const isSelected = prodPlatform === tab.key;
|
|
1293
|
-
return (<TouchableScale_1.default key={tab.key} onPress={() => setProdPlatform(tab.key)} style={[
|
|
1293
|
+
return (<TouchableScale_1.default key={tab.key} accessible={true} accessibilityRole="tab" accessibilityLabel={`${tab.label}, ${tab.badge}`} accessibilityState={{ selected: isSelected }} accessibilityHint={`Switches production estimate to ${tab.label}`} onPress={() => setProdPlatform(tab.key)} style={[
|
|
1294
1294
|
bundleStyles.prodPlatformBtn,
|
|
1295
1295
|
isSelected && bundleStyles.prodPlatformBtnActive,
|
|
1296
1296
|
]}>
|
|
@@ -1540,8 +1540,8 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1540
1540
|
<react_native_1.View style={bundleStyles.filterContainer}>
|
|
1541
1541
|
<react_native_1.View style={bundleStyles.searchRow}>
|
|
1542
1542
|
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak} size={15}/>
|
|
1543
|
-
<react_native_1.TextInput placeholder={t('bundle.searchFilesPlaceholder')} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={search} onChangeText={setSearch} style={bundleStyles.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
1544
|
-
{search.length > 0 && (<react_native_1.Pressable onPress={() => setSearch('')} hitSlop={10}>
|
|
1543
|
+
<react_native_1.TextInput accessible={true} accessibilityRole="search" accessibilityLabel="Search files" accessibilityHint="Type a filename, path, or extension to filter" placeholder={t('bundle.searchFilesPlaceholder')} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={search} onChangeText={setSearch} style={bundleStyles.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
1544
|
+
{search.length > 0 && (<react_native_1.Pressable accessible={true} accessibilityRole="button" accessibilityLabel="Clear search input" onPress={() => setSearch('')} hitSlop={10}>
|
|
1545
1545
|
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
1546
1546
|
</react_native_1.Pressable>)}
|
|
1547
1547
|
<CopyButton_1.default value={() => filteredFiles} label={t('bundle.filteredFilesJson')}/>
|
|
@@ -1558,7 +1558,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1558
1558
|
: tab.key === 'CONSUMED'
|
|
1559
1559
|
? bundleFiles.filter(f => f.isConsumed !== false).length
|
|
1560
1560
|
: bundleFiles.filter(f => f.category === tab.key).length;
|
|
1561
|
-
return (<TouchableScale_1.default key={tab.key} onPress={() => setActiveCategory(tab.key)} style={[
|
|
1561
|
+
return (<TouchableScale_1.default key={tab.key} accessible={true} accessibilityRole="button" accessibilityLabel={`Filter by ${t(tab.labelKey)}, ${count} items`} accessibilityState={{ selected: isActive }} accessibilityHint={`Filters files list to ${t(tab.labelKey)}`} onPress={() => setActiveCategory(tab.key)} style={[
|
|
1562
1562
|
bundleStyles.catPill,
|
|
1563
1563
|
isActive && bundleStyles.catPillActive,
|
|
1564
1564
|
tab.key === 'UNUSED' && isActive && { backgroundColor: AppColors_1.AppColors.red500, borderColor: AppColors_1.AppColors.red600 },
|
|
@@ -1582,7 +1582,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1582
1582
|
{/* View Mode Toggle Header Bar */}
|
|
1583
1583
|
<react_native_1.View style={bundleStyles.treeHeaderRow}>
|
|
1584
1584
|
<react_native_1.View style={bundleStyles.viewModeToggleGroup}>
|
|
1585
|
-
<TouchableScale_1.default onPress={() => setFilesViewMode('tree')} style={[
|
|
1585
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel="Tree folder view" accessibilityState={{ selected: filesViewMode === 'tree' }} onPress={() => setFilesViewMode('tree')} style={[
|
|
1586
1586
|
bundleStyles.viewModeBtn,
|
|
1587
1587
|
filesViewMode === 'tree' && bundleStyles.viewModeBtnActive,
|
|
1588
1588
|
]}>
|
|
@@ -1593,7 +1593,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1593
1593
|
{t('bundle.treeView')}
|
|
1594
1594
|
</react_native_1.Text>
|
|
1595
1595
|
</TouchableScale_1.default>
|
|
1596
|
-
<TouchableScale_1.default onPress={() => setFilesViewMode('list')} style={[
|
|
1596
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel="Flat list view" accessibilityState={{ selected: filesViewMode === 'list' }} onPress={() => setFilesViewMode('list')} style={[
|
|
1597
1597
|
bundleStyles.viewModeBtn,
|
|
1598
1598
|
filesViewMode === 'list' && bundleStyles.viewModeBtnActive,
|
|
1599
1599
|
]}>
|
|
@@ -1607,11 +1607,11 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1607
1607
|
</react_native_1.View>
|
|
1608
1608
|
|
|
1609
1609
|
{filesViewMode === 'tree' ? (<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1610
|
-
<TouchableScale_1.default onPress={expandAllFolders}>
|
|
1610
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel="Expand all folders" onPress={expandAllFolders}>
|
|
1611
1611
|
<react_native_1.Text style={bundleStyles.treeActionLink}>{t('bundle.expand')}</react_native_1.Text>
|
|
1612
1612
|
</TouchableScale_1.default>
|
|
1613
1613
|
<react_native_1.Text style={{ color: AppColors_1.AppColors.grayTextWeak, fontSize: 11 }}>•</react_native_1.Text>
|
|
1614
|
-
<TouchableScale_1.default onPress={collapseAllFolders}>
|
|
1614
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel="Collapse all folders" onPress={collapseAllFolders}>
|
|
1615
1615
|
<react_native_1.Text style={bundleStyles.treeActionLink}>{t('bundle.collapse')}</react_native_1.Text>
|
|
1616
1616
|
</TouchableScale_1.default>
|
|
1617
1617
|
</react_native_1.View>) : (<react_native_1.Text style={bundleStyles.listHeaderCount}>
|
|
@@ -1735,8 +1735,8 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1735
1735
|
<react_native_1.View style={bundleStyles.filterContainer}>
|
|
1736
1736
|
<react_native_1.View style={bundleStyles.searchRow}>
|
|
1737
1737
|
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak} size={15}/>
|
|
1738
|
-
<react_native_1.TextInput placeholder={t('bundle.searchPackagesPlaceholder')} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={search} onChangeText={setSearch} style={bundleStyles.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
1739
|
-
{search.length > 0 && (<react_native_1.Pressable onPress={() => setSearch('')} hitSlop={10}>
|
|
1738
|
+
<react_native_1.TextInput accessible={true} accessibilityRole="search" accessibilityLabel="Search packages" accessibilityHint="Type a package name or description to filter" placeholder={t('bundle.searchPackagesPlaceholder')} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={search} onChangeText={setSearch} style={bundleStyles.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
1739
|
+
{search.length > 0 && (<react_native_1.Pressable accessible={true} accessibilityRole="button" accessibilityLabel="Clear search input" onPress={() => setSearch('')} hitSlop={10}>
|
|
1740
1740
|
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
1741
1741
|
</react_native_1.Pressable>)}
|
|
1742
1742
|
<CopyButton_1.default value={() => filteredPackages} label={t('bundle.dependenciesJson')}/>
|
|
@@ -1751,7 +1751,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1751
1751
|
const cleanInstalledVersion = pkg.version ? pkg.version.replace(/^\^/, '') : '';
|
|
1752
1752
|
const hasUpdate = !!pkg.latestVersion && !!cleanInstalledVersion &&
|
|
1753
1753
|
pkg.latestVersion !== cleanInstalledVersion;
|
|
1754
|
-
return (<react_native_1.View key={pkg.id} style={[bundleStyles.fileCard, pkg.isDeprecated && { borderColor: AppColors_1.AppColors.errorBorder, backgroundColor:
|
|
1754
|
+
return (<react_native_1.View key={pkg.id} style={[bundleStyles.fileCard, pkg.isDeprecated && { borderColor: AppColors_1.AppColors.errorBorder, backgroundColor: AppColors_1.AppColors.errorCardBg }]}>
|
|
1755
1755
|
{/* Header Row: #s.no + Logo + Package Name + Version Pill + Update/Deprecated Badges + Size & Copy */}
|
|
1756
1756
|
<react_native_1.View style={bundleStyles.fileCardTop}>
|
|
1757
1757
|
<react_native_1.View style={bundleStyles.sNoBadge}>
|
|
@@ -1851,7 +1851,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1851
1851
|
<react_native_1.Text style={bundleStyles.fileMetaText}>
|
|
1852
1852
|
{t('bundle.minified', { size: pkg.sizeKb })}
|
|
1853
1853
|
</react_native_1.Text>
|
|
1854
|
-
<TouchableScale_1.default onPress={() => {
|
|
1854
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="link" accessibilityLabel={`Open ${pkg.name} on NPM`} accessibilityHint="Opens NPM package page in browser" onPress={() => {
|
|
1855
1855
|
const url = pkg.npmUrl || `https://www.npmjs.com/package/${pkg.name}`;
|
|
1856
1856
|
react_native_1.Linking.openURL(url).catch(() => { });
|
|
1857
1857
|
}} style={bundleStyles.npmLinkBtn}>
|
|
@@ -1930,7 +1930,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1930
1930
|
{t('bundle.fileSizeKb', { size: file.sizeKb })}
|
|
1931
1931
|
</react_native_1.Text>
|
|
1932
1932
|
</react_native_1.View>
|
|
1933
|
-
<TouchableScale_1.default onPress={() => (0, exports.downloadBundleFile)(file, analysis?.scriptURL)} style={bundleStyles.downloadFileBtn} hitSlop={8}>
|
|
1933
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel={`Download ${file.name}`} accessibilityHint="Downloads media asset file" onPress={() => (0, exports.downloadBundleFile)(file, analysis?.scriptURL)} style={bundleStyles.downloadFileBtn} hitSlop={8}>
|
|
1934
1934
|
<NetworkIcons_1.DownloadIcon size={14} color={AppColors_1.AppColors.sky500}/>
|
|
1935
1935
|
</TouchableScale_1.default>
|
|
1936
1936
|
<CopyButton_1.default value={() => file} label={t('bundle.mediaItemJson')}/>
|
|
@@ -135,23 +135,27 @@ const CrashDetail = react_1.default.memo(() => {
|
|
|
135
135
|
localStyles.pillBadge,
|
|
136
136
|
{
|
|
137
137
|
backgroundColor: selectedCrash.isFatal
|
|
138
|
-
?
|
|
139
|
-
:
|
|
140
|
-
borderColor: selectedCrash.isFatal
|
|
138
|
+
? AppColors_1.AppColors.errorCardBg
|
|
139
|
+
: AppColors_1.AppColors.amberBg,
|
|
140
|
+
borderColor: selectedCrash.isFatal
|
|
141
|
+
? AppColors_1.AppColors.errorBorder
|
|
142
|
+
: AppColors_1.AppColors.amberWarmBorder,
|
|
141
143
|
},
|
|
142
144
|
]}>
|
|
143
145
|
<react_native_1.View style={[
|
|
144
146
|
localStyles.statusDot,
|
|
145
147
|
{
|
|
146
148
|
backgroundColor: selectedCrash.isFatal
|
|
147
|
-
?
|
|
148
|
-
:
|
|
149
|
+
? AppColors_1.AppColors.red600
|
|
150
|
+
: AppColors_1.AppColors.amber600,
|
|
149
151
|
},
|
|
150
152
|
]}/>
|
|
151
153
|
<react_native_1.Text style={[
|
|
152
154
|
localStyles.pillBadgeText,
|
|
153
155
|
{
|
|
154
|
-
color: selectedCrash.isFatal
|
|
156
|
+
color: selectedCrash.isFatal
|
|
157
|
+
? AppColors_1.AppColors.redErrorText
|
|
158
|
+
: AppColors_1.AppColors.amberWarmText,
|
|
155
159
|
},
|
|
156
160
|
]}>
|
|
157
161
|
{selectedCrash.isFatal ? t('crash.fatalCrash') : t('crash.handledException')}
|
|
@@ -162,11 +166,11 @@ const CrashDetail = react_1.default.memo(() => {
|
|
|
162
166
|
<react_native_1.View style={[
|
|
163
167
|
localStyles.pillBadge,
|
|
164
168
|
{
|
|
165
|
-
backgroundColor:
|
|
166
|
-
borderColor:
|
|
169
|
+
backgroundColor: AppColors_1.AppColors.violetSoftBg,
|
|
170
|
+
borderColor: AppColors_1.AppColors.violetSoftBorder,
|
|
167
171
|
},
|
|
168
172
|
]}>
|
|
169
|
-
<react_native_1.Text style={[localStyles.pillBadgeText, { color:
|
|
173
|
+
<react_native_1.Text style={[localStyles.pillBadgeText, { color: AppColors_1.AppColors.purple700 }]}>
|
|
170
174
|
{selectedCrash.type.toUpperCase()}
|
|
171
175
|
</react_native_1.Text>
|
|
172
176
|
</react_native_1.View>
|
|
@@ -176,12 +180,12 @@ const CrashDetail = react_1.default.memo(() => {
|
|
|
176
180
|
{/* Copy Report Action */}
|
|
177
181
|
<TouchableScale_1.default onPress={handleCopyReport} hitSlop={10} style={[
|
|
178
182
|
localStyles.actionButton,
|
|
179
|
-
copiedSuccess && { backgroundColor:
|
|
183
|
+
copiedSuccess && { backgroundColor: AppColors_1.AppColors.mintGreenBg, borderColor: AppColors_1.AppColors.mintGreenBorder },
|
|
180
184
|
]}>
|
|
181
|
-
{copiedSuccess ? (<NetworkIcons_1.CircleCheckIcon color=
|
|
185
|
+
{copiedSuccess ? (<NetworkIcons_1.CircleCheckIcon color={AppColors_1.AppColors.mintGreenText} size={12}/>) : (<NetworkIcons_1.CopyIcon color={AppColors_1.AppColors.purple} size={12}/>)}
|
|
182
186
|
<react_native_1.Text style={[
|
|
183
187
|
localStyles.actionButtonText,
|
|
184
|
-
copiedSuccess && { color:
|
|
188
|
+
copiedSuccess && { color: AppColors_1.AppColors.mintGreenText },
|
|
185
189
|
]}>
|
|
186
190
|
{copiedSuccess ? t('crash.copied') : t('crash.copyReport')}
|
|
187
191
|
</react_native_1.Text>
|
|
@@ -57,33 +57,33 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
57
57
|
if (clean === 'DEV' || clean.includes('DEV') || clean === 'LOCAL') {
|
|
58
58
|
return {
|
|
59
59
|
label: rawEnv,
|
|
60
|
-
bg:
|
|
61
|
-
border:
|
|
62
|
-
text:
|
|
60
|
+
bg: `${AppColors_1.AppColors.emerald500}40`, // emerald
|
|
61
|
+
border: `${AppColors_1.AppColors.emerald400}8C`,
|
|
62
|
+
text: AppColors_1.AppColors.mintGreenBorder,
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
if (clean === 'UAT' || clean === 'QA' || clean === 'TEST') {
|
|
66
66
|
return {
|
|
67
67
|
label: rawEnv,
|
|
68
|
-
bg:
|
|
69
|
-
border:
|
|
70
|
-
text:
|
|
68
|
+
bg: `${AppColors_1.AppColors.amber500}47`, // amber
|
|
69
|
+
border: `${AppColors_1.AppColors.amber400}99`,
|
|
70
|
+
text: AppColors_1.AppColors.amberWarmBorder,
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
if (clean === 'PREPROD' || clean === 'STAGE' || clean === 'STAGING') {
|
|
74
74
|
return {
|
|
75
75
|
label: rawEnv,
|
|
76
|
-
bg:
|
|
77
|
-
border:
|
|
78
|
-
text:
|
|
76
|
+
bg: `${AppColors_1.AppColors.purple500}47`, // purple
|
|
77
|
+
border: `${AppColors_1.AppColors.purple400}99`,
|
|
78
|
+
text: AppColors_1.AppColors.violetSoftBorder,
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
// PROD / Live
|
|
82
82
|
return {
|
|
83
83
|
label: rawEnv,
|
|
84
|
-
bg:
|
|
85
|
-
border:
|
|
86
|
-
text:
|
|
84
|
+
bg: `${AppColors_1.AppColors.rose500}40`, // rose
|
|
85
|
+
border: `${AppColors_1.AppColors.roseBorder}8C`,
|
|
86
|
+
text: AppColors_1.AppColors.errorBorder,
|
|
87
87
|
};
|
|
88
88
|
}, [environment]);
|
|
89
89
|
const isDetailView = (activeTab === 'apis' && selected != null) ||
|
|
@@ -484,8 +484,8 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
484
484
|
styles_1.default.headerMethodBadge,
|
|
485
485
|
{
|
|
486
486
|
backgroundColor: selectedCrash.isFatal
|
|
487
|
-
?
|
|
488
|
-
:
|
|
487
|
+
? AppColors_1.AppColors.red600
|
|
488
|
+
: AppColors_1.AppColors.amber600,
|
|
489
489
|
},
|
|
490
490
|
]}>
|
|
491
491
|
<react_native_1.Text style={styles_1.default.headerMethodText}>
|
|
@@ -501,8 +501,8 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
501
501
|
styles_1.default.headerStatusDot,
|
|
502
502
|
{
|
|
503
503
|
backgroundColor: selectedCrash.isFatal
|
|
504
|
-
?
|
|
505
|
-
:
|
|
504
|
+
? AppColors_1.AppColors.red600
|
|
505
|
+
: AppColors_1.AppColors.amber500,
|
|
506
506
|
},
|
|
507
507
|
]}/>
|
|
508
508
|
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
@@ -80,13 +80,17 @@ const MainScreen = () => {
|
|
|
80
80
|
(activeTab === 'crash' && selectedCrash != null);
|
|
81
81
|
return (<>
|
|
82
82
|
{(react_native_1.Platform.OS === 'ios' || react_native_1.Platform.OS === 'android') && isEnabled && <FabLauncher_1.default />}
|
|
83
|
-
<react_native_1.Modal visible={visible} animationType={modalAnimationType} transparent>
|
|
83
|
+
<react_native_1.Modal visible={visible} animationType={modalAnimationType} transparent statusBarTranslucent={true}>
|
|
84
84
|
{visible && (<ErrorBoundary_1.default onClose={closeModal}>
|
|
85
85
|
<react_native_1.View style={styles_1.default.modalBackdrop}>
|
|
86
86
|
<react_native_1.Pressable style={styles_1.default.modalBackdropPressable} onPress={closeModal}/>
|
|
87
87
|
<react_native_1.View style={[
|
|
88
88
|
styles_1.default.modalContentCard,
|
|
89
|
-
{
|
|
89
|
+
{
|
|
90
|
+
height: `${modalHeightPercent}%`,
|
|
91
|
+
borderTopLeftRadius: modalHeightPercent >= 100 ? 0 : 20,
|
|
92
|
+
borderTopRightRadius: modalHeightPercent >= 100 ? 0 : 20,
|
|
93
|
+
},
|
|
90
94
|
]}>
|
|
91
95
|
<react_native_1.StatusBar translucent backgroundColor="transparent" barStyle="light-content"/>
|
|
92
96
|
|