react-native-inapp-inspector 2.0.5 → 2.0.6
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/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +11 -0
- package/dist/commonjs/components/Inspector/AuditTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/AuditTab.js +741 -0
- package/dist/commonjs/components/Inspector/DeviceTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/DeviceTab.js +717 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +28 -25
- package/dist/commonjs/components/Inspector/MainScreen.js +15 -2
- package/dist/commonjs/components/Inspector/NetworkDetail.js +15 -0
- package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +7 -0
- package/dist/commonjs/components/Inspector/PerformanceHud.js +210 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +30 -18
- package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +9 -0
- package/dist/commonjs/components/Inspector/RequestReplayModal.js +792 -0
- package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +8 -0
- package/dist/commonjs/components/Inspector/RequestReplayView.js +871 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +326 -15
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +610 -0
- package/dist/commonjs/components/Inspector/TabBar.js +23 -2
- package/dist/commonjs/components/NetworkIcons.d.ts +12 -0
- package/dist/commonjs/components/NetworkIcons.js +72 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/storageInspector.d.ts +13 -0
- package/dist/commonjs/customHooks/storageInspector.js +179 -0
- package/dist/commonjs/helpers/deviceInfo.d.ts +4 -0
- package/dist/commonjs/helpers/deviceInfo.js +94 -0
- package/dist/commonjs/helpers/index.d.ts +2 -0
- package/dist/commonjs/helpers/index.js +12 -1
- package/dist/commonjs/helpers/packageAuditor.d.ts +5 -0
- package/dist/commonjs/helpers/packageAuditor.js +182 -0
- package/dist/commonjs/i18n/locales/en.json +3 -2
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +113 -9
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/types/enums.d.ts +7 -0
- package/dist/commonjs/types/enums.js +7 -0
- package/dist/commonjs/types/interfaces.d.ts +73 -0
- package/dist/esm/components/Inspector/AuditTab.d.ts +3 -0
- package/dist/esm/components/Inspector/AuditTab.js +702 -0
- package/dist/esm/components/Inspector/DeviceTab.d.ts +3 -0
- package/dist/esm/components/Inspector/DeviceTab.js +678 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +28 -25
- package/dist/esm/components/Inspector/MainScreen.js +15 -2
- package/dist/esm/components/Inspector/NetworkDetail.js +16 -1
- package/dist/esm/components/Inspector/PerformanceHud.d.ts +7 -0
- package/dist/esm/components/Inspector/PerformanceHud.js +170 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +31 -19
- package/dist/esm/components/Inspector/RequestReplayModal.d.ts +9 -0
- package/dist/esm/components/Inspector/RequestReplayModal.js +752 -0
- package/dist/esm/components/Inspector/RequestReplayView.d.ts +8 -0
- package/dist/esm/components/Inspector/RequestReplayView.js +831 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +327 -16
- package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/esm/components/Inspector/StorageTab.js +571 -0
- package/dist/esm/components/Inspector/TabBar.js +24 -3
- package/dist/esm/components/NetworkIcons.d.ts +12 -0
- package/dist/esm/components/NetworkIcons.js +57 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/storageInspector.d.ts +13 -0
- package/dist/esm/customHooks/storageInspector.js +170 -0
- package/dist/esm/helpers/deviceInfo.d.ts +4 -0
- package/dist/esm/helpers/deviceInfo.js +89 -0
- package/dist/esm/helpers/index.d.ts +2 -0
- package/dist/esm/helpers/index.js +10 -0
- package/dist/esm/helpers/packageAuditor.d.ts +5 -0
- package/dist/esm/helpers/packageAuditor.js +173 -0
- package/dist/esm/i18n/locales/en.json +3 -2
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +109 -8
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/types/enums.d.ts +7 -0
- package/dist/esm/types/enums.js +7 -0
- package/dist/esm/types/interfaces.d.ts +73 -0
- package/ios/NetworkInspectorModule.mm +12 -5
- package/package.json +4 -1
|
@@ -62,7 +62,7 @@ const helpers_1 = require("../../helpers");
|
|
|
62
62
|
const toast_1 = require("../../helpers/toast");
|
|
63
63
|
const SettingsPanel = () => {
|
|
64
64
|
const { t } = (0, i18n_1.useTranslation)();
|
|
65
|
-
const { settingsPage, setSettingsPage, settingsActiveSubTab, setSettingsActiveSubTab, tabVisibility, toggleTabVisibility, defaultTab, setDefaultTab, isDark, setIsDark, modalHeightPercent, setModalHeightPercent, modalAnimationType, setModalAnimationType, showDuplicateLogs, setShowDuplicateLogs, showUpdateToast, setShowUpdateToast, showConsoleLevels, setShowConsoleLevels, resetToDefaults, storage, logs, consoleLogs, analyticsEvents, reduxState, maxNetworkLogs, setMaxNetworkLogs, maxConsoleLogs, setMaxConsoleLogs, maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit, isAutoRamLimitEnabled, setIsAutoRamLimitEnabled, deviceFreeRamMb, reduxAutoRefresh, setReduxAutoRefreshState, reduxExpandDepth, setReduxExpandDepth, switchActiveTab, setSelected, setSelectedEvent, setReduxState, crashRecords, maxCrashLogs, setMaxCrashLogs, updateAvailable, latestNpmVersion, } = (0, InspectorContext_1.useInspector)();
|
|
65
|
+
const { settingsPage, setSettingsPage, settingsActiveSubTab, setSettingsActiveSubTab, tabVisibility, toggleTabVisibility, defaultTab, setDefaultTab, isDark, setIsDark, modalHeightPercent, setModalHeightPercent, modalAnimationType, setModalAnimationType, showDuplicateLogs, setShowDuplicateLogs, showUpdateToast, setShowUpdateToast, showConsoleLevels, setShowConsoleLevels, resetToDefaults, storage, logs, consoleLogs, analyticsEvents, reduxState, maxNetworkLogs, setMaxNetworkLogs, maxConsoleLogs, setMaxConsoleLogs, maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit, isAutoRamLimitEnabled, setIsAutoRamLimitEnabled, deviceFreeRamMb, isPerformanceHudEnabled, setIsPerformanceHudEnabled, reduxAutoRefresh, setReduxAutoRefreshState, reduxExpandDepth, setReduxExpandDepth, switchActiveTab, setSelected, setSelectedEvent, setReduxState, crashRecords, maxCrashLogs, setMaxCrashLogs, updateAvailable, latestNpmVersion, } = (0, InspectorContext_1.useInspector)();
|
|
66
66
|
const [stagedHeight, setStagedHeight] = (0, react_1.useState)(modalHeightPercent);
|
|
67
67
|
const [telemetryConsent, setTelemetryConsentState] = (0, react_1.useState)(true);
|
|
68
68
|
(0, react_1.useEffect)(() => {
|
|
@@ -101,6 +101,27 @@ const SettingsPanel = () => {
|
|
|
101
101
|
icon: 'logs',
|
|
102
102
|
desc: 'Terminal console logs, warnings, errors & stack traces',
|
|
103
103
|
},
|
|
104
|
+
{
|
|
105
|
+
key: 'storage',
|
|
106
|
+
label: 'Storage (AsyncStorage)',
|
|
107
|
+
category: 'core',
|
|
108
|
+
icon: 'storage',
|
|
109
|
+
desc: 'Browse, edit, create and delete local key-value storage & JSON',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
key: 'device',
|
|
113
|
+
label: 'Device & System Info',
|
|
114
|
+
category: 'diagnostic',
|
|
115
|
+
icon: 'device',
|
|
116
|
+
desc: 'Hermes runtime, Fabric New Arch, screen metrics & build info',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
key: 'audit',
|
|
120
|
+
label: 'Code Quality & Package Audit',
|
|
121
|
+
category: 'diagnostic',
|
|
122
|
+
icon: 'audit',
|
|
123
|
+
desc: 'Audit dependencies, peer conflicts, TS schema errors & React Native anti-patterns',
|
|
124
|
+
},
|
|
104
125
|
{
|
|
105
126
|
key: 'performance',
|
|
106
127
|
label: 'Performance Tracker',
|
|
@@ -143,6 +164,9 @@ const SettingsPanel = () => {
|
|
|
143
164
|
logs: Boolean(tabVisibility?.logs),
|
|
144
165
|
analytics: Boolean(tabVisibility?.analytics),
|
|
145
166
|
redux: Boolean(tabVisibility?.redux),
|
|
167
|
+
storage: Boolean(tabVisibility?.storage),
|
|
168
|
+
device: Boolean(tabVisibility?.device),
|
|
169
|
+
audit: Boolean(tabVisibility?.audit),
|
|
146
170
|
bundle: Boolean(tabVisibility?.bundle),
|
|
147
171
|
performance: Boolean(tabVisibility?.performance),
|
|
148
172
|
crash: Boolean(tabVisibility?.crash),
|
|
@@ -154,6 +178,9 @@ const SettingsPanel = () => {
|
|
|
154
178
|
logs: Boolean(tabVisibility?.logs),
|
|
155
179
|
analytics: Boolean(tabVisibility?.analytics),
|
|
156
180
|
redux: Boolean(tabVisibility?.redux),
|
|
181
|
+
storage: Boolean(tabVisibility?.storage),
|
|
182
|
+
device: Boolean(tabVisibility?.device),
|
|
183
|
+
audit: Boolean(tabVisibility?.audit),
|
|
157
184
|
bundle: Boolean(tabVisibility?.bundle),
|
|
158
185
|
performance: Boolean(tabVisibility?.performance),
|
|
159
186
|
crash: Boolean(tabVisibility?.crash),
|
|
@@ -325,16 +352,17 @@ const SettingsPanel = () => {
|
|
|
325
352
|
shadowRadius: 4,
|
|
326
353
|
shadowOffset: { width: 0, height: 2 },
|
|
327
354
|
}}>
|
|
355
|
+
{/* Tab 1: Modules & Tabs */}
|
|
328
356
|
<TouchableScale_1.default accessible={true} accessibilityRole="tab" accessibilityLabel={t('settings.modulesAndTools')} accessibilityState={{ selected: settingsActiveSubTab === 'module' }} onPress={() => {
|
|
329
357
|
(0, InspectorContext_1.animateNextLayout)();
|
|
330
358
|
setSettingsActiveSubTab('module');
|
|
331
359
|
}} style={{
|
|
332
360
|
flex: 1,
|
|
333
|
-
paddingVertical:
|
|
361
|
+
paddingVertical: 8,
|
|
334
362
|
flexDirection: 'row',
|
|
335
363
|
alignItems: 'center',
|
|
336
364
|
justifyContent: 'center',
|
|
337
|
-
gap:
|
|
365
|
+
gap: 5,
|
|
338
366
|
borderRadius: 9,
|
|
339
367
|
backgroundColor: settingsActiveSubTab === 'module'
|
|
340
368
|
? AppColors_1.AppColors.purple
|
|
@@ -342,11 +370,11 @@ const SettingsPanel = () => {
|
|
|
342
370
|
}}>
|
|
343
371
|
<NetworkIcons_1.LayersIcon color={settingsActiveSubTab === 'module'
|
|
344
372
|
? AppColors_1.AppColors.white
|
|
345
|
-
: AppColors_1.AppColors.grayText} size={
|
|
373
|
+
: AppColors_1.AppColors.grayText} size={12.5}/>
|
|
346
374
|
<react_native_1.Text style={{
|
|
347
375
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
348
|
-
fontSize:
|
|
349
|
-
lineHeight:
|
|
376
|
+
fontSize: 11.5,
|
|
377
|
+
lineHeight: 15,
|
|
350
378
|
color: settingsActiveSubTab === 'module'
|
|
351
379
|
? AppColors_1.AppColors.white
|
|
352
380
|
: AppColors_1.AppColors.grayText,
|
|
@@ -355,16 +383,48 @@ const SettingsPanel = () => {
|
|
|
355
383
|
</react_native_1.Text>
|
|
356
384
|
</TouchableScale_1.default>
|
|
357
385
|
|
|
386
|
+
{/* Tab 2: RAM & Limits */}
|
|
387
|
+
<TouchableScale_1.default accessible={true} accessibilityRole="tab" accessibilityLabel={t('settings.ramLimits')} accessibilityState={{ selected: settingsActiveSubTab === 'limits' }} onPress={() => {
|
|
388
|
+
(0, InspectorContext_1.animateNextLayout)();
|
|
389
|
+
setSettingsActiveSubTab('limits');
|
|
390
|
+
}} style={{
|
|
391
|
+
flex: 1,
|
|
392
|
+
paddingVertical: 8,
|
|
393
|
+
flexDirection: 'row',
|
|
394
|
+
alignItems: 'center',
|
|
395
|
+
justifyContent: 'center',
|
|
396
|
+
gap: 5,
|
|
397
|
+
borderRadius: 9,
|
|
398
|
+
backgroundColor: settingsActiveSubTab === 'limits'
|
|
399
|
+
? AppColors_1.AppColors.purple
|
|
400
|
+
: 'transparent',
|
|
401
|
+
}}>
|
|
402
|
+
<NetworkIcons_1.CpuIcon color={settingsActiveSubTab === 'limits'
|
|
403
|
+
? AppColors_1.AppColors.white
|
|
404
|
+
: AppColors_1.AppColors.grayText} size={12.5}/>
|
|
405
|
+
<react_native_1.Text style={{
|
|
406
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
407
|
+
fontSize: 11.5,
|
|
408
|
+
lineHeight: 15,
|
|
409
|
+
color: settingsActiveSubTab === 'limits'
|
|
410
|
+
? AppColors_1.AppColors.white
|
|
411
|
+
: AppColors_1.AppColors.grayText,
|
|
412
|
+
}}>
|
|
413
|
+
{t('settings.ramLimits')}
|
|
414
|
+
</react_native_1.Text>
|
|
415
|
+
</TouchableScale_1.default>
|
|
416
|
+
|
|
417
|
+
{/* Tab 3: UI & Appearance */}
|
|
358
418
|
<TouchableScale_1.default accessible={true} accessibilityRole="tab" accessibilityLabel={t('settings.uiPreferences')} accessibilityState={{ selected: settingsActiveSubTab === 'ui' }} onPress={() => {
|
|
359
419
|
(0, InspectorContext_1.animateNextLayout)();
|
|
360
420
|
setSettingsActiveSubTab('ui');
|
|
361
421
|
}} style={{
|
|
362
422
|
flex: 1,
|
|
363
|
-
paddingVertical:
|
|
423
|
+
paddingVertical: 8,
|
|
364
424
|
flexDirection: 'row',
|
|
365
425
|
alignItems: 'center',
|
|
366
426
|
justifyContent: 'center',
|
|
367
|
-
gap:
|
|
427
|
+
gap: 5,
|
|
368
428
|
borderRadius: 9,
|
|
369
429
|
backgroundColor: settingsActiveSubTab === 'ui'
|
|
370
430
|
? AppColors_1.AppColors.purple
|
|
@@ -372,11 +432,11 @@ const SettingsPanel = () => {
|
|
|
372
432
|
}}>
|
|
373
433
|
<NetworkIcons_1.ScreenIcon color={settingsActiveSubTab === 'ui'
|
|
374
434
|
? AppColors_1.AppColors.white
|
|
375
|
-
: AppColors_1.AppColors.grayText} size={
|
|
435
|
+
: AppColors_1.AppColors.grayText} size={12.5}/>
|
|
376
436
|
<react_native_1.Text style={{
|
|
377
437
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
378
|
-
fontSize:
|
|
379
|
-
lineHeight:
|
|
438
|
+
fontSize: 11.5,
|
|
439
|
+
lineHeight: 15,
|
|
380
440
|
color: settingsActiveSubTab === 'ui'
|
|
381
441
|
? AppColors_1.AppColors.white
|
|
382
442
|
: AppColors_1.AppColors.grayText,
|
|
@@ -386,7 +446,7 @@ const SettingsPanel = () => {
|
|
|
386
446
|
</TouchableScale_1.default>
|
|
387
447
|
</react_native_1.View>
|
|
388
448
|
|
|
389
|
-
{settingsActiveSubTab === 'module'
|
|
449
|
+
{settingsActiveSubTab === 'module' && (<react_native_1.View style={{ gap: 12 }}>
|
|
390
450
|
{/* Individual Module Cards with Left Checkboxes */}
|
|
391
451
|
<react_native_1.View style={{ gap: 10 }}>
|
|
392
452
|
{allModules.map(moduleItem => {
|
|
@@ -521,6 +581,15 @@ const SettingsPanel = () => {
|
|
|
521
581
|
{moduleItem.icon === 'analytics' && (<NetworkIcons_1.AnalyticsIcon color={isChecked
|
|
522
582
|
? AppColors_1.AppColors.purple
|
|
523
583
|
: AppColors_1.AppColors.grayTextWeak} size={16}/>)}
|
|
584
|
+
{moduleItem.icon === 'storage' && (<NetworkIcons_1.DatabaseIcon color={isChecked
|
|
585
|
+
? AppColors_1.AppColors.purple
|
|
586
|
+
: AppColors_1.AppColors.grayTextWeak} size={16}/>)}
|
|
587
|
+
{moduleItem.icon === 'device' && (<NetworkIcons_1.DevicePhoneIcon color={isChecked
|
|
588
|
+
? AppColors_1.AppColors.purple
|
|
589
|
+
: AppColors_1.AppColors.grayTextWeak} size={16}/>)}
|
|
590
|
+
{moduleItem.icon === 'audit' && (<NetworkIcons_1.ShieldCheckIcon color={isChecked
|
|
591
|
+
? AppColors_1.AppColors.purple
|
|
592
|
+
: AppColors_1.AppColors.grayTextWeak} size={16}/>)}
|
|
524
593
|
{moduleItem.icon === 'redux' && (<NetworkIcons_1.ReduxIcon color={isChecked
|
|
525
594
|
? AppColors_1.AppColors.purple
|
|
526
595
|
: AppColors_1.AppColors.grayTextWeak} size={16}/>)}
|
|
@@ -726,8 +795,11 @@ const SettingsPanel = () => {
|
|
|
726
795
|
</react_native_1.View>);
|
|
727
796
|
})}
|
|
728
797
|
</react_native_1.View>
|
|
798
|
+
</react_native_1.View>)}
|
|
729
799
|
|
|
730
|
-
|
|
800
|
+
{/* ─── TAB 2: RAM & RESOURCE LIMITS ──────────────────────────────────── */}
|
|
801
|
+
{settingsActiveSubTab === 'limits' && (<react_native_1.View style={{ gap: 14 }}>
|
|
802
|
+
{/* Section 1: RAM-Based Auto Limits */}
|
|
731
803
|
<react_native_1.View style={{
|
|
732
804
|
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
733
805
|
borderRadius: 14,
|
|
@@ -744,7 +816,7 @@ const SettingsPanel = () => {
|
|
|
744
816
|
color: AppColors_1.AppColors.grayTextWeak,
|
|
745
817
|
letterSpacing: 0.8,
|
|
746
818
|
}}>
|
|
747
|
-
RAM-
|
|
819
|
+
RAM-BASED AUTO TUNING
|
|
748
820
|
</react_native_1.Text>
|
|
749
821
|
|
|
750
822
|
{/* Auto RAM Limit Toggle */}
|
|
@@ -949,8 +1021,247 @@ const SettingsPanel = () => {
|
|
|
949
1021
|
</react_native_1.View>))}
|
|
950
1022
|
</react_native_1.View>
|
|
951
1023
|
</react_native_1.View>)}
|
|
1024
|
+
|
|
1025
|
+
<react_native_1.View style={{ height: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
1026
|
+
|
|
1027
|
+
{/* Floating Mini Performance HUD Toggle */}
|
|
1028
|
+
{renderSettingRow({
|
|
1029
|
+
icon: <NetworkIcons_1.PerformanceIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1030
|
+
label: 'Show Mini Performance HUD Overlay',
|
|
1031
|
+
description: 'Floating on-screen real-time FPS and Memory/Heap widget',
|
|
1032
|
+
right: (<TouchableScale_1.default accessible={true} accessibilityRole="switch" accessibilityLabel="Toggle mini performance HUD overlay" accessibilityState={{ checked: isPerformanceHudEnabled }} onPress={() => setIsPerformanceHudEnabled(prev => !prev)} style={{
|
|
1033
|
+
width: 42,
|
|
1034
|
+
height: 24,
|
|
1035
|
+
borderRadius: 12,
|
|
1036
|
+
backgroundColor: isPerformanceHudEnabled
|
|
1037
|
+
? AppColors_1.AppColors.purple
|
|
1038
|
+
: AppColors_1.AppColors.grayBorderSecondary,
|
|
1039
|
+
padding: 2,
|
|
1040
|
+
justifyContent: 'center',
|
|
1041
|
+
alignItems: isPerformanceHudEnabled
|
|
1042
|
+
? 'flex-end'
|
|
1043
|
+
: 'flex-start',
|
|
1044
|
+
}}>
|
|
1045
|
+
<react_native_1.View style={{
|
|
1046
|
+
width: 20,
|
|
1047
|
+
height: 20,
|
|
1048
|
+
borderRadius: 10,
|
|
1049
|
+
backgroundColor: AppColors_1.AppColors.white,
|
|
1050
|
+
shadowColor: AppColors_1.AppColors.black,
|
|
1051
|
+
shadowOpacity: 0.18,
|
|
1052
|
+
shadowRadius: 2,
|
|
1053
|
+
shadowOffset: { width: 0, height: 1 },
|
|
1054
|
+
}}/>
|
|
1055
|
+
</TouchableScale_1.default>),
|
|
1056
|
+
isLast: true,
|
|
1057
|
+
})}
|
|
1058
|
+
</react_native_1.View>
|
|
1059
|
+
|
|
1060
|
+
{/* Section 2: Fine-Tuned Resource Limits */}
|
|
1061
|
+
<react_native_1.View style={{
|
|
1062
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1063
|
+
borderRadius: 14,
|
|
1064
|
+
borderWidth: 1,
|
|
1065
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1066
|
+
overflow: 'hidden',
|
|
1067
|
+
padding: 14,
|
|
1068
|
+
gap: 12,
|
|
1069
|
+
}}>
|
|
1070
|
+
<react_native_1.Text style={{
|
|
1071
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1072
|
+
fontSize: 11,
|
|
1073
|
+
lineHeight: 14,
|
|
1074
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
1075
|
+
letterSpacing: 0.8,
|
|
1076
|
+
}}>
|
|
1077
|
+
MANUAL RESOURCE THRESHOLDS
|
|
1078
|
+
</react_native_1.Text>
|
|
1079
|
+
|
|
1080
|
+
{renderSettingRow({
|
|
1081
|
+
icon: <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1082
|
+
label: 'Max Network / API Logs',
|
|
1083
|
+
description: 'Maximum in-memory API requests tracked before rotation',
|
|
1084
|
+
numericInput: {
|
|
1085
|
+
value: maxNetworkLogs,
|
|
1086
|
+
onChange: setMaxNetworkLogs,
|
|
1087
|
+
min: 10,
|
|
1088
|
+
max: 100,
|
|
1089
|
+
placeholder: '10 - 100',
|
|
1090
|
+
},
|
|
1091
|
+
})}
|
|
1092
|
+
|
|
1093
|
+
{renderSettingRow({
|
|
1094
|
+
icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1095
|
+
label: 'Max Console Logs',
|
|
1096
|
+
description: 'Maximum log entries kept across info/warn/error streams',
|
|
1097
|
+
numericInput: {
|
|
1098
|
+
value: maxConsoleLogs,
|
|
1099
|
+
onChange: setMaxConsoleLogs,
|
|
1100
|
+
min: 20,
|
|
1101
|
+
max: 300,
|
|
1102
|
+
placeholder: '20 - 300',
|
|
1103
|
+
},
|
|
1104
|
+
})}
|
|
1105
|
+
|
|
1106
|
+
{renderSettingRow({
|
|
1107
|
+
icon: <NetworkIcons_1.AnalyticsIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1108
|
+
label: 'Max Analytics Events',
|
|
1109
|
+
description: 'Capacity for captured analytics payloads & telemetry pings',
|
|
1110
|
+
numericInput: {
|
|
1111
|
+
value: maxAnalyticsEventsLimit,
|
|
1112
|
+
onChange: setMaxAnalyticsEventsLimit,
|
|
1113
|
+
min: 20,
|
|
1114
|
+
max: 200,
|
|
1115
|
+
placeholder: '20 - 200',
|
|
1116
|
+
},
|
|
1117
|
+
})}
|
|
1118
|
+
|
|
1119
|
+
{renderSettingRow({
|
|
1120
|
+
icon: <NetworkIcons_1.CrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1121
|
+
label: 'Max Crash Records',
|
|
1122
|
+
description: 'Stored fatal exceptions and crash diagnostics logs',
|
|
1123
|
+
numericInput: {
|
|
1124
|
+
value: maxCrashLogs,
|
|
1125
|
+
onChange: setMaxCrashLogs,
|
|
1126
|
+
min: 5,
|
|
1127
|
+
max: 50,
|
|
1128
|
+
placeholder: '5 - 50',
|
|
1129
|
+
},
|
|
1130
|
+
isLast: true,
|
|
1131
|
+
})}
|
|
952
1132
|
</react_native_1.View>
|
|
953
|
-
|
|
1133
|
+
|
|
1134
|
+
{/* Section 3: Storage & Cache Cleansing */}
|
|
1135
|
+
<react_native_1.View style={{
|
|
1136
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1137
|
+
borderRadius: 14,
|
|
1138
|
+
borderWidth: 1,
|
|
1139
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1140
|
+
overflow: 'hidden',
|
|
1141
|
+
padding: 14,
|
|
1142
|
+
gap: 12,
|
|
1143
|
+
}}>
|
|
1144
|
+
<react_native_1.Text style={{
|
|
1145
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1146
|
+
fontSize: 11,
|
|
1147
|
+
lineHeight: 14,
|
|
1148
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
1149
|
+
letterSpacing: 0.8,
|
|
1150
|
+
}}>
|
|
1151
|
+
STORAGE & CACHE CLEANSING
|
|
1152
|
+
</react_native_1.Text>
|
|
1153
|
+
|
|
1154
|
+
{renderSettingRow({
|
|
1155
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1156
|
+
label: 'Clear All Network Logs',
|
|
1157
|
+
description: `${logs.length} requests in memory`,
|
|
1158
|
+
onPress: () => {
|
|
1159
|
+
(0, networkLogger_1.clearNetworkLogs)();
|
|
1160
|
+
setSelected(null);
|
|
1161
|
+
react_native_1.Alert.alert(t('common.success'), 'Network logs cleared successfully.');
|
|
1162
|
+
},
|
|
1163
|
+
right: (<react_native_1.View style={{
|
|
1164
|
+
paddingHorizontal: 10,
|
|
1165
|
+
paddingVertical: 4,
|
|
1166
|
+
borderRadius: 6,
|
|
1167
|
+
backgroundColor: `${AppColors_1.AppColors.errorColor}14`,
|
|
1168
|
+
borderWidth: 1,
|
|
1169
|
+
borderColor: `${AppColors_1.AppColors.errorColor}33`,
|
|
1170
|
+
}}>
|
|
1171
|
+
<react_native_1.Text style={{
|
|
1172
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1173
|
+
fontSize: 11,
|
|
1174
|
+
color: AppColors_1.AppColors.errorColor,
|
|
1175
|
+
}}>
|
|
1176
|
+
Clear ({logs.length})
|
|
1177
|
+
</react_native_1.Text>
|
|
1178
|
+
</react_native_1.View>),
|
|
1179
|
+
})}
|
|
1180
|
+
|
|
1181
|
+
{renderSettingRow({
|
|
1182
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1183
|
+
label: 'Clear All Console Logs',
|
|
1184
|
+
description: `${consoleLogs.length} logs in memory`,
|
|
1185
|
+
onPress: () => {
|
|
1186
|
+
(0, consoleLogger_1.clearConsoleLogs)();
|
|
1187
|
+
react_native_1.Alert.alert(t('common.success'), 'Console logs cleared successfully.');
|
|
1188
|
+
},
|
|
1189
|
+
right: (<react_native_1.View style={{
|
|
1190
|
+
paddingHorizontal: 10,
|
|
1191
|
+
paddingVertical: 4,
|
|
1192
|
+
borderRadius: 6,
|
|
1193
|
+
backgroundColor: `${AppColors_1.AppColors.errorColor}14`,
|
|
1194
|
+
borderWidth: 1,
|
|
1195
|
+
borderColor: `${AppColors_1.AppColors.errorColor}33`,
|
|
1196
|
+
}}>
|
|
1197
|
+
<react_native_1.Text style={{
|
|
1198
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1199
|
+
fontSize: 11,
|
|
1200
|
+
color: AppColors_1.AppColors.errorColor,
|
|
1201
|
+
}}>
|
|
1202
|
+
Clear ({consoleLogs.length})
|
|
1203
|
+
</react_native_1.Text>
|
|
1204
|
+
</react_native_1.View>),
|
|
1205
|
+
})}
|
|
1206
|
+
|
|
1207
|
+
{renderSettingRow({
|
|
1208
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1209
|
+
label: 'Clear Analytics Events',
|
|
1210
|
+
description: `${analyticsEvents.length} events recorded`,
|
|
1211
|
+
onPress: () => {
|
|
1212
|
+
(0, analyticsLogger_1.clearAnalyticsEvents)();
|
|
1213
|
+
setSelectedEvent(null);
|
|
1214
|
+
react_native_1.Alert.alert(t('common.success'), 'Analytics events cleared successfully.');
|
|
1215
|
+
},
|
|
1216
|
+
right: (<react_native_1.View style={{
|
|
1217
|
+
paddingHorizontal: 10,
|
|
1218
|
+
paddingVertical: 4,
|
|
1219
|
+
borderRadius: 6,
|
|
1220
|
+
backgroundColor: `${AppColors_1.AppColors.errorColor}14`,
|
|
1221
|
+
borderWidth: 1,
|
|
1222
|
+
borderColor: `${AppColors_1.AppColors.errorColor}33`,
|
|
1223
|
+
}}>
|
|
1224
|
+
<react_native_1.Text style={{
|
|
1225
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1226
|
+
fontSize: 11,
|
|
1227
|
+
color: AppColors_1.AppColors.errorColor,
|
|
1228
|
+
}}>
|
|
1229
|
+
Clear ({analyticsEvents.length})
|
|
1230
|
+
</react_native_1.Text>
|
|
1231
|
+
</react_native_1.View>),
|
|
1232
|
+
})}
|
|
1233
|
+
|
|
1234
|
+
{renderSettingRow({
|
|
1235
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1236
|
+
label: 'Clear Crash Logs',
|
|
1237
|
+
description: `${crashRecords.length} crash dumps recorded`,
|
|
1238
|
+
onPress: () => {
|
|
1239
|
+
(0, crashHandler_1.clearCrashRecords)();
|
|
1240
|
+
react_native_1.Alert.alert(t('common.success'), 'Crash records cleared successfully.');
|
|
1241
|
+
},
|
|
1242
|
+
isLast: true,
|
|
1243
|
+
right: (<react_native_1.View style={{
|
|
1244
|
+
paddingHorizontal: 10,
|
|
1245
|
+
paddingVertical: 4,
|
|
1246
|
+
borderRadius: 6,
|
|
1247
|
+
backgroundColor: `${AppColors_1.AppColors.errorColor}14`,
|
|
1248
|
+
borderWidth: 1,
|
|
1249
|
+
borderColor: `${AppColors_1.AppColors.errorColor}33`,
|
|
1250
|
+
}}>
|
|
1251
|
+
<react_native_1.Text style={{
|
|
1252
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1253
|
+
fontSize: 11,
|
|
1254
|
+
color: AppColors_1.AppColors.errorColor,
|
|
1255
|
+
}}>
|
|
1256
|
+
Clear ({crashRecords.length})
|
|
1257
|
+
</react_native_1.Text>
|
|
1258
|
+
</react_native_1.View>),
|
|
1259
|
+
})}
|
|
1260
|
+
</react_native_1.View>
|
|
1261
|
+
</react_native_1.View>)}
|
|
1262
|
+
|
|
1263
|
+
{/* ─── TAB 3: UI & APPEARANCE ────────────────────────────────────────── */}
|
|
1264
|
+
{settingsActiveSubTab === 'ui' && (<react_native_1.View style={{ gap: 14 }}>
|
|
954
1265
|
{/* Section 1: Appearance */}
|
|
955
1266
|
<react_native_1.View style={{
|
|
956
1267
|
backgroundColor: AppColors_1.AppColors.primaryLight,
|