react-native-inapp-inspector 2.3.18 → 2.3.20
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 +57 -0
- package/dist/commonjs/analytics.js +1 -24
- package/dist/commonjs/bundle.js +1 -16
- package/dist/commonjs/capture.d.ts +2 -0
- package/dist/commonjs/capture.js +1 -32
- package/dist/commonjs/components/AnalyticsDetail.js +92 -623
- package/dist/commonjs/components/AnalyticsEventCard.js +54 -350
- package/dist/commonjs/components/AnalyticsGraph.js +70 -370
- package/dist/commonjs/components/AnimatedEntrance.js +1 -11
- package/dist/commonjs/components/AppHeaderLogo.js +7 -134
- package/dist/commonjs/components/BrandCircleIcon.js +73 -118
- package/dist/commonjs/components/BrandSquareIcon.js +63 -108
- package/dist/commonjs/components/CodeSnippet.js +48 -623
- package/dist/commonjs/components/ConsoleLogCard.js +63 -537
- package/dist/commonjs/components/CopyButton.js +3 -89
- package/dist/commonjs/components/DiffViewer.js +19 -83
- package/dist/commonjs/components/DomainHeader.js +27 -127
- package/dist/commonjs/components/EmptyState.d.ts +1 -0
- package/dist/commonjs/components/EmptyState.js +10 -87
- package/dist/commonjs/components/EndOfListFooter.js +7 -81
- package/dist/commonjs/components/ErrorBoundary.js +72 -566
- package/dist/commonjs/components/HeadersSection.js +31 -110
- package/dist/commonjs/components/HighlightText.js +17 -58
- package/dist/commonjs/components/Inspector/AboutModal.d.ts +6 -0
- package/dist/commonjs/components/Inspector/AboutModal.js +351 -0
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +98 -797
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +284 -930
- package/dist/commonjs/components/Inspector/BundleTab.js +551 -2918
- package/dist/commonjs/components/Inspector/ConsoleTab.js +79 -492
- package/dist/commonjs/components/Inspector/CrashDetail.js +123 -672
- package/dist/commonjs/components/Inspector/CrashFilterModal.js +66 -498
- package/dist/commonjs/components/Inspector/CrashTab.js +98 -670
- package/dist/commonjs/components/Inspector/DebuggingTab.js +64 -871
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +143 -907
- package/dist/commonjs/components/Inspector/FabLauncher.js +85 -54
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +6 -99
- package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +9 -0
- package/dist/commonjs/components/Inspector/FeedbackModal.js +167 -521
- package/dist/commonjs/components/Inspector/InspectorContext.js +1 -21
- package/dist/commonjs/components/Inspector/InspectorHeader.js +219 -1093
- package/dist/commonjs/components/Inspector/LogDetail.js +168 -994
- package/dist/commonjs/components/Inspector/MainScreen.js +60 -332
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +136 -278
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +134 -361
- package/dist/commonjs/components/Inspector/NavigationTracker.js +1 -12
- package/dist/commonjs/components/Inspector/NetworkDetail.js +96 -432
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +60 -576
- package/dist/commonjs/components/Inspector/NetworkTab.js +84 -514
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +17 -433
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +25 -298
- package/dist/commonjs/components/Inspector/PerformanceTab.js +182 -1397
- package/dist/commonjs/components/Inspector/ReduxDetail.js +188 -1089
- package/dist/commonjs/components/Inspector/ReduxTab.js +85 -701
- package/dist/commonjs/components/Inspector/SettingsPanel.js +431 -3431
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +11 -180
- package/dist/commonjs/components/Inspector/StorageTab.js +93 -826
- package/dist/commonjs/components/Inspector/TabBar.js +47 -183
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +34 -408
- package/dist/commonjs/components/JsonViewer.js +168 -380
- package/dist/commonjs/components/LogCard.js +57 -567
- package/dist/commonjs/components/LogSyntaxHighlighter.js +11 -130
- package/dist/commonjs/components/MetaAccordion.js +69 -238
- package/dist/commonjs/components/MiniBarChart.js +3 -56
- package/dist/commonjs/components/MiniLineChart.js +3 -58
- package/dist/commonjs/components/NetworkIcons.d.ts +7 -0
- package/dist/commonjs/components/NetworkIcons.js +479 -997
- package/dist/commonjs/components/QRCodeView.js +5 -79
- package/dist/commonjs/components/SectionHeader.js +15 -37
- package/dist/commonjs/components/SegmentedTabs.js +7 -61
- package/dist/commonjs/components/SkeletonPlaceholder.js +11 -180
- package/dist/commonjs/components/Slider.js +15 -243
- package/dist/commonjs/components/SourcePageCard.js +30 -89
- package/dist/commonjs/components/Toast.js +5 -147
- package/dist/commonjs/components/TouchableScale.js +3 -24
- package/dist/commonjs/components/TreeNode.js +55 -130
- package/dist/commonjs/console.js +1 -16
- package/dist/commonjs/constants/index.js +1 -32
- package/dist/commonjs/constants/telemetryConfig.js +1 -6
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -4
- package/dist/commonjs/crash.js +1 -23
- package/dist/commonjs/customHooks/analyticsLogger.js +1 -250
- package/dist/commonjs/customHooks/bundleAnalyzer.js +1 -957
- package/dist/commonjs/customHooks/consoleLogger.js +6 -445
- package/dist/commonjs/customHooks/crashHandler.js +7 -656
- package/dist/commonjs/customHooks/logFilters.js +1 -23
- package/dist/commonjs/customHooks/networkLogger.js +2 -536
- package/dist/commonjs/customHooks/performanceTracker.js +63 -750
- package/dist/commonjs/customHooks/reduxLogger.js +2 -313
- package/dist/commonjs/customHooks/storageInspector.js +1 -435
- package/dist/commonjs/customHooks/useAccordion.js +1 -18
- package/dist/commonjs/decorators/index.js +1 -100
- package/dist/commonjs/helpers/gaAnalyticsRegistry.js +1 -148
- package/dist/commonjs/helpers/index.js +8 -921
- package/dist/commonjs/helpers/memoryManager.js +1 -99
- package/dist/commonjs/helpers/qrGenerator.js +1 -367
- package/dist/commonjs/helpers/remoteConfig.js +1 -165
- package/dist/commonjs/helpers/searchQueryParser.js +1 -62
- package/dist/commonjs/helpers/settingsStore.js +1 -144
- package/dist/commonjs/helpers/telemetry.js +1 -501
- package/dist/commonjs/helpers/toast.js +1 -20
- package/dist/commonjs/i18n/index.js +1 -90
- package/dist/commonjs/i18n/locales/en.json +1 -1122
- package/dist/commonjs/index.js +5 -2153
- package/dist/commonjs/metro.js +6 -468
- package/dist/commonjs/native/NativeInspector.d.ts +3 -0
- package/dist/commonjs/native/NativeInspector.js +1 -402
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +1 -0
- package/dist/commonjs/native/NativeNetworkInspector.js +1 -4
- package/dist/commonjs/network.js +1 -13
- package/dist/commonjs/performance.js +1 -29
- package/dist/commonjs/redux.js +1 -20
- package/dist/commonjs/storage.js +1 -14
- package/dist/commonjs/styles/AppColors.js +1 -423
- package/dist/commonjs/styles/AppFonts.js +1 -17
- package/dist/commonjs/styles/common.js +1 -190
- package/dist/commonjs/styles/index.d.ts +6 -0
- package/dist/commonjs/styles/index.js +1 -1589
- package/dist/commonjs/types/enums.d.ts +2 -1
- package/dist/commonjs/types/enums.js +1 -150
- package/dist/commonjs/types/index.js +1 -18
- package/dist/commonjs/types/interfaces.d.ts +7 -0
- package/dist/commonjs/types/interfaces.js +1 -2
- package/dist/esm/analytics.js +1 -2
- package/dist/esm/bundle.js +1 -2
- package/dist/esm/capture.d.ts +2 -0
- package/dist/esm/capture.js +1 -29
- package/dist/esm/components/AnalyticsDetail.js +171 -664
- package/dist/esm/components/AnalyticsEventCard.js +77 -335
- package/dist/esm/components/AnalyticsGraph.js +95 -357
- package/dist/esm/components/AnimatedEntrance.js +1 -6
- package/dist/esm/components/AppHeaderLogo.js +7 -94
- package/dist/esm/components/BrandCircleIcon.js +114 -119
- package/dist/esm/components/BrandSquareIcon.js +73 -78
- package/dist/esm/components/CodeSnippet.js +58 -595
- package/dist/esm/components/ConsoleLogCard.js +91 -526
- package/dist/esm/components/CopyButton.js +3 -51
- package/dist/esm/components/DiffViewer.js +22 -48
- package/dist/esm/components/DomainHeader.js +43 -138
- package/dist/esm/components/EmptyState.d.ts +1 -0
- package/dist/esm/components/EmptyState.js +17 -56
- package/dist/esm/components/EndOfListFooter.js +15 -83
- package/dist/esm/components/ErrorBoundary.js +125 -582
- package/dist/esm/components/HeadersSection.js +52 -93
- package/dist/esm/components/HighlightText.js +17 -53
- package/dist/esm/components/Inspector/AboutModal.d.ts +6 -0
- package/dist/esm/components/Inspector/AboutModal.js +351 -0
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +225 -886
- package/dist/esm/components/Inspector/AnalyticsTab.js +296 -904
- package/dist/esm/components/Inspector/BundleTab.js +1175 -3502
- package/dist/esm/components/Inspector/ConsoleTab.js +113 -488
- package/dist/esm/components/Inspector/CrashDetail.js +236 -747
- package/dist/esm/components/Inspector/CrashFilterModal.js +149 -541
- package/dist/esm/components/Inspector/CrashTab.js +177 -711
- package/dist/esm/components/Inspector/DebuggingTab.js +156 -923
- package/dist/esm/components/Inspector/DeviceInfoTab.js +199 -924
- package/dist/esm/components/Inspector/FabLauncher.js +85 -49
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +14 -70
- package/dist/esm/components/Inspector/FeedbackModal.d.ts +9 -0
- package/dist/esm/components/Inspector/FeedbackModal.js +182 -499
- package/dist/esm/components/Inspector/InspectorContext.js +1 -12
- package/dist/esm/components/Inspector/InspectorHeader.js +309 -1145
- package/dist/esm/components/Inspector/LogDetail.js +235 -1023
- package/dist/esm/components/Inspector/MainScreen.js +86 -320
- package/dist/esm/components/Inspector/MediaGalleryTab.js +157 -259
- package/dist/esm/components/Inspector/MediaPreviewModal.js +153 -340
- package/dist/esm/components/Inspector/NavigationTracker.js +1 -10
- package/dist/esm/components/Inspector/NetworkDetail.js +141 -472
- package/dist/esm/components/Inspector/NetworkFilterModal.js +122 -597
- package/dist/esm/components/Inspector/NetworkTab.js +125 -517
- package/dist/esm/components/Inspector/NpmStarPrompt.js +58 -434
- package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -281
- package/dist/esm/components/Inspector/PerformanceTab.js +393 -1570
- package/dist/esm/components/Inspector/ReduxDetail.js +307 -1170
- package/dist/esm/components/Inspector/ReduxTab.js +144 -722
- package/dist/esm/components/Inspector/SettingsPanel.js +647 -3609
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +30 -163
- package/dist/esm/components/Inspector/StorageTab.js +172 -866
- package/dist/esm/components/Inspector/TabBar.js +52 -183
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +79 -416
- package/dist/esm/components/JsonViewer.js +179 -353
- package/dist/esm/components/LogCard.js +93 -565
- package/dist/esm/components/LogSyntaxHighlighter.js +11 -123
- package/dist/esm/components/MetaAccordion.js +136 -267
- package/dist/esm/components/MiniBarChart.js +3 -18
- package/dist/esm/components/MiniLineChart.js +3 -20
- package/dist/esm/components/NetworkIcons.d.ts +7 -0
- package/dist/esm/components/NetworkIcons.js +481 -817
- package/dist/esm/components/QRCodeView.js +8 -45
- package/dist/esm/components/SectionHeader.js +22 -39
- package/dist/esm/components/SegmentedTabs.js +8 -57
- package/dist/esm/components/SkeletonPlaceholder.js +30 -163
- package/dist/esm/components/Slider.js +24 -213
- package/dist/esm/components/SourcePageCard.js +65 -86
- package/dist/esm/components/Toast.js +10 -117
- package/dist/esm/components/TouchableScale.js +3 -19
- package/dist/esm/components/TreeNode.js +58 -95
- package/dist/esm/console.js +1 -2
- package/dist/esm/constants/index.js +1 -28
- package/dist/esm/constants/telemetryConfig.js +1 -3
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/crash.js +1 -2
- package/dist/esm/customHooks/analyticsLogger.js +1 -230
- package/dist/esm/customHooks/bundleAnalyzer.js +1 -944
- package/dist/esm/customHooks/consoleLogger.js +6 -432
- package/dist/esm/customHooks/crashHandler.js +7 -630
- package/dist/esm/customHooks/logFilters.js +1 -20
- package/dist/esm/customHooks/networkLogger.js +2 -519
- package/dist/esm/customHooks/performanceTracker.js +63 -723
- package/dist/esm/customHooks/reduxLogger.js +2 -293
- package/dist/esm/customHooks/storageInspector.js +1 -418
- package/dist/esm/customHooks/useAccordion.js +1 -16
- package/dist/esm/decorators/index.js +1 -95
- package/dist/esm/helpers/gaAnalyticsRegistry.js +1 -143
- package/dist/esm/helpers/index.js +8 -861
- package/dist/esm/helpers/memoryManager.js +1 -91
- package/dist/esm/helpers/qrGenerator.js +1 -364
- package/dist/esm/helpers/remoteConfig.js +1 -160
- package/dist/esm/helpers/searchQueryParser.js +1 -59
- package/dist/esm/helpers/settingsStore.js +1 -134
- package/dist/esm/helpers/telemetry.js +1 -489
- package/dist/esm/helpers/toast.js +1 -15
- package/dist/esm/i18n/index.js +1 -78
- package/dist/esm/i18n/locales/en.json +1 -1122
- package/dist/esm/index.js +7 -1967
- package/dist/esm/metro.js +6 -459
- package/dist/esm/native/NativeInspector.d.ts +3 -0
- package/dist/esm/native/NativeInspector.js +1 -370
- package/dist/esm/native/NativeNetworkInspector.d.ts +1 -0
- package/dist/esm/native/NativeNetworkInspector.js +1 -2
- package/dist/esm/network.js +1 -1
- package/dist/esm/performance.js +1 -2
- package/dist/esm/redux.js +1 -1
- package/dist/esm/storage.js +1 -1
- package/dist/esm/styles/AppColors.js +1 -417
- package/dist/esm/styles/AppFonts.js +1 -13
- package/dist/esm/styles/common.js +1 -186
- package/dist/esm/styles/index.d.ts +6 -0
- package/dist/esm/styles/index.js +1 -1551
- package/dist/esm/types/enums.d.ts +2 -1
- package/dist/esm/types/enums.js +1 -147
- package/dist/esm/types/index.js +1 -2
- package/dist/esm/types/interfaces.d.ts +7 -0
- package/dist/esm/types/interfaces.js +1 -1
- package/ios/NetworkInspectorModule.mm +253 -136
- package/package.json +5 -3
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/native/NativeInspector.ts +17 -0
- package/src/native/NativeNetworkInspector.ts +1 -0
- package/src/analytics.ts +0 -35
- package/src/bundle.ts +0 -25
- package/src/capture.ts +0 -101
- package/src/components/AnalyticsDetail.tsx +0 -870
- package/src/components/AnalyticsEventCard.tsx +0 -444
- package/src/components/AnalyticsGraph.tsx +0 -583
- package/src/components/AnimatedEntrance.tsx +0 -20
- package/src/components/AppHeaderLogo.tsx +0 -143
- package/src/components/BrandCircleIcon.tsx +0 -144
- package/src/components/BrandSquareIcon.tsx +0 -184
- package/src/components/CodeSnippet.tsx +0 -725
- package/src/components/ConsoleLogCard.tsx +0 -679
- package/src/components/CopyButton.tsx +0 -87
- package/src/components/DiffViewer.tsx +0 -82
- package/src/components/DomainHeader.tsx +0 -224
- package/src/components/EmptyState.tsx +0 -95
- package/src/components/EndOfListFooter.tsx +0 -100
- package/src/components/ErrorBoundary.tsx +0 -688
- package/src/components/HeadersSection.tsx +0 -172
- package/src/components/HighlightText.tsx +0 -100
- package/src/components/Inspector/AnalyticsFilterModal.tsx +0 -1250
- package/src/components/Inspector/AnalyticsTab.tsx +0 -1362
- package/src/components/Inspector/BundleTab.tsx +0 -4768
- package/src/components/Inspector/ConsoleTab.tsx +0 -726
- package/src/components/Inspector/CrashDetail.tsx +0 -997
- package/src/components/Inspector/CrashFilterModal.tsx +0 -721
- package/src/components/Inspector/CrashTab.tsx +0 -933
- package/src/components/Inspector/DebuggingTab.tsx +0 -1103
- package/src/components/Inspector/DeviceInfoTab.tsx +0 -1397
- package/src/components/Inspector/FabLauncher.tsx +0 -80
- package/src/components/Inspector/FeatureUnderDevNotice.tsx +0 -94
- package/src/components/Inspector/FeedbackModal.tsx +0 -626
- package/src/components/Inspector/InspectorContext.tsx +0 -28
- package/src/components/Inspector/InspectorHeader.tsx +0 -1545
- package/src/components/Inspector/LogDetail.tsx +0 -1431
- package/src/components/Inspector/MainScreen.tsx +0 -459
- package/src/components/Inspector/MediaGalleryTab.tsx +0 -355
- package/src/components/Inspector/MediaPreviewModal.tsx +0 -435
- package/src/components/Inspector/NavigationTracker.tsx +0 -13
- package/src/components/Inspector/NetworkDetail.tsx +0 -795
- package/src/components/Inspector/NetworkFilterModal.tsx +0 -730
- package/src/components/Inspector/NetworkTab.tsx +0 -820
- package/src/components/Inspector/NpmStarPrompt.tsx +0 -532
- package/src/components/Inspector/NpmUpdateToast.tsx +0 -387
- package/src/components/Inspector/PerformanceTab.tsx +0 -1967
- package/src/components/Inspector/ReduxDetail.tsx +0 -1651
- package/src/components/Inspector/ReduxTab.tsx +0 -987
- package/src/components/Inspector/SettingsPanel.tsx +0 -4580
- package/src/components/Inspector/SkeletonPlaceholder.tsx +0 -206
- package/src/components/Inspector/StorageTab.tsx +0 -1159
- package/src/components/Inspector/TabBar.tsx +0 -263
- package/src/components/Inspector/UpdateAvailableModal.tsx +0 -555
- package/src/components/JsonViewer.tsx +0 -547
- package/src/components/LogCard.tsx +0 -694
- package/src/components/LogSyntaxHighlighter.tsx +0 -178
- package/src/components/MetaAccordion.tsx +0 -355
- package/src/components/MiniBarChart.tsx +0 -42
- package/src/components/MiniLineChart.tsx +0 -33
- package/src/components/NetworkIcons.tsx +0 -2599
- package/src/components/QRCodeView.tsx +0 -75
- package/src/components/SectionHeader.tsx +0 -101
- package/src/components/SegmentedTabs.tsx +0 -83
- package/src/components/SkeletonPlaceholder.tsx +0 -206
- package/src/components/Slider.tsx +0 -300
- package/src/components/SourcePageCard.tsx +0 -150
- package/src/components/Toast.tsx +0 -131
- package/src/components/TouchableScale.tsx +0 -61
- package/src/components/TreeNode.tsx +0 -171
- package/src/console.ts +0 -24
- package/src/constants/index.ts +0 -41
- package/src/constants/telemetryConfig.ts +0 -4
- package/src/constants/version.ts +0 -3
- package/src/crash.ts +0 -32
- package/src/customHooks/analyticsLogger.ts +0 -336
- package/src/customHooks/bundleAnalyzer.ts +0 -1256
- package/src/customHooks/consoleLogger.ts +0 -530
- package/src/customHooks/crashHandler.ts +0 -944
- package/src/customHooks/logFilters.ts +0 -32
- package/src/customHooks/networkLogger.ts +0 -624
- package/src/customHooks/performanceTracker.ts +0 -1014
- package/src/customHooks/reduxLogger.ts +0 -406
- package/src/customHooks/storageInspector.ts +0 -513
- package/src/customHooks/useAccordion.tsx +0 -27
- package/src/decorators/index.ts +0 -184
- package/src/helpers/gaAnalyticsRegistry.ts +0 -204
- package/src/helpers/index.ts +0 -1092
- package/src/helpers/memoryManager.ts +0 -138
- package/src/helpers/qrGenerator.ts +0 -430
- package/src/helpers/remoteConfig.ts +0 -212
- package/src/helpers/searchQueryParser.ts +0 -84
- package/src/helpers/settingsStore.ts +0 -171
- package/src/helpers/telemetry.ts +0 -568
- package/src/helpers/toast.ts +0 -17
- package/src/i18n/index.ts +0 -104
- package/src/i18n/locales/en.json +0 -1125
- package/src/index.tsx +0 -2635
- package/src/metro.ts +0 -598
- package/src/network.ts +0 -22
- package/src/performance.ts +0 -38
- package/src/redux.ts +0 -23
- package/src/storage.ts +0 -18
- package/src/styles/AppColors.ts +0 -455
- package/src/styles/AppFonts.ts +0 -26
- package/src/styles/common.ts +0 -209
- package/src/styles/index.ts +0 -1606
- package/src/types/enums.ts +0 -208
- package/src/types/index.ts +0 -34
- package/src/types/interfaces.ts +0 -530
|
@@ -1,899 +1,205 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { View, Text, ScrollView, FlatList, TextInput, Modal, Alert, StyleSheet, ActivityIndicator, Platform, } from 'react-native';
|
|
3
|
-
import TouchableScale from '../TouchableScale';
|
|
4
|
-
import { AppColors } from '../../styles/AppColors';
|
|
5
|
-
import { AppFonts } from '../../styles/AppFonts';
|
|
6
|
-
import { useTranslation } from '../../i18n';
|
|
7
|
-
import { DatabaseIcon, SearchIcon, ClearIcon, PlusIcon, PencilIcon, TrashIcon, CopyIcon, CheckIcon, LayersIcon, ResetIcon, ChevronIcon, WarningTriangleIcon, } from '../NetworkIcons';
|
|
8
|
-
import { fetchStorageEntries, setStorageEntry, removeStorageEntry, clearStorageDriver, isAsyncStorageConnected, isMMKVConnected, getRegisteredMMKVInstanceIds, subscribeToStorageChanges, } from '../../customHooks/storageInspector';
|
|
9
|
-
import { copyToClipboard } from '../../helpers';
|
|
10
|
-
import { showToast } from '../../helpers/toast';
|
|
11
|
-
const getTypeBadge = (type) => {
|
|
12
|
-
switch (type) {
|
|
13
|
-
case 'json':
|
|
14
|
-
return { label: 'JSON', color: AppColors.purple, bg: `${AppColors.purple}16` };
|
|
15
|
-
case 'number':
|
|
16
|
-
return { label: 'NUM', color: AppColors.warningIconGold, bg: `${AppColors.warningIconGold}16` };
|
|
17
|
-
case 'boolean':
|
|
18
|
-
return { label: 'BOOL', color: AppColors.emerald500, bg: `${AppColors.emerald500}16` };
|
|
19
|
-
case 'null':
|
|
20
|
-
return { label: 'NULL', color: AppColors.grayTextWeak, bg: `${AppColors.grayTextWeak}16` };
|
|
21
|
-
default:
|
|
22
|
-
return { label: 'STR', color: AppColors.blue500, bg: `${AppColors.blue500}16` };
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
const StorageEntryCard = React.memo(function StorageEntryCard({ entry, isExpanded, onToggleExpand, onCopy, onEdit, onDelete, badge, }) {
|
|
26
|
-
const formattedBytes = useMemo(() => {
|
|
27
|
-
return entry.byteSize < 1024
|
|
28
|
-
? `${entry.byteSize} B`
|
|
29
|
-
: `${(entry.byteSize / 1024).toFixed(1)} KB`;
|
|
30
|
-
}, [entry.byteSize]);
|
|
31
|
-
const displayValue = useMemo(() => {
|
|
32
|
-
if (!isExpanded) {
|
|
33
|
-
if (entry.value.length > 250) {
|
|
34
|
-
return entry.value.slice(0, 250) + '...';
|
|
35
|
-
}
|
|
36
|
-
return entry.value;
|
|
37
|
-
}
|
|
38
|
-
if (entry.type === 'json') {
|
|
39
|
-
try {
|
|
40
|
-
const parsed = entry.parsedValue ?? JSON.parse(entry.value);
|
|
41
|
-
return JSON.stringify(parsed, null, 2);
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
return entry.value;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return entry.value;
|
|
48
|
-
}, [isExpanded, entry.value, entry.type, entry.parsedValue]);
|
|
49
|
-
return (<View style={styles.entryCard}>
|
|
1
|
+
import ae,{useState as k,useEffect as Re,useMemo as K,useCallback as X,useRef as We}from"react";import{View as T,Text as S,ScrollView as Ke,FlatList as De,TextInput as Z,Modal as Le,Alert as ne,StyleSheet as Ee,ActivityIndicator as Oe,Platform as le}from"react-native";import B from"../TouchableScale";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as x}from"../../styles/AppFonts";import{useTranslation as Ne}from"../../i18n";import{DatabaseIcon as Te,SearchIcon as He,ClearIcon as Se,PlusIcon as Je,PencilIcon as Ge,TrashIcon as Ce,CopyIcon as Ue,CheckIcon as Ye,LayersIcon as _e,ResetIcon as Qe,ChevronIcon as Xe,WarningTriangleIcon as Ze}from"../NetworkIcons";import{fetchStorageEntries as et,setStorageEntry as tt,removeStorageEntry as rt,clearStorageDriver as ot,isAsyncStorageConnected as at,isMMKVConnected as nt,getRegisteredMMKVInstanceIds as lt,subscribeToStorageChanges as it}from"../../customHooks/storageInspector";import{copyToClipboard as st}from"../../helpers";import{showToast as A}from"../../helpers/toast";const dt=J=>{switch(J){case"json":return{label:"JSON",color:e.purple,bg:`${e.purple}16`};case"number":return{label:"NUM",color:e.warningIconGold,bg:`${e.warningIconGold}16`};case"boolean":return{label:"BOOL",color:e.emerald500,bg:`${e.emerald500}16`};case"null":return{label:"NULL",color:e.grayTextWeak,bg:`${e.grayTextWeak}16`};default:return{label:"STR",color:e.blue500,bg:`${e.blue500}16`}}},Tt=ae.memo(function({entry:C,isExpanded:o,onToggleExpand:E,onCopy:z,onEdit:G,onDelete:v,badge:P}){const U=K(()=>C.byteSize<1024?`${C.byteSize} B`:`${(C.byteSize/1024).toFixed(1)} KB`,[C.byteSize]),O=K(()=>{if(!o)return C.value.length>250?C.value.slice(0,250)+"...":C.value;if(C.type==="json")try{const V=C.parsedValue??JSON.parse(C.value);return JSON.stringify(V,null,2)}catch{return C.value}return C.value},[o,C.value,C.type,C.parsedValue]);return<T style={t.entryCard}>
|
|
50
2
|
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
{
|
|
56
|
-
</
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<Text style={styles.sizeText}>{formattedBytes}</Text>
|
|
66
|
-
</View>
|
|
67
|
-
</View>
|
|
3
|
+
<T style={t.entryHeader}>
|
|
4
|
+
<T style={{flex:1,marginRight:8}}>
|
|
5
|
+
<T style={{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap"}}>
|
|
6
|
+
<S style={t.entryKey}numberOfLines={1}selectable>
|
|
7
|
+
{C.key}
|
|
8
|
+
</S>
|
|
9
|
+
<T style={[t.typeBadge,{backgroundColor:P.bg,borderColor:`${P.color}33`}]}>
|
|
10
|
+
<S style={[t.typeBadgeText,{color:P.color}]}>
|
|
11
|
+
{P.label}
|
|
12
|
+
</S>
|
|
13
|
+
</T>
|
|
14
|
+
<S style={t.sizeText}>{U}</S>
|
|
15
|
+
</T>
|
|
16
|
+
</T>
|
|
68
17
|
|
|
69
18
|
|
|
70
|
-
<
|
|
71
|
-
<
|
|
72
|
-
<
|
|
73
|
-
</
|
|
19
|
+
<T style={t.entryActions}>
|
|
20
|
+
<B hitSlop={6}onPress={()=>z(C)}style={t.entryActionBtn}>
|
|
21
|
+
<Ue size={12}color={e.grayText}/>
|
|
22
|
+
</B>
|
|
74
23
|
|
|
75
|
-
<
|
|
76
|
-
<
|
|
77
|
-
</
|
|
24
|
+
<B hitSlop={6}onPress={()=>G(C)}style={t.entryActionBtn}>
|
|
25
|
+
<Ge size={12}color={e.purple}/>
|
|
26
|
+
</B>
|
|
78
27
|
|
|
79
|
-
<
|
|
80
|
-
<
|
|
81
|
-
</
|
|
82
|
-
</
|
|
83
|
-
</
|
|
28
|
+
<B hitSlop={6}onPress={()=>v(C.key)}style={[t.entryActionBtn,{backgroundColor:`${e.errorColor}12`}]}>
|
|
29
|
+
<Ce size={12}color={e.errorColor}/>
|
|
30
|
+
</B>
|
|
31
|
+
</T>
|
|
32
|
+
</T>
|
|
84
33
|
|
|
85
34
|
|
|
86
|
-
<
|
|
87
|
-
<
|
|
88
|
-
{
|
|
89
|
-
</
|
|
90
|
-
{
|
|
91
|
-
<
|
|
92
|
-
{
|
|
93
|
-
</
|
|
94
|
-
<
|
|
95
|
-
</
|
|
96
|
-
</
|
|
97
|
-
</
|
|
98
|
-
});
|
|
99
|
-
export const StorageTab = React.memo(() => {
|
|
100
|
-
const { t } = useTranslation();
|
|
101
|
-
const listRef = useRef(null);
|
|
102
|
-
const [activeDriver, setActiveDriver] = useState('asyncStorage');
|
|
103
|
-
const [activeMMKVId, setActiveMMKVId] = useState('default');
|
|
104
|
-
const [entries, setEntries] = useState([]);
|
|
105
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
106
|
-
const [search, setSearch] = useState('');
|
|
107
|
-
const [expandedKeys, setExpandedKeys] = useState({});
|
|
108
|
-
const [modalVisible, setModalVisible] = useState(false);
|
|
109
|
-
const [modalMode, setModalMode] = useState('create');
|
|
110
|
-
const [editKeyName, setEditKeyName] = useState('');
|
|
111
|
-
const [editValue, setEditValue] = useState('');
|
|
112
|
-
const [editType, setEditType] = useState('string');
|
|
113
|
-
const [jsonError, setJsonError] = useState(null);
|
|
114
|
-
const mmkvInstanceIds = useMemo(() => getRegisteredMMKVInstanceIds(), []);
|
|
115
|
-
const loadEntries = useCallback(async () => {
|
|
116
|
-
setIsLoading(true);
|
|
117
|
-
try {
|
|
118
|
-
const data = await fetchStorageEntries(activeDriver, activeDriver === 'mmkv' ? activeMMKVId : undefined);
|
|
119
|
-
setEntries(data);
|
|
120
|
-
}
|
|
121
|
-
catch {
|
|
122
|
-
setEntries([]);
|
|
123
|
-
}
|
|
124
|
-
finally {
|
|
125
|
-
setIsLoading(false);
|
|
126
|
-
}
|
|
127
|
-
}, [activeDriver, activeMMKVId]);
|
|
128
|
-
useEffect(() => {
|
|
129
|
-
loadEntries();
|
|
130
|
-
const unsubscribe = subscribeToStorageChanges(loadEntries);
|
|
131
|
-
return unsubscribe;
|
|
132
|
-
}, [loadEntries]);
|
|
133
|
-
const toggleExpand = (key) => {
|
|
134
|
-
setExpandedKeys(prev => ({ ...prev, [key]: !prev[key] }));
|
|
135
|
-
};
|
|
136
|
-
const handleOpenCreate = () => {
|
|
137
|
-
setModalMode('create');
|
|
138
|
-
setEditKeyName('');
|
|
139
|
-
setEditValue('');
|
|
140
|
-
setEditType('string');
|
|
141
|
-
setJsonError(null);
|
|
142
|
-
setModalVisible(true);
|
|
143
|
-
};
|
|
144
|
-
const handleOpenEdit = (entry) => {
|
|
145
|
-
setModalMode('edit');
|
|
146
|
-
setEditKeyName(entry.key);
|
|
147
|
-
setEditValue(entry.value);
|
|
148
|
-
setEditType(entry.type === 'json' ? 'json' : entry.type === 'number' ? 'number' : entry.type === 'boolean' ? 'boolean' : 'string');
|
|
149
|
-
setJsonError(null);
|
|
150
|
-
setModalVisible(true);
|
|
151
|
-
};
|
|
152
|
-
const handleDeleteKey = (key) => {
|
|
153
|
-
Alert.alert('Delete Storage Key', `Are you sure you want to permanently delete "${key}" from ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'}?`, [
|
|
154
|
-
{ text: 'Cancel', style: 'cancel' },
|
|
155
|
-
{
|
|
156
|
-
text: 'Delete',
|
|
157
|
-
style: 'destructive',
|
|
158
|
-
onPress: async () => {
|
|
159
|
-
const ok = await removeStorageEntry(activeDriver, key, activeDriver === 'mmkv' ? activeMMKVId : undefined);
|
|
160
|
-
if (ok) {
|
|
161
|
-
showToast(`Deleted "${key}"`);
|
|
162
|
-
loadEntries();
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
showToast(`Failed to delete "${key}"`);
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
]);
|
|
170
|
-
};
|
|
171
|
-
const handleClearAll = () => {
|
|
172
|
-
Alert.alert('Wipe All Storage Keys', `Are you sure you want to clear all ${entries.length} keys in ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'}? This cannot be undone.`, [
|
|
173
|
-
{ text: 'Cancel', style: 'cancel' },
|
|
174
|
-
{
|
|
175
|
-
text: 'Wipe All',
|
|
176
|
-
style: 'destructive',
|
|
177
|
-
onPress: async () => {
|
|
178
|
-
const ok = await clearStorageDriver(activeDriver, activeDriver === 'mmkv' ? activeMMKVId : undefined);
|
|
179
|
-
if (ok) {
|
|
180
|
-
showToast('All storage keys wiped');
|
|
181
|
-
loadEntries();
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
]);
|
|
186
|
-
};
|
|
187
|
-
const handleSaveModal = async () => {
|
|
188
|
-
if (!editKeyName.trim()) {
|
|
189
|
-
showToast('Key name cannot be empty');
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
let finalVal = editValue;
|
|
193
|
-
if (editType === 'json') {
|
|
194
|
-
try {
|
|
195
|
-
const parsed = JSON.parse(editValue);
|
|
196
|
-
finalVal = JSON.stringify(parsed);
|
|
197
|
-
}
|
|
198
|
-
catch (err) {
|
|
199
|
-
setJsonError('Invalid JSON: ' + err.message);
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
else if (editType === 'number') {
|
|
204
|
-
if (isNaN(Number(editValue))) {
|
|
205
|
-
setJsonError('Value must be a valid number');
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
const success = await setStorageEntry(activeDriver, editKeyName.trim(), finalVal, activeDriver === 'mmkv' ? activeMMKVId : undefined);
|
|
210
|
-
if (success) {
|
|
211
|
-
showToast(modalMode === 'create' ? `Added "${editKeyName.trim()}"` : `Updated "${editKeyName.trim()}"`);
|
|
212
|
-
setModalVisible(false);
|
|
213
|
-
loadEntries();
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
showToast('Error saving storage key');
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
const handleBeautifyJson = () => {
|
|
220
|
-
try {
|
|
221
|
-
const parsed = JSON.parse(editValue);
|
|
222
|
-
setEditValue(JSON.stringify(parsed, null, 2));
|
|
223
|
-
setJsonError(null);
|
|
224
|
-
setEditType('json');
|
|
225
|
-
showToast('Formatted JSON');
|
|
226
|
-
}
|
|
227
|
-
catch {
|
|
228
|
-
setJsonError('Cannot format: invalid JSON syntax');
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
const filteredEntries = useMemo(() => {
|
|
232
|
-
if (!search.trim())
|
|
233
|
-
return entries;
|
|
234
|
-
const tokens = search.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
235
|
-
return entries.filter(e => {
|
|
236
|
-
const corpus = `${e.key} ${e.value}`.toLowerCase();
|
|
237
|
-
return tokens.every(tok => corpus.includes(tok));
|
|
238
|
-
});
|
|
239
|
-
}, [entries, search]);
|
|
240
|
-
const totalBytes = useMemo(() => {
|
|
241
|
-
return entries.reduce((sum, e) => sum + e.byteSize, 0);
|
|
242
|
-
}, [entries]);
|
|
243
|
-
const formattedTotalSize = useMemo(() => {
|
|
244
|
-
if (totalBytes < 1024)
|
|
245
|
-
return `${totalBytes} B`;
|
|
246
|
-
if (totalBytes < 1024 * 1024)
|
|
247
|
-
return `${(totalBytes / 1024).toFixed(1)} KB`;
|
|
248
|
-
return `${(totalBytes / (1024 * 1024)).toFixed(2)} MB`;
|
|
249
|
-
}, [totalBytes]);
|
|
250
|
-
const handleCopyEntry = useCallback((entry) => {
|
|
251
|
-
copyToClipboard(entry.value, entry.key);
|
|
252
|
-
showToast(`Copied value of "${entry.key}"`);
|
|
253
|
-
}, []);
|
|
254
|
-
const renderItem = useCallback(({ item }) => (<StorageEntryCard entry={item} isExpanded={Boolean(expandedKeys[item.key])} onToggleExpand={toggleExpand} onCopy={handleCopyEntry} onEdit={handleOpenEdit} onDelete={handleDeleteKey} badge={getTypeBadge(item.type)}/>), [expandedKeys, handleCopyEntry]);
|
|
255
|
-
const isConnected = activeDriver === 'asyncStorage'
|
|
256
|
-
? isAsyncStorageConnected()
|
|
257
|
-
: isMMKVConnected();
|
|
258
|
-
return (<View style={styles.container}>
|
|
35
|
+
<B onPress={()=>E(C.key)}style={t.valuePreviewBox}>
|
|
36
|
+
<S style={t.valuePreviewText}numberOfLines={o?void 0:3}selectable={o}>
|
|
37
|
+
{O}
|
|
38
|
+
</S>
|
|
39
|
+
{C.value.length>80&&<T style={{flexDirection:"row",alignItems:"center",gap:4,marginTop:4}}>
|
|
40
|
+
<S style={t.expandHint}>
|
|
41
|
+
{o?"Collapse":"Expand"}
|
|
42
|
+
</S>
|
|
43
|
+
<Xe direction={o?"up":"down"}size={10}color={e.purple}/>
|
|
44
|
+
</T>}
|
|
45
|
+
</B>
|
|
46
|
+
</T>});export const StorageTab=ae.memo(()=>{const{t:J}=Ne(),C=We(null),[o,E]=k("asyncStorage"),[z,G]=k("default"),[v,P]=k([]),[U,O]=k(!0),[V,Y]=k(""),[ee,Be]=k({}),[ve,F]=k(!1),[N,te]=k("create"),[R,_]=k(""),[D,H]=k(""),[$,j]=k("string"),[q,I]=k(null),re=K(()=>lt(),[]),M=X(async()=>{O(!0);try{const r=await et(o,o==="mmkv"?z:void 0);P(r)}catch{P([])}finally{O(!1)}},[o,z]);Re(()=>(M(),it(M)),[M]);const we=r=>{Be(w=>({...w,[r]:!w[r]}))},ke=()=>{te("create"),_(""),H(""),j("string"),I(null),F(!0)},Ve=r=>{te("edit"),_(r.key),H(r.value),j(r.type==="json"?"json":r.type==="number"?"number":r.type==="boolean"?"boolean":"string"),I(null),F(!0)},ze=r=>{ne.alert("Delete Storage Key",`Are you sure you want to permanently delete "${r}" from ${o==="asyncStorage"?"AsyncStorage":"MMKV"}?`,[{text:"Cancel",style:"cancel"},{text:"Delete",style:"destructive",onPress:async()=>{await rt(o,r,o==="mmkv"?z:void 0)?(A(`Deleted "${r}"`),M()):A(`Failed to delete "${r}"`)}}])},Ie=()=>{ne.alert("Wipe All Storage Keys",`Are you sure you want to clear all ${v.length} keys in ${o==="asyncStorage"?"AsyncStorage":"MMKV"}? This cannot be undone.`,[{text:"Cancel",style:"cancel"},{text:"Wipe All",style:"destructive",onPress:async()=>{await ot(o,o==="mmkv"?z:void 0)&&(A("All storage keys wiped"),M())}}])},Ae=async()=>{if(!R.trim()){A("Key name cannot be empty");return}let r=D;if($==="json")try{const L=JSON.parse(D);r=JSON.stringify(L)}catch(L){I("Invalid JSON: "+L.message);return}else if($==="number"&&isNaN(Number(D))){I("Value must be a valid number");return}await tt(o,R.trim(),r,o==="mmkv"?z:void 0)?(A(N==="create"?`Added "${R.trim()}"`:`Updated "${R.trim()}"`),F(!1),M()):A("Error saving storage key")},Pe=()=>{try{const r=JSON.parse(D);H(JSON.stringify(r,null,2)),I(null),j("json"),A("Formatted JSON")}catch{I("Cannot format: invalid JSON syntax")}},Q=K(()=>{if(!V.trim())return v;const r=V.toLowerCase().trim().split(/\s+/).filter(Boolean);return v.filter(w=>{const L=`${w.key} ${w.value}`.toLowerCase();return r.every(Fe=>L.includes(Fe))})},[v,V]),W=K(()=>v.reduce((r,w)=>r+w.byteSize,0),[v]),$e=K(()=>W<1024?`${W} B`:W<1024*1024?`${(W/1024).toFixed(1)} KB`:`${(W/(1024*1024)).toFixed(2)} MB`,[W]),oe=X(r=>{st(r.value,r.key),A(`Copied value of "${r.key}"`)},[]),Me=X(({item:r})=><Tt entry={r}isExpanded={!!ee[r.key]}onToggleExpand={we}onCopy={oe}onEdit={Ve}onDelete={ze}badge={dt(r.type)}/>,[ee,oe]),xt=o==="asyncStorage"?at():nt();return<T style={t.container}>
|
|
259
47
|
|
|
260
|
-
<
|
|
261
|
-
<
|
|
262
|
-
<
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
]}>
|
|
266
|
-
<DatabaseIcon size={13} color={activeDriver === 'asyncStorage'
|
|
267
|
-
? AppColors.white
|
|
268
|
-
: AppColors.grayText}/>
|
|
269
|
-
<Text style={[
|
|
270
|
-
styles.driverTabText,
|
|
271
|
-
activeDriver === 'asyncStorage' && styles.driverTabTextActive,
|
|
272
|
-
]}>
|
|
48
|
+
<T style={t.driverTabsWrapper}>
|
|
49
|
+
<Ke horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={t.driverTabsContainer}>
|
|
50
|
+
<B onPress={()=>E("asyncStorage")}style={[t.driverTabPill,o==="asyncStorage"&&t.driverTabPillActive]}>
|
|
51
|
+
<Te size={13}color={o==="asyncStorage"?e.white:e.grayText}/>
|
|
52
|
+
<S style={[t.driverTabText,o==="asyncStorage"&&t.driverTabTextActive]}>
|
|
273
53
|
AsyncStorage
|
|
274
|
-
</
|
|
275
|
-
{
|
|
276
|
-
<
|
|
277
|
-
</
|
|
278
|
-
</
|
|
279
|
-
|
|
280
|
-
<
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
]}>
|
|
284
|
-
<LayersIcon size={13} color={activeDriver === 'mmkv'
|
|
285
|
-
? AppColors.white
|
|
286
|
-
: AppColors.grayText}/>
|
|
287
|
-
<Text style={[
|
|
288
|
-
styles.driverTabText,
|
|
289
|
-
activeDriver === 'mmkv' && styles.driverTabTextActive,
|
|
290
|
-
]}>
|
|
54
|
+
</S>
|
|
55
|
+
{o==="asyncStorage"&&v.length>0&&<T style={t.driverCountBadge}>
|
|
56
|
+
<S style={t.driverCountText}>{v.length}</S>
|
|
57
|
+
</T>}
|
|
58
|
+
</B>
|
|
59
|
+
|
|
60
|
+
<B onPress={()=>E("mmkv")}style={[t.driverTabPill,o==="mmkv"&&t.driverTabPillActive]}>
|
|
61
|
+
<_e size={13}color={o==="mmkv"?e.white:e.grayText}/>
|
|
62
|
+
<S style={[t.driverTabText,o==="mmkv"&&t.driverTabTextActive]}>
|
|
291
63
|
MMKV
|
|
292
|
-
</
|
|
293
|
-
{
|
|
294
|
-
<
|
|
295
|
-
</
|
|
296
|
-
</
|
|
64
|
+
</S>
|
|
65
|
+
{o==="mmkv"&&v.length>0&&<T style={t.driverCountBadge}>
|
|
66
|
+
<S style={t.driverCountText}>{v.length}</S>
|
|
67
|
+
</T>}
|
|
68
|
+
</B>
|
|
297
69
|
|
|
298
70
|
|
|
299
|
-
{
|
|
300
|
-
{
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
{id}
|
|
309
|
-
</Text>
|
|
310
|
-
</TouchableScale>))}
|
|
311
|
-
</View>)}
|
|
312
|
-
</ScrollView>
|
|
313
|
-
</View>
|
|
71
|
+
{o==="mmkv"&&re.length>1&&<T style={{flexDirection:"row",alignItems:"center",gap:4,marginLeft:6}}>
|
|
72
|
+
{re.map(r=><B key={r}onPress={()=>G(r)}style={[t.instancePill,z===r&&t.instancePillActive]}>
|
|
73
|
+
<S style={[t.instancePillText,z===r&&t.instancePillTextActive]}>
|
|
74
|
+
{r}
|
|
75
|
+
</S>
|
|
76
|
+
</B>)}
|
|
77
|
+
</T>}
|
|
78
|
+
</Ke>
|
|
79
|
+
</T>
|
|
314
80
|
|
|
315
81
|
|
|
316
|
-
<
|
|
317
|
-
<
|
|
318
|
-
<
|
|
319
|
-
<
|
|
320
|
-
{
|
|
321
|
-
<
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
<
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}}>
|
|
332
|
-
{filteredEntries.length}
|
|
333
|
-
</Text>
|
|
334
|
-
</View>
|
|
335
|
-
<TouchableScale onPress={() => setSearch('')} hitSlop={8}>
|
|
336
|
-
<ClearIcon size={13} color={AppColors.grayTextWeak}/>
|
|
337
|
-
</TouchableScale>
|
|
338
|
-
</View>)}
|
|
339
|
-
</View>
|
|
82
|
+
<T style={t.actionBar}>
|
|
83
|
+
<T style={t.searchBar}>
|
|
84
|
+
<He size={14}color={e.grayTextWeak}/>
|
|
85
|
+
<Z value={V}onChangeText={Y}placeholder={`Search ${v.length} keys & values...`}placeholderTextColor={e.grayTextWeak}style={t.searchInput}clearButtonMode="while-editing"/>
|
|
86
|
+
{V.length>0&&<T style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
87
|
+
<T style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
88
|
+
<S style={{color:e.purple,fontSize:9.5,fontFamily:x.interBold}}>
|
|
89
|
+
{Q.length}
|
|
90
|
+
</S>
|
|
91
|
+
</T>
|
|
92
|
+
<B onPress={()=>Y("")}hitSlop={8}>
|
|
93
|
+
<Se size={13}color={e.grayTextWeak}/>
|
|
94
|
+
</B>
|
|
95
|
+
</T>}
|
|
96
|
+
</T>
|
|
340
97
|
|
|
341
98
|
|
|
342
|
-
<
|
|
343
|
-
<
|
|
344
|
-
<
|
|
345
|
-
</
|
|
99
|
+
<B onPress={ke}style={t.addKeyBtn}hitSlop={6}>
|
|
100
|
+
<Je size={13}color={e.white}/>
|
|
101
|
+
<S style={t.addKeyBtnText}>Add</S>
|
|
102
|
+
</B>
|
|
346
103
|
|
|
347
|
-
<
|
|
348
|
-
<
|
|
349
|
-
</
|
|
104
|
+
<B onPress={M}style={t.actionIconBtn}hitSlop={6}>
|
|
105
|
+
<Qe size={13}color={e.grayText}/>
|
|
106
|
+
</B>
|
|
350
107
|
|
|
351
|
-
{
|
|
352
|
-
<
|
|
353
|
-
</
|
|
354
|
-
</
|
|
108
|
+
{v.length>0&&<B onPress={Ie}style={[t.actionIconBtn,{borderColor:`${e.errorColor}33`,backgroundColor:`${e.errorColor}12`}]}hitSlop={6}>
|
|
109
|
+
<Ce size={13}color={e.errorColor}/>
|
|
110
|
+
</B>}
|
|
111
|
+
</T>
|
|
355
112
|
|
|
356
113
|
|
|
357
|
-
<
|
|
358
|
-
<
|
|
359
|
-
{
|
|
360
|
-
</
|
|
361
|
-
<
|
|
362
|
-
{
|
|
363
|
-
</
|
|
364
|
-
</
|
|
114
|
+
<T style={t.statsStrip}>
|
|
115
|
+
<S style={t.statsText}>
|
|
116
|
+
{Q.length} of {v.length} Keys • {$e}
|
|
117
|
+
</S>
|
|
118
|
+
<S style={t.statsSubtext}>
|
|
119
|
+
{o==="asyncStorage"?"SQLite Key-Value":`MMKV (${z})`}
|
|
120
|
+
</S>
|
|
121
|
+
</T>
|
|
365
122
|
|
|
366
123
|
|
|
367
|
-
{
|
|
368
|
-
<
|
|
369
|
-
<
|
|
370
|
-
</
|
|
371
|
-
<
|
|
372
|
-
<
|
|
373
|
-
<
|
|
374
|
-
</
|
|
375
|
-
<
|
|
376
|
-
{
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
: `Storage is auto-detected. Tap "+ Add" above to create your first ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'} key!`}
|
|
384
|
-
</Text>
|
|
385
|
-
{search.trim().length > 0 && (<TouchableScale onPress={() => setSearch('')} style={{
|
|
386
|
-
marginTop: 12,
|
|
387
|
-
paddingHorizontal: 14,
|
|
388
|
-
paddingVertical: 6,
|
|
389
|
-
borderRadius: 8,
|
|
390
|
-
backgroundColor: AppColors.grayBackground,
|
|
391
|
-
borderWidth: 1,
|
|
392
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
393
|
-
}}>
|
|
394
|
-
<Text style={{ color: AppColors.brandPurple, fontSize: 12, fontFamily: AppFonts.interBold }}>
|
|
124
|
+
{U?<T style={t.loadingContainer}>
|
|
125
|
+
<Oe size="small"color={e.purple}/>
|
|
126
|
+
<S style={t.loadingText}>Loading storage entries...</S>
|
|
127
|
+
</T>:<>
|
|
128
|
+
<De ref={C}data={Q}keyExtractor={r=>r.key}renderItem={Me}initialNumToRender={10}maxToRenderPerBatch={10}windowSize={5}removeClippedSubviews={le.OS==="android"}style={t.scrollArea}contentContainerStyle={t.scrollContent}showsVerticalScrollIndicator={!1}ListEmptyComponent={<T style={t.emptyContainer}>
|
|
129
|
+
<T style={t.emptyIconWrap}>
|
|
130
|
+
<Te size={28}color={e.grayTextWeak}/>
|
|
131
|
+
</T>
|
|
132
|
+
<S style={t.emptyTitle}>
|
|
133
|
+
{V.trim().length>0?"No matching keys found":`No ${o==="asyncStorage"?"AsyncStorage":"MMKV"} Keys`}
|
|
134
|
+
</S>
|
|
135
|
+
<S style={t.emptySubtitle}>
|
|
136
|
+
{V.trim().length>0?`No keys or values match "${V}"`:`Storage is auto-detected. Tap "+ Add" above to create your first ${o==="asyncStorage"?"AsyncStorage":"MMKV"} key!`}
|
|
137
|
+
</S>
|
|
138
|
+
{V.trim().length>0&&<B onPress={()=>Y("")}style={{marginTop:12,paddingHorizontal:14,paddingVertical:6,borderRadius:8,backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary}}>
|
|
139
|
+
<S style={{color:e.brandPurple,fontSize:12,fontFamily:x.interBold}}>
|
|
395
140
|
Clear Search
|
|
396
|
-
</
|
|
397
|
-
</
|
|
398
|
-
</
|
|
399
|
-
</>
|
|
141
|
+
</S>
|
|
142
|
+
</B>}
|
|
143
|
+
</T>}ListFooterComponent={<T style={{height:60}}/>}/>
|
|
144
|
+
</>}
|
|
400
145
|
|
|
401
146
|
|
|
402
|
-
<
|
|
403
|
-
<
|
|
404
|
-
<
|
|
405
|
-
<
|
|
406
|
-
<
|
|
407
|
-
{
|
|
408
|
-
</
|
|
409
|
-
<
|
|
410
|
-
<
|
|
411
|
-
</
|
|
412
|
-
</
|
|
147
|
+
<Le visible={ve}transparent animationType="fade"onRequestClose={()=>F(!1)}>
|
|
148
|
+
<T style={t.modalOverlay}>
|
|
149
|
+
<T style={t.modalCard}>
|
|
150
|
+
<T style={t.modalHeader}>
|
|
151
|
+
<S style={t.modalTitle}>
|
|
152
|
+
{N==="create"?"Add Storage Key":`Edit: ${R}`}
|
|
153
|
+
</S>
|
|
154
|
+
<B onPress={()=>F(!1)}hitSlop={8}>
|
|
155
|
+
<Se size={16}color={e.grayText}/>
|
|
156
|
+
</B>
|
|
157
|
+
</T>
|
|
413
158
|
|
|
414
159
|
|
|
415
|
-
<
|
|
416
|
-
<
|
|
417
|
-
<
|
|
418
|
-
|
|
419
|
-
modalMode === 'edit' && styles.textInputDisabled,
|
|
420
|
-
]} autoCapitalize="none"/>
|
|
421
|
-
</View>
|
|
160
|
+
<T style={t.inputGroup}>
|
|
161
|
+
<S style={t.inputLabel}>KEY NAME</S>
|
|
162
|
+
<Z value={R}onChangeText={_}placeholder="e.g. user_session, auth_token"placeholderTextColor={e.grayTextWeak}editable={N==="create"}style={[t.textInput,N==="edit"&&t.textInputDisabled]}autoCapitalize="none"/>
|
|
163
|
+
</T>
|
|
422
164
|
|
|
423
165
|
|
|
424
|
-
<
|
|
425
|
-
<
|
|
426
|
-
<
|
|
427
|
-
{
|
|
428
|
-
<
|
|
429
|
-
</
|
|
430
|
-
</
|
|
431
|
-
<
|
|
432
|
-
{[
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
isSel && styles.typePillActive,
|
|
440
|
-
]}>
|
|
441
|
-
<Text style={[
|
|
442
|
-
styles.typePillText,
|
|
443
|
-
isSel && styles.typePillTextActive,
|
|
444
|
-
]}>
|
|
445
|
-
{t.toUpperCase()}
|
|
446
|
-
</Text>
|
|
447
|
-
</TouchableScale>);
|
|
448
|
-
})}
|
|
449
|
-
</View>
|
|
450
|
-
</View>
|
|
166
|
+
<T style={t.inputGroup}>
|
|
167
|
+
<T style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4}}>
|
|
168
|
+
<S style={t.inputLabel}>VALUE TYPE</S>
|
|
169
|
+
{$==="json"&&<B onPress={Pe}hitSlop={6}>
|
|
170
|
+
<S style={t.formatJsonBtn}>Beautify JSON</S>
|
|
171
|
+
</B>}
|
|
172
|
+
</T>
|
|
173
|
+
<T style={t.typeSelectorStrip}>
|
|
174
|
+
{["string","json","number","boolean"].map(r=>{const w=$===r;return<B key={r}onPress={()=>{j(r),I(null)}}style={[t.typePill,w&&t.typePillActive]}>
|
|
175
|
+
<S style={[t.typePillText,w&&t.typePillTextActive]}>
|
|
176
|
+
{r.toUpperCase()}
|
|
177
|
+
</S>
|
|
178
|
+
</B>})}
|
|
179
|
+
</T>
|
|
180
|
+
</T>
|
|
451
181
|
|
|
452
182
|
|
|
453
|
-
<
|
|
454
|
-
<
|
|
455
|
-
<
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
: editType === 'number'
|
|
462
|
-
? '42'
|
|
463
|
-
: editType === 'boolean'
|
|
464
|
-
? 'true'
|
|
465
|
-
: 'String value...'} placeholderTextColor={AppColors.grayTextWeak} style={[styles.textInput, styles.textAreaInput]} multiline textAlignVertical="top" autoCapitalize="none"/>
|
|
466
|
-
{jsonError && (<View style={{ flexDirection: 'row', alignItems: 'center', gap: 5, marginTop: 4 }}>
|
|
467
|
-
<WarningTriangleIcon size={12} color={AppColors.errorColor}/>
|
|
468
|
-
<Text style={styles.errorText}>{jsonError}</Text>
|
|
469
|
-
</View>)}
|
|
470
|
-
</View>
|
|
183
|
+
<T style={t.inputGroup}>
|
|
184
|
+
<S style={t.inputLabel}>VALUE CONTENT</S>
|
|
185
|
+
<Z value={D}onChangeText={r=>{H(r),q&&I(null)}}placeholder={$==="json"?'{"userId": 123, "isLoggedIn": true}':$==="number"?"42":$==="boolean"?"true":"String value..."}placeholderTextColor={e.grayTextWeak}style={[t.textInput,t.textAreaInput]}multiline textAlignVertical="top"autoCapitalize="none"/>
|
|
186
|
+
{q&&<T style={{flexDirection:"row",alignItems:"center",gap:5,marginTop:4}}>
|
|
187
|
+
<Ze size={12}color={e.errorColor}/>
|
|
188
|
+
<S style={t.errorText}>{q}</S>
|
|
189
|
+
</T>}
|
|
190
|
+
</T>
|
|
471
191
|
|
|
472
192
|
|
|
473
|
-
<
|
|
474
|
-
<
|
|
475
|
-
<
|
|
476
|
-
</
|
|
477
|
-
<
|
|
478
|
-
<
|
|
479
|
-
<
|
|
480
|
-
</
|
|
481
|
-
</
|
|
482
|
-
</
|
|
483
|
-
</
|
|
484
|
-
</
|
|
485
|
-
</
|
|
486
|
-
});
|
|
487
|
-
const styles = StyleSheet.create({
|
|
488
|
-
container: {
|
|
489
|
-
flex: 1,
|
|
490
|
-
backgroundColor: AppColors.grayBackground,
|
|
491
|
-
},
|
|
492
|
-
driverTabsWrapper: {
|
|
493
|
-
backgroundColor: AppColors.primaryLight,
|
|
494
|
-
borderBottomWidth: 1,
|
|
495
|
-
borderBottomColor: AppColors.dividerColor,
|
|
496
|
-
paddingVertical: 8,
|
|
497
|
-
},
|
|
498
|
-
driverTabsContainer: {
|
|
499
|
-
paddingHorizontal: 12,
|
|
500
|
-
flexDirection: 'row',
|
|
501
|
-
alignItems: 'center',
|
|
502
|
-
gap: 6,
|
|
503
|
-
},
|
|
504
|
-
driverTabPill: {
|
|
505
|
-
flexDirection: 'row',
|
|
506
|
-
alignItems: 'center',
|
|
507
|
-
gap: 6,
|
|
508
|
-
paddingHorizontal: 11,
|
|
509
|
-
paddingVertical: 6,
|
|
510
|
-
borderRadius: 8,
|
|
511
|
-
backgroundColor: AppColors.grayBackground,
|
|
512
|
-
borderWidth: 1,
|
|
513
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
514
|
-
},
|
|
515
|
-
driverTabPillActive: {
|
|
516
|
-
backgroundColor: AppColors.purple,
|
|
517
|
-
borderColor: AppColors.purple,
|
|
518
|
-
},
|
|
519
|
-
driverTabText: {
|
|
520
|
-
fontFamily: AppFonts.interBold,
|
|
521
|
-
fontSize: 11.5,
|
|
522
|
-
color: AppColors.grayText,
|
|
523
|
-
},
|
|
524
|
-
driverTabTextActive: {
|
|
525
|
-
color: AppColors.white,
|
|
526
|
-
},
|
|
527
|
-
driverCountBadge: {
|
|
528
|
-
backgroundColor: 'rgba(255, 255, 255, 0.25)',
|
|
529
|
-
paddingHorizontal: 5,
|
|
530
|
-
paddingVertical: 1,
|
|
531
|
-
borderRadius: 6,
|
|
532
|
-
},
|
|
533
|
-
driverCountText: {
|
|
534
|
-
fontFamily: AppFonts.interBold,
|
|
535
|
-
fontSize: 9,
|
|
536
|
-
color: AppColors.white,
|
|
537
|
-
},
|
|
538
|
-
instancePill: {
|
|
539
|
-
paddingHorizontal: 7,
|
|
540
|
-
paddingVertical: 3,
|
|
541
|
-
borderRadius: 6,
|
|
542
|
-
backgroundColor: `${AppColors.purple}14`,
|
|
543
|
-
borderWidth: 1,
|
|
544
|
-
borderColor: `${AppColors.purple}30`,
|
|
545
|
-
},
|
|
546
|
-
instancePillActive: {
|
|
547
|
-
backgroundColor: AppColors.purple,
|
|
548
|
-
borderColor: AppColors.purple,
|
|
549
|
-
},
|
|
550
|
-
instancePillText: {
|
|
551
|
-
fontFamily: AppFonts.interBold,
|
|
552
|
-
fontSize: 10,
|
|
553
|
-
color: AppColors.purple,
|
|
554
|
-
},
|
|
555
|
-
instancePillTextActive: {
|
|
556
|
-
color: AppColors.white,
|
|
557
|
-
},
|
|
558
|
-
actionBar: {
|
|
559
|
-
flexDirection: 'row',
|
|
560
|
-
alignItems: 'center',
|
|
561
|
-
paddingHorizontal: 12,
|
|
562
|
-
paddingVertical: 8,
|
|
563
|
-
backgroundColor: AppColors.primaryLight,
|
|
564
|
-
borderBottomWidth: 1,
|
|
565
|
-
borderBottomColor: AppColors.dividerColor,
|
|
566
|
-
gap: 6,
|
|
567
|
-
},
|
|
568
|
-
searchBar: {
|
|
569
|
-
flex: 1,
|
|
570
|
-
flexDirection: 'row',
|
|
571
|
-
alignItems: 'center',
|
|
572
|
-
backgroundColor: AppColors.grayBackground,
|
|
573
|
-
borderRadius: 8,
|
|
574
|
-
paddingHorizontal: 9,
|
|
575
|
-
paddingVertical: Platform.OS === 'ios' ? 6 : 2,
|
|
576
|
-
borderWidth: 1,
|
|
577
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
578
|
-
gap: 6,
|
|
579
|
-
},
|
|
580
|
-
searchInput: {
|
|
581
|
-
flex: 1,
|
|
582
|
-
fontFamily: AppFonts.interMedium,
|
|
583
|
-
fontSize: 12,
|
|
584
|
-
color: AppColors.primaryBlack,
|
|
585
|
-
padding: 0,
|
|
586
|
-
},
|
|
587
|
-
addKeyBtn: {
|
|
588
|
-
flexDirection: 'row',
|
|
589
|
-
alignItems: 'center',
|
|
590
|
-
gap: 4,
|
|
591
|
-
paddingHorizontal: 10,
|
|
592
|
-
paddingVertical: 6,
|
|
593
|
-
borderRadius: 8,
|
|
594
|
-
backgroundColor: AppColors.purple,
|
|
595
|
-
},
|
|
596
|
-
addKeyBtnText: {
|
|
597
|
-
fontFamily: AppFonts.interBold,
|
|
598
|
-
fontSize: 11,
|
|
599
|
-
color: AppColors.white,
|
|
600
|
-
},
|
|
601
|
-
actionIconBtn: {
|
|
602
|
-
width: 30,
|
|
603
|
-
height: 30,
|
|
604
|
-
borderRadius: 8,
|
|
605
|
-
alignItems: 'center',
|
|
606
|
-
justifyContent: 'center',
|
|
607
|
-
backgroundColor: AppColors.grayBackground,
|
|
608
|
-
borderWidth: 1,
|
|
609
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
610
|
-
},
|
|
611
|
-
statsStrip: {
|
|
612
|
-
flexDirection: 'row',
|
|
613
|
-
alignItems: 'center',
|
|
614
|
-
justifyContent: 'space-between',
|
|
615
|
-
paddingHorizontal: 12,
|
|
616
|
-
paddingVertical: 5,
|
|
617
|
-
backgroundColor: `${AppColors.grayBorderSecondary}40`,
|
|
618
|
-
},
|
|
619
|
-
statsText: {
|
|
620
|
-
fontFamily: AppFonts.interMedium,
|
|
621
|
-
fontSize: 10,
|
|
622
|
-
color: AppColors.grayText,
|
|
623
|
-
},
|
|
624
|
-
statsSubtext: {
|
|
625
|
-
fontFamily: AppFonts.interBold,
|
|
626
|
-
fontSize: 9.5,
|
|
627
|
-
color: AppColors.grayTextWeak,
|
|
628
|
-
},
|
|
629
|
-
scrollArea: {
|
|
630
|
-
flex: 1,
|
|
631
|
-
},
|
|
632
|
-
scrollContent: {
|
|
633
|
-
padding: 12,
|
|
634
|
-
gap: 10,
|
|
635
|
-
paddingBottom: 100,
|
|
636
|
-
},
|
|
637
|
-
entryCard: {
|
|
638
|
-
backgroundColor: AppColors.primaryLight,
|
|
639
|
-
borderRadius: 10,
|
|
640
|
-
borderWidth: 1,
|
|
641
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
642
|
-
padding: 10,
|
|
643
|
-
gap: 8,
|
|
644
|
-
shadowColor: AppColors.black,
|
|
645
|
-
shadowOpacity: 0.02,
|
|
646
|
-
shadowRadius: 3,
|
|
647
|
-
shadowOffset: { width: 0, height: 1 },
|
|
648
|
-
elevation: 1,
|
|
649
|
-
},
|
|
650
|
-
entryHeader: {
|
|
651
|
-
flexDirection: 'row',
|
|
652
|
-
alignItems: 'center',
|
|
653
|
-
justifyContent: 'space-between',
|
|
654
|
-
},
|
|
655
|
-
entryKey: {
|
|
656
|
-
fontFamily: AppFonts.interBold,
|
|
657
|
-
fontSize: 12.5,
|
|
658
|
-
color: AppColors.primaryBlack,
|
|
659
|
-
},
|
|
660
|
-
typeBadge: {
|
|
661
|
-
paddingHorizontal: 5,
|
|
662
|
-
paddingVertical: 1,
|
|
663
|
-
borderRadius: 4,
|
|
664
|
-
borderWidth: 1,
|
|
665
|
-
},
|
|
666
|
-
typeBadgeText: {
|
|
667
|
-
fontFamily: AppFonts.interBold,
|
|
668
|
-
fontSize: 8.5,
|
|
669
|
-
},
|
|
670
|
-
sizeText: {
|
|
671
|
-
fontFamily: AppFonts.interRegular,
|
|
672
|
-
fontSize: 10,
|
|
673
|
-
color: AppColors.grayTextWeak,
|
|
674
|
-
},
|
|
675
|
-
entryActions: {
|
|
676
|
-
flexDirection: 'row',
|
|
677
|
-
alignItems: 'center',
|
|
678
|
-
gap: 5,
|
|
679
|
-
},
|
|
680
|
-
entryActionBtn: {
|
|
681
|
-
padding: 5,
|
|
682
|
-
borderRadius: 5,
|
|
683
|
-
backgroundColor: AppColors.grayBackground,
|
|
684
|
-
},
|
|
685
|
-
valuePreviewBox: {
|
|
686
|
-
backgroundColor: AppColors.grayBackground,
|
|
687
|
-
borderRadius: 6,
|
|
688
|
-
padding: 8,
|
|
689
|
-
borderWidth: 1,
|
|
690
|
-
borderColor: `${AppColors.grayBorderSecondary}80`,
|
|
691
|
-
},
|
|
692
|
-
valuePreviewText: {
|
|
693
|
-
fontFamily: AppFonts.interRegular,
|
|
694
|
-
fontSize: 11,
|
|
695
|
-
color: AppColors.primaryBlack,
|
|
696
|
-
lineHeight: 16,
|
|
697
|
-
},
|
|
698
|
-
expandHint: {
|
|
699
|
-
fontFamily: AppFonts.interBold,
|
|
700
|
-
fontSize: 9.5,
|
|
701
|
-
color: AppColors.purple,
|
|
702
|
-
marginTop: 4,
|
|
703
|
-
},
|
|
704
|
-
loadingContainer: {
|
|
705
|
-
flex: 1,
|
|
706
|
-
alignItems: 'center',
|
|
707
|
-
justifyContent: 'center',
|
|
708
|
-
gap: 8,
|
|
709
|
-
},
|
|
710
|
-
loadingText: {
|
|
711
|
-
fontFamily: AppFonts.interMedium,
|
|
712
|
-
fontSize: 12,
|
|
713
|
-
color: AppColors.grayText,
|
|
714
|
-
},
|
|
715
|
-
emptyContainer: {
|
|
716
|
-
padding: 24,
|
|
717
|
-
alignItems: 'center',
|
|
718
|
-
justifyContent: 'center',
|
|
719
|
-
},
|
|
720
|
-
emptyIconWrap: {
|
|
721
|
-
width: 56,
|
|
722
|
-
height: 56,
|
|
723
|
-
borderRadius: 28,
|
|
724
|
-
backgroundColor: `${AppColors.grayBorderSecondary}40`,
|
|
725
|
-
alignItems: 'center',
|
|
726
|
-
justifyContent: 'center',
|
|
727
|
-
marginBottom: 12,
|
|
728
|
-
},
|
|
729
|
-
emptyTitle: {
|
|
730
|
-
fontFamily: AppFonts.interBold,
|
|
731
|
-
fontSize: 14,
|
|
732
|
-
color: AppColors.primaryBlack,
|
|
733
|
-
marginBottom: 4,
|
|
734
|
-
},
|
|
735
|
-
emptySubtitle: {
|
|
736
|
-
fontFamily: AppFonts.interRegular,
|
|
737
|
-
fontSize: 11.5,
|
|
738
|
-
color: AppColors.grayText,
|
|
739
|
-
textAlign: 'center',
|
|
740
|
-
maxWidth: 280,
|
|
741
|
-
},
|
|
742
|
-
connectGuideCard: {
|
|
743
|
-
marginTop: 20,
|
|
744
|
-
width: '100%',
|
|
745
|
-
backgroundColor: AppColors.primaryLight,
|
|
746
|
-
borderRadius: 10,
|
|
747
|
-
borderWidth: 1,
|
|
748
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
749
|
-
padding: 12,
|
|
750
|
-
gap: 6,
|
|
751
|
-
},
|
|
752
|
-
connectGuideTitle: {
|
|
753
|
-
fontFamily: AppFonts.interBold,
|
|
754
|
-
fontSize: 11,
|
|
755
|
-
color: AppColors.purple,
|
|
756
|
-
},
|
|
757
|
-
connectGuideCode: {
|
|
758
|
-
fontFamily: AppFonts.interRegular,
|
|
759
|
-
fontSize: 10,
|
|
760
|
-
color: AppColors.grayText,
|
|
761
|
-
lineHeight: 15,
|
|
762
|
-
},
|
|
763
|
-
modalOverlay: {
|
|
764
|
-
flex: 1,
|
|
765
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
766
|
-
justifyContent: 'center',
|
|
767
|
-
alignItems: 'center',
|
|
768
|
-
padding: 16,
|
|
769
|
-
},
|
|
770
|
-
modalCard: {
|
|
771
|
-
width: '100%',
|
|
772
|
-
maxWidth: 400,
|
|
773
|
-
backgroundColor: AppColors.primaryLight,
|
|
774
|
-
borderRadius: 14,
|
|
775
|
-
padding: 16,
|
|
776
|
-
gap: 12,
|
|
777
|
-
shadowColor: AppColors.black,
|
|
778
|
-
shadowOpacity: 0.2,
|
|
779
|
-
shadowRadius: 10,
|
|
780
|
-
shadowOffset: { width: 0, height: 4 },
|
|
781
|
-
elevation: 5,
|
|
782
|
-
},
|
|
783
|
-
modalHeader: {
|
|
784
|
-
flexDirection: 'row',
|
|
785
|
-
alignItems: 'center',
|
|
786
|
-
justifyContent: 'space-between',
|
|
787
|
-
borderBottomWidth: 1,
|
|
788
|
-
borderBottomColor: AppColors.dividerColor,
|
|
789
|
-
paddingBottom: 10,
|
|
790
|
-
},
|
|
791
|
-
modalTitle: {
|
|
792
|
-
fontFamily: AppFonts.interBold,
|
|
793
|
-
fontSize: 14,
|
|
794
|
-
color: AppColors.primaryBlack,
|
|
795
|
-
},
|
|
796
|
-
inputGroup: {
|
|
797
|
-
gap: 4,
|
|
798
|
-
},
|
|
799
|
-
inputLabel: {
|
|
800
|
-
fontFamily: AppFonts.interBold,
|
|
801
|
-
fontSize: 9.5,
|
|
802
|
-
color: AppColors.grayTextWeak,
|
|
803
|
-
letterSpacing: 0.5,
|
|
804
|
-
},
|
|
805
|
-
textInput: {
|
|
806
|
-
backgroundColor: AppColors.grayBackground,
|
|
807
|
-
borderRadius: 8,
|
|
808
|
-
paddingHorizontal: 10,
|
|
809
|
-
paddingVertical: 8,
|
|
810
|
-
fontFamily: AppFonts.interMedium,
|
|
811
|
-
fontSize: 12,
|
|
812
|
-
color: AppColors.primaryBlack,
|
|
813
|
-
borderWidth: 1,
|
|
814
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
815
|
-
},
|
|
816
|
-
textInputDisabled: {
|
|
817
|
-
backgroundColor: `${AppColors.grayBorderSecondary}40`,
|
|
818
|
-
color: AppColors.grayText,
|
|
819
|
-
},
|
|
820
|
-
textAreaInput: {
|
|
821
|
-
minHeight: 90,
|
|
822
|
-
maxHeight: 160,
|
|
823
|
-
fontFamily: AppFonts.interRegular,
|
|
824
|
-
fontSize: 11,
|
|
825
|
-
},
|
|
826
|
-
typeSelectorStrip: {
|
|
827
|
-
flexDirection: 'row',
|
|
828
|
-
alignItems: 'center',
|
|
829
|
-
gap: 6,
|
|
830
|
-
},
|
|
831
|
-
typePill: {
|
|
832
|
-
flex: 1,
|
|
833
|
-
alignItems: 'center',
|
|
834
|
-
paddingVertical: 6,
|
|
835
|
-
borderRadius: 6,
|
|
836
|
-
backgroundColor: AppColors.grayBackground,
|
|
837
|
-
borderWidth: 1,
|
|
838
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
839
|
-
},
|
|
840
|
-
typePillActive: {
|
|
841
|
-
backgroundColor: AppColors.purple,
|
|
842
|
-
borderColor: AppColors.purple,
|
|
843
|
-
},
|
|
844
|
-
typePillText: {
|
|
845
|
-
fontFamily: AppFonts.interBold,
|
|
846
|
-
fontSize: 10,
|
|
847
|
-
color: AppColors.grayText,
|
|
848
|
-
},
|
|
849
|
-
typePillTextActive: {
|
|
850
|
-
color: AppColors.white,
|
|
851
|
-
},
|
|
852
|
-
formatJsonBtn: {
|
|
853
|
-
fontFamily: AppFonts.interBold,
|
|
854
|
-
fontSize: 10,
|
|
855
|
-
color: AppColors.purple,
|
|
856
|
-
},
|
|
857
|
-
errorText: {
|
|
858
|
-
fontFamily: AppFonts.interMedium,
|
|
859
|
-
fontSize: 10,
|
|
860
|
-
color: AppColors.errorColor,
|
|
861
|
-
marginTop: 2,
|
|
862
|
-
},
|
|
863
|
-
modalActions: {
|
|
864
|
-
flexDirection: 'row',
|
|
865
|
-
alignItems: 'center',
|
|
866
|
-
gap: 10,
|
|
867
|
-
marginTop: 4,
|
|
868
|
-
},
|
|
869
|
-
cancelBtn: {
|
|
870
|
-
flex: 1,
|
|
871
|
-
alignItems: 'center',
|
|
872
|
-
paddingVertical: 10,
|
|
873
|
-
borderRadius: 8,
|
|
874
|
-
backgroundColor: AppColors.grayBackground,
|
|
875
|
-
borderWidth: 1,
|
|
876
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
877
|
-
},
|
|
878
|
-
cancelBtnText: {
|
|
879
|
-
fontFamily: AppFonts.interBold,
|
|
880
|
-
fontSize: 12,
|
|
881
|
-
color: AppColors.grayText,
|
|
882
|
-
},
|
|
883
|
-
saveBtn: {
|
|
884
|
-
flex: 1.5,
|
|
885
|
-
flexDirection: 'row',
|
|
886
|
-
alignItems: 'center',
|
|
887
|
-
justifyContent: 'center',
|
|
888
|
-
gap: 5,
|
|
889
|
-
paddingVertical: 10,
|
|
890
|
-
borderRadius: 8,
|
|
891
|
-
backgroundColor: AppColors.purple,
|
|
892
|
-
},
|
|
893
|
-
saveBtnText: {
|
|
894
|
-
fontFamily: AppFonts.interBold,
|
|
895
|
-
fontSize: 12,
|
|
896
|
-
color: AppColors.white,
|
|
897
|
-
},
|
|
898
|
-
});
|
|
899
|
-
export default StorageTab;
|
|
193
|
+
<T style={t.modalActions}>
|
|
194
|
+
<B onPress={()=>F(!1)}style={t.cancelBtn}>
|
|
195
|
+
<S style={t.cancelBtnText}>Cancel</S>
|
|
196
|
+
</B>
|
|
197
|
+
<B onPress={Ae}style={t.saveBtn}>
|
|
198
|
+
<Ye size={14}color={e.white}/>
|
|
199
|
+
<S style={t.saveBtnText}>Save Key</S>
|
|
200
|
+
</B>
|
|
201
|
+
</T>
|
|
202
|
+
</T>
|
|
203
|
+
</T>
|
|
204
|
+
</Le>
|
|
205
|
+
</T>});const t=Ee.create({container:{flex:1,backgroundColor:e.grayBackground},driverTabsWrapper:{backgroundColor:e.primaryLight,borderBottomWidth:1,borderBottomColor:e.dividerColor,paddingVertical:8},driverTabsContainer:{paddingHorizontal:12,flexDirection:"row",alignItems:"center",gap:6},driverTabPill:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:11,paddingVertical:6,borderRadius:8,backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary},driverTabPillActive:{backgroundColor:e.purple,borderColor:e.purple},driverTabText:{fontFamily:x.interBold,fontSize:11.5,color:e.grayText},driverTabTextActive:{color:e.white},driverCountBadge:{backgroundColor:"rgba(255, 255, 255, 0.25)",paddingHorizontal:5,paddingVertical:1,borderRadius:6},driverCountText:{fontFamily:x.interBold,fontSize:9,color:e.white},instancePill:{paddingHorizontal:7,paddingVertical:3,borderRadius:6,backgroundColor:`${e.purple}14`,borderWidth:1,borderColor:`${e.purple}30`},instancePillActive:{backgroundColor:e.purple,borderColor:e.purple},instancePillText:{fontFamily:x.interBold,fontSize:10,color:e.purple},instancePillTextActive:{color:e.white},actionBar:{flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:8,backgroundColor:e.primaryLight,borderBottomWidth:1,borderBottomColor:e.dividerColor,gap:6},searchBar:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:e.grayBackground,borderRadius:8,paddingHorizontal:9,paddingVertical:le.OS==="ios"?6:2,borderWidth:1,borderColor:e.grayBorderSecondary,gap:6},searchInput:{flex:1,fontFamily:x.interMedium,fontSize:12,color:e.primaryBlack,padding:0},addKeyBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:10,paddingVertical:6,borderRadius:8,backgroundColor:e.purple},addKeyBtnText:{fontFamily:x.interBold,fontSize:11,color:e.white},actionIconBtn:{width:30,height:30,borderRadius:8,alignItems:"center",justifyContent:"center",backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary},statsStrip:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:5,backgroundColor:`${e.grayBorderSecondary}40`},statsText:{fontFamily:x.interMedium,fontSize:10,color:e.grayText},statsSubtext:{fontFamily:x.interBold,fontSize:9.5,color:e.grayTextWeak},scrollArea:{flex:1},scrollContent:{padding:12,gap:10,paddingBottom:100},entryCard:{backgroundColor:e.primaryLight,borderRadius:10,borderWidth:1,borderColor:e.grayBorderSecondary,padding:10,gap:8,shadowColor:e.black,shadowOpacity:.02,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1},entryHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},entryKey:{fontFamily:x.interBold,fontSize:12.5,color:e.primaryBlack},typeBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:4,borderWidth:1},typeBadgeText:{fontFamily:x.interBold,fontSize:8.5},sizeText:{fontFamily:x.interRegular,fontSize:10,color:e.grayTextWeak},entryActions:{flexDirection:"row",alignItems:"center",gap:5},entryActionBtn:{padding:5,borderRadius:5,backgroundColor:e.grayBackground},valuePreviewBox:{backgroundColor:e.grayBackground,borderRadius:6,padding:8,borderWidth:1,borderColor:`${e.grayBorderSecondary}80`},valuePreviewText:{fontFamily:x.interRegular,fontSize:11,color:e.primaryBlack,lineHeight:16},expandHint:{fontFamily:x.interBold,fontSize:9.5,color:e.purple,marginTop:4},loadingContainer:{flex:1,alignItems:"center",justifyContent:"center",gap:8},loadingText:{fontFamily:x.interMedium,fontSize:12,color:e.grayText},emptyContainer:{padding:24,alignItems:"center",justifyContent:"center"},emptyIconWrap:{width:56,height:56,borderRadius:28,backgroundColor:`${e.grayBorderSecondary}40`,alignItems:"center",justifyContent:"center",marginBottom:12},emptyTitle:{fontFamily:x.interBold,fontSize:14,color:e.primaryBlack,marginBottom:4},emptySubtitle:{fontFamily:x.interRegular,fontSize:11.5,color:e.grayText,textAlign:"center",maxWidth:280},connectGuideCard:{marginTop:20,width:"100%",backgroundColor:e.primaryLight,borderRadius:10,borderWidth:1,borderColor:e.grayBorderSecondary,padding:12,gap:6},connectGuideTitle:{fontFamily:x.interBold,fontSize:11,color:e.purple},connectGuideCode:{fontFamily:x.interRegular,fontSize:10,color:e.grayText,lineHeight:15},modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:16},modalCard:{width:"100%",maxWidth:400,backgroundColor:e.primaryLight,borderRadius:14,padding:16,gap:12,shadowColor:e.black,shadowOpacity:.2,shadowRadius:10,shadowOffset:{width:0,height:4},elevation:5},modalHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottomWidth:1,borderBottomColor:e.dividerColor,paddingBottom:10},modalTitle:{fontFamily:x.interBold,fontSize:14,color:e.primaryBlack},inputGroup:{gap:4},inputLabel:{fontFamily:x.interBold,fontSize:9.5,color:e.grayTextWeak,letterSpacing:.5},textInput:{backgroundColor:e.grayBackground,borderRadius:8,paddingHorizontal:10,paddingVertical:8,fontFamily:x.interMedium,fontSize:12,color:e.primaryBlack,borderWidth:1,borderColor:e.grayBorderSecondary},textInputDisabled:{backgroundColor:`${e.grayBorderSecondary}40`,color:e.grayText},textAreaInput:{minHeight:90,maxHeight:160,fontFamily:x.interRegular,fontSize:11},typeSelectorStrip:{flexDirection:"row",alignItems:"center",gap:6},typePill:{flex:1,alignItems:"center",paddingVertical:6,borderRadius:6,backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary},typePillActive:{backgroundColor:e.purple,borderColor:e.purple},typePillText:{fontFamily:x.interBold,fontSize:10,color:e.grayText},typePillTextActive:{color:e.white},formatJsonBtn:{fontFamily:x.interBold,fontSize:10,color:e.purple},errorText:{fontFamily:x.interMedium,fontSize:10,color:e.errorColor,marginTop:2},modalActions:{flexDirection:"row",alignItems:"center",gap:10,marginTop:4},cancelBtn:{flex:1,alignItems:"center",paddingVertical:10,borderRadius:8,backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary},cancelBtnText:{fontFamily:x.interBold,fontSize:12,color:e.grayText},saveBtn:{flex:1.5,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:5,paddingVertical:10,borderRadius:8,backgroundColor:e.purple},saveBtnText:{fontFamily:x.interBold,fontSize:12,color:e.white}});export default StorageTab;
|