react-native-inapp-inspector 2.0.5 → 2.0.7

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.
Files changed (85) hide show
  1. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +11 -0
  2. package/dist/commonjs/components/Inspector/AuditTab.d.ts +3 -0
  3. package/dist/commonjs/components/Inspector/AuditTab.js +741 -0
  4. package/dist/commonjs/components/Inspector/DeviceTab.d.ts +3 -0
  5. package/dist/commonjs/components/Inspector/DeviceTab.js +717 -0
  6. package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.d.ts +7 -0
  7. package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.js +600 -0
  8. package/dist/commonjs/components/Inspector/InspectorHeader.js +28 -25
  9. package/dist/commonjs/components/Inspector/MainScreen.js +19 -2
  10. package/dist/commonjs/components/Inspector/NetworkDetail.js +15 -0
  11. package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +7 -0
  12. package/dist/commonjs/components/Inspector/PerformanceHud.js +210 -0
  13. package/dist/commonjs/components/Inspector/PerformanceTab.js +30 -18
  14. package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +9 -0
  15. package/dist/commonjs/components/Inspector/RequestReplayModal.js +792 -0
  16. package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +8 -0
  17. package/dist/commonjs/components/Inspector/RequestReplayView.js +871 -0
  18. package/dist/commonjs/components/Inspector/SettingsPanel.js +448 -49
  19. package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
  20. package/dist/commonjs/components/Inspector/StorageTab.js +610 -0
  21. package/dist/commonjs/components/Inspector/TabBar.js +23 -2
  22. package/dist/commonjs/components/NetworkIcons.d.ts +12 -0
  23. package/dist/commonjs/components/NetworkIcons.js +72 -3
  24. package/dist/commonjs/constants/version.d.ts +1 -1
  25. package/dist/commonjs/constants/version.js +1 -1
  26. package/dist/commonjs/customHooks/storageInspector.d.ts +13 -0
  27. package/dist/commonjs/customHooks/storageInspector.js +179 -0
  28. package/dist/commonjs/helpers/deviceInfo.d.ts +4 -0
  29. package/dist/commonjs/helpers/deviceInfo.js +94 -0
  30. package/dist/commonjs/helpers/index.d.ts +2 -0
  31. package/dist/commonjs/helpers/index.js +12 -1
  32. package/dist/commonjs/helpers/packageAuditor.d.ts +5 -0
  33. package/dist/commonjs/helpers/packageAuditor.js +182 -0
  34. package/dist/commonjs/helpers/settingsStore.d.ts +1 -1
  35. package/dist/commonjs/helpers/settingsStore.js +4 -2
  36. package/dist/commonjs/i18n/locales/en.json +3 -2
  37. package/dist/commonjs/index.d.ts +1 -0
  38. package/dist/commonjs/index.js +127 -9
  39. package/dist/commonjs/native/NativeInspector.d.ts +1 -0
  40. package/dist/commonjs/types/enums.d.ts +7 -0
  41. package/dist/commonjs/types/enums.js +7 -0
  42. package/dist/commonjs/types/interfaces.d.ts +77 -0
  43. package/dist/esm/components/Inspector/AuditTab.d.ts +3 -0
  44. package/dist/esm/components/Inspector/AuditTab.js +702 -0
  45. package/dist/esm/components/Inspector/DeviceTab.d.ts +3 -0
  46. package/dist/esm/components/Inspector/DeviceTab.js +678 -0
  47. package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.d.ts +7 -0
  48. package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.js +560 -0
  49. package/dist/esm/components/Inspector/InspectorHeader.js +28 -25
  50. package/dist/esm/components/Inspector/MainScreen.js +19 -2
  51. package/dist/esm/components/Inspector/NetworkDetail.js +16 -1
  52. package/dist/esm/components/Inspector/PerformanceHud.d.ts +7 -0
  53. package/dist/esm/components/Inspector/PerformanceHud.js +170 -0
  54. package/dist/esm/components/Inspector/PerformanceTab.js +31 -19
  55. package/dist/esm/components/Inspector/RequestReplayModal.d.ts +9 -0
  56. package/dist/esm/components/Inspector/RequestReplayModal.js +752 -0
  57. package/dist/esm/components/Inspector/RequestReplayView.d.ts +8 -0
  58. package/dist/esm/components/Inspector/RequestReplayView.js +831 -0
  59. package/dist/esm/components/Inspector/SettingsPanel.js +449 -50
  60. package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
  61. package/dist/esm/components/Inspector/StorageTab.js +571 -0
  62. package/dist/esm/components/Inspector/TabBar.js +24 -3
  63. package/dist/esm/components/NetworkIcons.d.ts +12 -0
  64. package/dist/esm/components/NetworkIcons.js +57 -0
  65. package/dist/esm/constants/version.d.ts +1 -1
  66. package/dist/esm/constants/version.js +1 -1
  67. package/dist/esm/customHooks/storageInspector.d.ts +13 -0
  68. package/dist/esm/customHooks/storageInspector.js +170 -0
  69. package/dist/esm/helpers/deviceInfo.d.ts +4 -0
  70. package/dist/esm/helpers/deviceInfo.js +89 -0
  71. package/dist/esm/helpers/index.d.ts +2 -0
  72. package/dist/esm/helpers/index.js +10 -0
  73. package/dist/esm/helpers/packageAuditor.d.ts +5 -0
  74. package/dist/esm/helpers/packageAuditor.js +173 -0
  75. package/dist/esm/helpers/settingsStore.d.ts +1 -1
  76. package/dist/esm/helpers/settingsStore.js +4 -2
  77. package/dist/esm/i18n/locales/en.json +3 -2
  78. package/dist/esm/index.d.ts +1 -0
  79. package/dist/esm/index.js +123 -8
  80. package/dist/esm/native/NativeInspector.d.ts +1 -0
  81. package/dist/esm/types/enums.d.ts +7 -0
  82. package/dist/esm/types/enums.js +7 -0
  83. package/dist/esm/types/interfaces.d.ts +77 -0
  84. package/ios/NetworkInspectorModule.mm +12 -5
  85. package/package.json +4 -1
@@ -0,0 +1,741 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.AuditTab = void 0;
40
+ const react_1 = __importStar(require("react"));
41
+ const react_native_1 = require("react-native");
42
+ const InspectorContext_1 = require("./InspectorContext");
43
+ const TouchableScale_1 = __importDefault(require("../TouchableScale"));
44
+ const AppColors_1 = require("../../styles/AppColors");
45
+ const AppFonts_1 = require("../../styles/AppFonts");
46
+ const helpers_1 = require("../../helpers");
47
+ const toast_1 = require("../../helpers/toast");
48
+ const NetworkIcons_1 = require("../NetworkIcons");
49
+ exports.AuditTab = react_1.default.memo(() => {
50
+ const { auditReport, refreshAuditReport } = (0, InspectorContext_1.useInspector)();
51
+ const [activeSubTab, setActiveSubTab] = (0, react_1.useState)('all');
52
+ const [selectedSeverity, setSelectedSeverity] = (0, react_1.useState)('all');
53
+ const [search, setSearch] = (0, react_1.useState)('');
54
+ const subTabs = [
55
+ { key: 'all', label: 'All Issues', icon: 'shield' },
56
+ { key: 'packages', label: 'Packages & Peers', icon: 'package' },
57
+ { key: 'runtime', label: 'Runtime & Types', icon: 'code' },
58
+ { key: 'bestpractices', label: 'Best Practices', icon: 'sparkles' },
59
+ { key: 'raw', label: 'Raw Report', icon: 'copy' },
60
+ ];
61
+ const optimalCount = (0, react_1.useMemo)(() => {
62
+ return (auditReport.issues || []).filter(i => i.severity === 'optimal').length;
63
+ }, [auditReport.issues]);
64
+ const severityFilters = [
65
+ { key: 'all', label: 'All', count: auditReport.totalIssues },
66
+ { key: 'critical', label: 'Critical', count: auditReport.criticalCount },
67
+ { key: 'warning', label: 'Warnings', count: auditReport.warningCount },
68
+ { key: 'optimal', label: 'Passed / Optimal', count: optimalCount + auditReport.infoCount },
69
+ ];
70
+ const handleCopyReport = () => {
71
+ (0, helpers_1.copyToClipboard)(JSON.stringify(auditReport, null, 2), 'Code Quality Audit Report');
72
+ (0, toast_1.showToast)('Copied full audit report!');
73
+ };
74
+ const handleCopyFix = (cmd) => {
75
+ if (!cmd)
76
+ return;
77
+ (0, helpers_1.copyToClipboard)(cmd, 'Fix Command');
78
+ (0, toast_1.showToast)('Copied fix command to clipboard!');
79
+ };
80
+ // Filtered issues based on sub-tab, severity, and search text
81
+ const filteredIssues = (0, react_1.useMemo)(() => {
82
+ let list = auditReport.issues || [];
83
+ // Filter by subtab
84
+ if (activeSubTab === 'packages') {
85
+ list = list.filter(i => i.category === 'dependency' || i.category === 'peer');
86
+ }
87
+ else if (activeSubTab === 'runtime') {
88
+ list = list.filter(i => i.category === 'typescript');
89
+ }
90
+ else if (activeSubTab === 'bestpractices') {
91
+ list = list.filter(i => i.category === 'performance' || i.category === 'security');
92
+ }
93
+ // Filter by severity
94
+ if (selectedSeverity !== 'all') {
95
+ if (selectedSeverity === 'optimal') {
96
+ list = list.filter(i => i.severity === 'optimal' || i.severity === 'info');
97
+ }
98
+ else {
99
+ list = list.filter(i => i.severity === selectedSeverity);
100
+ }
101
+ }
102
+ // Filter by search query
103
+ if (search.trim().length > 0) {
104
+ const q = search.toLowerCase();
105
+ list = list.filter(i => i.title.toLowerCase().includes(q) ||
106
+ i.message.toLowerCase().includes(q) ||
107
+ i.packageName?.toLowerCase().includes(q) ||
108
+ i.category.toLowerCase().includes(q));
109
+ }
110
+ return list;
111
+ }, [auditReport.issues, activeSubTab, selectedSeverity, search]);
112
+ const getSeverityBadgeStyle = (sev) => {
113
+ switch (sev) {
114
+ case 'critical':
115
+ return {
116
+ bg: `${AppColors_1.AppColors.errorColor}15`,
117
+ border: `${AppColors_1.AppColors.errorColor}40`,
118
+ text: AppColors_1.AppColors.errorColor,
119
+ label: 'CRITICAL',
120
+ };
121
+ case 'warning':
122
+ return {
123
+ bg: `${AppColors_1.AppColors.warningIconGold}18`,
124
+ border: `${AppColors_1.AppColors.warningIconGold}40`,
125
+ text: '#D97706',
126
+ label: 'WARNING',
127
+ };
128
+ case 'info':
129
+ return {
130
+ bg: `${AppColors_1.AppColors.purple}15`,
131
+ border: `${AppColors_1.AppColors.purple}40`,
132
+ text: AppColors_1.AppColors.purple,
133
+ label: 'INFO',
134
+ };
135
+ default:
136
+ return {
137
+ bg: `${AppColors_1.AppColors.greenColor}15`,
138
+ border: `${AppColors_1.AppColors.greenColor}40`,
139
+ text: AppColors_1.AppColors.greenColor,
140
+ label: 'OPTIMAL',
141
+ };
142
+ }
143
+ };
144
+ const getScoreColor = (score) => {
145
+ if (score >= 90)
146
+ return AppColors_1.AppColors.greenColor;
147
+ if (score >= 70)
148
+ return '#D97706';
149
+ return AppColors_1.AppColors.errorColor;
150
+ };
151
+ return (<react_native_1.View style={styles.container}>
152
+ {/* ─── Top Sub-Tab Navigation Bar with Vector Icons ──────────────────────── */}
153
+ <react_native_1.View style={styles.tabBarWrapper}>
154
+ <react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.subTabBarContainer}>
155
+ {subTabs.map(tab => {
156
+ const isActive = activeSubTab === tab.key;
157
+ const iconColor = isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText;
158
+ return (<TouchableScale_1.default key={tab.key} onPress={() => setActiveSubTab(tab.key)} style={[
159
+ styles.subTabButton,
160
+ isActive && styles.subTabButtonActive,
161
+ ]}>
162
+ <react_native_1.View style={styles.subTabInnerRow}>
163
+ {tab.icon === 'shield' && <NetworkIcons_1.ShieldCheckIcon size={12} color={iconColor}/>}
164
+ {tab.icon === 'package' && <NetworkIcons_1.PackageIcon size={12} color={iconColor}/>}
165
+ {tab.icon === 'code' && <NetworkIcons_1.CodeIcon size={12} color={iconColor}/>}
166
+ {tab.icon === 'sparkles' && <NetworkIcons_1.SparklesIcon size={12} color={iconColor}/>}
167
+ {tab.icon === 'copy' && <NetworkIcons_1.CopyIcon size={12} color={iconColor}/>}
168
+ <react_native_1.Text style={[
169
+ styles.subTabText,
170
+ isActive && styles.subTabTextActive,
171
+ ]}>
172
+ {tab.label}
173
+ </react_native_1.Text>
174
+ </react_native_1.View>
175
+ </TouchableScale_1.default>);
176
+ })}
177
+ </react_native_1.ScrollView>
178
+ </react_native_1.View>
179
+
180
+ <react_native_1.ScrollView style={styles.scrollArea} contentContainerStyle={styles.contentContainer} showsVerticalScrollIndicator={false}>
181
+ {/* ─── Health Score Hero Banner ────────────────────────────────────────── */}
182
+ <react_native_1.View style={styles.heroCard}>
183
+ <react_native_1.View style={styles.heroTopRow}>
184
+ {/* Health Score Gauge */}
185
+ <react_native_1.View style={[
186
+ styles.scoreBadgeBox,
187
+ {
188
+ borderColor: `${getScoreColor(auditReport.score)}40`,
189
+ backgroundColor: `${getScoreColor(auditReport.score)}10`,
190
+ },
191
+ ]}>
192
+ <react_native_1.Text style={[
193
+ styles.scoreText,
194
+ { color: getScoreColor(auditReport.score) },
195
+ ]}>
196
+ {auditReport.score}%
197
+ </react_native_1.Text>
198
+ <react_native_1.Text style={[
199
+ styles.gradeText,
200
+ { color: getScoreColor(auditReport.score) },
201
+ ]}>
202
+ GRADE {auditReport.grade}
203
+ </react_native_1.Text>
204
+ </react_native_1.View>
205
+
206
+ {/* Title & Diagnostic Overview */}
207
+ <react_native_1.View style={styles.heroTitleBox}>
208
+ <react_native_1.View style={styles.heroBadgeRow}>
209
+ <NetworkIcons_1.ShieldCheckIcon size={15} color={getScoreColor(auditReport.score)}/>
210
+ <react_native_1.Text style={styles.heroStatusText}>
211
+ {auditReport.score >= 90
212
+ ? 'Optimal Health'
213
+ : auditReport.score >= 70
214
+ ? 'Warnings Found'
215
+ : 'Attention Needed'}
216
+ </react_native_1.Text>
217
+ </react_native_1.View>
218
+ <react_native_1.Text style={styles.heroSubText}>
219
+ {auditReport.totalIssues} diagnostic checks across packages, runtime & security
220
+ </react_native_1.Text>
221
+ </react_native_1.View>
222
+ </react_native_1.View>
223
+
224
+ {/* Action Row */}
225
+ <react_native_1.View style={styles.heroActionRow}>
226
+ <TouchableScale_1.default onPress={refreshAuditReport} style={styles.refreshAuditBtn}>
227
+ <NetworkIcons_1.SparklesIcon size={12} color={AppColors_1.AppColors.purple}/>
228
+ <react_native_1.Text style={styles.refreshAuditText}>Re-Scan</react_native_1.Text>
229
+ </TouchableScale_1.default>
230
+ <TouchableScale_1.default onPress={handleCopyReport} style={styles.copyReportBtn}>
231
+ <NetworkIcons_1.CopyIcon size={12} color={AppColors_1.AppColors.white}/>
232
+ <react_native_1.Text style={styles.copyReportText}>Copy Report</react_native_1.Text>
233
+ </TouchableScale_1.default>
234
+ </react_native_1.View>
235
+
236
+ {/* Quick Metrics Bar */}
237
+ <react_native_1.View style={styles.metricsBar}>
238
+ <react_native_1.View style={styles.metricItem}>
239
+ <react_native_1.Text style={[styles.metricCount, { color: AppColors_1.AppColors.errorColor }]}>
240
+ {auditReport.criticalCount}
241
+ </react_native_1.Text>
242
+ <react_native_1.Text style={styles.metricLabel}>Critical</react_native_1.Text>
243
+ </react_native_1.View>
244
+ <react_native_1.View style={styles.metricDivider}/>
245
+ <react_native_1.View style={styles.metricItem}>
246
+ <react_native_1.Text style={[styles.metricCount, { color: '#D97706' }]}>
247
+ {auditReport.warningCount}
248
+ </react_native_1.Text>
249
+ <react_native_1.Text style={styles.metricLabel}>Warnings</react_native_1.Text>
250
+ </react_native_1.View>
251
+ <react_native_1.View style={styles.metricDivider}/>
252
+ <react_native_1.View style={styles.metricItem}>
253
+ <react_native_1.Text style={[styles.metricCount, { color: AppColors_1.AppColors.greenColor }]}>
254
+ {optimalCount + auditReport.infoCount}
255
+ </react_native_1.Text>
256
+ <react_native_1.Text style={styles.metricLabel}>Passed / Optimal</react_native_1.Text>
257
+ </react_native_1.View>
258
+ </react_native_1.View>
259
+ </react_native_1.View>
260
+
261
+ {/* ─── Search & Severity Filter Bar ────────────────────────────────────── */}
262
+ {activeSubTab !== 'raw' && (<react_native_1.View style={styles.filterSection}>
263
+ <react_native_1.View style={styles.searchBox}>
264
+ <NetworkIcons_1.SearchIcon size={13} color={AppColors_1.AppColors.grayTextWeak}/>
265
+ <react_native_1.TextInput style={styles.searchInput} value={search} onChangeText={setSearch} placeholder="Search packages, issues, rules..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} autoCapitalize="none" autoCorrect={false}/>
266
+ {search.length > 0 && (<TouchableScale_1.default onPress={() => setSearch('')}>
267
+ <NetworkIcons_1.ClearIcon size={14} color={AppColors_1.AppColors.grayTextWeak}/>
268
+ </TouchableScale_1.default>)}
269
+ </react_native_1.View>
270
+
271
+ <react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.severityFilterRow}>
272
+ {severityFilters.map(sf => {
273
+ const isSelected = selectedSeverity === sf.key;
274
+ return (<TouchableScale_1.default key={sf.key} onPress={() => setSelectedSeverity(sf.key)} style={[
275
+ styles.severityChip,
276
+ isSelected && styles.severityChipActive,
277
+ ]}>
278
+ <react_native_1.Text style={[
279
+ styles.severityChipText,
280
+ isSelected && styles.severityChipTextActive,
281
+ ]}>
282
+ {sf.label} {sf.count !== undefined ? `(${sf.count})` : ''}
283
+ </react_native_1.Text>
284
+ </TouchableScale_1.default>);
285
+ })}
286
+ </react_native_1.ScrollView>
287
+ </react_native_1.View>)}
288
+
289
+ {/* ─── Issues Feed ─────────────────────────────────────────────────────── */}
290
+ {activeSubTab !== 'raw' && (<react_native_1.View style={styles.issuesList}>
291
+ {filteredIssues.length === 0 ? (<react_native_1.View style={styles.emptyStateCard}>
292
+ <NetworkIcons_1.ShieldCheckIcon size={32} color={AppColors_1.AppColors.greenColor}/>
293
+ <react_native_1.Text style={styles.emptyTitle}>No Issues in this Category</react_native_1.Text>
294
+ <react_native_1.Text style={styles.emptySub}>
295
+ {search.length > 0
296
+ ? 'No checks matched your search query.'
297
+ : 'All scanned package dependencies and code standards passed successfully!'}
298
+ </react_native_1.Text>
299
+ </react_native_1.View>) : (filteredIssues.map(issue => {
300
+ const badge = getSeverityBadgeStyle(issue.severity);
301
+ return (<react_native_1.View key={issue.id} style={styles.issueCard}>
302
+ <react_native_1.View style={styles.issueHeader}>
303
+ <react_native_1.View style={styles.issueHeaderLeft}>
304
+ <react_native_1.View style={[
305
+ styles.severityBadge,
306
+ { backgroundColor: badge.bg, borderColor: badge.border },
307
+ ]}>
308
+ <react_native_1.Text style={[styles.severityBadgeText, { color: badge.text }]}>
309
+ {badge.label}
310
+ </react_native_1.Text>
311
+ </react_native_1.View>
312
+ <react_native_1.View style={styles.categoryBadge}>
313
+ <react_native_1.Text style={styles.categoryBadgeText}>
314
+ {issue.category.toUpperCase()}
315
+ </react_native_1.Text>
316
+ </react_native_1.View>
317
+ </react_native_1.View>
318
+
319
+ {issue.packageName && (<react_native_1.View style={styles.packageTag}>
320
+ <NetworkIcons_1.PackageIcon size={11} color={AppColors_1.AppColors.purple}/>
321
+ <react_native_1.Text style={styles.packageTagText}>
322
+ {issue.packageName}
323
+ {issue.currentVersion ? ` @ ${issue.currentVersion}` : ''}
324
+ </react_native_1.Text>
325
+ </react_native_1.View>)}
326
+ </react_native_1.View>
327
+
328
+ <react_native_1.Text style={styles.issueTitle}>{issue.title}</react_native_1.Text>
329
+ <react_native_1.Text style={styles.issueMessage}>{issue.message}</react_native_1.Text>
330
+
331
+ {/* Actionable Fix Command Bar */}
332
+ {issue.fixCommand && (<react_native_1.View style={styles.fixCommandBox}>
333
+ <react_native_1.View style={styles.fixLeft}>
334
+ <NetworkIcons_1.TerminalIcon size={12} color={AppColors_1.AppColors.purple}/>
335
+ <react_native_1.Text style={styles.fixCommandText} numberOfLines={1}>
336
+ {issue.fixCommand}
337
+ </react_native_1.Text>
338
+ </react_native_1.View>
339
+ <TouchableScale_1.default onPress={() => handleCopyFix(issue.fixCommand)} style={styles.fixCopyBtn}>
340
+ <NetworkIcons_1.CopyIcon size={11} color={AppColors_1.AppColors.purple}/>
341
+ <react_native_1.Text style={styles.fixCopyText}>Copy Fix</react_native_1.Text>
342
+ </TouchableScale_1.default>
343
+ </react_native_1.View>)}
344
+ </react_native_1.View>);
345
+ }))}
346
+ </react_native_1.View>)}
347
+
348
+ {/* ─── Raw JSON Sub-Tab ────────────────────────────────────────────────── */}
349
+ {activeSubTab === 'raw' && (<react_native_1.View style={styles.rawCard}>
350
+ <react_native_1.View style={styles.rawHeader}>
351
+ <react_native_1.Text style={styles.rawTitle}>RAW AUDIT JSON REPORT</react_native_1.Text>
352
+ <TouchableScale_1.default onPress={handleCopyReport} style={styles.copyReportBtn}>
353
+ <NetworkIcons_1.CopyIcon size={11} color={AppColors_1.AppColors.white}/>
354
+ <react_native_1.Text style={styles.copyReportText}>Copy All</react_native_1.Text>
355
+ </TouchableScale_1.default>
356
+ </react_native_1.View>
357
+ <react_native_1.ScrollView horizontal style={styles.rawScroll}>
358
+ <react_native_1.Text style={styles.rawText} selectable>
359
+ {JSON.stringify(auditReport, null, 2)}
360
+ </react_native_1.Text>
361
+ </react_native_1.ScrollView>
362
+ </react_native_1.View>)}
363
+
364
+ <react_native_1.View style={{ height: 40 }}/>
365
+ </react_native_1.ScrollView>
366
+ </react_native_1.View>);
367
+ });
368
+ const styles = react_native_1.StyleSheet.create({
369
+ container: {
370
+ flex: 1,
371
+ backgroundColor: AppColors_1.AppColors.grayBackground,
372
+ },
373
+ tabBarWrapper: {
374
+ backgroundColor: AppColors_1.AppColors.contentBg,
375
+ borderBottomWidth: 1,
376
+ borderBottomColor: AppColors_1.AppColors.grayBorderSecondary,
377
+ paddingVertical: 8,
378
+ },
379
+ subTabBarContainer: {
380
+ paddingHorizontal: 12,
381
+ flexDirection: 'row',
382
+ gap: 8,
383
+ alignItems: 'center',
384
+ },
385
+ subTabButton: {
386
+ paddingHorizontal: 12,
387
+ paddingVertical: 7,
388
+ borderRadius: 20,
389
+ backgroundColor: AppColors_1.AppColors.grayBackground,
390
+ borderWidth: 1,
391
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
392
+ },
393
+ subTabButtonActive: {
394
+ backgroundColor: AppColors_1.AppColors.purple,
395
+ borderColor: AppColors_1.AppColors.purple,
396
+ },
397
+ subTabInnerRow: {
398
+ flexDirection: 'row',
399
+ alignItems: 'center',
400
+ gap: 5,
401
+ },
402
+ subTabText: {
403
+ fontSize: 12,
404
+ fontFamily: AppFonts_1.AppFonts.interMedium,
405
+ color: AppColors_1.AppColors.grayText,
406
+ },
407
+ subTabTextActive: {
408
+ color: AppColors_1.AppColors.white,
409
+ fontFamily: AppFonts_1.AppFonts.interBold,
410
+ },
411
+ scrollArea: {
412
+ flex: 1,
413
+ },
414
+ contentContainer: {
415
+ padding: 12,
416
+ },
417
+ heroCard: {
418
+ backgroundColor: AppColors_1.AppColors.contentBg,
419
+ borderRadius: 14,
420
+ padding: 14,
421
+ marginBottom: 12,
422
+ borderWidth: 1,
423
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
424
+ gap: 12,
425
+ },
426
+ heroTopRow: {
427
+ flexDirection: 'row',
428
+ alignItems: 'center',
429
+ gap: 12,
430
+ },
431
+ scoreBadgeBox: {
432
+ width: 60,
433
+ height: 60,
434
+ borderRadius: 12,
435
+ borderWidth: 1.5,
436
+ alignItems: 'center',
437
+ justifyContent: 'center',
438
+ },
439
+ scoreText: {
440
+ fontSize: 17,
441
+ fontFamily: AppFonts_1.AppFonts.interBold,
442
+ },
443
+ gradeText: {
444
+ fontSize: 8.5,
445
+ fontFamily: AppFonts_1.AppFonts.interBold,
446
+ letterSpacing: 0.5,
447
+ marginTop: 1,
448
+ },
449
+ heroTitleBox: {
450
+ flex: 1,
451
+ gap: 2,
452
+ },
453
+ heroBadgeRow: {
454
+ flexDirection: 'row',
455
+ alignItems: 'center',
456
+ gap: 6,
457
+ },
458
+ heroStatusText: {
459
+ fontSize: 14,
460
+ fontFamily: AppFonts_1.AppFonts.interBold,
461
+ color: AppColors_1.AppColors.black,
462
+ },
463
+ heroSubText: {
464
+ fontSize: 11,
465
+ fontFamily: AppFonts_1.AppFonts.interMedium,
466
+ color: AppColors_1.AppColors.grayText,
467
+ lineHeight: 15,
468
+ },
469
+ heroActionRow: {
470
+ flexDirection: 'row',
471
+ alignItems: 'center',
472
+ gap: 8,
473
+ },
474
+ refreshAuditBtn: {
475
+ flex: 1,
476
+ flexDirection: 'row',
477
+ alignItems: 'center',
478
+ justifyContent: 'center',
479
+ gap: 5,
480
+ backgroundColor: `${AppColors_1.AppColors.purple}12`,
481
+ paddingVertical: 7,
482
+ borderRadius: 8,
483
+ borderWidth: 1,
484
+ borderColor: `${AppColors_1.AppColors.purple}30`,
485
+ },
486
+ refreshAuditText: {
487
+ fontSize: 11.5,
488
+ fontFamily: AppFonts_1.AppFonts.interBold,
489
+ color: AppColors_1.AppColors.purple,
490
+ },
491
+ copyReportBtn: {
492
+ flex: 1,
493
+ flexDirection: 'row',
494
+ alignItems: 'center',
495
+ justifyContent: 'center',
496
+ gap: 5,
497
+ backgroundColor: AppColors_1.AppColors.purple,
498
+ paddingVertical: 7,
499
+ borderRadius: 8,
500
+ },
501
+ copyReportText: {
502
+ fontSize: 11.5,
503
+ fontFamily: AppFonts_1.AppFonts.interBold,
504
+ color: AppColors_1.AppColors.white,
505
+ },
506
+ metricsBar: {
507
+ flexDirection: 'row',
508
+ alignItems: 'center',
509
+ backgroundColor: AppColors_1.AppColors.grayBackground,
510
+ borderRadius: 10,
511
+ paddingVertical: 8,
512
+ paddingHorizontal: 12,
513
+ },
514
+ metricItem: {
515
+ flex: 1,
516
+ alignItems: 'center',
517
+ },
518
+ metricCount: {
519
+ fontSize: 14,
520
+ fontFamily: AppFonts_1.AppFonts.interBold,
521
+ },
522
+ metricLabel: {
523
+ fontSize: 9.5,
524
+ fontFamily: AppFonts_1.AppFonts.interMedium,
525
+ color: AppColors_1.AppColors.grayText,
526
+ marginTop: 1,
527
+ },
528
+ metricDivider: {
529
+ width: 1,
530
+ height: 22,
531
+ backgroundColor: AppColors_1.AppColors.grayBorderSecondary,
532
+ },
533
+ filterSection: {
534
+ marginBottom: 12,
535
+ gap: 8,
536
+ },
537
+ searchBox: {
538
+ flexDirection: 'row',
539
+ alignItems: 'center',
540
+ gap: 6,
541
+ backgroundColor: AppColors_1.AppColors.contentBg,
542
+ borderRadius: 10,
543
+ paddingHorizontal: 10,
544
+ paddingVertical: 6,
545
+ borderWidth: 1,
546
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
547
+ },
548
+ searchInput: {
549
+ flex: 1,
550
+ fontSize: 12,
551
+ fontFamily: AppFonts_1.AppFonts.interRegular,
552
+ color: AppColors_1.AppColors.black,
553
+ paddingVertical: 0,
554
+ },
555
+ severityFilterRow: {
556
+ flexDirection: 'row',
557
+ gap: 6,
558
+ },
559
+ severityChip: {
560
+ paddingHorizontal: 12,
561
+ paddingVertical: 5,
562
+ borderRadius: 16,
563
+ backgroundColor: AppColors_1.AppColors.contentBg,
564
+ borderWidth: 1,
565
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
566
+ },
567
+ severityChipActive: {
568
+ backgroundColor: AppColors_1.AppColors.purple,
569
+ borderColor: AppColors_1.AppColors.purple,
570
+ },
571
+ severityChipText: {
572
+ fontSize: 11,
573
+ fontFamily: AppFonts_1.AppFonts.interMedium,
574
+ color: AppColors_1.AppColors.grayText,
575
+ },
576
+ severityChipTextActive: {
577
+ color: AppColors_1.AppColors.white,
578
+ fontFamily: AppFonts_1.AppFonts.interBold,
579
+ },
580
+ issuesList: {
581
+ gap: 10,
582
+ },
583
+ issueCard: {
584
+ backgroundColor: AppColors_1.AppColors.contentBg,
585
+ borderRadius: 12,
586
+ padding: 12,
587
+ borderWidth: 1,
588
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
589
+ },
590
+ issueHeader: {
591
+ flexDirection: 'row',
592
+ alignItems: 'center',
593
+ justifyContent: 'space-between',
594
+ marginBottom: 8,
595
+ },
596
+ issueHeaderLeft: {
597
+ flexDirection: 'row',
598
+ alignItems: 'center',
599
+ gap: 6,
600
+ },
601
+ severityBadge: {
602
+ paddingHorizontal: 6,
603
+ paddingVertical: 2,
604
+ borderRadius: 4,
605
+ borderWidth: 1,
606
+ },
607
+ severityBadgeText: {
608
+ fontSize: 9,
609
+ fontFamily: AppFonts_1.AppFonts.interBold,
610
+ letterSpacing: 0.5,
611
+ },
612
+ categoryBadge: {
613
+ backgroundColor: AppColors_1.AppColors.grayBackground,
614
+ paddingHorizontal: 6,
615
+ paddingVertical: 2,
616
+ borderRadius: 4,
617
+ },
618
+ categoryBadgeText: {
619
+ fontSize: 9,
620
+ fontFamily: AppFonts_1.AppFonts.interBold,
621
+ color: AppColors_1.AppColors.grayTextWeak,
622
+ },
623
+ packageTag: {
624
+ flexDirection: 'row',
625
+ alignItems: 'center',
626
+ gap: 4,
627
+ backgroundColor: `${AppColors_1.AppColors.purple}10`,
628
+ paddingHorizontal: 6,
629
+ paddingVertical: 2,
630
+ borderRadius: 4,
631
+ },
632
+ packageTagText: {
633
+ fontSize: 10,
634
+ fontFamily: AppFonts_1.AppFonts.interMedium,
635
+ color: AppColors_1.AppColors.purple,
636
+ },
637
+ issueTitle: {
638
+ fontSize: 13,
639
+ fontFamily: AppFonts_1.AppFonts.interBold,
640
+ color: AppColors_1.AppColors.black,
641
+ marginBottom: 4,
642
+ },
643
+ issueMessage: {
644
+ fontSize: 12,
645
+ fontFamily: AppFonts_1.AppFonts.interRegular,
646
+ color: AppColors_1.AppColors.grayText,
647
+ lineHeight: 17,
648
+ },
649
+ fixCommandBox: {
650
+ marginTop: 8,
651
+ flexDirection: 'row',
652
+ alignItems: 'center',
653
+ justifyContent: 'space-between',
654
+ backgroundColor: AppColors_1.AppColors.grayBackground,
655
+ borderRadius: 8,
656
+ paddingHorizontal: 8,
657
+ paddingVertical: 6,
658
+ borderWidth: 1,
659
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
660
+ },
661
+ fixLeft: {
662
+ flexDirection: 'row',
663
+ alignItems: 'center',
664
+ gap: 6,
665
+ flex: 1,
666
+ },
667
+ fixCommandText: {
668
+ fontSize: 11,
669
+ fontFamily: react_native_1.Platform.OS === 'ios' ? 'Menlo' : 'monospace',
670
+ color: AppColors_1.AppColors.black,
671
+ flex: 1,
672
+ },
673
+ fixCopyBtn: {
674
+ flexDirection: 'row',
675
+ alignItems: 'center',
676
+ gap: 3,
677
+ backgroundColor: `${AppColors_1.AppColors.purple}15`,
678
+ paddingHorizontal: 6,
679
+ paddingVertical: 3,
680
+ borderRadius: 4,
681
+ },
682
+ fixCopyText: {
683
+ fontSize: 10,
684
+ fontFamily: AppFonts_1.AppFonts.interBold,
685
+ color: AppColors_1.AppColors.purple,
686
+ },
687
+ emptyStateCard: {
688
+ backgroundColor: AppColors_1.AppColors.contentBg,
689
+ borderRadius: 14,
690
+ padding: 24,
691
+ alignItems: 'center',
692
+ justifyContent: 'center',
693
+ borderWidth: 1,
694
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
695
+ },
696
+ emptyTitle: {
697
+ fontSize: 15,
698
+ fontFamily: AppFonts_1.AppFonts.interBold,
699
+ color: AppColors_1.AppColors.black,
700
+ marginTop: 10,
701
+ },
702
+ emptySub: {
703
+ fontSize: 12,
704
+ fontFamily: AppFonts_1.AppFonts.interRegular,
705
+ color: AppColors_1.AppColors.grayText,
706
+ textAlign: 'center',
707
+ marginTop: 4,
708
+ lineHeight: 18,
709
+ },
710
+ rawCard: {
711
+ backgroundColor: AppColors_1.AppColors.contentBg,
712
+ borderRadius: 14,
713
+ padding: 14,
714
+ borderWidth: 1,
715
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
716
+ },
717
+ rawHeader: {
718
+ flexDirection: 'row',
719
+ alignItems: 'center',
720
+ justifyContent: 'space-between',
721
+ marginBottom: 10,
722
+ },
723
+ rawTitle: {
724
+ fontSize: 12,
725
+ fontFamily: AppFonts_1.AppFonts.interBold,
726
+ color: AppColors_1.AppColors.grayTextWeak,
727
+ letterSpacing: 0.5,
728
+ },
729
+ rawScroll: {
730
+ backgroundColor: AppColors_1.AppColors.grayBackground,
731
+ borderRadius: 8,
732
+ padding: 10,
733
+ },
734
+ rawText: {
735
+ fontSize: 11,
736
+ fontFamily: react_native_1.Platform.OS === 'ios' ? 'Menlo' : 'monospace',
737
+ color: AppColors_1.AppColors.black,
738
+ lineHeight: 16,
739
+ },
740
+ });
741
+ exports.default = exports.AuditTab;