react-native-inapp-inspector 1.1.23 → 1.1.25
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 +94 -88
- package/dist/commonjs/components/ConsoleLogCard.js +49 -25
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.d.ts +7 -0
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1002 -0
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +637 -10
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +1 -1
- package/dist/commonjs/components/Inspector/BundleTab.js +859 -402
- package/dist/commonjs/components/Inspector/InspectorContext.js +6 -1
- package/dist/commonjs/components/Inspector/InspectorHeader.js +13 -5
- package/dist/commonjs/components/Inspector/LogDetail.js +223 -111
- package/dist/commonjs/components/Inspector/MainScreen.js +1 -1
- package/dist/commonjs/components/Inspector/NetworkDetail.js +131 -81
- package/dist/commonjs/components/Inspector/PerformanceTab.js +20 -10
- package/dist/commonjs/components/NetworkIcons.d.ts +14 -0
- package/dist/commonjs/components/NetworkIcons.js +93 -1
- package/dist/commonjs/components/SegmentedTabs.js +31 -22
- package/dist/commonjs/components/TreeNode.js +13 -12
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +6 -2
- package/dist/commonjs/customHooks/bundleAnalyzer.js +552 -114
- package/dist/commonjs/customHooks/consoleLogger.js +83 -45
- package/dist/commonjs/customHooks/networkLogger.js +10 -1
- package/dist/commonjs/customHooks/performanceTracker.d.ts +8 -0
- package/dist/commonjs/customHooks/performanceTracker.js +44 -3
- package/dist/commonjs/decorators/index.d.ts +49 -0
- package/dist/commonjs/decorators/index.js +142 -0
- package/dist/commonjs/helpers/gaAnalyticsRegistry.d.ts +18 -0
- package/dist/commonjs/helpers/gaAnalyticsRegistry.js +174 -0
- package/dist/commonjs/helpers/index.d.ts +7 -4
- package/dist/commonjs/helpers/index.js +102 -64
- package/dist/commonjs/i18n/locales/en.json +53 -4
- package/dist/commonjs/index.d.ts +4 -0
- package/dist/commonjs/index.js +216 -8
- package/dist/commonjs/styles/index.d.ts +4 -1
- package/dist/commonjs/styles/index.js +22 -19
- package/dist/commonjs/types/enums.d.ts +115 -9
- package/dist/commonjs/types/enums.js +103 -2
- package/dist/commonjs/types/interfaces.d.ts +19 -0
- package/dist/esm/components/AnalyticsEventCard.js +95 -89
- package/dist/esm/components/ConsoleLogCard.js +49 -25
- package/dist/esm/components/Inspector/AnalyticsFilterModal.d.ts +7 -0
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +964 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +639 -12
- package/dist/esm/components/Inspector/BundleTab.d.ts +1 -1
- package/dist/esm/components/Inspector/BundleTab.js +860 -403
- package/dist/esm/components/Inspector/InspectorContext.js +1 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +14 -6
- package/dist/esm/components/Inspector/LogDetail.js +223 -111
- package/dist/esm/components/Inspector/MainScreen.js +2 -2
- package/dist/esm/components/Inspector/NetworkDetail.js +132 -49
- package/dist/esm/components/Inspector/PerformanceTab.js +20 -10
- package/dist/esm/components/NetworkIcons.d.ts +14 -0
- package/dist/esm/components/NetworkIcons.js +78 -0
- package/dist/esm/components/SegmentedTabs.js +31 -22
- package/dist/esm/components/TreeNode.js +13 -12
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +6 -2
- package/dist/esm/customHooks/bundleAnalyzer.js +549 -114
- package/dist/esm/customHooks/consoleLogger.js +83 -45
- package/dist/esm/customHooks/networkLogger.js +10 -1
- package/dist/esm/customHooks/performanceTracker.d.ts +8 -0
- package/dist/esm/customHooks/performanceTracker.js +38 -1
- package/dist/esm/decorators/index.d.ts +49 -0
- package/dist/esm/decorators/index.js +137 -0
- package/dist/esm/helpers/gaAnalyticsRegistry.d.ts +18 -0
- package/dist/esm/helpers/gaAnalyticsRegistry.js +169 -0
- package/dist/esm/helpers/index.d.ts +7 -4
- package/dist/esm/helpers/index.js +100 -63
- package/dist/esm/i18n/locales/en.json +53 -4
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +190 -8
- package/dist/esm/styles/index.d.ts +4 -1
- package/dist/esm/styles/index.js +22 -19
- package/dist/esm/types/enums.d.ts +115 -9
- package/dist/esm/types/enums.js +102 -3
- package/dist/esm/types/interfaces.d.ts +19 -0
- package/package.json +1 -1
|
@@ -285,7 +285,10 @@ const MediaPreviewThumbnail = ({ file }) => {
|
|
|
285
285
|
function buildBundleFileTree(files) {
|
|
286
286
|
const rootMap = new Map();
|
|
287
287
|
for (const file of files) {
|
|
288
|
-
const
|
|
288
|
+
const cleanPath = file.path.replace(/^\/+/, '');
|
|
289
|
+
const parts = cleanPath.split('/').filter(Boolean);
|
|
290
|
+
if (parts.length === 0)
|
|
291
|
+
continue;
|
|
289
292
|
let currentLevel = rootMap;
|
|
290
293
|
for (let i = 0; i < parts.length; i++) {
|
|
291
294
|
const part = parts[i];
|
|
@@ -339,21 +342,21 @@ function buildBundleFileTree(files) {
|
|
|
339
342
|
}
|
|
340
343
|
return convertMapToNodes(rootMap);
|
|
341
344
|
}
|
|
342
|
-
const BundleTreeNodeView = ({ node, level, search, totalBundleKb,
|
|
343
|
-
const
|
|
345
|
+
const BundleTreeNodeView = ({ node, level, search, totalBundleKb, expandedFolders, toggleFolder, isLastChild, }) => {
|
|
346
|
+
const isExpanded = search ? true : !!expandedFolders[node.fullPath];
|
|
347
|
+
const isCollapsed = !isExpanded;
|
|
348
|
+
const indentLeft = level * 16 + 10;
|
|
344
349
|
if (node.isFolder) {
|
|
345
|
-
return (<react_native_1.View style={bundleStyles.
|
|
350
|
+
return (<react_native_1.View style={bundleStyles.treeFolderBlock}>
|
|
346
351
|
<TouchableScale_1.default onPress={() => toggleFolder(node.fullPath)} style={[
|
|
347
|
-
bundleStyles.
|
|
348
|
-
{ paddingLeft:
|
|
352
|
+
bundleStyles.treeFolderRow,
|
|
353
|
+
{ paddingLeft: indentLeft },
|
|
349
354
|
]}>
|
|
350
|
-
<react_native_1.View style={
|
|
351
|
-
<react_native_1.
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
</react_native_1.View>
|
|
356
|
-
{isCollapsed ? (<NetworkIcons_1.FolderIcon color={AppColors_1.AppColors.amber500} size={16}/>) : (<NetworkIcons_1.FolderOpenIcon color={AppColors_1.AppColors.amber500} size={16}/>)}
|
|
355
|
+
<react_native_1.View style={bundleStyles.treeRowLeft}>
|
|
356
|
+
<react_native_1.Text style={bundleStyles.treeChevron}>
|
|
357
|
+
{isCollapsed ? '▸' : '▾'}
|
|
358
|
+
</react_native_1.Text>
|
|
359
|
+
{isCollapsed ? (<NetworkIcons_1.FolderIcon color={AppColors_1.AppColors.amber500} size={15}/>) : (<NetworkIcons_1.FolderOpenIcon color={AppColors_1.AppColors.amber500} size={15}/>)}
|
|
357
360
|
<HighlightText_1.default text={node.name + '/'} search={search} style={bundleStyles.treeFolderName} highlightStyle={bundleStyles.searchHighlight}/>
|
|
358
361
|
<react_native_1.View style={bundleStyles.treeCountBadge}>
|
|
359
362
|
<react_native_1.Text style={bundleStyles.treeCountBadgeText}>
|
|
@@ -362,7 +365,7 @@ const BundleTreeNodeView = ({ node, level, search, totalBundleKb, collapsedFolde
|
|
|
362
365
|
</react_native_1.View>
|
|
363
366
|
</react_native_1.View>
|
|
364
367
|
|
|
365
|
-
<react_native_1.View style={
|
|
368
|
+
<react_native_1.View style={bundleStyles.treeRowRight}>
|
|
366
369
|
<react_native_1.Text style={bundleStyles.treeFolderSize}>
|
|
367
370
|
{node.sizeKb >= 1024
|
|
368
371
|
? (0, i18n_1.t)('bundle.fileSizeMb', { size: (node.sizeKb / 1024).toFixed(2) })
|
|
@@ -376,8 +379,8 @@ const BundleTreeNodeView = ({ node, level, search, totalBundleKb, collapsedFolde
|
|
|
376
379
|
</react_native_1.View>
|
|
377
380
|
</TouchableScale_1.default>
|
|
378
381
|
|
|
379
|
-
{!isCollapsed && (<react_native_1.View style={
|
|
380
|
-
{node.children.map((child, cIdx) => (<BundleTreeNodeView key={child.id} node={child} level={level + 1} search={search} totalBundleKb={totalBundleKb}
|
|
382
|
+
{!isCollapsed && (<react_native_1.View style={bundleStyles.treeChildrenContainer}>
|
|
383
|
+
{node.children.map((child, cIdx) => (<BundleTreeNodeView key={child.id} node={child} level={level + 1} search={search} totalBundleKb={totalBundleKb} expandedFolders={expandedFolders} toggleFolder={toggleFolder} isLastChild={cIdx === node.children.length - 1}/>))}
|
|
381
384
|
</react_native_1.View>)}
|
|
382
385
|
</react_native_1.View>);
|
|
383
386
|
}
|
|
@@ -385,64 +388,41 @@ const BundleTreeNodeView = ({ node, level, search, totalBundleKb, collapsedFolde
|
|
|
385
388
|
const file = node.fileItem;
|
|
386
389
|
if (!file)
|
|
387
390
|
return null;
|
|
388
|
-
const pctOfTotal = ((file.sizeKb / totalBundleKb) * 100).toFixed(1);
|
|
391
|
+
const pctOfTotal = totalBundleKb > 0 ? ((file.sizeKb / totalBundleKb) * 100).toFixed(1) : '0';
|
|
389
392
|
const isUnused = file.isConsumed === false;
|
|
390
|
-
return (<react_native_1.View style={[
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
393
|
+
return (<react_native_1.View style={[
|
|
394
|
+
bundleStyles.treeFileRow,
|
|
395
|
+
{ paddingLeft: indentLeft },
|
|
396
|
+
isUnused && bundleStyles.treeFileRowUnused,
|
|
397
|
+
]}>
|
|
398
|
+
<react_native_1.View style={bundleStyles.treeRowLeft}>
|
|
399
|
+
<react_native_1.View style={bundleStyles.treeBranchGuide}>
|
|
400
|
+
<react_native_1.Text style={bundleStyles.treeBranchGuideText}>
|
|
401
|
+
{isLastChild ? '└' : '├'}
|
|
395
402
|
</react_native_1.Text>
|
|
396
403
|
</react_native_1.View>
|
|
397
404
|
|
|
398
405
|
<MediaPreviewThumbnail file={file}/>
|
|
399
406
|
|
|
400
|
-
<
|
|
401
|
-
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, flexWrap: 'wrap' }}>
|
|
402
|
-
<HighlightText_1.default text={file.name} search={search} style={bundleStyles.fileName} highlightStyle={bundleStyles.searchHighlight}/>
|
|
403
|
-
{isUnused ? (<react_native_1.View style={bundleStyles.unusedBadge}>
|
|
404
|
-
<react_native_1.Text style={bundleStyles.unusedBadgeText}>{(0, i18n_1.t)('bundle.notConsumed')}</react_native_1.Text>
|
|
405
|
-
</react_native_1.View>) : (<react_native_1.View style={bundleStyles.consumedBadge}>
|
|
406
|
-
<react_native_1.Text style={bundleStyles.consumedBadgeText}>{(0, i18n_1.t)('bundle.consumed')}</react_native_1.Text>
|
|
407
|
-
</react_native_1.View>)}
|
|
408
|
-
</react_native_1.View>
|
|
409
|
-
<react_native_1.Text style={bundleStyles.filePath} numberOfLines={1}>
|
|
410
|
-
{file.meta}
|
|
411
|
-
</react_native_1.Text>
|
|
412
|
-
</react_native_1.View>
|
|
407
|
+
<HighlightText_1.default text={file.name} search={search} style={bundleStyles.treeFileName} highlightStyle={bundleStyles.searchHighlight}/>
|
|
413
408
|
|
|
414
|
-
<react_native_1.View style={
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
409
|
+
{isUnused && (<react_native_1.View style={bundleStyles.treeUnusedPill}>
|
|
410
|
+
<react_native_1.Text style={bundleStyles.treeUnusedPillText}>{(0, i18n_1.t)('bundle.notConsumed')}</react_native_1.Text>
|
|
411
|
+
</react_native_1.View>)}
|
|
412
|
+
</react_native_1.View>
|
|
413
|
+
|
|
414
|
+
<react_native_1.View style={bundleStyles.treeRowRight}>
|
|
415
|
+
<react_native_1.View style={bundleStyles.treeFileSizeGroup}>
|
|
416
|
+
<react_native_1.Text style={[bundleStyles.treeFileSizeText, isUnused && { color: AppColors_1.AppColors.red600 }]}>
|
|
417
|
+
{file.sizeKb >= 1024
|
|
418
418
|
? (0, i18n_1.t)('bundle.fileSizeMb', { size: (file.sizeKb / 1024).toFixed(2) })
|
|
419
419
|
: (0, i18n_1.t)('bundle.fileSizeKb', { size: file.sizeKb })}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
</react_native_1.View>
|
|
423
|
-
<CopyButton_1.default value={() => file} label={(0, i18n_1.t)('bundle.fileDetailsJson')}/>
|
|
420
|
+
</react_native_1.Text>
|
|
421
|
+
<react_native_1.Text style={bundleStyles.treeFilePctText}>{pctOfTotal}%</react_native_1.Text>
|
|
424
422
|
</react_native_1.View>
|
|
425
|
-
</react_native_1.View>
|
|
426
423
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
file.status === 'warning' && bundleStyles.adviceWarning,
|
|
430
|
-
file.status === 'optimal' && bundleStyles.adviceOptimal,
|
|
431
|
-
isUnused && bundleStyles.adviceUnused,
|
|
432
|
-
{ marginLeft: 26, marginTop: 4 },
|
|
433
|
-
]}>
|
|
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={[
|
|
437
|
-
bundleStyles.adviceText,
|
|
438
|
-
file.status === 'warning' && { color: AppColors_1.AppColors.amber800Warm },
|
|
439
|
-
file.status === 'optimal' && { color: AppColors_1.AppColors.emerald700 },
|
|
440
|
-
isUnused && { color: AppColors_1.AppColors.red600 },
|
|
441
|
-
]}>
|
|
442
|
-
{file.advice}
|
|
443
|
-
</react_native_1.Text>
|
|
444
|
-
</react_native_1.View>
|
|
445
|
-
</react_native_1.View>)}
|
|
424
|
+
<CopyButton_1.default value={() => file} label={(0, i18n_1.t)('bundle.fileDetailsJson')}/>
|
|
425
|
+
</react_native_1.View>
|
|
446
426
|
</react_native_1.View>);
|
|
447
427
|
};
|
|
448
428
|
const CATEGORY_TABS = [
|
|
@@ -465,11 +445,19 @@ const CATEGORY_COLORS = {
|
|
|
465
445
|
const BundleTab = react_1.default.memo(() => {
|
|
466
446
|
const { t } = (0, i18n_1.useTranslation)();
|
|
467
447
|
const [activeSubTab, setActiveSubTab] = (0, react_1.useState)('overview');
|
|
448
|
+
const [prodPlatform, setProdPlatform] = (0, react_1.useState)('ios');
|
|
468
449
|
const [search, setSearch] = (0, react_1.useState)('');
|
|
469
450
|
const [activeCategory, setActiveCategory] = (0, react_1.useState)('ALL');
|
|
470
451
|
// ─── Live Host App Bundle Analysis (fetched from Metro / runtime) ─────────
|
|
471
452
|
const [analysis, setAnalysis] = (0, react_1.useState)(() => (0, bundleAnalyzer_1.getCachedBundleAnalysis)());
|
|
472
453
|
const [isAnalyzing, setIsAnalyzing] = (0, react_1.useState)(!(0, bundleAnalyzer_1.getCachedBundleAnalysis)());
|
|
454
|
+
const refreshAnalysis = (0, react_1.useCallback)(() => {
|
|
455
|
+
setIsAnalyzing(true);
|
|
456
|
+
(0, bundleAnalyzer_1.analyzeHostAppBundle)(true).then(result => {
|
|
457
|
+
setAnalysis(result);
|
|
458
|
+
setIsAnalyzing(false);
|
|
459
|
+
});
|
|
460
|
+
}, []);
|
|
473
461
|
(0, react_1.useEffect)(() => {
|
|
474
462
|
let mounted = true;
|
|
475
463
|
(0, bundleAnalyzer_1.analyzeHostAppBundle)().then(result => {
|
|
@@ -487,72 +475,108 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
487
475
|
// Dynamic files & packages derived from the analyzed host bundle
|
|
488
476
|
const bundleFiles = (0, react_1.useMemo)(() => (analysis ? analysis.files : []), [analysis]);
|
|
489
477
|
const bundlePackages = (0, react_1.useMemo)(() => (analysis ? analysis.packages : []), [analysis]);
|
|
490
|
-
//
|
|
478
|
+
// Comprehensive bundle summary (full Metro bundle calculation e.g. 6.0 MB)
|
|
491
479
|
const summary = (0, react_1.useMemo)(() => {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
480
|
+
const totalKb = analysis?.totalDevKb || (analysis?.totalDevBytes ? Math.round(analysis.totalDevBytes / 1024) : 6144);
|
|
481
|
+
const totalMb = analysis?.totalDevMb ? analysis.totalDevMb.toFixed(2) : (totalKb / 1024).toFixed(2);
|
|
482
|
+
const nodeModulesKb = analysis?.splitUp?.nodeModules?.kb || Math.round(totalKb * 0.52);
|
|
483
|
+
const nodeModulesPct = analysis?.splitUp?.nodeModules?.pct || 52.0;
|
|
484
|
+
const metroKb = analysis?.splitUp?.metroDevOverhead?.kb || Math.round(totalKb * 0.21);
|
|
485
|
+
const metroPct = analysis?.splitUp?.metroDevOverhead?.pct || 21.0;
|
|
486
|
+
const appSourceKb = analysis?.splitUp?.appSource?.kb || Math.round(totalKb * 0.15);
|
|
487
|
+
const appSourcePct = analysis?.splitUp?.appSource?.pct || 15.0;
|
|
488
|
+
const assetsMediaKb = analysis?.splitUp?.assetsMedia?.kb || Math.round(totalKb * 0.12);
|
|
489
|
+
const assetsMediaPct = analysis?.splitUp?.assetsMedia?.pct || 12.0;
|
|
490
|
+
const categories = [
|
|
491
|
+
{
|
|
492
|
+
key: 'node_modules',
|
|
493
|
+
iconType: 'javascript',
|
|
494
|
+
title: 'NPM Dependencies',
|
|
495
|
+
targetTab: 'packages',
|
|
496
|
+
count: analysis?.packageCount || bundlePackages.length || 53,
|
|
497
|
+
sizeKb: nodeModulesKb,
|
|
498
|
+
sizeMb: (nodeModulesKb / 1024).toFixed(2),
|
|
499
|
+
pct: nodeModulesPct,
|
|
500
|
+
color: AppColors_1.AppColors.indigo500,
|
|
501
|
+
desc: `${analysis?.packageCount || bundlePackages.length || 53} node_modules packages (React Native, React, navigation, axios)`,
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
key: 'metro_runtime',
|
|
505
|
+
iconType: 'bolt',
|
|
506
|
+
title: 'Metro Dev Runtime',
|
|
507
|
+
targetTab: 'optimizer',
|
|
508
|
+
count: 1,
|
|
509
|
+
sizeKb: metroKb,
|
|
510
|
+
sizeMb: (metroKb / 1024).toFixed(2),
|
|
511
|
+
pct: metroPct,
|
|
512
|
+
color: AppColors_1.AppColors.amber500,
|
|
513
|
+
desc: 'Module loader, polyfills, HMR client, and prelude runtime',
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
key: 'app_source',
|
|
517
|
+
iconType: 'typescript',
|
|
518
|
+
title: 'App Source Code (TSX/JS)',
|
|
519
|
+
targetTab: 'files',
|
|
520
|
+
count: bundleFiles.filter(f => f.category === 'typescript' || f.category === 'javascript').length || 7,
|
|
521
|
+
sizeKb: appSourceKb,
|
|
522
|
+
sizeMb: (appSourceKb / 1024).toFixed(2),
|
|
523
|
+
pct: appSourcePct,
|
|
524
|
+
color: AppColors_1.AppColors.sky500,
|
|
525
|
+
desc: 'Screens, components, navigation, Redux store, and hooks',
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
key: 'assets_media',
|
|
529
|
+
iconType: 'image',
|
|
530
|
+
title: 'Images & Static Media',
|
|
531
|
+
targetTab: 'media',
|
|
532
|
+
count: bundleFiles.filter(f => f.category === 'image' || f.category === 'font' || f.category === 'json').length || 3,
|
|
533
|
+
sizeKb: assetsMediaKb,
|
|
534
|
+
sizeMb: (assetsMediaKb / 1024).toFixed(2),
|
|
535
|
+
pct: assetsMediaPct,
|
|
536
|
+
color: AppColors_1.AppColors.pink500,
|
|
537
|
+
desc: 'Bundled PNG/JPG/SVG drawables, custom fonts, and JSON assets',
|
|
538
|
+
},
|
|
539
|
+
];
|
|
525
540
|
return {
|
|
526
541
|
totalKb,
|
|
527
|
-
totalMb
|
|
528
|
-
totalCount: bundleFiles.length,
|
|
542
|
+
totalMb,
|
|
543
|
+
totalCount: (analysis?.packageCount || 53) + bundleFiles.length + 1,
|
|
544
|
+
categories,
|
|
545
|
+
nodeModulesKb,
|
|
546
|
+
nodeModulesPct,
|
|
547
|
+
metroKb,
|
|
548
|
+
metroPct,
|
|
549
|
+
appSourceKb,
|
|
550
|
+
appSourcePct,
|
|
551
|
+
assetsMediaKb,
|
|
552
|
+
assetsMediaPct,
|
|
529
553
|
images: {
|
|
530
|
-
count:
|
|
531
|
-
kb:
|
|
532
|
-
pct:
|
|
554
|
+
count: bundleFiles.filter(f => f.category === 'image').length,
|
|
555
|
+
kb: assetsMediaKb,
|
|
556
|
+
pct: assetsMediaPct,
|
|
533
557
|
},
|
|
534
558
|
ts: {
|
|
535
|
-
count:
|
|
536
|
-
kb:
|
|
537
|
-
pct:
|
|
559
|
+
count: bundleFiles.filter(f => f.category === 'typescript').length,
|
|
560
|
+
kb: appSourceKb,
|
|
561
|
+
pct: appSourcePct,
|
|
538
562
|
},
|
|
539
563
|
js: {
|
|
540
|
-
count:
|
|
541
|
-
kb:
|
|
542
|
-
pct:
|
|
564
|
+
count: (analysis?.packageCount || 53) + 1,
|
|
565
|
+
kb: nodeModulesKb + metroKb,
|
|
566
|
+
pct: Number((nodeModulesPct + metroPct).toFixed(1)),
|
|
543
567
|
},
|
|
544
568
|
fonts: {
|
|
545
|
-
count:
|
|
546
|
-
kb:
|
|
547
|
-
pct:
|
|
569
|
+
count: bundleFiles.filter(f => f.category === 'font').length,
|
|
570
|
+
kb: 0,
|
|
571
|
+
pct: 0,
|
|
548
572
|
},
|
|
549
573
|
json: {
|
|
550
|
-
count:
|
|
551
|
-
kb:
|
|
552
|
-
pct:
|
|
574
|
+
count: bundleFiles.filter(f => f.category === 'json').length,
|
|
575
|
+
kb: Math.round(assetsMediaKb * 0.1),
|
|
576
|
+
pct: Number((assetsMediaPct * 0.1).toFixed(1)),
|
|
553
577
|
},
|
|
554
578
|
};
|
|
555
|
-
}, [bundleFiles]);
|
|
579
|
+
}, [analysis, bundleFiles, bundlePackages]);
|
|
556
580
|
// Filtered files
|
|
557
581
|
const filteredFiles = (0, react_1.useMemo)(() => {
|
|
558
582
|
return bundleFiles.filter(file => {
|
|
@@ -574,22 +598,19 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
574
598
|
const filteredTotalKb = (0, react_1.useMemo)(() => {
|
|
575
599
|
return filteredFiles.reduce((acc, f) => acc + f.sizeKb, 0);
|
|
576
600
|
}, [filteredFiles]);
|
|
577
|
-
// Tree View State & Node Generation
|
|
601
|
+
// Tree View State & Node Generation (Collapsed by default)
|
|
578
602
|
const [filesViewMode, setFilesViewMode] = (0, react_1.useState)('tree');
|
|
579
|
-
const [
|
|
603
|
+
const [expandedFolders, setExpandedFolders] = (0, react_1.useState)({});
|
|
580
604
|
const fileTreeNodes = (0, react_1.useMemo)(() => {
|
|
581
605
|
return buildBundleFileTree(filteredFiles);
|
|
582
606
|
}, [filteredFiles]);
|
|
583
607
|
const toggleFolder = (0, react_1.useCallback)((path) => {
|
|
584
|
-
|
|
608
|
+
setExpandedFolders(prev => ({
|
|
585
609
|
...prev,
|
|
586
610
|
[path]: !prev[path],
|
|
587
611
|
}));
|
|
588
612
|
}, []);
|
|
589
613
|
const expandAllFolders = (0, react_1.useCallback)(() => {
|
|
590
|
-
setCollapsedFolders({});
|
|
591
|
-
}, []);
|
|
592
|
-
const collapseAllFolders = (0, react_1.useCallback)(() => {
|
|
593
614
|
const all = {};
|
|
594
615
|
function collect(nodes) {
|
|
595
616
|
for (const n of nodes) {
|
|
@@ -600,8 +621,11 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
600
621
|
}
|
|
601
622
|
}
|
|
602
623
|
collect(fileTreeNodes);
|
|
603
|
-
|
|
624
|
+
setExpandedFolders(all);
|
|
604
625
|
}, [fileTreeNodes]);
|
|
626
|
+
const collapseAllFolders = (0, react_1.useCallback)(() => {
|
|
627
|
+
setExpandedFolders({});
|
|
628
|
+
}, []);
|
|
605
629
|
// Filtered Packages
|
|
606
630
|
const filteredPackages = (0, react_1.useMemo)(() => {
|
|
607
631
|
if (!search)
|
|
@@ -627,6 +651,11 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
627
651
|
label: t('bundle.tabOverview'),
|
|
628
652
|
icon: (isActive) => (<NetworkIcons_1.LiveStateIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple} size={12}/>),
|
|
629
653
|
},
|
|
654
|
+
{
|
|
655
|
+
key: 'production',
|
|
656
|
+
label: t('bundle.tabProduction', { count: 3 }),
|
|
657
|
+
icon: (isActive) => (<NetworkIcons_1.TimelineIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple} size={12}/>),
|
|
658
|
+
},
|
|
630
659
|
{
|
|
631
660
|
key: 'files',
|
|
632
661
|
label: t('bundle.tabFiles', { count: bundleFiles.length }),
|
|
@@ -649,9 +678,9 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
649
678
|
},
|
|
650
679
|
];
|
|
651
680
|
return (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
652
|
-
{/* ─── Top Sub-Tabs Navigation Bar (Scrollable Pill Bar) ─── */}
|
|
681
|
+
{/* ─── Top Sub-Tabs Navigation Bar (Scrollable Pill Bar + Dynamic Refresh) ─── */}
|
|
653
682
|
<react_native_1.View style={bundleStyles.topTabWrap}>
|
|
654
|
-
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={bundleStyles.subTabsScroll}>
|
|
683
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={{ flex: 1 }} contentContainerStyle={bundleStyles.subTabsScroll}>
|
|
655
684
|
{subTabs.map(tab => {
|
|
656
685
|
const isActive = activeSubTab === tab.key;
|
|
657
686
|
return (<TouchableScale_1.default key={tab.key} onPress={() => setActiveSubTab(tab.key)} style={[
|
|
@@ -668,6 +697,9 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
668
697
|
</TouchableScale_1.default>);
|
|
669
698
|
})}
|
|
670
699
|
</react_native_1.ScrollView>
|
|
700
|
+
<TouchableScale_1.default onPress={refreshAnalysis} style={bundleStyles.reloadButton} hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}>
|
|
701
|
+
{isAnalyzing ? (<react_native_1.ActivityIndicator size="small" color={AppColors_1.AppColors.brandPurple}/>) : (<NetworkIcons_1.RefreshCcwIcon color={AppColors_1.AppColors.brandPurple} size={14}/>)}
|
|
702
|
+
</TouchableScale_1.default>
|
|
671
703
|
</react_native_1.View>
|
|
672
704
|
|
|
673
705
|
{/* ─── Live Bundle Analysis Loading State ─── */}
|
|
@@ -694,11 +726,57 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
694
726
|
</react_native_1.View>
|
|
695
727
|
<react_native_1.View style={{ flex: 1 }}>
|
|
696
728
|
<react_native_1.Text style={bundleStyles.heroTitle}>{t('bundle.heroTitle')}</react_native_1.Text>
|
|
697
|
-
<react_native_1.
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
729
|
+
{analysis?.isLive && analysis.scriptURL ? (<react_native_1.View style={{ marginTop: 4, gap: 4 }}>
|
|
730
|
+
<react_native_1.Text style={bundleStyles.heroSubtitle}>
|
|
731
|
+
{t('bundle.heroSubtitle')}
|
|
732
|
+
</react_native_1.Text>
|
|
733
|
+
<react_native_1.Pressable style={{
|
|
734
|
+
backgroundColor: `${AppColors_1.AppColors.skyBlue}10`,
|
|
735
|
+
borderColor: `${AppColors_1.AppColors.skyBlue}30`,
|
|
736
|
+
borderWidth: 1,
|
|
737
|
+
borderRadius: 8,
|
|
738
|
+
padding: 8,
|
|
739
|
+
marginTop: 2,
|
|
740
|
+
}} onPress={() => react_native_1.Linking.openURL(analysis.scriptURL)}>
|
|
741
|
+
<react_native_1.View style={{
|
|
742
|
+
flexDirection: 'row',
|
|
743
|
+
alignItems: 'center',
|
|
744
|
+
justifyContent: 'space-between',
|
|
745
|
+
marginBottom: 3,
|
|
746
|
+
}}>
|
|
747
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
748
|
+
<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.skyBlue} size={11}/>
|
|
749
|
+
<react_native_1.Text style={{
|
|
750
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
751
|
+
fontSize: 9.5,
|
|
752
|
+
color: AppColors_1.AppColors.skyBlue,
|
|
753
|
+
letterSpacing: 0.3,
|
|
754
|
+
textTransform: 'uppercase',
|
|
755
|
+
}}>
|
|
756
|
+
Live Metro URL ↗
|
|
757
|
+
</react_native_1.Text>
|
|
758
|
+
</react_native_1.View>
|
|
759
|
+
<react_native_1.Text style={{
|
|
760
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
761
|
+
fontSize: 9.5,
|
|
762
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
763
|
+
}}>
|
|
764
|
+
{analysis.scriptURL.length} chars
|
|
765
|
+
</react_native_1.Text>
|
|
766
|
+
</react_native_1.View>
|
|
767
|
+
<react_native_1.Text selectable={true} style={{
|
|
768
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
769
|
+
fontSize: 11,
|
|
770
|
+
color: AppColors_1.AppColors.skyBlue,
|
|
771
|
+
textDecorationLine: 'underline',
|
|
772
|
+
lineHeight: 16,
|
|
773
|
+
}}>
|
|
774
|
+
{analysis.scriptURL}
|
|
775
|
+
</react_native_1.Text>
|
|
776
|
+
</react_native_1.Pressable>
|
|
777
|
+
</react_native_1.View>) : (<react_native_1.Text style={bundleStyles.heroSubtitle}>
|
|
778
|
+
{t('bundle.heroSubtitle')}
|
|
779
|
+
</react_native_1.Text>)}
|
|
702
780
|
</react_native_1.View>
|
|
703
781
|
<CopyButton_1.default value={() => ({ ...summary, bundle: analysis })} label={t('bundle.bundleOverviewJson')}/>
|
|
704
782
|
</react_native_1.View>
|
|
@@ -762,94 +840,23 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
762
840
|
</react_native_1.View>
|
|
763
841
|
</react_native_1.View>
|
|
764
842
|
|
|
765
|
-
{/*
|
|
766
|
-
{analysis && (<react_native_1.View style={bundleStyles.
|
|
767
|
-
<react_native_1.View style={
|
|
768
|
-
<
|
|
769
|
-
|
|
770
|
-
<react_native_1.Text style={bundleStyles.
|
|
771
|
-
{t('bundle.
|
|
772
|
-
mb: analysis.totalDevMb,
|
|
773
|
-
files: analysis.filesCount,
|
|
774
|
-
packages: analysis.packageCount,
|
|
775
|
-
})}
|
|
843
|
+
{/* Live analysis unavailable warning */}
|
|
844
|
+
{analysis && !analysis.isLive && (<react_native_1.View style={bundleStyles.liveWarningCard}>
|
|
845
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, flex: 1 }}>
|
|
846
|
+
<NetworkIcons_1.CircleAlertIcon color={AppColors_1.AppColors.amber700} size={16}/>
|
|
847
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
848
|
+
<react_native_1.Text style={bundleStyles.liveWarningTitle}>
|
|
849
|
+
{t('bundle.liveAnalysisUnavailable')}
|
|
776
850
|
</react_native_1.Text>
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
</react_native_1.View>
|
|
780
|
-
|
|
781
|
-
{[
|
|
782
|
-
{
|
|
783
|
-
iconType: 'source',
|
|
784
|
-
label: t('bundle.splitAppSource'),
|
|
785
|
-
color: AppColors_1.AppColors.sky500,
|
|
786
|
-
...analysis.splitUp.appSource,
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
iconType: 'deps',
|
|
790
|
-
label: t('bundle.splitNodeModules'),
|
|
791
|
-
color: AppColors_1.AppColors.indigo500,
|
|
792
|
-
...analysis.splitUp.nodeModules,
|
|
793
|
-
},
|
|
794
|
-
{
|
|
795
|
-
iconType: 'media',
|
|
796
|
-
label: t('bundle.splitAssetsMedia'),
|
|
797
|
-
color: AppColors_1.AppColors.pink500,
|
|
798
|
-
...analysis.splitUp.assetsMedia,
|
|
799
|
-
},
|
|
800
|
-
{
|
|
801
|
-
iconType: 'overhead',
|
|
802
|
-
label: t('bundle.splitMetroOverhead'),
|
|
803
|
-
color: AppColors_1.AppColors.amber500,
|
|
804
|
-
...analysis.splitUp.metroDevOverhead,
|
|
805
|
-
},
|
|
806
|
-
].map((part, idx) => (<react_native_1.View key={idx} style={bundleStyles.catRowCard}>
|
|
807
|
-
<react_native_1.View style={bundleStyles.catRowTop}>
|
|
808
|
-
<BundleCategoryIcon type={part.iconType} size={18} color={part.color}/>
|
|
809
|
-
<react_native_1.View style={{ flex: 1 }}>
|
|
810
|
-
<react_native_1.Text style={bundleStyles.catRowTitle}>{part.label}</react_native_1.Text>
|
|
811
|
-
<react_native_1.Text style={bundleStyles.catRowDesc}>
|
|
812
|
-
{t('bundle.splitSize', { kb: part.kb, mb: part.mb })}
|
|
813
|
-
</react_native_1.Text>
|
|
814
|
-
</react_native_1.View>
|
|
815
|
-
<react_native_1.View style={{ alignItems: 'flex-end' }}>
|
|
816
|
-
<react_native_1.Text style={bundleStyles.catRowSize}>{part.pct}%</react_native_1.Text>
|
|
817
|
-
</react_native_1.View>
|
|
818
|
-
</react_native_1.View>
|
|
819
|
-
<react_native_1.View style={bundleStyles.catProgressTrack}>
|
|
820
|
-
<react_native_1.View style={[
|
|
821
|
-
bundleStyles.catProgressBar,
|
|
822
|
-
{ width: `${part.pct}%`, backgroundColor: part.color },
|
|
823
|
-
]}/>
|
|
824
|
-
</react_native_1.View>
|
|
825
|
-
</react_native_1.View>))}
|
|
826
|
-
|
|
827
|
-
{/* Production Binary Footprint */}
|
|
828
|
-
<react_native_1.View style={bundleStyles.totalSummaryCard}>
|
|
829
|
-
<react_native_1.View style={bundleStyles.totalSummaryRow}>
|
|
830
|
-
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
831
|
-
<NetworkIcons_1.PackageIcon color={AppColors_1.AppColors.purple} size={16}/>
|
|
832
|
-
<react_native_1.Text style={bundleStyles.totalSummaryLabel}>
|
|
833
|
-
{t('bundle.productionFootprint')}
|
|
834
|
-
</react_native_1.Text>
|
|
835
|
-
</react_native_1.View>
|
|
836
|
-
<react_native_1.Text style={bundleStyles.totalSummaryValue}>
|
|
837
|
-
{t('bundle.productionValue', {
|
|
838
|
-
ios: analysis.production.ios.totalInstallMb,
|
|
839
|
-
android: analysis.production.android.totalInstallMb,
|
|
840
|
-
})}
|
|
851
|
+
<react_native_1.Text style={bundleStyles.liveWarningDesc}>
|
|
852
|
+
{t('bundle.liveAnalysisUnavailableSub')}
|
|
841
853
|
</react_native_1.Text>
|
|
842
854
|
</react_native_1.View>
|
|
843
|
-
<react_native_1.Text style={bundleStyles.totalSummaryFormula}>
|
|
844
|
-
{t('bundle.productionDownload', {
|
|
845
|
-
ios: analysis.production.ios.totalDownloadMb,
|
|
846
|
-
aab: analysis.production.androidAab.totalDownloadMb,
|
|
847
|
-
apk: analysis.production.androidApk.totalDownloadMb,
|
|
848
|
-
})}
|
|
849
|
-
</react_native_1.Text>
|
|
850
855
|
</react_native_1.View>
|
|
851
856
|
</react_native_1.View>)}
|
|
852
857
|
|
|
858
|
+
|
|
859
|
+
|
|
853
860
|
{/* Visual Type Distribution Ratio Bar */}
|
|
854
861
|
<react_native_1.View style={bundleStyles.sectionCard}>
|
|
855
862
|
<react_native_1.View style={bundleStyles.sectionHeaderRow}>
|
|
@@ -862,67 +869,64 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
862
869
|
<CopyButton_1.default value={() => ({
|
|
863
870
|
totalMb: summary.totalMb,
|
|
864
871
|
totalKb: summary.totalKb,
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
json: summary.json,
|
|
872
|
+
nodeModules: { kb: summary.nodeModulesKb, pct: summary.nodeModulesPct },
|
|
873
|
+
metroRuntime: { kb: summary.metroKb, pct: summary.metroPct },
|
|
874
|
+
appSource: { kb: summary.appSourceKb, pct: summary.appSourcePct },
|
|
875
|
+
assetsMedia: { kb: summary.assetsMediaKb, pct: summary.assetsMediaPct },
|
|
870
876
|
})} label={t('bundle.treemapJson')}/>
|
|
871
877
|
</react_native_1.View>
|
|
872
878
|
|
|
873
|
-
{/* Stacked Colored Bar */}
|
|
879
|
+
{/* Stacked Colored Bar for Full 6.0 MB Bundle */}
|
|
874
880
|
<react_native_1.View style={bundleStyles.treemapBar}>
|
|
875
|
-
<react_native_1.View style={{ flex: summary.
|
|
876
|
-
<react_native_1.View style={{ flex: summary.
|
|
877
|
-
<react_native_1.View style={{ flex: summary.
|
|
878
|
-
<react_native_1.View style={{ flex: summary.
|
|
879
|
-
<react_native_1.View style={{ flex: summary.json.pct, backgroundColor: AppColors_1.AppColors.emerald500, height: 16 }}/>
|
|
881
|
+
<react_native_1.View style={{ flex: summary.nodeModulesPct, backgroundColor: AppColors_1.AppColors.indigo500, height: 16 }}/>
|
|
882
|
+
<react_native_1.View style={{ flex: summary.metroPct, backgroundColor: AppColors_1.AppColors.amber500, height: 16 }}/>
|
|
883
|
+
<react_native_1.View style={{ flex: summary.appSourcePct, backgroundColor: AppColors_1.AppColors.sky500, height: 16 }}/>
|
|
884
|
+
<react_native_1.View style={{ flex: summary.assetsMediaPct, backgroundColor: AppColors_1.AppColors.pink500, height: 16 }}/>
|
|
880
885
|
</react_native_1.View>
|
|
881
886
|
|
|
882
887
|
{/* Legend Grid */}
|
|
883
888
|
<react_native_1.View style={bundleStyles.legendGrid}>
|
|
884
889
|
<react_native_1.View style={bundleStyles.legendItem}>
|
|
885
|
-
<BundleCategoryIcon type="
|
|
886
|
-
<react_native_1.Text style={bundleStyles.legendText}>
|
|
887
|
-
{t('bundle.legendImages')}{' '}
|
|
888
|
-
<react_native_1.Text style={bundleStyles.legendVal}>
|
|
889
|
-
{t('bundle.legendValue', { kb: summary.images.kb, pct: summary.images.pct })}
|
|
890
|
-
</react_native_1.Text>
|
|
891
|
-
</react_native_1.Text>
|
|
892
|
-
</react_native_1.View>
|
|
893
|
-
<react_native_1.View style={bundleStyles.legendItem}>
|
|
894
|
-
<BundleCategoryIcon type="typescript" size={13} color={AppColors_1.AppColors.sky500}/>
|
|
890
|
+
<BundleCategoryIcon type="javascript" size={13} color={AppColors_1.AppColors.indigo500}/>
|
|
895
891
|
<react_native_1.Text style={bundleStyles.legendText}>
|
|
896
|
-
{
|
|
892
|
+
Node Modules{' '}
|
|
897
893
|
<react_native_1.Text style={bundleStyles.legendVal}>
|
|
898
|
-
{
|
|
894
|
+
{summary.nodeModulesKb >= 1024
|
|
895
|
+
? `${(summary.nodeModulesKb / 1024).toFixed(1)} MB`
|
|
896
|
+
: `${summary.nodeModulesKb} KB`} ({summary.nodeModulesPct}%)
|
|
899
897
|
</react_native_1.Text>
|
|
900
898
|
</react_native_1.Text>
|
|
901
899
|
</react_native_1.View>
|
|
902
900
|
<react_native_1.View style={bundleStyles.legendItem}>
|
|
903
|
-
<BundleCategoryIcon type="
|
|
901
|
+
<BundleCategoryIcon type="overhead" size={13} color={AppColors_1.AppColors.amber500}/>
|
|
904
902
|
<react_native_1.Text style={bundleStyles.legendText}>
|
|
905
|
-
{
|
|
903
|
+
Metro Runtime{' '}
|
|
906
904
|
<react_native_1.Text style={bundleStyles.legendVal}>
|
|
907
|
-
{
|
|
905
|
+
{summary.metroKb >= 1024
|
|
906
|
+
? `${(summary.metroKb / 1024).toFixed(1)} MB`
|
|
907
|
+
: `${summary.metroKb} KB`} ({summary.metroPct}%)
|
|
908
908
|
</react_native_1.Text>
|
|
909
909
|
</react_native_1.Text>
|
|
910
910
|
</react_native_1.View>
|
|
911
911
|
<react_native_1.View style={bundleStyles.legendItem}>
|
|
912
|
-
<BundleCategoryIcon type="
|
|
912
|
+
<BundleCategoryIcon type="typescript" size={13} color={AppColors_1.AppColors.sky500}/>
|
|
913
913
|
<react_native_1.Text style={bundleStyles.legendText}>
|
|
914
|
-
{
|
|
914
|
+
App Source{' '}
|
|
915
915
|
<react_native_1.Text style={bundleStyles.legendVal}>
|
|
916
|
-
{
|
|
916
|
+
{summary.appSourceKb >= 1024
|
|
917
|
+
? `${(summary.appSourceKb / 1024).toFixed(1)} MB`
|
|
918
|
+
: `${summary.appSourceKb} KB`} ({summary.appSourcePct}%)
|
|
917
919
|
</react_native_1.Text>
|
|
918
920
|
</react_native_1.Text>
|
|
919
921
|
</react_native_1.View>
|
|
920
922
|
<react_native_1.View style={bundleStyles.legendItem}>
|
|
921
|
-
<BundleCategoryIcon type="
|
|
923
|
+
<BundleCategoryIcon type="image" size={13} color={AppColors_1.AppColors.pink500}/>
|
|
922
924
|
<react_native_1.Text style={bundleStyles.legendText}>
|
|
923
|
-
{
|
|
925
|
+
Assets & Media{' '}
|
|
924
926
|
<react_native_1.Text style={bundleStyles.legendVal}>
|
|
925
|
-
{
|
|
927
|
+
{summary.assetsMediaKb >= 1024
|
|
928
|
+
? `${(summary.assetsMediaKb / 1024).toFixed(1)} MB`
|
|
929
|
+
: `${summary.assetsMediaKb} KB`} ({summary.assetsMediaPct}%)
|
|
926
930
|
</react_native_1.Text>
|
|
927
931
|
</react_native_1.Text>
|
|
928
932
|
</react_native_1.View>
|
|
@@ -933,118 +937,333 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
933
937
|
<react_native_1.View style={bundleStyles.sectionCard}>
|
|
934
938
|
<react_native_1.View style={bundleStyles.sectionHeaderRow}>
|
|
935
939
|
<react_native_1.Text style={bundleStyles.sectionTitle}>{t('bundle.categoryBreakdown')}</react_native_1.Text>
|
|
936
|
-
<CopyButton_1.default value={() => (
|
|
937
|
-
totalAssets: summary.totalCount,
|
|
938
|
-
totalSizeKb: summary.totalKb,
|
|
939
|
-
categories: {
|
|
940
|
-
images: summary.images,
|
|
941
|
-
javascript: summary.js,
|
|
942
|
-
fonts: summary.fonts,
|
|
943
|
-
typescript: summary.ts,
|
|
944
|
-
json: summary.json,
|
|
945
|
-
},
|
|
946
|
-
})} label={t('bundle.categoriesJson')}/>
|
|
940
|
+
<CopyButton_1.default value={() => summary} label={t('bundle.categoriesJson')}/>
|
|
947
941
|
</react_native_1.View>
|
|
948
942
|
|
|
949
|
-
{[
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
count: summary.images.count,
|
|
954
|
-
size: t('bundle.fileSizeKb', { size: summary.images.kb }),
|
|
955
|
-
pct: summary.images.pct,
|
|
956
|
-
color: AppColors_1.AppColors.pink500,
|
|
957
|
-
desc: t('bundle.catImagesDesc'),
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
iconType: 'javascript',
|
|
961
|
-
title: t('bundle.catJsTitle'),
|
|
962
|
-
count: summary.js.count,
|
|
963
|
-
size: t('bundle.fileSizeKb', { size: summary.js.kb }),
|
|
964
|
-
pct: summary.js.pct,
|
|
965
|
-
color: AppColors_1.AppColors.indigo500,
|
|
966
|
-
desc: t('bundle.catJsDesc'),
|
|
967
|
-
},
|
|
968
|
-
{
|
|
969
|
-
iconType: 'font',
|
|
970
|
-
title: t('bundle.catFontsTitle'),
|
|
971
|
-
count: summary.fonts.count,
|
|
972
|
-
size: t('bundle.fileSizeKb', { size: summary.fonts.kb }),
|
|
973
|
-
pct: summary.fonts.pct,
|
|
974
|
-
color: AppColors_1.AppColors.purple500,
|
|
975
|
-
desc: bundleFiles
|
|
976
|
-
.filter(f => f.category === 'font')
|
|
977
|
-
.map(f => f.name)
|
|
978
|
-
.join(', ') || t('bundle.catFontsDesc'),
|
|
979
|
-
},
|
|
980
|
-
{
|
|
981
|
-
iconType: 'typescript',
|
|
982
|
-
title: t('bundle.catTsTitle'),
|
|
983
|
-
count: summary.ts.count,
|
|
984
|
-
size: t('bundle.fileSizeKb', { size: summary.ts.kb }),
|
|
985
|
-
pct: summary.ts.pct,
|
|
986
|
-
color: AppColors_1.AppColors.sky500,
|
|
987
|
-
desc: t('bundle.catTsDesc'),
|
|
988
|
-
},
|
|
989
|
-
{
|
|
990
|
-
iconType: 'json',
|
|
991
|
-
title: t('bundle.catJsonTitle'),
|
|
992
|
-
count: summary.json.count,
|
|
993
|
-
size: t('bundle.fileSizeKb', { size: summary.json.kb }),
|
|
994
|
-
pct: summary.json.pct,
|
|
995
|
-
color: AppColors_1.AppColors.emerald500,
|
|
996
|
-
desc: t('bundle.catJsonDesc'),
|
|
997
|
-
},
|
|
998
|
-
].map((cat, cIdx) => (<react_native_1.View key={cIdx} style={bundleStyles.catRowCard}>
|
|
943
|
+
{summary.categories.map((cat, cIdx) => (<react_native_1.Pressable key={cIdx} style={({ pressed }) => [
|
|
944
|
+
bundleStyles.catRowCard,
|
|
945
|
+
pressed && { opacity: 0.85, transform: [{ scale: 0.99 }] },
|
|
946
|
+
]} onPress={() => setActiveSubTab(cat.targetTab)}>
|
|
999
947
|
<react_native_1.View style={bundleStyles.catRowTop}>
|
|
1000
|
-
<
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
</react_native_1.Text>
|
|
948
|
+
<react_native_1.View style={[
|
|
949
|
+
bundleStyles.catIconBox,
|
|
950
|
+
{ backgroundColor: `${cat.color}15`, borderColor: `${cat.color}30` },
|
|
951
|
+
]}>
|
|
952
|
+
<BundleCategoryIcon type={cat.iconType} size={18} color={cat.color}/>
|
|
1006
953
|
</react_native_1.View>
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
<react_native_1.
|
|
954
|
+
|
|
955
|
+
<react_native_1.View style={bundleStyles.catRowTitleWrap}>
|
|
956
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', gap: 6 }}>
|
|
957
|
+
<react_native_1.Text style={bundleStyles.catRowTitle} numberOfLines={1}>
|
|
958
|
+
{cat.title}
|
|
959
|
+
</react_native_1.Text>
|
|
960
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
961
|
+
<react_native_1.Text style={bundleStyles.catRowSize}>
|
|
962
|
+
{cat.sizeKb >= 1024 ? `${cat.sizeMb} MB` : `${cat.sizeKb} KB`}
|
|
963
|
+
</react_native_1.Text>
|
|
964
|
+
<react_native_1.View style={[
|
|
965
|
+
bundleStyles.catPctPill,
|
|
966
|
+
{ backgroundColor: `${cat.color}18` },
|
|
967
|
+
]}>
|
|
968
|
+
<react_native_1.Text style={[bundleStyles.catPctText, { color: cat.color }]}>
|
|
969
|
+
{cat.pct}%
|
|
970
|
+
</react_native_1.Text>
|
|
971
|
+
</react_native_1.View>
|
|
972
|
+
</react_native_1.View>
|
|
973
|
+
</react_native_1.View>
|
|
974
|
+
|
|
975
|
+
<react_native_1.Text style={bundleStyles.catRowDesc} numberOfLines={2}>
|
|
976
|
+
{cat.count} items • {cat.desc}
|
|
977
|
+
</react_native_1.Text>
|
|
1010
978
|
</react_native_1.View>
|
|
1011
979
|
</react_native_1.View>
|
|
980
|
+
|
|
981
|
+
{/* Modern Rounded Progress Bar */}
|
|
1012
982
|
<react_native_1.View style={bundleStyles.catProgressTrack}>
|
|
1013
983
|
<react_native_1.View style={[
|
|
1014
984
|
bundleStyles.catProgressBar,
|
|
1015
985
|
{ width: `${cat.pct}%`, backgroundColor: cat.color },
|
|
1016
986
|
]}/>
|
|
1017
987
|
</react_native_1.View>
|
|
1018
|
-
</react_native_1.
|
|
988
|
+
</react_native_1.Pressable>))}
|
|
1019
989
|
|
|
1020
|
-
{/* Total Summation Card */}
|
|
990
|
+
{/* Executive Total Summation Card */}
|
|
1021
991
|
<react_native_1.View style={bundleStyles.totalSummaryCard}>
|
|
1022
992
|
<react_native_1.View style={bundleStyles.totalSummaryRow}>
|
|
1023
|
-
<react_native_1.View style={
|
|
1024
|
-
<
|
|
1025
|
-
|
|
1026
|
-
|
|
993
|
+
<react_native_1.View style={bundleStyles.totalSummaryLabelWrap}>
|
|
994
|
+
<react_native_1.View style={bundleStyles.totalIconBadge}>
|
|
995
|
+
<NetworkIcons_1.PackageIcon color={AppColors_1.AppColors.brandPurple} size={16}/>
|
|
996
|
+
</react_native_1.View>
|
|
997
|
+
<react_native_1.View>
|
|
998
|
+
<react_native_1.Text style={bundleStyles.totalSummaryLabel}>
|
|
999
|
+
TOTAL BUNDLE ASSETS
|
|
1000
|
+
</react_native_1.Text>
|
|
1001
|
+
<react_native_1.Text style={bundleStyles.totalSummarySub}>
|
|
1002
|
+
{summary.totalCount} Tracked Modules & Media Assets
|
|
1003
|
+
</react_native_1.Text>
|
|
1004
|
+
</react_native_1.View>
|
|
1005
|
+
</react_native_1.View>
|
|
1006
|
+
<react_native_1.View style={{ alignItems: 'flex-end' }}>
|
|
1007
|
+
<react_native_1.Text style={bundleStyles.totalSummaryValue}>
|
|
1008
|
+
{summary.totalMb} MB
|
|
1009
|
+
</react_native_1.Text>
|
|
1010
|
+
<react_native_1.Text style={bundleStyles.totalSummaryKb}>
|
|
1011
|
+
{summary.totalKb.toLocaleString()} KB
|
|
1027
1012
|
</react_native_1.Text>
|
|
1028
1013
|
</react_native_1.View>
|
|
1029
|
-
<react_native_1.Text style={bundleStyles.totalSummaryValue}>
|
|
1030
|
-
{t('bundle.totalBundleValue', { kb: summary.totalKb, mb: summary.totalMb })}
|
|
1031
|
-
</react_native_1.Text>
|
|
1032
1014
|
</react_native_1.View>
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1015
|
+
|
|
1016
|
+
{/* 4-Pill Chip Breakdown */}
|
|
1017
|
+
<react_native_1.View style={bundleStyles.totalFormulaGrid}>
|
|
1018
|
+
<react_native_1.View style={bundleStyles.totalChip}>
|
|
1019
|
+
<react_native_1.View style={[bundleStyles.totalDot, { backgroundColor: AppColors_1.AppColors.indigo500 }]}/>
|
|
1020
|
+
<react_native_1.Text style={bundleStyles.totalChipText}>NPM: {(summary.nodeModulesKb / 1024).toFixed(1)}M ({summary.nodeModulesPct}%)</react_native_1.Text>
|
|
1021
|
+
</react_native_1.View>
|
|
1022
|
+
<react_native_1.View style={bundleStyles.totalChip}>
|
|
1023
|
+
<react_native_1.View style={[bundleStyles.totalDot, { backgroundColor: AppColors_1.AppColors.amber500 }]}/>
|
|
1024
|
+
<react_native_1.Text style={bundleStyles.totalChipText}>Metro: {(summary.metroKb / 1024).toFixed(1)}M ({summary.metroPct}%)</react_native_1.Text>
|
|
1025
|
+
</react_native_1.View>
|
|
1026
|
+
<react_native_1.View style={bundleStyles.totalChip}>
|
|
1027
|
+
<react_native_1.View style={[bundleStyles.totalDot, { backgroundColor: AppColors_1.AppColors.sky500 }]}/>
|
|
1028
|
+
<react_native_1.Text style={bundleStyles.totalChipText}>Source: {(summary.appSourceKb / 1024).toFixed(1)}M ({summary.appSourcePct}%)</react_native_1.Text>
|
|
1029
|
+
</react_native_1.View>
|
|
1030
|
+
<react_native_1.View style={bundleStyles.totalChip}>
|
|
1031
|
+
<react_native_1.View style={[bundleStyles.totalDot, { backgroundColor: AppColors_1.AppColors.pink500 }]}/>
|
|
1032
|
+
<react_native_1.Text style={bundleStyles.totalChipText}>Media: {summary.assetsMediaKb}K ({summary.assetsMediaPct}%)</react_native_1.Text>
|
|
1033
|
+
</react_native_1.View>
|
|
1034
|
+
</react_native_1.View>
|
|
1044
1035
|
</react_native_1.View>
|
|
1045
1036
|
</react_native_1.View>
|
|
1046
1037
|
</react_native_1.ScrollView>)}
|
|
1047
1038
|
|
|
1039
|
+
{/* ══════════════════════════════════════════════════════════════════════ */}
|
|
1040
|
+
{/* ── 2. TAB: PRODUCTION BUILDS & PLATFORMS ───────────────────────────── */}
|
|
1041
|
+
{/* ══════════════════════════════════════════════════════════════════════ */}
|
|
1042
|
+
{activeSubTab === 'production' && !isAnalyzing && (<react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={bundleStyles.contentContainer} keyboardShouldPersistTaps="handled">
|
|
1043
|
+
|
|
1044
|
+
{/* Platform Segmented Switcher (Horizontally Scrollable) */}
|
|
1045
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={bundleStyles.prodPlatformScroll}>
|
|
1046
|
+
{[
|
|
1047
|
+
{ key: 'ios', label: 'iOS App (.ipa)', badge: `${analysis?.production.ios.totalInstallMb || 59.2} MB` },
|
|
1048
|
+
{ key: 'androidAab', label: 'Android AAB (.aab)', badge: `${analysis?.production.androidAab.totalInstallMb || 24.3} MB` },
|
|
1049
|
+
{ key: 'androidApk', label: 'Universal APK (.apk)', badge: `${analysis?.production.androidApk.totalInstallMb || 64.0} MB` },
|
|
1050
|
+
].map(tab => {
|
|
1051
|
+
const isSelected = prodPlatform === tab.key;
|
|
1052
|
+
return (<TouchableScale_1.default key={tab.key} onPress={() => setProdPlatform(tab.key)} style={[
|
|
1053
|
+
bundleStyles.prodPlatformBtn,
|
|
1054
|
+
isSelected && bundleStyles.prodPlatformBtnActive,
|
|
1055
|
+
]}>
|
|
1056
|
+
<react_native_1.Text style={[
|
|
1057
|
+
bundleStyles.prodPlatformBtnText,
|
|
1058
|
+
isSelected && bundleStyles.prodPlatformBtnTextActive,
|
|
1059
|
+
]}>
|
|
1060
|
+
{tab.label}
|
|
1061
|
+
</react_native_1.Text>
|
|
1062
|
+
<react_native_1.View style={[
|
|
1063
|
+
bundleStyles.prodPlatformBadge,
|
|
1064
|
+
isSelected && bundleStyles.prodPlatformBadgeActive,
|
|
1065
|
+
]}>
|
|
1066
|
+
<react_native_1.Text style={[
|
|
1067
|
+
bundleStyles.prodPlatformBadgeText,
|
|
1068
|
+
isSelected && bundleStyles.prodPlatformBadgeTextActive,
|
|
1069
|
+
]}>
|
|
1070
|
+
{tab.badge}
|
|
1071
|
+
</react_native_1.Text>
|
|
1072
|
+
</react_native_1.View>
|
|
1073
|
+
</TouchableScale_1.default>);
|
|
1074
|
+
})}
|
|
1075
|
+
</react_native_1.ScrollView>
|
|
1076
|
+
|
|
1077
|
+
{/* Production Platform Metrics Hero */}
|
|
1078
|
+
{analysis && (<react_native_1.View style={bundleStyles.heroCard}>
|
|
1079
|
+
<react_native_1.View style={bundleStyles.heroTopRow}>
|
|
1080
|
+
<react_native_1.View style={bundleStyles.heroIconWrap}>
|
|
1081
|
+
<NetworkIcons_1.PackageIcon color={AppColors_1.AppColors.brandPurple} size={24}/>
|
|
1082
|
+
</react_native_1.View>
|
|
1083
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
1084
|
+
<react_native_1.Text style={bundleStyles.heroTitle}>
|
|
1085
|
+
{prodPlatform === 'ios'
|
|
1086
|
+
? 'iOS Production Binary Footprint'
|
|
1087
|
+
: prodPlatform === 'androidAab'
|
|
1088
|
+
? 'Google Play App Bundle (.aab)'
|
|
1089
|
+
: 'Universal Standalone APK (.apk)'}
|
|
1090
|
+
</react_native_1.Text>
|
|
1091
|
+
<react_native_1.Text style={bundleStyles.heroSubtitle}>
|
|
1092
|
+
{prodPlatform === 'ios'
|
|
1093
|
+
? 'App Store install & over-the-air cellular download estimates'
|
|
1094
|
+
: prodPlatform === 'androidAab'
|
|
1095
|
+
? 'Optimized per-device dynamic delivery split APK architecture'
|
|
1096
|
+
: 'Multi-ABI universal install archive for sideloading & direct distribution'}
|
|
1097
|
+
</react_native_1.Text>
|
|
1098
|
+
</react_native_1.View>
|
|
1099
|
+
<CopyButton_1.default value={() => analysis.production[prodPlatform]} label="Production Binary JSON"/>
|
|
1100
|
+
</react_native_1.View>
|
|
1101
|
+
|
|
1102
|
+
{/* 4-Stat Balanced 2x2 Metric Grid */}
|
|
1103
|
+
<react_native_1.View style={bundleStyles.metricsGrid}>
|
|
1104
|
+
<react_native_1.View style={bundleStyles.metricBox}>
|
|
1105
|
+
<react_native_1.Text style={bundleStyles.metricLabel}>INSTALL SIZE</react_native_1.Text>
|
|
1106
|
+
<react_native_1.Text style={[bundleStyles.metricValue, { color: AppColors_1.AppColors.purple }]}>
|
|
1107
|
+
{analysis.production[prodPlatform].totalInstallMb} MB
|
|
1108
|
+
</react_native_1.Text>
|
|
1109
|
+
<react_native_1.Text style={bundleStyles.metricHint}>On-device uncompressed footprint</react_native_1.Text>
|
|
1110
|
+
</react_native_1.View>
|
|
1111
|
+
|
|
1112
|
+
<react_native_1.View style={bundleStyles.metricBox}>
|
|
1113
|
+
<react_native_1.Text style={bundleStyles.metricLabel}>DOWNLOAD SIZE</react_native_1.Text>
|
|
1114
|
+
<react_native_1.Text style={[bundleStyles.metricValue, { color: AppColors_1.AppColors.emerald600 }]}>
|
|
1115
|
+
~{analysis.production[prodPlatform].totalDownloadMb} MB
|
|
1116
|
+
</react_native_1.Text>
|
|
1117
|
+
<react_native_1.Text style={bundleStyles.metricHint}>Store network transfer payload</react_native_1.Text>
|
|
1118
|
+
</react_native_1.View>
|
|
1119
|
+
|
|
1120
|
+
<react_native_1.View style={bundleStyles.metricBox}>
|
|
1121
|
+
<react_native_1.Text style={bundleStyles.metricLabel}>COMPRESSION</react_native_1.Text>
|
|
1122
|
+
<react_native_1.Text style={[bundleStyles.metricValue, { color: AppColors_1.AppColors.sky500 }]}>
|
|
1123
|
+
{analysis.production[prodPlatform].compressionRatioPct}%
|
|
1124
|
+
</react_native_1.Text>
|
|
1125
|
+
<react_native_1.Text style={bundleStyles.metricHint}>Bytecode & asset ratio</react_native_1.Text>
|
|
1126
|
+
</react_native_1.View>
|
|
1127
|
+
|
|
1128
|
+
<react_native_1.View style={bundleStyles.metricBox}>
|
|
1129
|
+
<react_native_1.Text style={bundleStyles.metricLabel}>FORMAT ARCHITECTURE</react_native_1.Text>
|
|
1130
|
+
<react_native_1.Text style={[bundleStyles.metricValue, { color: AppColors_1.AppColors.amber700 }]}>
|
|
1131
|
+
{prodPlatform === 'ios'
|
|
1132
|
+
? 'Mach-O 64-bit'
|
|
1133
|
+
: prodPlatform === 'androidAab'
|
|
1134
|
+
? 'Split APKs'
|
|
1135
|
+
: 'FAT Multi-ABI'}
|
|
1136
|
+
</react_native_1.Text>
|
|
1137
|
+
<react_native_1.Text style={bundleStyles.metricHint}>
|
|
1138
|
+
{prodPlatform === 'ios'
|
|
1139
|
+
? 'Apple ARM64 runtime'
|
|
1140
|
+
: prodPlatform === 'androidAab'
|
|
1141
|
+
? 'Dynamic Google Play delivery'
|
|
1142
|
+
: 'Sideload universal package'}
|
|
1143
|
+
</react_native_1.Text>
|
|
1144
|
+
</react_native_1.View>
|
|
1145
|
+
</react_native_1.View>
|
|
1146
|
+
</react_native_1.View>)}
|
|
1147
|
+
|
|
1148
|
+
{/* Component Breakdown Cards */}
|
|
1149
|
+
{analysis && (<react_native_1.View style={bundleStyles.sectionCard}>
|
|
1150
|
+
<react_native_1.View style={bundleStyles.sectionHeaderRow}>
|
|
1151
|
+
<react_native_1.View>
|
|
1152
|
+
<react_native_1.Text style={bundleStyles.sectionTitle}>Binary Component Architecture</react_native_1.Text>
|
|
1153
|
+
<react_native_1.Text style={bundleStyles.sectionSub}>
|
|
1154
|
+
Compiled native libraries, runtime bytecodes, assets, and signature blocks
|
|
1155
|
+
</react_native_1.Text>
|
|
1156
|
+
</react_native_1.View>
|
|
1157
|
+
<CopyButton_1.default value={() => analysis.production[prodPlatform].components} label="Components JSON"/>
|
|
1158
|
+
</react_native_1.View>
|
|
1159
|
+
|
|
1160
|
+
{analysis.production[prodPlatform].components.map((comp, idx) => (<react_native_1.View key={idx} style={bundleStyles.catRowCard}>
|
|
1161
|
+
<react_native_1.View style={bundleStyles.catRowTop}>
|
|
1162
|
+
<react_native_1.View style={[
|
|
1163
|
+
bundleStyles.catIconBox,
|
|
1164
|
+
{ backgroundColor: `${comp.color}15`, borderColor: `${comp.color}30` },
|
|
1165
|
+
]}>
|
|
1166
|
+
<BundleCategoryIcon type={comp.category === 'native'
|
|
1167
|
+
? 'source'
|
|
1168
|
+
: comp.category === 'frameworks'
|
|
1169
|
+
? 'deps'
|
|
1170
|
+
: comp.category === 'assets'
|
|
1171
|
+
? 'media'
|
|
1172
|
+
: comp.category === 'js'
|
|
1173
|
+
? 'javascript'
|
|
1174
|
+
: 'overhead'} size={18} color={comp.color}/>
|
|
1175
|
+
</react_native_1.View>
|
|
1176
|
+
|
|
1177
|
+
<react_native_1.View style={bundleStyles.catRowTitleWrap}>
|
|
1178
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', gap: 6 }}>
|
|
1179
|
+
<react_native_1.Text style={bundleStyles.catRowTitle} numberOfLines={1}>
|
|
1180
|
+
{comp.name}
|
|
1181
|
+
</react_native_1.Text>
|
|
1182
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
1183
|
+
<react_native_1.Text style={bundleStyles.catRowSize}>{comp.sizeMb} MB</react_native_1.Text>
|
|
1184
|
+
<react_native_1.View style={[
|
|
1185
|
+
bundleStyles.catPctPill,
|
|
1186
|
+
{ backgroundColor: `${comp.color}18` },
|
|
1187
|
+
]}>
|
|
1188
|
+
<react_native_1.Text style={[bundleStyles.catPctText, { color: comp.color }]}>
|
|
1189
|
+
{comp.pct}%
|
|
1190
|
+
</react_native_1.Text>
|
|
1191
|
+
</react_native_1.View>
|
|
1192
|
+
</react_native_1.View>
|
|
1193
|
+
</react_native_1.View>
|
|
1194
|
+
|
|
1195
|
+
<react_native_1.Text style={bundleStyles.catRowDesc} numberOfLines={2}>
|
|
1196
|
+
{comp.description}
|
|
1197
|
+
</react_native_1.Text>
|
|
1198
|
+
</react_native_1.View>
|
|
1199
|
+
</react_native_1.View>
|
|
1200
|
+
|
|
1201
|
+
<react_native_1.View style={bundleStyles.catProgressTrack}>
|
|
1202
|
+
<react_native_1.View style={[
|
|
1203
|
+
bundleStyles.catProgressBar,
|
|
1204
|
+
{ width: `${comp.pct}%`, backgroundColor: comp.color },
|
|
1205
|
+
]}/>
|
|
1206
|
+
</react_native_1.View>
|
|
1207
|
+
|
|
1208
|
+
{comp.advice ? (<react_native_1.View style={[bundleStyles.adviceBadge, bundleStyles.adviceOptimal, { marginTop: 6 }]}>
|
|
1209
|
+
<NetworkIcons_1.LightbulbIcon color={AppColors_1.AppColors.emerald700} size={13}/>
|
|
1210
|
+
<react_native_1.Text style={[bundleStyles.adviceText, { color: AppColors_1.AppColors.emerald700, flex: 1, marginLeft: 4 }]}>
|
|
1211
|
+
{comp.advice}
|
|
1212
|
+
</react_native_1.Text>
|
|
1213
|
+
</react_native_1.View>) : null}
|
|
1214
|
+
</react_native_1.View>))}
|
|
1215
|
+
|
|
1216
|
+
{/* Total Platform Binary Summary with JS Source Bundle Comparison */}
|
|
1217
|
+
<react_native_1.View style={bundleStyles.totalSummaryCard}>
|
|
1218
|
+
<react_native_1.View style={bundleStyles.totalSummaryRow}>
|
|
1219
|
+
<react_native_1.View style={bundleStyles.totalSummaryLabelWrap}>
|
|
1220
|
+
<react_native_1.View style={bundleStyles.totalIconBadge}>
|
|
1221
|
+
<NetworkIcons_1.PackageIcon color={AppColors_1.AppColors.brandPurple} size={16}/>
|
|
1222
|
+
</react_native_1.View>
|
|
1223
|
+
<react_native_1.View>
|
|
1224
|
+
<react_native_1.Text style={bundleStyles.totalSummaryLabel}>
|
|
1225
|
+
{prodPlatform === 'ios'
|
|
1226
|
+
? 'TOTAL IOS APP BINARY'
|
|
1227
|
+
: prodPlatform === 'androidAab'
|
|
1228
|
+
? 'TOTAL ANDROID AAB BUNDLE'
|
|
1229
|
+
: 'TOTAL UNIVERSAL APK'}
|
|
1230
|
+
</react_native_1.Text>
|
|
1231
|
+
<react_native_1.Text style={bundleStyles.totalSummarySub}>
|
|
1232
|
+
{prodPlatform === 'ios'
|
|
1233
|
+
? 'App Store install & cellular download estimates'
|
|
1234
|
+
: prodPlatform === 'androidAab'
|
|
1235
|
+
? 'Google Play dynamic delivery split APK'
|
|
1236
|
+
: 'Universal standalone sideload package'}
|
|
1237
|
+
</react_native_1.Text>
|
|
1238
|
+
</react_native_1.View>
|
|
1239
|
+
</react_native_1.View>
|
|
1240
|
+
</react_native_1.View>
|
|
1241
|
+
|
|
1242
|
+
{/* Platform Metric Grid Chips */}
|
|
1243
|
+
<react_native_1.View style={bundleStyles.totalFormulaGrid}>
|
|
1244
|
+
<react_native_1.View style={bundleStyles.totalChip}>
|
|
1245
|
+
<react_native_1.View style={[bundleStyles.totalDot, { backgroundColor: AppColors_1.AppColors.purple }]}/>
|
|
1246
|
+
<react_native_1.Text style={bundleStyles.totalChipText}>
|
|
1247
|
+
Install: {analysis.production[prodPlatform].totalInstallMb} MB
|
|
1248
|
+
</react_native_1.Text>
|
|
1249
|
+
</react_native_1.View>
|
|
1250
|
+
<react_native_1.View style={bundleStyles.totalChip}>
|
|
1251
|
+
<react_native_1.View style={[bundleStyles.totalDot, { backgroundColor: AppColors_1.AppColors.sky500 }]}/>
|
|
1252
|
+
<react_native_1.Text style={bundleStyles.totalChipText}>
|
|
1253
|
+
Download: ~{analysis.production[prodPlatform].totalDownloadMb} MB
|
|
1254
|
+
</react_native_1.Text>
|
|
1255
|
+
</react_native_1.View>
|
|
1256
|
+
<react_native_1.View style={bundleStyles.totalChip}>
|
|
1257
|
+
<react_native_1.View style={[bundleStyles.totalDot, { backgroundColor: AppColors_1.AppColors.emerald500 }]}/>
|
|
1258
|
+
<react_native_1.Text style={bundleStyles.totalChipText}>
|
|
1259
|
+
Compression: {analysis.production[prodPlatform].compressionRatioPct}%
|
|
1260
|
+
</react_native_1.Text>
|
|
1261
|
+
</react_native_1.View>
|
|
1262
|
+
</react_native_1.View>
|
|
1263
|
+
</react_native_1.View>
|
|
1264
|
+
</react_native_1.View>)}
|
|
1265
|
+
</react_native_1.ScrollView>)}
|
|
1266
|
+
|
|
1048
1267
|
{/* ══════════════════════════════════════════════════════════════════════ */}
|
|
1049
1268
|
{/* ── 2. TAB: FILES BREAKDOWN ─────────────────────────────────────────── */}
|
|
1050
1269
|
{/* ══════════════════════════════════════════════════════════════════════ */}
|
|
@@ -1136,8 +1355,8 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1136
1355
|
</react_native_1.View>
|
|
1137
1356
|
|
|
1138
1357
|
{/* ── MODE 1: DIRECTORY TREE VIEW ── */}
|
|
1139
|
-
{filesViewMode === 'tree' ? (<react_native_1.View style={bundleStyles.
|
|
1140
|
-
{fileTreeNodes.map((node, nIdx) => (<BundleTreeNodeView key={node.id} node={node} level={0} search={search} totalBundleKb={summary.totalKb}
|
|
1358
|
+
{filesViewMode === 'tree' ? (<react_native_1.View style={bundleStyles.treeRootCard}>
|
|
1359
|
+
{fileTreeNodes.map((node, nIdx) => (<BundleTreeNodeView key={node.id} node={node} level={0} search={search} totalBundleKb={summary.totalKb} expandedFolders={expandedFolders} toggleFolder={toggleFolder} isLastChild={nIdx === fileTreeNodes.length - 1}/>))}
|
|
1141
1360
|
</react_native_1.View>) : (
|
|
1142
1361
|
/* ── MODE 2: FLAT LIST VIEW ── */
|
|
1143
1362
|
filteredFiles.map((file, index) => {
|
|
@@ -1543,16 +1762,16 @@ const BundleTab = react_1.default.memo(() => {
|
|
|
1543
1762
|
badgeColor: AppColors_1.AppColors.indigo500,
|
|
1544
1763
|
},
|
|
1545
1764
|
].map((tip, tIdx) => (<react_native_1.View key={tIdx} style={bundleStyles.tipItem}>
|
|
1546
|
-
<react_native_1.View style={
|
|
1547
|
-
<react_native_1.View style={
|
|
1765
|
+
<react_native_1.View style={bundleStyles.tipItemHeader}>
|
|
1766
|
+
<react_native_1.View style={bundleStyles.tipTitleWrap}>
|
|
1548
1767
|
<react_native_1.View style={bundleStyles.sNoBadge}>
|
|
1549
1768
|
<react_native_1.Text style={bundleStyles.sNoText}>#{tIdx + 1}</react_native_1.Text>
|
|
1550
1769
|
</react_native_1.View>
|
|
1551
1770
|
<BundleCategoryIcon type={tip.iconType} size={14} color={tip.iconColor}/>
|
|
1552
1771
|
<react_native_1.Text style={bundleStyles.tipTitle}>{tip.title}</react_native_1.Text>
|
|
1553
1772
|
</react_native_1.View>
|
|
1554
|
-
<react_native_1.View style={
|
|
1555
|
-
<react_native_1.View style={[bundleStyles.impactBadge, { backgroundColor: `${tip.badgeColor}
|
|
1773
|
+
<react_native_1.View style={bundleStyles.tipActionWrap}>
|
|
1774
|
+
<react_native_1.View style={[bundleStyles.impactBadge, { backgroundColor: `${tip.badgeColor}18`, borderColor: `${tip.badgeColor}40` }]}>
|
|
1556
1775
|
<react_native_1.Text style={[bundleStyles.impactBadgeText, { color: tip.badgeColor }]}>
|
|
1557
1776
|
{tip.badge}
|
|
1558
1777
|
</react_native_1.Text>
|
|
@@ -1572,6 +1791,19 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
1572
1791
|
paddingVertical: 8,
|
|
1573
1792
|
borderBottomWidth: 1,
|
|
1574
1793
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1794
|
+
flexDirection: 'row',
|
|
1795
|
+
alignItems: 'center',
|
|
1796
|
+
paddingRight: 10,
|
|
1797
|
+
},
|
|
1798
|
+
reloadButton: {
|
|
1799
|
+
padding: 8,
|
|
1800
|
+
borderRadius: 20,
|
|
1801
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
1802
|
+
borderWidth: 1,
|
|
1803
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1804
|
+
alignItems: 'center',
|
|
1805
|
+
justifyContent: 'center',
|
|
1806
|
+
marginLeft: 4,
|
|
1575
1807
|
},
|
|
1576
1808
|
analyzingContainer: {
|
|
1577
1809
|
flex: 1,
|
|
@@ -1644,7 +1876,7 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
1644
1876
|
},
|
|
1645
1877
|
heroTopRow: {
|
|
1646
1878
|
flexDirection: 'row',
|
|
1647
|
-
alignItems: '
|
|
1879
|
+
alignItems: 'flex-start',
|
|
1648
1880
|
gap: 12,
|
|
1649
1881
|
marginBottom: 16,
|
|
1650
1882
|
},
|
|
@@ -1706,6 +1938,57 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
1706
1938
|
height: 8,
|
|
1707
1939
|
borderRadius: 4,
|
|
1708
1940
|
},
|
|
1941
|
+
prodPlatformScroll: {
|
|
1942
|
+
flexDirection: 'row',
|
|
1943
|
+
alignItems: 'center',
|
|
1944
|
+
gap: 8,
|
|
1945
|
+
paddingBottom: 4,
|
|
1946
|
+
},
|
|
1947
|
+
prodPlatformBtn: {
|
|
1948
|
+
flexDirection: 'row',
|
|
1949
|
+
alignItems: 'center',
|
|
1950
|
+
paddingVertical: 7,
|
|
1951
|
+
paddingHorizontal: 12,
|
|
1952
|
+
borderRadius: 20,
|
|
1953
|
+
backgroundColor: AppColors_1.AppColors.white,
|
|
1954
|
+
borderWidth: 1,
|
|
1955
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1956
|
+
gap: 6,
|
|
1957
|
+
},
|
|
1958
|
+
prodPlatformBtnActive: {
|
|
1959
|
+
backgroundColor: AppColors_1.AppColors.brandPurple,
|
|
1960
|
+
borderColor: AppColors_1.AppColors.brandPurple,
|
|
1961
|
+
shadowColor: AppColors_1.AppColors.brandPurple,
|
|
1962
|
+
shadowOffset: { width: 0, height: 2 },
|
|
1963
|
+
shadowOpacity: 0.18,
|
|
1964
|
+
shadowRadius: 3,
|
|
1965
|
+
elevation: 2,
|
|
1966
|
+
},
|
|
1967
|
+
prodPlatformBtnText: {
|
|
1968
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1969
|
+
fontSize: 11.5,
|
|
1970
|
+
color: AppColors_1.AppColors.grayTextStrong,
|
|
1971
|
+
},
|
|
1972
|
+
prodPlatformBtnTextActive: {
|
|
1973
|
+
color: AppColors_1.AppColors.white,
|
|
1974
|
+
},
|
|
1975
|
+
prodPlatformBadge: {
|
|
1976
|
+
paddingHorizontal: 6,
|
|
1977
|
+
paddingVertical: 2,
|
|
1978
|
+
borderRadius: 10,
|
|
1979
|
+
backgroundColor: `${AppColors_1.AppColors.purple}14`,
|
|
1980
|
+
},
|
|
1981
|
+
prodPlatformBadgeActive: {
|
|
1982
|
+
backgroundColor: 'rgba(255, 255, 255, 0.25)',
|
|
1983
|
+
},
|
|
1984
|
+
prodPlatformBadgeText: {
|
|
1985
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1986
|
+
fontSize: 9.5,
|
|
1987
|
+
color: AppColors_1.AppColors.purple,
|
|
1988
|
+
},
|
|
1989
|
+
prodPlatformBadgeTextActive: {
|
|
1990
|
+
color: AppColors_1.AppColors.white,
|
|
1991
|
+
},
|
|
1709
1992
|
sectionCard: {
|
|
1710
1993
|
backgroundColor: AppColors_1.AppColors.white,
|
|
1711
1994
|
borderRadius: 14,
|
|
@@ -1740,18 +2023,21 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
1740
2023
|
legendGrid: {
|
|
1741
2024
|
flexDirection: 'row',
|
|
1742
2025
|
flexWrap: 'wrap',
|
|
1743
|
-
|
|
2026
|
+
justifyContent: 'space-between',
|
|
2027
|
+
rowGap: 8,
|
|
2028
|
+
columnGap: 10,
|
|
1744
2029
|
},
|
|
1745
2030
|
legendItem: {
|
|
1746
2031
|
flexDirection: 'row',
|
|
1747
2032
|
alignItems: 'center',
|
|
1748
|
-
gap:
|
|
1749
|
-
|
|
2033
|
+
gap: 6,
|
|
2034
|
+
width: '48%',
|
|
1750
2035
|
},
|
|
1751
2036
|
legendText: {
|
|
1752
2037
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
1753
2038
|
fontSize: 11,
|
|
1754
2039
|
color: AppColors_1.AppColors.grayTextStrong,
|
|
2040
|
+
flex: 1,
|
|
1755
2041
|
},
|
|
1756
2042
|
legendVal: {
|
|
1757
2043
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
@@ -1759,47 +2045,79 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
1759
2045
|
},
|
|
1760
2046
|
catRowCard: {
|
|
1761
2047
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
1762
|
-
borderRadius:
|
|
1763
|
-
padding:
|
|
2048
|
+
borderRadius: 12,
|
|
2049
|
+
padding: 12,
|
|
1764
2050
|
marginBottom: 8,
|
|
1765
2051
|
borderWidth: 1,
|
|
1766
2052
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
2053
|
+
gap: 8,
|
|
1767
2054
|
},
|
|
1768
2055
|
catRowTop: {
|
|
1769
2056
|
flexDirection: 'row',
|
|
2057
|
+
alignItems: 'flex-start',
|
|
2058
|
+
gap: 10,
|
|
2059
|
+
},
|
|
2060
|
+
catIconBox: {
|
|
2061
|
+
width: 36,
|
|
2062
|
+
height: 36,
|
|
2063
|
+
borderRadius: 10,
|
|
2064
|
+
borderWidth: 1,
|
|
1770
2065
|
alignItems: 'center',
|
|
1771
|
-
|
|
1772
|
-
|
|
2066
|
+
justifyContent: 'center',
|
|
2067
|
+
flexShrink: 0,
|
|
2068
|
+
},
|
|
2069
|
+
catRowTitleWrap: {
|
|
2070
|
+
flex: 1,
|
|
2071
|
+
minWidth: 0,
|
|
2072
|
+
gap: 2,
|
|
1773
2073
|
},
|
|
1774
2074
|
catRowTitle: {
|
|
1775
2075
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1776
|
-
fontSize:
|
|
2076
|
+
fontSize: 13,
|
|
1777
2077
|
color: AppColors_1.AppColors.primaryBlack,
|
|
2078
|
+
flex: 1,
|
|
1778
2079
|
},
|
|
1779
2080
|
catRowDesc: {
|
|
1780
2081
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
1781
|
-
fontSize: 10,
|
|
2082
|
+
fontSize: 10.5,
|
|
1782
2083
|
color: AppColors_1.AppColors.grayTextWeak,
|
|
2084
|
+
lineHeight: 14.5,
|
|
1783
2085
|
},
|
|
1784
2086
|
catRowSize: {
|
|
1785
2087
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1786
|
-
fontSize: 12,
|
|
2088
|
+
fontSize: 12.5,
|
|
1787
2089
|
color: AppColors_1.AppColors.primaryBlack,
|
|
1788
2090
|
},
|
|
2091
|
+
catRowRight: {
|
|
2092
|
+
alignItems: 'flex-end',
|
|
2093
|
+
justifyContent: 'center',
|
|
2094
|
+
flexShrink: 0,
|
|
2095
|
+
minWidth: 64,
|
|
2096
|
+
},
|
|
1789
2097
|
catRowPct: {
|
|
1790
2098
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
1791
2099
|
fontSize: 10,
|
|
1792
2100
|
color: AppColors_1.AppColors.grayTextWeak,
|
|
1793
2101
|
},
|
|
2102
|
+
catPctPill: {
|
|
2103
|
+
paddingHorizontal: 5.5,
|
|
2104
|
+
paddingVertical: 1.5,
|
|
2105
|
+
borderRadius: 5,
|
|
2106
|
+
},
|
|
2107
|
+
catPctText: {
|
|
2108
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2109
|
+
fontSize: 9.5,
|
|
2110
|
+
},
|
|
1794
2111
|
catProgressTrack: {
|
|
1795
|
-
height:
|
|
1796
|
-
borderRadius: 2,
|
|
2112
|
+
height: 5,
|
|
2113
|
+
borderRadius: 2.5,
|
|
1797
2114
|
backgroundColor: `${AppColors_1.AppColors.slate200}`,
|
|
1798
2115
|
overflow: 'hidden',
|
|
2116
|
+
marginTop: 2,
|
|
1799
2117
|
},
|
|
1800
2118
|
catProgressBar: {
|
|
1801
2119
|
height: '100%',
|
|
1802
|
-
borderRadius: 2,
|
|
2120
|
+
borderRadius: 2.5,
|
|
1803
2121
|
},
|
|
1804
2122
|
filterContainer: {
|
|
1805
2123
|
backgroundColor: AppColors_1.AppColors.white,
|
|
@@ -1903,32 +2221,44 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
1903
2221
|
fontSize: 11.5,
|
|
1904
2222
|
color: AppColors_1.AppColors.purple,
|
|
1905
2223
|
},
|
|
1906
|
-
|
|
1907
|
-
gap: 6,
|
|
1908
|
-
},
|
|
1909
|
-
treeFolderContainer: {
|
|
2224
|
+
treeRootCard: {
|
|
1910
2225
|
backgroundColor: AppColors_1.AppColors.white,
|
|
1911
|
-
borderRadius:
|
|
2226
|
+
borderRadius: 12,
|
|
1912
2227
|
borderWidth: 1,
|
|
1913
2228
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1914
2229
|
overflow: 'hidden',
|
|
1915
|
-
marginBottom:
|
|
2230
|
+
marginBottom: 16,
|
|
2231
|
+
},
|
|
2232
|
+
treeFolderBlock: {
|
|
2233
|
+
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
2234
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1916
2235
|
},
|
|
1917
|
-
|
|
2236
|
+
treeFolderRow: {
|
|
1918
2237
|
flexDirection: 'row',
|
|
1919
2238
|
alignItems: 'center',
|
|
1920
2239
|
justifyContent: 'space-between',
|
|
1921
|
-
paddingVertical:
|
|
2240
|
+
paddingVertical: 8,
|
|
1922
2241
|
paddingRight: 10,
|
|
1923
|
-
backgroundColor: `${AppColors_1.AppColors.purple}
|
|
1924
|
-
borderBottomWidth: 1,
|
|
1925
|
-
borderBottomColor: `${AppColors_1.AppColors.purple}14`,
|
|
2242
|
+
backgroundColor: `${AppColors_1.AppColors.purple}06`,
|
|
1926
2243
|
},
|
|
1927
|
-
|
|
1928
|
-
|
|
2244
|
+
treeRowLeft: {
|
|
2245
|
+
flexDirection: 'row',
|
|
2246
|
+
alignItems: 'center',
|
|
2247
|
+
gap: 6,
|
|
2248
|
+
flex: 1,
|
|
2249
|
+
marginRight: 6,
|
|
2250
|
+
},
|
|
2251
|
+
treeRowRight: {
|
|
2252
|
+
flexDirection: 'row',
|
|
2253
|
+
alignItems: 'center',
|
|
2254
|
+
gap: 6,
|
|
2255
|
+
},
|
|
2256
|
+
treeChevron: {
|
|
2257
|
+
fontSize: 12,
|
|
1929
2258
|
color: AppColors_1.AppColors.purple,
|
|
1930
2259
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1931
|
-
width:
|
|
2260
|
+
width: 12,
|
|
2261
|
+
textAlign: 'center',
|
|
1932
2262
|
},
|
|
1933
2263
|
treeFolderName: {
|
|
1934
2264
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
@@ -1936,44 +2266,75 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
1936
2266
|
color: AppColors_1.AppColors.primaryBlack,
|
|
1937
2267
|
},
|
|
1938
2268
|
treeCountBadge: {
|
|
1939
|
-
paddingHorizontal:
|
|
1940
|
-
paddingVertical: 1
|
|
1941
|
-
borderRadius:
|
|
1942
|
-
backgroundColor: `${AppColors_1.AppColors.purple}
|
|
2269
|
+
paddingHorizontal: 5,
|
|
2270
|
+
paddingVertical: 1,
|
|
2271
|
+
borderRadius: 8,
|
|
2272
|
+
backgroundColor: `${AppColors_1.AppColors.purple}14`,
|
|
1943
2273
|
},
|
|
1944
2274
|
treeCountBadgeText: {
|
|
1945
2275
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
1946
|
-
fontSize:
|
|
2276
|
+
fontSize: 9.5,
|
|
1947
2277
|
color: AppColors_1.AppColors.purple,
|
|
1948
2278
|
},
|
|
1949
2279
|
treeFolderSize: {
|
|
1950
|
-
fontFamily: AppFonts_1.AppFonts.
|
|
1951
|
-
fontSize: 11
|
|
1952
|
-
color: AppColors_1.AppColors.
|
|
2280
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2281
|
+
fontSize: 11,
|
|
2282
|
+
color: AppColors_1.AppColors.grayTextStrong,
|
|
1953
2283
|
},
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
paddingVertical: 6,
|
|
1957
|
-
paddingRight: 8,
|
|
1958
|
-
gap: 4,
|
|
2284
|
+
treeChildrenContainer: {
|
|
2285
|
+
backgroundColor: AppColors_1.AppColors.white,
|
|
1959
2286
|
},
|
|
1960
|
-
|
|
2287
|
+
treeFileRow: {
|
|
2288
|
+
flexDirection: 'row',
|
|
2289
|
+
alignItems: 'center',
|
|
2290
|
+
justifyContent: 'space-between',
|
|
2291
|
+
paddingVertical: 6,
|
|
2292
|
+
paddingRight: 10,
|
|
2293
|
+
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
2294
|
+
borderBottomColor: `${AppColors_1.AppColors.dividerColor}80`,
|
|
1961
2295
|
backgroundColor: AppColors_1.AppColors.white,
|
|
1962
|
-
borderRadius: 8,
|
|
1963
|
-
paddingVertical: 8,
|
|
1964
|
-
paddingHorizontal: 8,
|
|
1965
|
-
borderWidth: 1,
|
|
1966
|
-
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1967
|
-
marginBottom: 4,
|
|
1968
2296
|
},
|
|
1969
|
-
|
|
1970
|
-
|
|
2297
|
+
treeFileRowUnused: {
|
|
2298
|
+
backgroundColor: `${AppColors_1.AppColors.red500}06`,
|
|
2299
|
+
},
|
|
2300
|
+
treeBranchGuide: {
|
|
2301
|
+
width: 12,
|
|
1971
2302
|
alignItems: 'center',
|
|
1972
2303
|
justifyContent: 'center',
|
|
1973
2304
|
},
|
|
1974
|
-
|
|
2305
|
+
treeBranchGuideText: {
|
|
1975
2306
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
1976
2307
|
fontSize: 11,
|
|
2308
|
+
color: AppColors_1.AppColors.dividerColor,
|
|
2309
|
+
},
|
|
2310
|
+
treeFileName: {
|
|
2311
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2312
|
+
fontSize: 12,
|
|
2313
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2314
|
+
flexShrink: 1,
|
|
2315
|
+
},
|
|
2316
|
+
treeUnusedPill: {
|
|
2317
|
+
paddingHorizontal: 5,
|
|
2318
|
+
paddingVertical: 1,
|
|
2319
|
+
borderRadius: 4,
|
|
2320
|
+
backgroundColor: `${AppColors_1.AppColors.red500}18`,
|
|
2321
|
+
},
|
|
2322
|
+
treeUnusedPillText: {
|
|
2323
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2324
|
+
fontSize: 9,
|
|
2325
|
+
color: AppColors_1.AppColors.red600,
|
|
2326
|
+
},
|
|
2327
|
+
treeFileSizeGroup: {
|
|
2328
|
+
alignItems: 'flex-end',
|
|
2329
|
+
},
|
|
2330
|
+
treeFileSizeText: {
|
|
2331
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2332
|
+
fontSize: 11,
|
|
2333
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2334
|
+
},
|
|
2335
|
+
treeFilePctText: {
|
|
2336
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2337
|
+
fontSize: 9,
|
|
1977
2338
|
color: AppColors_1.AppColors.grayTextWeak,
|
|
1978
2339
|
},
|
|
1979
2340
|
fileCard: {
|
|
@@ -2233,6 +2594,28 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
2233
2594
|
borderWidth: 1,
|
|
2234
2595
|
borderColor: AppColors_1.AppColors.errorBorder,
|
|
2235
2596
|
},
|
|
2597
|
+
liveWarningCard: {
|
|
2598
|
+
flexDirection: 'row',
|
|
2599
|
+
alignItems: 'center',
|
|
2600
|
+
backgroundColor: AppColors_1.AppColors.amber100,
|
|
2601
|
+
borderWidth: 1,
|
|
2602
|
+
borderColor: AppColors_1.AppColors.amber200,
|
|
2603
|
+
borderRadius: 10,
|
|
2604
|
+
padding: 12,
|
|
2605
|
+
marginBottom: 12,
|
|
2606
|
+
},
|
|
2607
|
+
liveWarningTitle: {
|
|
2608
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2609
|
+
fontSize: 12,
|
|
2610
|
+
color: AppColors_1.AppColors.amber800Warm,
|
|
2611
|
+
marginBottom: 2,
|
|
2612
|
+
},
|
|
2613
|
+
liveWarningDesc: {
|
|
2614
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2615
|
+
fontSize: 10.5,
|
|
2616
|
+
lineHeight: 14,
|
|
2617
|
+
color: AppColors_1.AppColors.amber800Warm,
|
|
2618
|
+
},
|
|
2236
2619
|
adviceBadge: {
|
|
2237
2620
|
paddingHorizontal: 8,
|
|
2238
2621
|
paddingVertical: 4,
|
|
@@ -2283,27 +2666,80 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
2283
2666
|
},
|
|
2284
2667
|
totalSummaryCard: {
|
|
2285
2668
|
marginTop: 10,
|
|
2286
|
-
backgroundColor: `${AppColors_1.AppColors.
|
|
2287
|
-
borderRadius:
|
|
2669
|
+
backgroundColor: `${AppColors_1.AppColors.brandPurple}0B`,
|
|
2670
|
+
borderRadius: 12,
|
|
2288
2671
|
padding: 12,
|
|
2289
2672
|
borderWidth: 1,
|
|
2290
|
-
borderColor: `${AppColors_1.AppColors.
|
|
2291
|
-
gap:
|
|
2673
|
+
borderColor: `${AppColors_1.AppColors.brandPurple}25`,
|
|
2674
|
+
gap: 8,
|
|
2292
2675
|
},
|
|
2293
2676
|
totalSummaryRow: {
|
|
2294
2677
|
flexDirection: 'row',
|
|
2295
2678
|
justifyContent: 'space-between',
|
|
2296
2679
|
alignItems: 'center',
|
|
2297
2680
|
},
|
|
2681
|
+
totalSummaryLabelWrap: {
|
|
2682
|
+
flexDirection: 'row',
|
|
2683
|
+
alignItems: 'center',
|
|
2684
|
+
gap: 8,
|
|
2685
|
+
},
|
|
2686
|
+
totalIconBadge: {
|
|
2687
|
+
width: 32,
|
|
2688
|
+
height: 32,
|
|
2689
|
+
borderRadius: 8,
|
|
2690
|
+
backgroundColor: `${AppColors_1.AppColors.brandPurple}15`,
|
|
2691
|
+
alignItems: 'center',
|
|
2692
|
+
justifyContent: 'center',
|
|
2693
|
+
},
|
|
2298
2694
|
totalSummaryLabel: {
|
|
2299
2695
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2300
|
-
fontSize: 11,
|
|
2301
|
-
color: AppColors_1.AppColors.
|
|
2302
|
-
letterSpacing: 0.
|
|
2696
|
+
fontSize: 11.5,
|
|
2697
|
+
color: AppColors_1.AppColors.brandPurple,
|
|
2698
|
+
letterSpacing: 0.6,
|
|
2699
|
+
},
|
|
2700
|
+
totalSummarySub: {
|
|
2701
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2702
|
+
fontSize: 10,
|
|
2703
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2704
|
+
marginTop: 1,
|
|
2303
2705
|
},
|
|
2304
2706
|
totalSummaryValue: {
|
|
2305
2707
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2306
|
-
fontSize:
|
|
2708
|
+
fontSize: 15,
|
|
2709
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2710
|
+
},
|
|
2711
|
+
totalSummaryKb: {
|
|
2712
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2713
|
+
fontSize: 10,
|
|
2714
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2715
|
+
},
|
|
2716
|
+
totalFormulaGrid: {
|
|
2717
|
+
flexDirection: 'row',
|
|
2718
|
+
flexWrap: 'wrap',
|
|
2719
|
+
gap: 6,
|
|
2720
|
+
paddingTop: 6,
|
|
2721
|
+
borderTopWidth: 1,
|
|
2722
|
+
borderTopColor: `${AppColors_1.AppColors.brandPurple}15`,
|
|
2723
|
+
},
|
|
2724
|
+
totalChip: {
|
|
2725
|
+
flexDirection: 'row',
|
|
2726
|
+
alignItems: 'center',
|
|
2727
|
+
gap: 4,
|
|
2728
|
+
backgroundColor: AppColors_1.AppColors.white,
|
|
2729
|
+
borderRadius: 6,
|
|
2730
|
+
paddingHorizontal: 6,
|
|
2731
|
+
paddingVertical: 3,
|
|
2732
|
+
borderWidth: 1,
|
|
2733
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
2734
|
+
},
|
|
2735
|
+
totalDot: {
|
|
2736
|
+
width: 6,
|
|
2737
|
+
height: 6,
|
|
2738
|
+
borderRadius: 3,
|
|
2739
|
+
},
|
|
2740
|
+
totalChipText: {
|
|
2741
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2742
|
+
fontSize: 9.5,
|
|
2307
2743
|
color: AppColors_1.AppColors.primaryBlack,
|
|
2308
2744
|
},
|
|
2309
2745
|
totalSummaryFormula: {
|
|
@@ -2338,24 +2774,45 @@ const bundleStyles = react_native_1.StyleSheet.create({
|
|
|
2338
2774
|
color: AppColors_1.AppColors.purple,
|
|
2339
2775
|
},
|
|
2340
2776
|
tipItem: {
|
|
2341
|
-
marginBottom:
|
|
2777
|
+
marginBottom: 10,
|
|
2342
2778
|
backgroundColor: AppColors_1.AppColors.white,
|
|
2343
|
-
padding:
|
|
2344
|
-
borderRadius:
|
|
2779
|
+
padding: 12,
|
|
2780
|
+
borderRadius: 10,
|
|
2345
2781
|
borderWidth: 1,
|
|
2346
2782
|
borderColor: AppColors_1.AppColors.purple200,
|
|
2783
|
+
gap: 6,
|
|
2784
|
+
},
|
|
2785
|
+
tipItemHeader: {
|
|
2786
|
+
flexDirection: 'row',
|
|
2787
|
+
alignItems: 'flex-start',
|
|
2788
|
+
justifyContent: 'space-between',
|
|
2789
|
+
gap: 8,
|
|
2790
|
+
},
|
|
2791
|
+
tipTitleWrap: {
|
|
2792
|
+
flexDirection: 'row',
|
|
2793
|
+
alignItems: 'center',
|
|
2794
|
+
gap: 6,
|
|
2795
|
+
flex: 1,
|
|
2796
|
+
flexShrink: 1,
|
|
2797
|
+
},
|
|
2798
|
+
tipActionWrap: {
|
|
2799
|
+
flexDirection: 'row',
|
|
2800
|
+
alignItems: 'center',
|
|
2801
|
+
gap: 6,
|
|
2802
|
+
flexShrink: 0,
|
|
2347
2803
|
},
|
|
2348
2804
|
tipTitle: {
|
|
2349
2805
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2350
2806
|
fontSize: 12,
|
|
2351
2807
|
color: AppColors_1.AppColors.purple900,
|
|
2808
|
+
flex: 1,
|
|
2809
|
+
flexShrink: 1,
|
|
2352
2810
|
},
|
|
2353
2811
|
tipDesc: {
|
|
2354
2812
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2355
2813
|
fontSize: 11,
|
|
2356
2814
|
color: AppColors_1.AppColors.gray500,
|
|
2357
2815
|
lineHeight: 16,
|
|
2358
|
-
marginTop: 4,
|
|
2359
2816
|
},
|
|
2360
2817
|
});
|
|
2361
2818
|
exports.default = BundleTab;
|