react-native-inapp-inspector 1.1.22 → 1.1.24
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 +172 -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/customHooks/bundleAnalyzer.d.ts +1 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.js +95 -28
- package/dist/commonjs/i18n/locales/en.json +24 -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 +174 -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/customHooks/bundleAnalyzer.d.ts +1 -1
- package/dist/esm/customHooks/bundleAnalyzer.js +96 -29
- package/dist/esm/i18n/locales/en.json +24 -22
- package/package.json +1 -1
|
@@ -295,35 +295,35 @@ const PerformanceTab = react_1.default.memo(() => {
|
|
|
295
295
|
<react_native_1.View style={perfStyles.filterRow}>
|
|
296
296
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{ gap: 6, paddingHorizontal: 12, paddingVertical: 4 }}>
|
|
297
297
|
{[
|
|
298
|
-
{ key: 'ALL', label: t('performance.allLogs'),
|
|
298
|
+
{ key: 'ALL', label: t('performance.allLogs'), Icon: NetworkIcons_1.BoltIcon, count: events.length },
|
|
299
299
|
{
|
|
300
300
|
key: 'JANKY',
|
|
301
301
|
label: t('performance.jankySlow'),
|
|
302
|
-
|
|
302
|
+
Icon: NetworkIcons_1.WarningTriangleIcon,
|
|
303
303
|
count: events.filter(e => e.severity === 'warning' || e.severity === 'critical').length,
|
|
304
304
|
},
|
|
305
305
|
{
|
|
306
306
|
key: 'NAVIGATION',
|
|
307
307
|
label: t('performance.navigation'),
|
|
308
|
-
|
|
308
|
+
Icon: NetworkIcons_1.MapIcon,
|
|
309
309
|
count: events.filter(e => e.category === 'navigation').length,
|
|
310
310
|
},
|
|
311
311
|
{
|
|
312
312
|
key: 'RENDER',
|
|
313
313
|
label: t('performance.components'),
|
|
314
|
-
|
|
314
|
+
Icon: NetworkIcons_1.AtomIcon,
|
|
315
315
|
count: events.filter(e => e.category === 'render').length,
|
|
316
316
|
},
|
|
317
317
|
{
|
|
318
318
|
key: 'MEMORY',
|
|
319
319
|
label: t('performance.memoryGc'),
|
|
320
|
-
|
|
320
|
+
Icon: NetworkIcons_1.BrainIcon,
|
|
321
321
|
count: events.filter(e => e.category === 'memory').length,
|
|
322
322
|
},
|
|
323
323
|
{
|
|
324
324
|
key: 'IO',
|
|
325
325
|
label: t('performance.networkIo'),
|
|
326
|
-
|
|
326
|
+
Icon: NetworkIcons_1.GlobeIcon,
|
|
327
327
|
count: events.filter(e => e.category === 'io' || e.category === 'bridge').length,
|
|
328
328
|
},
|
|
329
329
|
].map(tab => {
|
|
@@ -332,7 +332,7 @@ const PerformanceTab = react_1.default.memo(() => {
|
|
|
332
332
|
perfStyles.filterPill,
|
|
333
333
|
isActive && perfStyles.filterPillActive,
|
|
334
334
|
]}>
|
|
335
|
-
<
|
|
335
|
+
<tab.Icon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayTextStrong} size={12}/>
|
|
336
336
|
<react_native_1.Text style={[
|
|
337
337
|
perfStyles.filterPillText,
|
|
338
338
|
isActive && perfStyles.filterPillTextActive,
|
|
@@ -525,7 +525,7 @@ const PerformanceTab = react_1.default.memo(() => {
|
|
|
525
525
|
</react_native_1.View>
|
|
526
526
|
|
|
527
527
|
{filteredEvents.length === 0 ? (<react_native_1.View style={perfStyles.emptyCard}>
|
|
528
|
-
<
|
|
528
|
+
<NetworkIcons_1.BoltIcon color={AppColors_1.AppColors.amber500} size={30}/>
|
|
529
529
|
<react_native_1.Text style={perfStyles.emptyTitle}>{t('performance.emptyTitle')}</react_native_1.Text>
|
|
530
530
|
<react_native_1.Text style={perfStyles.emptySub}>
|
|
531
531
|
{t('performance.emptySubtitle')}
|
|
@@ -612,7 +612,10 @@ const PerformanceTab = react_1.default.memo(() => {
|
|
|
612
612
|
|
|
613
613
|
{/* Actionable Optimization Tip */}
|
|
614
614
|
{event.advice && (<react_native_1.View style={perfStyles.adviceCard}>
|
|
615
|
-
<react_native_1.
|
|
615
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 5 }}>
|
|
616
|
+
<NetworkIcons_1.LightbulbIcon color={AppColors_1.AppColors.purpleShade700} size={12}/>
|
|
617
|
+
<react_native_1.Text style={perfStyles.adviceHeading}>{t('performance.optimizationTip')}</react_native_1.Text>
|
|
618
|
+
</react_native_1.View>
|
|
616
619
|
<react_native_1.Text style={perfStyles.adviceBodyText}>{event.advice}</react_native_1.Text>
|
|
617
620
|
</react_native_1.View>)}
|
|
618
621
|
</react_native_1.View>)}
|
|
@@ -703,9 +706,6 @@ const perfStyles = react_native_1.StyleSheet.create({
|
|
|
703
706
|
backgroundColor: AppColors_1.AppColors.brandPurple,
|
|
704
707
|
borderColor: AppColors_1.AppColors.brandPurple,
|
|
705
708
|
},
|
|
706
|
-
filterPillIcon: {
|
|
707
|
-
fontSize: 11,
|
|
708
|
-
},
|
|
709
709
|
filterPillText: {
|
|
710
710
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
711
711
|
fontSize: 11,
|
|
@@ -221,9 +221,12 @@ const ReduxTab = react_1.default.memo(() => {
|
|
|
221
221
|
<react_native_1.Text style={reduxTabStyles.resultCount}>
|
|
222
222
|
Showing {filteredSlices.length} of {sliceItems.length} state slices
|
|
223
223
|
</react_native_1.Text>
|
|
224
|
-
<react_native_1.
|
|
225
|
-
{sortMode === 'latest' ?
|
|
226
|
-
|
|
224
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
225
|
+
{sortMode === 'latest' ? (<NetworkIcons_1.BoltIcon color={AppColors_1.AppColors.brandPurple} size={11}/>) : (<NetworkIcons_1.TextAaIcon color={AppColors_1.AppColors.brandPurple} size={11}/>)}
|
|
226
|
+
<react_native_1.Text style={reduxTabStyles.sortLabel}>
|
|
227
|
+
{sortMode === 'latest' ? 'Newest Updates First' : 'Alphabetical (A-Z)'}
|
|
228
|
+
</react_native_1.Text>
|
|
229
|
+
</react_native_1.View>
|
|
227
230
|
</react_native_1.View>
|
|
228
231
|
</react_native_1.View>
|
|
229
232
|
|
|
@@ -66,3 +66,15 @@ export declare const StorageIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
|
66
66
|
export declare const MetadataIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
67
67
|
export declare const ReduxIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
68
68
|
export declare const PerformanceIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
69
|
+
export declare const BoltIcon: ({ color, size }: any) => React.JSX.Element;
|
|
70
|
+
export declare const BanIcon: ({ color, size }: any) => React.JSX.Element;
|
|
71
|
+
export declare const FolderOpenIcon: ({ color, size }: any) => React.JSX.Element;
|
|
72
|
+
export declare const DocIcon: ({ color, size }: any) => React.JSX.Element;
|
|
73
|
+
export declare const LightbulbIcon: ({ color, size }: any) => React.JSX.Element;
|
|
74
|
+
export declare const SparkleIcon: ({ color, size }: any) => React.JSX.Element;
|
|
75
|
+
export declare const MapIcon: ({ color, size }: any) => React.JSX.Element;
|
|
76
|
+
export declare const AtomIcon: ({ color, size }: any) => React.JSX.Element;
|
|
77
|
+
export declare const BrainIcon: ({ color, size }: any) => React.JSX.Element;
|
|
78
|
+
export declare const TextAaIcon: ({ color, size }: any) => React.JSX.Element;
|
|
79
|
+
export declare const CartIcon: ({ color, size }: any) => React.JSX.Element;
|
|
80
|
+
export declare const MoneyIcon: ({ color, size }: any) => React.JSX.Element;
|
|
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.InfoCircleIcon = exports.UserIcon = exports.LayersIcon = exports.WipeIcon = exports.FolderIcon = exports.SettingsIcon = exports.EyeIcon = exports.JsIcon = exports.CssIcon = exports.HtmlIcon = exports.BrandSquareIcon = exports.BrandCircleIcon = exports.MoonIcon = exports.SunIcon = exports.DebugIcon = exports.InsightsIcon = exports.AnalyticsIcon = exports.WhiteBackNavigation = exports.CloseWhite = exports.DownloadIcon = exports.FilterIcon = exports.ChevronIcon = exports.SortArrowIcon = exports.GlobeIcon = exports.DiffIcon = exports.SignalIcon = exports.ExportIcon = exports.HeaderPauseIcon = exports.TrashIcon = exports.FailIcon = exports.CircleAlertIcon = exports.CircleXIcon = exports.CircleCheckIcon = exports.CheckIcon = exports.TerminalIcon = exports.FetchIcon = exports.CopyIcon = exports.HeadersIcon = exports.ResponseIcon = exports.RequestIcon = exports.SizeIcon = exports.StatusIcon = exports.CalendarIcon = exports.ClockIcon = exports.ClearIcon = exports.SearchIcon = exports.ExpandCollapseIcon = exports.ScreenIcon = exports.MapPinIcon = exports.EmptyRadarIcon = void 0;
|
|
40
|
-
exports.PerformanceIcon = exports.ReduxIcon = exports.MetadataIcon = exports.StorageIcon = exports.TimelineIcon = exports.LiveStateIcon = exports.BundleIcon = exports.ForwardChevronIcon = exports.PackageIcon = exports.TableIcon = exports.RawIcon = exports.PrettyIcon = exports.SortIcon = exports.MotionIcon = exports.TrendingUpIcon = exports.ErrorCircleIcon = exports.WarningTriangleIcon = void 0;
|
|
40
|
+
exports.MoneyIcon = exports.CartIcon = exports.TextAaIcon = exports.BrainIcon = exports.AtomIcon = exports.MapIcon = exports.SparkleIcon = exports.LightbulbIcon = exports.DocIcon = exports.FolderOpenIcon = exports.BanIcon = exports.BoltIcon = exports.PerformanceIcon = exports.ReduxIcon = exports.MetadataIcon = exports.StorageIcon = exports.TimelineIcon = exports.LiveStateIcon = exports.BundleIcon = exports.ForwardChevronIcon = exports.PackageIcon = exports.TableIcon = exports.RawIcon = exports.PrettyIcon = exports.SortIcon = exports.MotionIcon = exports.TrendingUpIcon = exports.ErrorCircleIcon = exports.WarningTriangleIcon = void 0;
|
|
41
41
|
const react_1 = __importDefault(require("react"));
|
|
42
42
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
43
43
|
// Stylesheet
|
|
@@ -508,3 +508,94 @@ const PerformanceIcon = ({ color = AppColors_1.AppColors.purple, size = 14, }) =
|
|
|
508
508
|
</react_native_svg_1.default>);
|
|
509
509
|
};
|
|
510
510
|
exports.PerformanceIcon = PerformanceIcon;
|
|
511
|
+
// ─── App-wide Vector Icons (emoji-free, render on every device) ─────────────
|
|
512
|
+
const BoltIcon = ({ color = AppColors_1.AppColors.amber500, size = 14 }) => {
|
|
513
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
514
|
+
<react_native_svg_1.Path d="M13 2 4.5 13.5 H10.5 L9 22 19.5 9.5 H13.5 Z" stroke={color} strokeWidth="1.8" strokeLinejoin="round"/>
|
|
515
|
+
</react_native_svg_1.default>);
|
|
516
|
+
};
|
|
517
|
+
exports.BoltIcon = BoltIcon;
|
|
518
|
+
const BanIcon = ({ color = AppColors_1.AppColors.errorColor, size = 14 }) => {
|
|
519
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
520
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="8.5" stroke={color} strokeWidth="1.8"/>
|
|
521
|
+
<react_native_svg_1.Path d="M5.5 5.5 18.5 18.5" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
522
|
+
</react_native_svg_1.default>);
|
|
523
|
+
};
|
|
524
|
+
exports.BanIcon = BanIcon;
|
|
525
|
+
const FolderOpenIcon = ({ color = AppColors_1.AppColors.amber500, size = 14 }) => {
|
|
526
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
527
|
+
<react_native_svg_1.Path d="M8.4 11 10 5.5a2 2 0 0 1 1.9-1.5h3.7a1.5 1.5 0 0 1 1.4 2L15.5 11" stroke={color} strokeWidth="1.8" strokeLinejoin="round"/>
|
|
528
|
+
<react_native_svg_1.Path d="M6.7 20.4 4.3 12.9A1.6 1.6 0 0 1 5.8 11h14.6a1.6 1.6 0 0 1 1.6 1.9l-2.4 7.5a2 2 0 0 1-2 1.4H8.7a2 2 0 0 1-2-1.4Z" stroke={color} strokeWidth="1.8" strokeLinejoin="round"/>
|
|
529
|
+
</react_native_svg_1.default>);
|
|
530
|
+
};
|
|
531
|
+
exports.FolderOpenIcon = FolderOpenIcon;
|
|
532
|
+
const DocIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => {
|
|
533
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
534
|
+
<react_native_svg_1.Path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" stroke={color} strokeWidth="1.8" strokeLinejoin="round"/>
|
|
535
|
+
<react_native_svg_1.Path d="M14 2v4a2 2 0 0 0 2 2h4" stroke={color} strokeWidth="1.8" strokeLinejoin="round"/>
|
|
536
|
+
<react_native_svg_1.Path d="M8 13h8 M8 17h8" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
537
|
+
</react_native_svg_1.default>);
|
|
538
|
+
};
|
|
539
|
+
exports.DocIcon = DocIcon;
|
|
540
|
+
const LightbulbIcon = ({ color = AppColors_1.AppColors.amber500, size = 14 }) => {
|
|
541
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
542
|
+
<react_native_svg_1.Path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1.3.5 2.6 1.5 3.5.8.8 1.3 1.5 1.5 2.5" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
543
|
+
<react_native_svg_1.Path d="M9 18h6" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
544
|
+
<react_native_svg_1.Path d="M10 22h4" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
545
|
+
</react_native_svg_1.default>);
|
|
546
|
+
};
|
|
547
|
+
exports.LightbulbIcon = LightbulbIcon;
|
|
548
|
+
const SparkleIcon = ({ color = AppColors_1.AppColors.amber500, size = 14 }) => {
|
|
549
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
550
|
+
<react_native_svg_1.Path d="M11.1 3.9c.2-.6 1-.6 1.2 0l1.2 4.2 4.2 1.2c.6.2.6 1 0 1.2l-4.2 1.2-1.2 4.2c-.2.6-1 .6-1.2 0l-1.2-4.2-4.2-1.2c-.6-.2-.6-1 0-1.2l4.2-1.2Z" fill={color}/>
|
|
551
|
+
<react_native_svg_1.Path d="M18.5 3.5v4 M16.5 5.5h4" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
552
|
+
</react_native_svg_1.default>);
|
|
553
|
+
};
|
|
554
|
+
exports.SparkleIcon = SparkleIcon;
|
|
555
|
+
const MapIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => {
|
|
556
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
557
|
+
<react_native_svg_1.Path d="M3 5.5 9 3.5l6 2 6-2v15l-6 2-6-2-6 2Z" stroke={color} strokeWidth="1.8" strokeLinejoin="round"/>
|
|
558
|
+
<react_native_svg_1.Path d="M9 3.5v15M15 5.5v15" stroke={color} strokeWidth="1.8"/>
|
|
559
|
+
<react_native_svg_1.Circle cx="12" cy="11" r="1.9" stroke={color} strokeWidth="1.6"/>
|
|
560
|
+
</react_native_svg_1.default>);
|
|
561
|
+
};
|
|
562
|
+
exports.MapIcon = MapIcon;
|
|
563
|
+
const AtomIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => {
|
|
564
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
565
|
+
<react_native_svg_1.Ellipse cx="12" cy="12" rx="9" ry="3.8" stroke={color} strokeWidth="1.6"/>
|
|
566
|
+
<react_native_svg_1.Ellipse cx="12" cy="12" rx="9" ry="3.8" stroke={color} strokeWidth="1.6" transform="rotate(60 12 12)"/>
|
|
567
|
+
<react_native_svg_1.Ellipse cx="12" cy="12" rx="9" ry="3.8" stroke={color} strokeWidth="1.6" transform="rotate(120 12 12)"/>
|
|
568
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="1.6" fill={color}/>
|
|
569
|
+
</react_native_svg_1.default>);
|
|
570
|
+
};
|
|
571
|
+
exports.AtomIcon = AtomIcon;
|
|
572
|
+
const BrainIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => {
|
|
573
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
574
|
+
<react_native_svg_1.Path d="M9.5 2a2.5 2.5 0 0 0-2.5 2.5v.5a2.5 2.5 0 0 0-3 3.17A2.5 2.5 0 0 0 2 10.5c0 .76.34 1.44.88 1.9A2.5 2.5 0 0 0 2 15.5c0 .76.34 1.44.88 1.9A2.5 2.5 0 0 0 5 19.75c0 .75.5 1.5 1.25 1.75A2.5 2.5 0 0 0 8.5 23h.25a2.5 2.5 0 0 0 2.5-2.5V4a2.5 2.5 0 0 0-1.75-2ZM14.5 2a2.5 2.5 0 0 1 2.5 2.5v.5a2.5 2.5 0 0 1 3 3.17A2.5 2.5 0 0 1 22 10.5c0 .76-.34 1.44-.88 1.9a2.5 2.5 0 0 1 .88 1.9c0 .76-.34 1.44-.88 1.9A2.5 2.5 0 0 1 19 19.75c0 .75-.5 1.5-1.25 1.75A2.5 2.5 0 0 1 15.5 23h-.25a2.5 2.5 0 0 1-2.5-2.5V4a2.5 2.5 0 0 1 1.75-2Z" stroke={color} strokeWidth="1.6" strokeLinejoin="round"/>
|
|
575
|
+
</react_native_svg_1.default>);
|
|
576
|
+
};
|
|
577
|
+
exports.BrainIcon = BrainIcon;
|
|
578
|
+
const TextAaIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => {
|
|
579
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
580
|
+
<react_native_svg_1.Path d="M4 19 7.5 7 11 19" stroke={color} strokeWidth="1.8" strokeLinejoin="round"/>
|
|
581
|
+
<react_native_svg_1.Path d="M5.5 15h4" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
582
|
+
<react_native_svg_1.Path d="M16 19l1.7-6.6 1.7 6.6" stroke={color} strokeWidth="1.8" strokeLinejoin="round"/>
|
|
583
|
+
<react_native_svg_1.Path d="M16.9 15.8h1.6" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
584
|
+
</react_native_svg_1.default>);
|
|
585
|
+
};
|
|
586
|
+
exports.TextAaIcon = TextAaIcon;
|
|
587
|
+
const CartIcon = ({ color = AppColors_1.AppColors.amber500, size = 14 }) => {
|
|
588
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
589
|
+
<react_native_svg_1.Circle cx="9.5" cy="20" r="1.3" stroke={color} strokeWidth="1.8"/>
|
|
590
|
+
<react_native_svg_1.Circle cx="18.5" cy="20" r="1.3" stroke={color} strokeWidth="1.8"/>
|
|
591
|
+
<react_native_svg_1.Path d="M3 3.5h1.8a1 1 0 0 1 .97.75l3.1 9.75a1.5 1.5 0 0 0 1.44 1.1h9.2a1 1 0 0 0 .95-.7l2.5-7.5a.8.8 0 0 0-.75-1.05H7" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
592
|
+
</react_native_svg_1.default>);
|
|
593
|
+
};
|
|
594
|
+
exports.CartIcon = CartIcon;
|
|
595
|
+
const MoneyIcon = ({ color = AppColors_1.AppColors.emerald500, size = 14 }) => {
|
|
596
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
597
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="8.5" stroke={color} strokeWidth="1.8"/>
|
|
598
|
+
<react_native_svg_1.Path d="M12 7v10M14.5 9.5c-.6-1-1.5-1.5-2.5-1.5-1.5 0-2.5.9-2.5 2s1 1.8 2.5 2 2.5.8 2.5 2-1 2-2.5 2c-1 0-1.9-.5-2.5-1.5" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
599
|
+
</react_native_svg_1.default>);
|
|
600
|
+
};
|
|
601
|
+
exports.MoneyIcon = MoneyIcon;
|
|
@@ -81,7 +81,7 @@ const TreeNode = react_1.default.memo(function TreeNode({ data, name, level = 0,
|
|
|
81
81
|
{name !== undefined && (<react_native_1.Text style={[styles_1.default.codeKey, { marginBottom: 4 }]}>{`"${String(name)}": `}</react_native_1.Text>)}
|
|
82
82
|
<react_native_1.View style={styles_1.default.filePreviewCard}>
|
|
83
83
|
{isImage ? (<react_native_1.Image source={{ uri: file.uri }} style={styles_1.default.filePreviewThumb} resizeMode="cover"/>) : (<react_native_1.View style={styles_1.default.filePreviewDoc}>
|
|
84
|
-
<
|
|
84
|
+
<NetworkIcons_1.DocIcon color={AppColors_1.AppColors.grayTextWeak} size={20}/>
|
|
85
85
|
</react_native_1.View>)}
|
|
86
86
|
<react_native_1.View style={{ flex: 1 }}>
|
|
87
87
|
<react_native_1.Text style={styles_1.default.filePreviewName} numberOfLines={1}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "1.1.
|
|
1
|
+
export declare const LIB_VERSION = "1.1.24";
|
|
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LIB_VERSION = void 0;
|
|
4
4
|
// AUTO-GENERATED FILE — do not edit by hand.
|
|
5
5
|
// Regenerated from package.json on every build by scripts/gen-version.js.
|
|
6
|
-
exports.LIB_VERSION = '1.1.
|
|
6
|
+
exports.LIB_VERSION = '1.1.24';
|
|
@@ -107,7 +107,7 @@ export declare const getHostScriptURL: () => string;
|
|
|
107
107
|
/**
|
|
108
108
|
* Parses raw Metro bundle source code to discover real modules and packages in the host app.
|
|
109
109
|
*/
|
|
110
|
-
export declare const parseBundleSource: (bundleText: string, totalBytes: number, scriptURL: string) => HostBundleAnalysisResult;
|
|
110
|
+
export declare const parseBundleSource: (bundleText: string, totalBytes: number, scriptURL: string, isLive?: boolean) => HostBundleAnalysisResult;
|
|
111
111
|
/**
|
|
112
112
|
* Automatically fetch and analyze the real running bundle for the host app.
|
|
113
113
|
*/
|
|
@@ -15,20 +15,88 @@ const react_native_1 = require("react-native");
|
|
|
15
15
|
let cachedAnalysis = null;
|
|
16
16
|
let isAnalyzing = false;
|
|
17
17
|
const subscribers = [];
|
|
18
|
+
const getSourceCodeModule = () => {
|
|
19
|
+
try {
|
|
20
|
+
const legacy = react_native_1.NativeModules?.SourceCode;
|
|
21
|
+
if (legacy && typeof legacy.scriptURL === 'string' && legacy.scriptURL.length > 0) {
|
|
22
|
+
return legacy;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch { }
|
|
26
|
+
try {
|
|
27
|
+
const turbo = react_native_1.TurboModuleRegistry?.get?.('SourceCode');
|
|
28
|
+
const constants = turbo?.getConstants?.();
|
|
29
|
+
const scriptURL = turbo?.scriptURL || constants?.scriptURL;
|
|
30
|
+
if (typeof scriptURL === 'string' && scriptURL.length > 0) {
|
|
31
|
+
return { scriptURL };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch { }
|
|
35
|
+
return null;
|
|
36
|
+
};
|
|
18
37
|
const getHostScriptURL = () => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
38
|
+
// 1. NativeModules.SourceCode (bridged) or SourceCode TurboModule (bridgeless / new arch)
|
|
39
|
+
const scriptURL = getSourceCodeModule()?.scriptURL;
|
|
40
|
+
if (typeof scriptURL === 'string' && scriptURL.length > 0) {
|
|
41
|
+
return scriptURL;
|
|
22
42
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
43
|
+
// 2. Android legacy: PlatformConstants.serverHost -> "localhost:8082"
|
|
44
|
+
try {
|
|
45
|
+
const serverHost = react_native_1.NativeModules?.PlatformConstants?.serverHost;
|
|
46
|
+
if (typeof serverHost === 'string' && serverHost.length > 0) {
|
|
47
|
+
return `http://${serverHost}/index.bundle?platform=${react_native_1.Platform.OS}&dev=true`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch { }
|
|
51
|
+
return '';
|
|
26
52
|
};
|
|
27
53
|
exports.getHostScriptURL = getHostScriptURL;
|
|
54
|
+
const DEV_SERVER_PORTS = [8081, 8082, 8083, 8084, 8090, 8080, 19000];
|
|
55
|
+
const buildProbeUrls = (scriptURL) => {
|
|
56
|
+
const urls = [];
|
|
57
|
+
if (typeof scriptURL === 'string' && scriptURL.startsWith('http')) {
|
|
58
|
+
urls.push(scriptURL);
|
|
59
|
+
}
|
|
60
|
+
const portMatch = typeof scriptURL === 'string' ? scriptURL.match(/:(\d{2,5})/) : null;
|
|
61
|
+
const ports = portMatch ? [parseInt(portMatch[1], 10)] : DEV_SERVER_PORTS;
|
|
62
|
+
const hosts = react_native_1.Platform.OS === 'android'
|
|
63
|
+
? ['localhost', '127.0.0.1', '10.0.2.2']
|
|
64
|
+
: ['localhost', '127.0.0.1'];
|
|
65
|
+
for (const host of hosts) {
|
|
66
|
+
for (const port of ports) {
|
|
67
|
+
urls.push(`http://${host}:${port}/index.bundle?platform=${react_native_1.Platform.OS}&dev=true`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return Array.from(new Set(urls));
|
|
71
|
+
};
|
|
72
|
+
const fetchWithTimeout = async (url, timeoutMs) => {
|
|
73
|
+
try {
|
|
74
|
+
const controller = new AbortController();
|
|
75
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
76
|
+
try {
|
|
77
|
+
const res = await fetch(url, { signal: controller.signal });
|
|
78
|
+
if (!res.ok)
|
|
79
|
+
return { ok: false };
|
|
80
|
+
const contentLength = res.headers.get('content-length');
|
|
81
|
+
const text = await res.text();
|
|
82
|
+
return {
|
|
83
|
+
ok: true,
|
|
84
|
+
text,
|
|
85
|
+
bytes: contentLength ? parseInt(contentLength, 10) || text.length : text.length,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
finally {
|
|
89
|
+
clearTimeout(timer);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
return { ok: false };
|
|
94
|
+
}
|
|
95
|
+
};
|
|
28
96
|
/**
|
|
29
97
|
* Parses raw Metro bundle source code to discover real modules and packages in the host app.
|
|
30
98
|
*/
|
|
31
|
-
const parseBundleSource = (bundleText, totalBytes, scriptURL) => {
|
|
99
|
+
const parseBundleSource = (bundleText, totalBytes, scriptURL, isLive = true) => {
|
|
32
100
|
const isHermes = Boolean(globalThis.HermesInternal);
|
|
33
101
|
const totalDevMb = Number((totalBytes / (1024 * 1024)).toFixed(2));
|
|
34
102
|
const totalDevKb = Math.round(totalBytes / 1024);
|
|
@@ -451,7 +519,7 @@ const parseBundleSource = (bundleText, totalBytes, scriptURL) => {
|
|
|
451
519
|
},
|
|
452
520
|
];
|
|
453
521
|
return {
|
|
454
|
-
isLive
|
|
522
|
+
isLive,
|
|
455
523
|
scriptURL,
|
|
456
524
|
totalDevBytes: totalBytes,
|
|
457
525
|
totalDevMb,
|
|
@@ -526,30 +594,29 @@ const analyzeHostAppBundle = async () => {
|
|
|
526
594
|
}
|
|
527
595
|
isAnalyzing = true;
|
|
528
596
|
const scriptURL = (0, exports.getHostScriptURL)();
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
byteLength = byteLength || bundleText.length;
|
|
539
|
-
const result = (0, exports.parseBundleSource)(bundleText, byteLength, scriptURL);
|
|
540
|
-
cachedAnalysis = result;
|
|
541
|
-
isAnalyzing = false;
|
|
542
|
-
subscribers.forEach(cb => cb(result));
|
|
543
|
-
subscribers.length = 0;
|
|
544
|
-
return result;
|
|
597
|
+
// Probe candidate dev-server URLs until one serves the JS bundle
|
|
598
|
+
let fetched = null;
|
|
599
|
+
let fetchedUrl = '';
|
|
600
|
+
for (const url of buildProbeUrls(scriptURL)) {
|
|
601
|
+
const probe = await fetchWithTimeout(url, 3000);
|
|
602
|
+
if (probe.ok && probe.text && probe.text.length > 0) {
|
|
603
|
+
fetched = { text: probe.text, bytes: probe.bytes ?? probe.text.length };
|
|
604
|
+
fetchedUrl = url;
|
|
605
|
+
break;
|
|
545
606
|
}
|
|
546
607
|
}
|
|
547
|
-
|
|
548
|
-
|
|
608
|
+
if (fetched) {
|
|
609
|
+
const result = (0, exports.parseBundleSource)(fetched.text, fetched.bytes, fetchedUrl);
|
|
610
|
+
cachedAnalysis = result;
|
|
611
|
+
isAnalyzing = false;
|
|
612
|
+
subscribers.forEach(cb => cb(result));
|
|
613
|
+
subscribers.length = 0;
|
|
614
|
+
return result;
|
|
549
615
|
}
|
|
550
|
-
// Fallback
|
|
616
|
+
// Fallback: could not reach a Metro dev server (release build, offline, or
|
|
617
|
+
// custom dev-server host). Return estimated values so the UI never crashes.
|
|
551
618
|
const fallbackBytes = 6840000; // ~6.8MB standard RN dev bundle
|
|
552
|
-
const result = (0, exports.parseBundleSource)('', fallbackBytes, scriptURL);
|
|
619
|
+
const result = (0, exports.parseBundleSource)('', fallbackBytes, scriptURL || 'unknown', false);
|
|
553
620
|
cachedAnalysis = result;
|
|
554
621
|
isAnalyzing = false;
|
|
555
622
|
subscribers.forEach(cb => cb(result));
|
|
@@ -355,6 +355,8 @@
|
|
|
355
355
|
"heroTitle": "Bundle & Asset Architecture",
|
|
356
356
|
"heroSubtitle": "Real-time size breakdown across all assets, code, and dependencies",
|
|
357
357
|
"heroSubtitleLive": "Live analysis of {{scriptUrl}}",
|
|
358
|
+
"liveAnalysisUnavailable": "Live bundle analysis unavailable",
|
|
359
|
+
"liveAnalysisUnavailableSub": "Could not reach the Metro dev server, so values are estimates. Make sure the app runs in development via `npx react-native start` and the Inspector can reach your Metro port (8081, 8082, ...).",
|
|
358
360
|
"bundleOverviewJson": "Bundle Overview JSON",
|
|
359
361
|
"devBundleSize": "DEV BUNDLE SIZE",
|
|
360
362
|
"devBundleHint": "{{kb}} KB • {{modules}} modules",
|
|
@@ -379,11 +381,11 @@
|
|
|
379
381
|
"treemapTitle": "Asset & File Type Ratio Treemap",
|
|
380
382
|
"treemapSub": "Total ~{{mb}} MB",
|
|
381
383
|
"treemapJson": "Ratio Treemap JSON",
|
|
382
|
-
"legendImages": "
|
|
383
|
-
"legendTs": "
|
|
384
|
-
"legendJs": "
|
|
385
|
-
"legendFonts": "
|
|
386
|
-
"legendJson": "
|
|
384
|
+
"legendImages": "Images:",
|
|
385
|
+
"legendTs": "TS/TSX:",
|
|
386
|
+
"legendJs": "JS Libs:",
|
|
387
|
+
"legendFonts": "Fonts:",
|
|
388
|
+
"legendJson": "JSON:",
|
|
387
389
|
"categoryBreakdown": "Category Breakdown",
|
|
388
390
|
"categoriesJson": "Categories Breakdown JSON",
|
|
389
391
|
"catImagesTitle": "Images & Media Assets",
|
|
@@ -417,14 +419,14 @@
|
|
|
417
419
|
"catJavascript": "JS & Node Modules",
|
|
418
420
|
"catFonts": "Fonts & Glyphs",
|
|
419
421
|
"catJson": "JSON & Data",
|
|
420
|
-
"treeView": "
|
|
421
|
-
"flatList": "
|
|
422
|
+
"treeView": "Tree View",
|
|
423
|
+
"flatList": "Flat List",
|
|
422
424
|
"expand": "Expand",
|
|
423
425
|
"collapse": "Collapse",
|
|
424
426
|
"showingFilesOf": "Showing {{shown}} of {{total}} files",
|
|
425
427
|
"filesOf": "{{count}} of {{total}} Files",
|
|
426
|
-
"notConsumed": "
|
|
427
|
-
"consumed": "
|
|
428
|
+
"notConsumed": "Not Consumed",
|
|
429
|
+
"consumed": "Consumed",
|
|
428
430
|
"copyFileInfo": "Copy {{name}} Info",
|
|
429
431
|
"fileDetailsJson": "File Details JSON",
|
|
430
432
|
"file": "file",
|
|
@@ -440,13 +442,13 @@
|
|
|
440
442
|
"showingDependencies": "Showing {{count}} dependencies",
|
|
441
443
|
"versionPrefix": "v{{version}}",
|
|
442
444
|
"bundled": "bundled",
|
|
443
|
-
"deprecated": "
|
|
444
|
-
"updateAvailable": "
|
|
445
|
-
"upToDate": "
|
|
446
|
-
"bundledBadge": "
|
|
445
|
+
"deprecated": "DEPRECATED",
|
|
446
|
+
"updateAvailable": "Update: v{{version}}",
|
|
447
|
+
"upToDate": "Up to date",
|
|
448
|
+
"bundledBadge": "Bundled",
|
|
447
449
|
"packageDetailsJson": "Package Details JSON",
|
|
448
|
-
"direct": "
|
|
449
|
-
"transitive": "
|
|
450
|
+
"direct": "Direct",
|
|
451
|
+
"transitive": "Transitive",
|
|
450
452
|
"minified": "~{{size}} KB minified",
|
|
451
453
|
"npmLink": "npm ↗",
|
|
452
454
|
"dependenciesCount": "{{count}} Dependencies",
|
|
@@ -460,16 +462,16 @@
|
|
|
460
462
|
"mediaAndFonts": "{{count}} Media & Fonts",
|
|
461
463
|
"optimizerTitle": "React Native Bundle Optimization Checklist",
|
|
462
464
|
"optimizationChecklist": "Optimization Checklist",
|
|
463
|
-
"optTip1Title": "
|
|
465
|
+
"optTip1Title": "Convert Heavy PNGs to WebP / SVGs",
|
|
464
466
|
"optTip1Desc": "Images account for >40% of final app download size. Converting 2x/3x raster PNGs to WebP saves 60-70% size with no visible fidelity loss.",
|
|
465
|
-
"optTip2Title": "
|
|
466
|
-
"optTip2DescActive": "
|
|
467
|
-
"optTip2DescInactive": "
|
|
468
|
-
"optTip3Title": "
|
|
467
|
+
"optTip2Title": "Enable Hermes Bytecode Engine",
|
|
468
|
+
"optTip2DescActive": "Hermes is active! JavaScript is compiled into optimized bytecode Ahead-Of-Time.",
|
|
469
|
+
"optTip2DescInactive": "Hermes is disabled. Enable hermes in your app config for ~40% smaller payload and instant TTI startup.",
|
|
470
|
+
"optTip3Title": "Font Subsetting & Weight Pruning",
|
|
469
471
|
"optTip3Desc": "Include only the font weights you actively use (e.g. Regular & Bold). Remove unused glyph ranges to save 100KB+ per font file.",
|
|
470
|
-
"optTip4Title": "
|
|
472
|
+
"optTip4Title": "Selective Path Imports (Tree-shaking)",
|
|
471
473
|
"optTip4Desc": "Import from specific subpaths (e.g. lodash/get or specific vector icon sets) instead of importing large monolithic packages.",
|
|
472
|
-
"optTip5Title": "
|
|
474
|
+
"optTip5Title": "Screen Lazy-Loading",
|
|
473
475
|
"optTip5Desc": "Lazy load secondary screens and heavy modal sheets using dynamic imports and InteractionManager to reduce initial bundle evaluation.",
|
|
474
476
|
"highImpact": "High Impact",
|
|
475
477
|
"mediumImpact": "Medium Impact",
|
|
@@ -6,6 +6,7 @@ import { formatGap, formatTime, getEventColor, getEventCategory, getCategoryColo
|
|
|
6
6
|
import { useTranslation } from '../i18n';
|
|
7
7
|
import HighlightText from './HighlightText';
|
|
8
8
|
import TouchableScale from './TouchableScale';
|
|
9
|
+
import { CartIcon, MoneyIcon } from './NetworkIcons';
|
|
9
10
|
// ─── Component ────────────────────────────────────────────────────────────────
|
|
10
11
|
const AnalyticsEventCard = React.memo(function AnalyticsEventCard({ event, onPress, isNew = false, searchStr = '', msSincePrev, computedScreenName, }) {
|
|
11
12
|
const { t } = useTranslation();
|
|
@@ -166,6 +167,7 @@ const AnalyticsEventCard = React.memo(function AnalyticsEventCard({ event, onPre
|
|
|
166
167
|
borderColor: AppColors.amberBorder,
|
|
167
168
|
},
|
|
168
169
|
]}>
|
|
170
|
+
<CartIcon color={AppColors.amber700} size={12}/>
|
|
169
171
|
<Text style={[
|
|
170
172
|
cardStyles.chipText,
|
|
171
173
|
{
|
|
@@ -173,7 +175,7 @@ const AnalyticsEventCard = React.memo(function AnalyticsEventCard({ event, onPre
|
|
|
173
175
|
fontFamily: AppFonts.interBold,
|
|
174
176
|
},
|
|
175
177
|
]}>
|
|
176
|
-
|
|
178
|
+
{items.length}{' '}
|
|
177
179
|
{items.length === 1
|
|
178
180
|
? t('analytics.item')
|
|
179
181
|
: t('analytics.items')}
|
|
@@ -198,6 +200,7 @@ const AnalyticsEventCard = React.memo(function AnalyticsEventCard({ event, onPre
|
|
|
198
200
|
borderColor: AppColors.emeraldBorder,
|
|
199
201
|
},
|
|
200
202
|
]}>
|
|
203
|
+
<MoneyIcon color={AppColors.emerald600} size={12}/>
|
|
201
204
|
<Text style={[
|
|
202
205
|
cardStyles.chipText,
|
|
203
206
|
{
|
|
@@ -205,7 +208,7 @@ const AnalyticsEventCard = React.memo(function AnalyticsEventCard({ event, onPre
|
|
|
205
208
|
fontFamily: AppFonts.interBold,
|
|
206
209
|
},
|
|
207
210
|
]}>
|
|
208
|
-
|
|
211
|
+
{String(val)} {currencyStr}
|
|
209
212
|
</Text>
|
|
210
213
|
</View>);
|
|
211
214
|
}
|
|
@@ -3,6 +3,7 @@ import { StyleSheet, Text, View, ScrollView, TouchableOpacity } from 'react-nati
|
|
|
3
3
|
import { AppColors } from '../styles/AppColors';
|
|
4
4
|
import { AppFonts } from '../styles/AppFonts';
|
|
5
5
|
import { copyToClipboard } from '../helpers';
|
|
6
|
+
import { WarningTriangleIcon, CopyIcon } from './NetworkIcons';
|
|
6
7
|
function parseStackTrace(stack) {
|
|
7
8
|
if (!stack)
|
|
8
9
|
return null;
|
|
@@ -74,7 +75,10 @@ ${error.stack}`;
|
|
|
74
75
|
const isInline = this.props.fallbackType === 'inline';
|
|
75
76
|
if (isInline) {
|
|
76
77
|
return (<View style={styles.inlineContainer}>
|
|
77
|
-
<
|
|
78
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
79
|
+
<WarningTriangleIcon color={AppColors.redErrorText} size={14}/>
|
|
80
|
+
<Text style={styles.inlineTitle}>Inspector Crash</Text>
|
|
81
|
+
</View>
|
|
78
82
|
<TouchableOpacity style={styles.inlineResetBtn} onPress={this.handleReset}>
|
|
79
83
|
<Text style={styles.inlineResetText}>Reload</Text>
|
|
80
84
|
</TouchableOpacity>
|
|
@@ -85,7 +89,9 @@ ${error.stack}`;
|
|
|
85
89
|
const parsed = error && error.stack ? parseStackTrace(error.stack) : null;
|
|
86
90
|
return (<View style={styles.container}>
|
|
87
91
|
<View style={styles.card}>
|
|
88
|
-
<
|
|
92
|
+
<View style={{ marginBottom: 12, alignItems: 'center' }}>
|
|
93
|
+
<WarningTriangleIcon color={AppColors.amber500} size={44}/>
|
|
94
|
+
</View>
|
|
89
95
|
<Text style={styles.title}>Something went wrong</Text>
|
|
90
96
|
|
|
91
97
|
<View style={{
|
|
@@ -98,13 +104,19 @@ ${error.stack}`;
|
|
|
98
104
|
marginBottom: 12,
|
|
99
105
|
gap: 4
|
|
100
106
|
}}>
|
|
107
|
+
<View style={{
|
|
108
|
+
width: 8,
|
|
109
|
+
height: 8,
|
|
110
|
+
borderRadius: 4,
|
|
111
|
+
backgroundColor: isNativeCrash ? AppColors.errorColor : AppColors.amber500,
|
|
112
|
+
}}/>
|
|
101
113
|
<Text style={{
|
|
102
114
|
fontSize: 10,
|
|
103
115
|
fontWeight: 'bold',
|
|
104
116
|
color: isNativeCrash ? AppColors.errorColor : AppColors.amber500,
|
|
105
117
|
fontFamily: AppFonts.interBold || 'System'
|
|
106
118
|
}}>
|
|
107
|
-
{isNativeCrash ? '
|
|
119
|
+
{isNativeCrash ? 'NATIVE CRASH' : 'JAVASCRIPT CRASH'}
|
|
108
120
|
</Text>
|
|
109
121
|
</View>
|
|
110
122
|
|
|
@@ -151,8 +163,9 @@ ${error.stack}`;
|
|
|
151
163
|
flexDirection: 'row',
|
|
152
164
|
gap: 6
|
|
153
165
|
}} onPress={this.handleCopyTrace}>
|
|
166
|
+
<CopyIcon color={AppColors.white} size={14}/>
|
|
154
167
|
<Text style={{ color: AppColors.white, fontSize: 12, fontWeight: 'bold', fontFamily: AppFonts.interBold || 'System' }}>
|
|
155
|
-
|
|
168
|
+
Copy Crash Traceback
|
|
156
169
|
</Text>
|
|
157
170
|
</TouchableOpacity>
|
|
158
171
|
</View>
|
|
@@ -194,10 +207,6 @@ const styles = StyleSheet.create({
|
|
|
194
207
|
shadowRadius: 12,
|
|
195
208
|
elevation: 8,
|
|
196
209
|
},
|
|
197
|
-
emoji: {
|
|
198
|
-
fontSize: 40,
|
|
199
|
-
marginBottom: 12,
|
|
200
|
-
},
|
|
201
210
|
title: {
|
|
202
211
|
fontFamily: AppFonts.interBold || 'System',
|
|
203
212
|
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;
|