react-native-inapp-inspector 1.1.22 → 1.1.23
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/AnalyticsEventCard.js +5 -2
- package/dist/commonjs/components/ErrorBoundary.js +17 -8
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +1 -0
- package/dist/commonjs/components/Inspector/BundleTab.js +135 -48
- package/dist/commonjs/components/Inspector/LogDetail.js +12 -6
- package/dist/commonjs/components/Inspector/PerformanceTab.js +12 -12
- package/dist/commonjs/components/Inspector/ReduxTab.js +6 -3
- package/dist/commonjs/components/NetworkIcons.d.ts +12 -0
- package/dist/commonjs/components/NetworkIcons.js +92 -1
- package/dist/commonjs/components/TreeNode.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/i18n/locales/en.json +22 -22
- package/dist/esm/components/AnalyticsEventCard.js +5 -2
- package/dist/esm/components/ErrorBoundary.js +17 -8
- package/dist/esm/components/Inspector/BundleTab.d.ts +1 -0
- package/dist/esm/components/Inspector/BundleTab.js +137 -50
- package/dist/esm/components/Inspector/LogDetail.js +13 -7
- package/dist/esm/components/Inspector/PerformanceTab.js +13 -13
- package/dist/esm/components/Inspector/ReduxTab.js +7 -4
- package/dist/esm/components/NetworkIcons.d.ts +12 -0
- package/dist/esm/components/NetworkIcons.js +79 -0
- package/dist/esm/components/TreeNode.js +2 -2
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/i18n/locales/en.json +22 -22
- package/package.json +1 -1
|
@@ -44,6 +44,7 @@ const helpers_1 = require("../helpers");
|
|
|
44
44
|
const i18n_1 = require("../i18n");
|
|
45
45
|
const HighlightText_1 = __importDefault(require("./HighlightText"));
|
|
46
46
|
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
47
|
+
const NetworkIcons_1 = require("./NetworkIcons");
|
|
47
48
|
// ─── Component ────────────────────────────────────────────────────────────────
|
|
48
49
|
const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ event, onPress, isNew = false, searchStr = '', msSincePrev, computedScreenName, }) {
|
|
49
50
|
const { t } = (0, i18n_1.useTranslation)();
|
|
@@ -204,6 +205,7 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
204
205
|
borderColor: AppColors_1.AppColors.amberBorder,
|
|
205
206
|
},
|
|
206
207
|
]}>
|
|
208
|
+
<NetworkIcons_1.CartIcon color={AppColors_1.AppColors.amber700} size={12}/>
|
|
207
209
|
<react_native_1.Text style={[
|
|
208
210
|
cardStyles.chipText,
|
|
209
211
|
{
|
|
@@ -211,7 +213,7 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
211
213
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
212
214
|
},
|
|
213
215
|
]}>
|
|
214
|
-
|
|
216
|
+
{items.length}{' '}
|
|
215
217
|
{items.length === 1
|
|
216
218
|
? t('analytics.item')
|
|
217
219
|
: t('analytics.items')}
|
|
@@ -236,6 +238,7 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
236
238
|
borderColor: AppColors_1.AppColors.emeraldBorder,
|
|
237
239
|
},
|
|
238
240
|
]}>
|
|
241
|
+
<NetworkIcons_1.MoneyIcon color={AppColors_1.AppColors.emerald600} size={12}/>
|
|
239
242
|
<react_native_1.Text style={[
|
|
240
243
|
cardStyles.chipText,
|
|
241
244
|
{
|
|
@@ -243,7 +246,7 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
|
|
|
243
246
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
244
247
|
},
|
|
245
248
|
]}>
|
|
246
|
-
|
|
249
|
+
{String(val)} {currencyStr}
|
|
247
250
|
</react_native_1.Text>
|
|
248
251
|
</react_native_1.View>);
|
|
249
252
|
}
|
|
@@ -39,6 +39,7 @@ const react_native_1 = require("react-native");
|
|
|
39
39
|
const AppColors_1 = require("../styles/AppColors");
|
|
40
40
|
const AppFonts_1 = require("../styles/AppFonts");
|
|
41
41
|
const helpers_1 = require("../helpers");
|
|
42
|
+
const NetworkIcons_1 = require("./NetworkIcons");
|
|
42
43
|
function parseStackTrace(stack) {
|
|
43
44
|
if (!stack)
|
|
44
45
|
return null;
|
|
@@ -110,7 +111,10 @@ ${error.stack}`;
|
|
|
110
111
|
const isInline = this.props.fallbackType === 'inline';
|
|
111
112
|
if (isInline) {
|
|
112
113
|
return (<react_native_1.View style={styles.inlineContainer}>
|
|
113
|
-
<react_native_1.
|
|
114
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
115
|
+
<NetworkIcons_1.WarningTriangleIcon color={AppColors_1.AppColors.redErrorText} size={14}/>
|
|
116
|
+
<react_native_1.Text style={styles.inlineTitle}>Inspector Crash</react_native_1.Text>
|
|
117
|
+
</react_native_1.View>
|
|
114
118
|
<react_native_1.TouchableOpacity style={styles.inlineResetBtn} onPress={this.handleReset}>
|
|
115
119
|
<react_native_1.Text style={styles.inlineResetText}>Reload</react_native_1.Text>
|
|
116
120
|
</react_native_1.TouchableOpacity>
|
|
@@ -121,7 +125,9 @@ ${error.stack}`;
|
|
|
121
125
|
const parsed = error && error.stack ? parseStackTrace(error.stack) : null;
|
|
122
126
|
return (<react_native_1.View style={styles.container}>
|
|
123
127
|
<react_native_1.View style={styles.card}>
|
|
124
|
-
<react_native_1.
|
|
128
|
+
<react_native_1.View style={{ marginBottom: 12, alignItems: 'center' }}>
|
|
129
|
+
<NetworkIcons_1.WarningTriangleIcon color={AppColors_1.AppColors.amber500} size={44}/>
|
|
130
|
+
</react_native_1.View>
|
|
125
131
|
<react_native_1.Text style={styles.title}>Something went wrong</react_native_1.Text>
|
|
126
132
|
|
|
127
133
|
<react_native_1.View style={{
|
|
@@ -134,13 +140,19 @@ ${error.stack}`;
|
|
|
134
140
|
marginBottom: 12,
|
|
135
141
|
gap: 4
|
|
136
142
|
}}>
|
|
143
|
+
<react_native_1.View style={{
|
|
144
|
+
width: 8,
|
|
145
|
+
height: 8,
|
|
146
|
+
borderRadius: 4,
|
|
147
|
+
backgroundColor: isNativeCrash ? AppColors_1.AppColors.errorColor : AppColors_1.AppColors.amber500,
|
|
148
|
+
}}/>
|
|
137
149
|
<react_native_1.Text style={{
|
|
138
150
|
fontSize: 10,
|
|
139
151
|
fontWeight: 'bold',
|
|
140
152
|
color: isNativeCrash ? AppColors_1.AppColors.errorColor : AppColors_1.AppColors.amber500,
|
|
141
153
|
fontFamily: AppFonts_1.AppFonts.interBold || 'System'
|
|
142
154
|
}}>
|
|
143
|
-
{isNativeCrash ? '
|
|
155
|
+
{isNativeCrash ? 'NATIVE CRASH' : 'JAVASCRIPT CRASH'}
|
|
144
156
|
</react_native_1.Text>
|
|
145
157
|
</react_native_1.View>
|
|
146
158
|
|
|
@@ -187,8 +199,9 @@ ${error.stack}`;
|
|
|
187
199
|
flexDirection: 'row',
|
|
188
200
|
gap: 6
|
|
189
201
|
}} onPress={this.handleCopyTrace}>
|
|
202
|
+
<NetworkIcons_1.CopyIcon color={AppColors_1.AppColors.white} size={14}/>
|
|
190
203
|
<react_native_1.Text style={{ color: AppColors_1.AppColors.white, fontSize: 12, fontWeight: 'bold', fontFamily: AppFonts_1.AppFonts.interBold || 'System' }}>
|
|
191
|
-
|
|
204
|
+
Copy Crash Traceback
|
|
192
205
|
</react_native_1.Text>
|
|
193
206
|
</react_native_1.TouchableOpacity>
|
|
194
207
|
</react_native_1.View>
|
|
@@ -231,10 +244,6 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
231
244
|
shadowRadius: 12,
|
|
232
245
|
elevation: 8,
|
|
233
246
|
},
|
|
234
|
-
emoji: {
|
|
235
|
-
fontSize: 40,
|
|
236
|
-
marginBottom: 12,
|
|
237
|
-
},
|
|
238
247
|
title: {
|
|
239
248
|
fontFamily: AppFonts_1.AppFonts.interBold || 'System',
|
|
240
249
|
fontSize: 18,
|
|
@@ -32,6 +32,7 @@ export interface BundlePackageItem {
|
|
|
32
32
|
lastActive?: string;
|
|
33
33
|
npmUrl?: string;
|
|
34
34
|
}
|
|
35
|
+
export type BundleIconType = 'source' | 'deps' | 'media' | 'overhead' | 'image' | 'typescript' | 'javascript' | 'font' | 'json' | 'folder' | 'ban' | 'bolt';
|
|
35
36
|
export interface TreeNode {
|
|
36
37
|
id: string;
|
|
37
38
|
name: string;
|
|
@@ -162,6 +162,77 @@ const PackageLogoRenderer = ({ name, size = 28 }) => {
|
|
|
162
162
|
</react_native_svg_1.default>
|
|
163
163
|
</react_native_1.View>);
|
|
164
164
|
};
|
|
165
|
+
const BundleCategoryIcon = ({ type, size = 16, color = AppColors_1.AppColors.purple }) => {
|
|
166
|
+
const stroke = { stroke: color, strokeWidth: 1.7, strokeLinecap: 'round', strokeLinejoin: 'round' };
|
|
167
|
+
const renderGlyph = () => {
|
|
168
|
+
switch (type) {
|
|
169
|
+
case 'folder':
|
|
170
|
+
return (<react_native_svg_1.G>
|
|
171
|
+
<react_native_svg_1.Path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" {...stroke}/>
|
|
172
|
+
</react_native_svg_1.G>);
|
|
173
|
+
case 'ban':
|
|
174
|
+
return (<react_native_svg_1.G>
|
|
175
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="8.5" {...stroke}/>
|
|
176
|
+
<react_native_svg_1.Path d="M5.5 5.5 18.5 18.5" {...stroke}/>
|
|
177
|
+
</react_native_svg_1.G>);
|
|
178
|
+
case 'bolt':
|
|
179
|
+
return (<react_native_svg_1.G>
|
|
180
|
+
<react_native_svg_1.Path d="M13 2 4.5 13.5 H10.5 L9 22 19.5 9.5 H13.5 Z" {...stroke}/>
|
|
181
|
+
</react_native_svg_1.G>);
|
|
182
|
+
case 'source':
|
|
183
|
+
return (<react_native_svg_1.G>
|
|
184
|
+
<react_native_svg_1.Path d="M8.5 7 L4 12 L8.5 17" {...stroke}/>
|
|
185
|
+
<react_native_svg_1.Path d="M15.5 7 L20 12 L15.5 17" {...stroke}/>
|
|
186
|
+
<react_native_svg_1.Path d="M13.5 4.5 L10.5 19.5" {...stroke}/>
|
|
187
|
+
</react_native_svg_1.G>);
|
|
188
|
+
case 'deps':
|
|
189
|
+
return (<react_native_svg_1.G>
|
|
190
|
+
<react_native_svg_1.Rect x="4" y="4" width="16" height="16" rx="2.5" {...stroke}/>
|
|
191
|
+
<react_native_svg_1.Path d="M4 9.5 H20" {...stroke}/>
|
|
192
|
+
<react_native_svg_1.Path d="M9.5 9.5 V20" {...stroke}/>
|
|
193
|
+
</react_native_svg_1.G>);
|
|
194
|
+
case 'media':
|
|
195
|
+
case 'image':
|
|
196
|
+
return (<react_native_svg_1.G>
|
|
197
|
+
<react_native_svg_1.Rect x="3.5" y="4.5" width="17" height="15" rx="2" {...stroke}/>
|
|
198
|
+
<react_native_svg_1.Circle cx="9" cy="10" r="1.5" {...stroke}/>
|
|
199
|
+
<react_native_svg_1.Path d="M3.5 17.5 L9.5 12.5 L14 16.5 L17 13.5 L20.5 17.5" {...stroke}/>
|
|
200
|
+
</react_native_svg_1.G>);
|
|
201
|
+
case 'overhead':
|
|
202
|
+
return (<react_native_svg_1.G>
|
|
203
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="3.2" {...stroke}/>
|
|
204
|
+
<react_native_svg_1.Path d="M12 2.5 V5.5 M12 18.5 V21.5 M2.5 12 H5.5 M18.5 12 H21.5 M5.3 5.3 L7.4 7.4 M16.6 16.6 L18.7 18.7 M18.7 5.3 L16.6 7.4 M7.4 16.6 L5.3 18.7" {...stroke}/>
|
|
205
|
+
</react_native_svg_1.G>);
|
|
206
|
+
case 'typescript':
|
|
207
|
+
return (<react_native_svg_1.G>
|
|
208
|
+
<react_native_svg_1.Path d="M6.5 3.5 H14 L18.5 8 V20.5 H6.5 Z" {...stroke}/>
|
|
209
|
+
<react_native_svg_1.Path d="M14 3.5 V8 H18.5" {...stroke}/>
|
|
210
|
+
<react_native_svg_1.Path d="M9.5 13.5 H15 M12 13.5 V16.5 M9.5 16.5 H13" {...stroke}/>
|
|
211
|
+
</react_native_svg_1.G>);
|
|
212
|
+
case 'javascript':
|
|
213
|
+
return (<react_native_svg_1.G>
|
|
214
|
+
<react_native_svg_1.Path d="M9.5 3.5 C7.5 3.5 7.5 6.5 7.5 9 C7.5 11 6.5 12 5 12 C6.5 12 7.5 13 7.5 15 C7.5 17.5 7.5 20.5 9.5 20.5" {...stroke}/>
|
|
215
|
+
<react_native_svg_1.Path d="M14.5 3.5 C16.5 3.5 16.5 6.5 16.5 9 C16.5 11 17.5 12 19 12 C17.5 12 16.5 13 16.5 15 C16.5 17.5 16.5 20.5 14.5 20.5" {...stroke}/>
|
|
216
|
+
</react_native_svg_1.G>);
|
|
217
|
+
case 'font':
|
|
218
|
+
return (<react_native_svg_1.G>
|
|
219
|
+
<react_native_svg_1.Path d="M8 19 L12 5.5 L16 19" {...stroke}/>
|
|
220
|
+
<react_native_svg_1.Path d="M9.4 14.5 H14.6" {...stroke}/>
|
|
221
|
+
</react_native_svg_1.G>);
|
|
222
|
+
case 'json':
|
|
223
|
+
return (<react_native_svg_1.G>
|
|
224
|
+
<react_native_svg_1.Path d="M9 3.5 C7 3.5 7 6 7 8.5 C7 10.5 6 11.5 5 12 C6 12.5 7 13.5 7 15.5 C7 18 7 20.5 9 20.5" {...stroke}/>
|
|
225
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="1.1" fill={color}/>
|
|
226
|
+
<react_native_svg_1.Path d="M15 3.5 C17 3.5 17 6 17 8.5 C17 10.5 18 11.5 19 12 C18 12.5 17 13.5 17 15.5 C17 18 17 20.5 15 20.5" {...stroke}/>
|
|
227
|
+
</react_native_svg_1.G>);
|
|
228
|
+
default:
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
233
|
+
{renderGlyph()}
|
|
234
|
+
</react_native_svg_1.default>);
|
|
235
|
+
};
|
|
165
236
|
// ─── Media File Thumbnail Component ──────────────────────────────────────────
|
|
166
237
|
const MediaPreviewThumbnail = ({ file }) => {
|
|
167
238
|
const [loadError, setLoadError] = (0, react_1.useState)(false);
|
|
@@ -282,7 +353,7 @@ const BundleTreeNodeView = ({ node, level, search, totalBundleKb, collapsedFolde
|
|
|
282
353
|
{isCollapsed ? '▶' : '▼'}
|
|
283
354
|
</react_native_1.Text>
|
|
284
355
|
</react_native_1.View>
|
|
285
|
-
<
|
|
356
|
+
{isCollapsed ? (<NetworkIcons_1.FolderIcon color={AppColors_1.AppColors.amber500} size={16}/>) : (<NetworkIcons_1.FolderOpenIcon color={AppColors_1.AppColors.amber500} size={16}/>)}
|
|
286
357
|
<HighlightText_1.default text={node.name + '/'} search={search} style={bundleStyles.treeFolderName} highlightStyle={bundleStyles.searchHighlight}/>
|
|
287
358
|
<react_native_1.View style={bundleStyles.treeCountBadge}>
|
|
288
359
|
<react_native_1.Text style={bundleStyles.treeCountBadgeText}>
|
|
@@ -360,27 +431,29 @@ const BundleTreeNodeView = ({ node, level, search, totalBundleKb, collapsedFolde
|
|
|
360
431
|
isUnused && bundleStyles.adviceUnused,
|
|
361
432
|
{ marginLeft: 26, marginTop: 4 },
|
|
362
433
|
]}>
|
|
363
|
-
<react_native_1.
|
|
434
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'flex-start', gap: 5 }}>
|
|
435
|
+
{isUnused ? (<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.red600} size={12}/>) : file.status === 'warning' ? (<NetworkIcons_1.LightbulbIcon color={AppColors_1.AppColors.amber800Warm} size={12}/>) : (<NetworkIcons_1.SparkleIcon color={AppColors_1.AppColors.emerald700} size={12}/>)}
|
|
436
|
+
<react_native_1.Text style={[
|
|
364
437
|
bundleStyles.adviceText,
|
|
365
438
|
file.status === 'warning' && { color: AppColors_1.AppColors.amber800Warm },
|
|
366
439
|
file.status === 'optimal' && { color: AppColors_1.AppColors.emerald700 },
|
|
367
440
|
isUnused && { color: AppColors_1.AppColors.red600 },
|
|
368
441
|
]}>
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
</react_native_1.
|
|
442
|
+
{file.advice}
|
|
443
|
+
</react_native_1.Text>
|
|
444
|
+
</react_native_1.View>
|
|
372
445
|
</react_native_1.View>)}
|
|
373
446
|
</react_native_1.View>);
|
|
374
447
|
};
|
|
375
448
|
const CATEGORY_TABS = [
|
|
376
|
-
{ key: 'ALL', labelKey: 'bundle.catAll',
|
|
377
|
-
{ key: 'UNUSED', labelKey: 'bundle.catUnused',
|
|
378
|
-
{ key: 'CONSUMED', labelKey: 'bundle.catConsumed',
|
|
379
|
-
{ key: 'image', labelKey: 'bundle.catImages',
|
|
380
|
-
{ key: 'typescript', labelKey: 'bundle.catTypescript',
|
|
381
|
-
{ key: 'javascript', labelKey: 'bundle.catJavascript',
|
|
382
|
-
{ key: 'font', labelKey: 'bundle.catFonts',
|
|
383
|
-
{ key: 'json', labelKey: 'bundle.catJson',
|
|
449
|
+
{ key: 'ALL', labelKey: 'bundle.catAll', iconType: 'folder' },
|
|
450
|
+
{ key: 'UNUSED', labelKey: 'bundle.catUnused', iconType: 'ban' },
|
|
451
|
+
{ key: 'CONSUMED', labelKey: 'bundle.catConsumed', iconType: 'bolt' },
|
|
452
|
+
{ key: 'image', labelKey: 'bundle.catImages', iconType: 'image' },
|
|
453
|
+
{ key: 'typescript', labelKey: 'bundle.catTypescript', iconType: 'typescript' },
|
|
454
|
+
{ key: 'javascript', labelKey: 'bundle.catJavascript', iconType: 'javascript' },
|
|
455
|
+
{ key: 'font', labelKey: 'bundle.catFonts', iconType: 'font' },
|
|
456
|
+
{ key: 'json', labelKey: 'bundle.catJson', iconType: 'json' },
|
|
384
457
|
];
|
|
385
458
|
const CATEGORY_COLORS = {
|
|
386
459
|
image: { label: 'Images & Media', color: AppColors_1.AppColors.pink500, bg: AppColors_1.AppColors.pink100 },
|
|
@@ -707,28 +780,32 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
707
780
|
|
|
708
781
|
{[
|
|
709
782
|
{
|
|
783
|
+
iconType: 'source',
|
|
710
784
|
label: t('bundle.splitAppSource'),
|
|
711
785
|
color: AppColors_1.AppColors.sky500,
|
|
712
786
|
...analysis.splitUp.appSource,
|
|
713
787
|
},
|
|
714
788
|
{
|
|
789
|
+
iconType: 'deps',
|
|
715
790
|
label: t('bundle.splitNodeModules'),
|
|
716
791
|
color: AppColors_1.AppColors.indigo500,
|
|
717
792
|
...analysis.splitUp.nodeModules,
|
|
718
793
|
},
|
|
719
794
|
{
|
|
795
|
+
iconType: 'media',
|
|
720
796
|
label: t('bundle.splitAssetsMedia'),
|
|
721
797
|
color: AppColors_1.AppColors.pink500,
|
|
722
798
|
...analysis.splitUp.assetsMedia,
|
|
723
799
|
},
|
|
724
800
|
{
|
|
801
|
+
iconType: 'overhead',
|
|
725
802
|
label: t('bundle.splitMetroOverhead'),
|
|
726
803
|
color: AppColors_1.AppColors.amber500,
|
|
727
804
|
...analysis.splitUp.metroDevOverhead,
|
|
728
805
|
},
|
|
729
806
|
].map((part, idx) => (<react_native_1.View key={idx} style={bundleStyles.catRowCard}>
|
|
730
807
|
<react_native_1.View style={bundleStyles.catRowTop}>
|
|
731
|
-
<
|
|
808
|
+
<BundleCategoryIcon type={part.iconType} size={18} color={part.color}/>
|
|
732
809
|
<react_native_1.View style={{ flex: 1 }}>
|
|
733
810
|
<react_native_1.Text style={bundleStyles.catRowTitle}>{part.label}</react_native_1.Text>
|
|
734
811
|
<react_native_1.Text style={bundleStyles.catRowDesc}>
|
|
@@ -805,7 +882,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
805
882
|
{/* Legend Grid */}
|
|
806
883
|
<react_native_1.View style={bundleStyles.legendGrid}>
|
|
807
884
|
<react_native_1.View style={bundleStyles.legendItem}>
|
|
808
|
-
<
|
|
885
|
+
<BundleCategoryIcon type="image" size={13} color={AppColors_1.AppColors.pink500}/>
|
|
809
886
|
<react_native_1.Text style={bundleStyles.legendText}>
|
|
810
887
|
{t('bundle.legendImages')}{' '}
|
|
811
888
|
<react_native_1.Text style={bundleStyles.legendVal}>
|
|
@@ -814,7 +891,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
814
891
|
</react_native_1.Text>
|
|
815
892
|
</react_native_1.View>
|
|
816
893
|
<react_native_1.View style={bundleStyles.legendItem}>
|
|
817
|
-
<
|
|
894
|
+
<BundleCategoryIcon type="typescript" size={13} color={AppColors_1.AppColors.sky500}/>
|
|
818
895
|
<react_native_1.Text style={bundleStyles.legendText}>
|
|
819
896
|
{t('bundle.legendTs')}{' '}
|
|
820
897
|
<react_native_1.Text style={bundleStyles.legendVal}>
|
|
@@ -823,7 +900,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
823
900
|
</react_native_1.Text>
|
|
824
901
|
</react_native_1.View>
|
|
825
902
|
<react_native_1.View style={bundleStyles.legendItem}>
|
|
826
|
-
<
|
|
903
|
+
<BundleCategoryIcon type="javascript" size={13} color={AppColors_1.AppColors.indigo500}/>
|
|
827
904
|
<react_native_1.Text style={bundleStyles.legendText}>
|
|
828
905
|
{t('bundle.legendJs')}{' '}
|
|
829
906
|
<react_native_1.Text style={bundleStyles.legendVal}>
|
|
@@ -832,7 +909,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
832
909
|
</react_native_1.Text>
|
|
833
910
|
</react_native_1.View>
|
|
834
911
|
<react_native_1.View style={bundleStyles.legendItem}>
|
|
835
|
-
<
|
|
912
|
+
<BundleCategoryIcon type="font" size={13} color={AppColors_1.AppColors.purple500}/>
|
|
836
913
|
<react_native_1.Text style={bundleStyles.legendText}>
|
|
837
914
|
{t('bundle.legendFonts')}{' '}
|
|
838
915
|
<react_native_1.Text style={bundleStyles.legendVal}>
|
|
@@ -841,7 +918,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
841
918
|
</react_native_1.Text>
|
|
842
919
|
</react_native_1.View>
|
|
843
920
|
<react_native_1.View style={bundleStyles.legendItem}>
|
|
844
|
-
<
|
|
921
|
+
<BundleCategoryIcon type="json" size={13} color={AppColors_1.AppColors.emerald500}/>
|
|
845
922
|
<react_native_1.Text style={bundleStyles.legendText}>
|
|
846
923
|
{t('bundle.legendJson')}{' '}
|
|
847
924
|
<react_native_1.Text style={bundleStyles.legendVal}>
|
|
@@ -871,7 +948,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
871
948
|
|
|
872
949
|
{[
|
|
873
950
|
{
|
|
874
|
-
|
|
951
|
+
iconType: 'image',
|
|
875
952
|
title: t('bundle.catImagesTitle'),
|
|
876
953
|
count: summary.images.count,
|
|
877
954
|
size: t('bundle.fileSizeKb', { size: summary.images.kb }),
|
|
@@ -880,7 +957,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
880
957
|
desc: t('bundle.catImagesDesc'),
|
|
881
958
|
},
|
|
882
959
|
{
|
|
883
|
-
|
|
960
|
+
iconType: 'javascript',
|
|
884
961
|
title: t('bundle.catJsTitle'),
|
|
885
962
|
count: summary.js.count,
|
|
886
963
|
size: t('bundle.fileSizeKb', { size: summary.js.kb }),
|
|
@@ -889,7 +966,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
889
966
|
desc: t('bundle.catJsDesc'),
|
|
890
967
|
},
|
|
891
968
|
{
|
|
892
|
-
|
|
969
|
+
iconType: 'font',
|
|
893
970
|
title: t('bundle.catFontsTitle'),
|
|
894
971
|
count: summary.fonts.count,
|
|
895
972
|
size: t('bundle.fileSizeKb', { size: summary.fonts.kb }),
|
|
@@ -901,7 +978,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
901
978
|
.join(', ') || t('bundle.catFontsDesc'),
|
|
902
979
|
},
|
|
903
980
|
{
|
|
904
|
-
|
|
981
|
+
iconType: 'typescript',
|
|
905
982
|
title: t('bundle.catTsTitle'),
|
|
906
983
|
count: summary.ts.count,
|
|
907
984
|
size: t('bundle.fileSizeKb', { size: summary.ts.kb }),
|
|
@@ -910,7 +987,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
910
987
|
desc: t('bundle.catTsDesc'),
|
|
911
988
|
},
|
|
912
989
|
{
|
|
913
|
-
|
|
990
|
+
iconType: 'json',
|
|
914
991
|
title: t('bundle.catJsonTitle'),
|
|
915
992
|
count: summary.json.count,
|
|
916
993
|
size: t('bundle.fileSizeKb', { size: summary.json.kb }),
|
|
@@ -920,7 +997,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
920
997
|
},
|
|
921
998
|
].map((cat, cIdx) => (<react_native_1.View key={cIdx} style={bundleStyles.catRowCard}>
|
|
922
999
|
<react_native_1.View style={bundleStyles.catRowTop}>
|
|
923
|
-
<
|
|
1000
|
+
<BundleCategoryIcon type={cat.iconType} size={18} color={cat.color}/>
|
|
924
1001
|
<react_native_1.View style={{ flex: 1 }}>
|
|
925
1002
|
<react_native_1.Text style={bundleStyles.catRowTitle}>{cat.title}</react_native_1.Text>
|
|
926
1003
|
<react_native_1.Text style={bundleStyles.catRowDesc}>
|
|
@@ -1000,7 +1077,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1000
1077
|
tab.key === 'UNUSED' && isActive && { backgroundColor: AppColors_1.AppColors.red500, borderColor: AppColors_1.AppColors.red600 },
|
|
1001
1078
|
tab.key === 'CONSUMED' && isActive && { backgroundColor: AppColors_1.AppColors.emerald600, borderColor: AppColors_1.AppColors.emerald700 },
|
|
1002
1079
|
]}>
|
|
1003
|
-
<
|
|
1080
|
+
<BundleCategoryIcon type={tab.iconType} size={12} color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayTextStrong}/>
|
|
1004
1081
|
<react_native_1.Text style={[
|
|
1005
1082
|
bundleStyles.catPillText,
|
|
1006
1083
|
isActive && bundleStyles.catPillTextActive,
|
|
@@ -1118,15 +1195,17 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1118
1195
|
file.status === 'optimal' && bundleStyles.adviceOptimal,
|
|
1119
1196
|
isUnused && bundleStyles.adviceUnused,
|
|
1120
1197
|
]}>
|
|
1198
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'flex-start', gap: 5 }}>
|
|
1199
|
+
{isUnused ? (<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.red600} size={12}/>) : file.status === 'warning' ? (<NetworkIcons_1.LightbulbIcon color={AppColors_1.AppColors.amber800Warm} size={12}/>) : (<NetworkIcons_1.SparkleIcon color={AppColors_1.AppColors.emerald700} size={12}/>)}
|
|
1121
1200
|
<react_native_1.Text style={[
|
|
1122
1201
|
bundleStyles.adviceText,
|
|
1123
1202
|
file.status === 'warning' && { color: AppColors_1.AppColors.amber800Warm },
|
|
1124
1203
|
file.status === 'optimal' && { color: AppColors_1.AppColors.emerald700 },
|
|
1125
1204
|
isUnused && { color: AppColors_1.AppColors.red600 },
|
|
1126
1205
|
]}>
|
|
1127
|
-
{isUnused ? '🗑️ ' : file.status === 'warning' ? '💡 ' : '✨ '}
|
|
1128
1206
|
{file.advice}
|
|
1129
1207
|
</react_native_1.Text>
|
|
1208
|
+
</react_native_1.View>
|
|
1130
1209
|
</react_native_1.View>)}
|
|
1131
1210
|
</react_native_1.View>
|
|
1132
1211
|
</react_native_1.View>);
|
|
@@ -1243,9 +1322,12 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1243
1322
|
|
|
1244
1323
|
{/* Deprecation Warning Banner if deprecated */}
|
|
1245
1324
|
{pkg.isDeprecated && pkg.deprecationReason && (<react_native_1.View style={bundleStyles.deprecationBox}>
|
|
1246
|
-
<react_native_1.
|
|
1247
|
-
|
|
1248
|
-
|
|
1325
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 5 }}>
|
|
1326
|
+
<NetworkIcons_1.CircleAlertIcon color={AppColors_1.AppColors.errorColor} size={12}/>
|
|
1327
|
+
<react_native_1.Text style={bundleStyles.deprecationText}>
|
|
1328
|
+
{pkg.deprecationReason}
|
|
1329
|
+
</react_native_1.Text>
|
|
1330
|
+
</react_native_1.View>
|
|
1249
1331
|
</react_native_1.View>)}
|
|
1250
1332
|
|
|
1251
1333
|
<react_native_1.View style={bundleStyles.fileProgressTrack}>
|
|
@@ -1263,9 +1345,12 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1263
1345
|
{pkg.type === 'direct' ? t('bundle.direct') : t('bundle.transitive')}
|
|
1264
1346
|
</react_native_1.Text>
|
|
1265
1347
|
</react_native_1.View>
|
|
1266
|
-
{pkg.lastActive && (<react_native_1.
|
|
1267
|
-
|
|
1268
|
-
|
|
1348
|
+
{pkg.lastActive && (<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
1349
|
+
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.grayTextWeak} size={11}/>
|
|
1350
|
+
<react_native_1.Text style={bundleStyles.lastActiveText}>
|
|
1351
|
+
{pkg.lastActive}
|
|
1352
|
+
</react_native_1.Text>
|
|
1353
|
+
</react_native_1.View>)}
|
|
1269
1354
|
</react_native_1.View>
|
|
1270
1355
|
|
|
1271
1356
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
@@ -1362,14 +1447,16 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1362
1447
|
file.status === 'warning' && bundleStyles.adviceWarning,
|
|
1363
1448
|
file.status === 'optimal' && bundleStyles.adviceOptimal,
|
|
1364
1449
|
]}>
|
|
1365
|
-
<react_native_1.
|
|
1450
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'flex-start', gap: 5 }}>
|
|
1451
|
+
{file.status === 'warning' ? (<NetworkIcons_1.LightbulbIcon color={AppColors_1.AppColors.amber800Warm} size={12}/>) : (<NetworkIcons_1.SparkleIcon color={AppColors_1.AppColors.emerald700} size={12}/>)}
|
|
1452
|
+
<react_native_1.Text style={[
|
|
1366
1453
|
bundleStyles.adviceText,
|
|
1367
1454
|
file.status === 'warning' && { color: AppColors_1.AppColors.amber800Warm },
|
|
1368
1455
|
file.status === 'optimal' && { color: AppColors_1.AppColors.emerald700 },
|
|
1369
1456
|
]}>
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
</react_native_1.
|
|
1457
|
+
{file.advice}
|
|
1458
|
+
</react_native_1.Text>
|
|
1459
|
+
</react_native_1.View>
|
|
1373
1460
|
</react_native_1.View>)}
|
|
1374
1461
|
</react_native_1.View>
|
|
1375
1462
|
</react_native_1.View>))}
|
|
@@ -1414,12 +1501,16 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1414
1501
|
|
|
1415
1502
|
{[
|
|
1416
1503
|
{
|
|
1504
|
+
iconType: 'image',
|
|
1505
|
+
iconColor: AppColors_1.AppColors.pink500,
|
|
1417
1506
|
title: t('bundle.optTip1Title'),
|
|
1418
1507
|
desc: t('bundle.optTip1Desc'),
|
|
1419
1508
|
badge: t('bundle.highImpact'),
|
|
1420
1509
|
badgeColor: AppColors_1.AppColors.pink500,
|
|
1421
1510
|
},
|
|
1422
1511
|
{
|
|
1512
|
+
iconType: 'bolt',
|
|
1513
|
+
iconColor: isHermes ? AppColors_1.AppColors.emerald500 : AppColors_1.AppColors.amber500,
|
|
1423
1514
|
title: t('bundle.optTip2Title'),
|
|
1424
1515
|
desc: isHermes
|
|
1425
1516
|
? t('bundle.optTip2DescActive')
|
|
@@ -1428,18 +1519,24 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1428
1519
|
badgeColor: isHermes ? AppColors_1.AppColors.emerald500 : AppColors_1.AppColors.amber500,
|
|
1429
1520
|
},
|
|
1430
1521
|
{
|
|
1522
|
+
iconType: 'font',
|
|
1523
|
+
iconColor: AppColors_1.AppColors.purple500,
|
|
1431
1524
|
title: t('bundle.optTip3Title'),
|
|
1432
1525
|
desc: t('bundle.optTip3Desc'),
|
|
1433
1526
|
badge: t('bundle.mediumImpact'),
|
|
1434
1527
|
badgeColor: AppColors_1.AppColors.purple500,
|
|
1435
1528
|
},
|
|
1436
1529
|
{
|
|
1530
|
+
iconType: 'source',
|
|
1531
|
+
iconColor: AppColors_1.AppColors.sky500,
|
|
1437
1532
|
title: t('bundle.optTip4Title'),
|
|
1438
1533
|
desc: t('bundle.optTip4Desc'),
|
|
1439
1534
|
badge: t('bundle.bestPractice'),
|
|
1440
1535
|
badgeColor: AppColors_1.AppColors.sky500,
|
|
1441
1536
|
},
|
|
1442
1537
|
{
|
|
1538
|
+
iconType: 'overhead',
|
|
1539
|
+
iconColor: AppColors_1.AppColors.indigo500,
|
|
1443
1540
|
title: t('bundle.optTip5Title'),
|
|
1444
1541
|
desc: t('bundle.optTip5Desc'),
|
|
1445
1542
|
badge: t('bundle.bestPractice'),
|
|
@@ -1451,6 +1548,7 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1451
1548
|
<react_native_1.View style={bundleStyles.sNoBadge}>
|
|
1452
1549
|
<react_native_1.Text style={bundleStyles.sNoText}>#{tIdx + 1}</react_native_1.Text>
|
|
1453
1550
|
</react_native_1.View>
|
|
1551
|
+
<BundleCategoryIcon type={tip.iconType} size={14} color={tip.iconColor}/>
|
|
1454
1552
|
<react_native_1.Text style={bundleStyles.tipTitle}>{tip.title}</react_native_1.Text>
|
|
1455
1553
|
</react_native_1.View>
|
|
1456
1554
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
@@ -1650,11 +1748,6 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
1650
1748
|
gap: 5,
|
|
1651
1749
|
minWidth: '45%',
|
|
1652
1750
|
},
|
|
1653
|
-
legendDot: {
|
|
1654
|
-
width: 8,
|
|
1655
|
-
height: 8,
|
|
1656
|
-
borderRadius: 4,
|
|
1657
|
-
},
|
|
1658
1751
|
legendText: {
|
|
1659
1752
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
1660
1753
|
fontSize: 11,
|
|
@@ -1678,9 +1771,6 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
1678
1771
|
gap: 8,
|
|
1679
1772
|
marginBottom: 8,
|
|
1680
1773
|
},
|
|
1681
|
-
catRowIcon: {
|
|
1682
|
-
fontSize: 16,
|
|
1683
|
-
},
|
|
1684
1774
|
catRowTitle: {
|
|
1685
1775
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1686
1776
|
fontSize: 12,
|
|
@@ -1756,9 +1846,6 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
1756
1846
|
backgroundColor: AppColors_1.AppColors.brandPurple,
|
|
1757
1847
|
borderColor: AppColors_1.AppColors.brandPurple,
|
|
1758
1848
|
},
|
|
1759
|
-
catPillIcon: {
|
|
1760
|
-
fontSize: 11,
|
|
1761
|
-
},
|
|
1762
1849
|
catPillText: {
|
|
1763
1850
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
1764
1851
|
fontSize: 11,
|
|
@@ -306,14 +306,17 @@ const LogDetail = react_1.default.memo(() => {
|
|
|
306
306
|
paddingVertical: 2,
|
|
307
307
|
},
|
|
308
308
|
]}>
|
|
309
|
-
<react_native_1.
|
|
309
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 3 }}>
|
|
310
|
+
<NetworkIcons_1.DocIcon color={AppColors_1.AppColors.brandPurple} size={10}/>
|
|
311
|
+
<react_native_1.Text style={[
|
|
310
312
|
styles_1.default.metaChipText,
|
|
311
313
|
{ color: AppColors_1.AppColors.brandPurple, fontSize: 10, fontFamily: AppFonts_1.AppFonts.interBold },
|
|
312
314
|
]}>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
{originFrame.fileName}
|
|
316
|
+
{originFrame.lineNumber ? `:${originFrame.lineNumber}` : ''}
|
|
317
|
+
{originFrame.columnNumber ? `:${originFrame.columnNumber}` : ''}
|
|
318
|
+
</react_native_1.Text>
|
|
319
|
+
</react_native_1.View>
|
|
317
320
|
</react_native_1.View>)}
|
|
318
321
|
</react_native_1.View>
|
|
319
322
|
|
|
@@ -749,6 +752,8 @@ const LogDetail = react_1.default.memo(() => {
|
|
|
749
752
|
{frame.fileExt.toUpperCase()}
|
|
750
753
|
</react_native_1.Text>
|
|
751
754
|
</react_native_1.View>)}
|
|
755
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 3 }}>
|
|
756
|
+
<NetworkIcons_1.DocIcon color={isTopFrame ? AppColors_1.AppColors.brandPurple : AppColors_1.AppColors.grayTextWeak} size={10}/>
|
|
752
757
|
<react_native_1.Text style={{
|
|
753
758
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
754
759
|
fontSize: 10.5,
|
|
@@ -756,9 +761,10 @@ const LogDetail = react_1.default.memo(() => {
|
|
|
756
761
|
? AppColors_1.AppColors.brandPurple
|
|
757
762
|
: AppColors_1.AppColors.grayTextWeak,
|
|
758
763
|
}}>
|
|
759
|
-
|
|
764
|
+
{frame.fileName}
|
|
760
765
|
</react_native_1.Text>
|
|
761
766
|
</react_native_1.View>
|
|
767
|
+
</react_native_1.View>
|
|
762
768
|
|
|
763
769
|
{/* Full path */}
|
|
764
770
|
{frame.fullPath && frame.fullPath !== frame.fileName && (<react_native_1.Text selectable style={{
|