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,123 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return []
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
TOKEN_REGEX.lastIndex = 0;
|
|
13
|
-
while ((match = TOKEN_REGEX.exec(input)) !== null) {
|
|
14
|
-
if (match[1]) {
|
|
15
|
-
tokens.push({ type: 'key', value: match[1] });
|
|
16
|
-
}
|
|
17
|
-
else if (match[2]) {
|
|
18
|
-
tokens.push({ type: 'string', value: match[2] });
|
|
19
|
-
}
|
|
20
|
-
else if (match[3]) {
|
|
21
|
-
tokens.push({ type: 'number', value: match[3] });
|
|
22
|
-
}
|
|
23
|
-
else if (match[4]) {
|
|
24
|
-
tokens.push({ type: 'boolean', value: match[4] });
|
|
25
|
-
}
|
|
26
|
-
else if (match[5]) {
|
|
27
|
-
tokens.push({ type: 'null', value: match[5] });
|
|
28
|
-
}
|
|
29
|
-
else if (match[6]) {
|
|
30
|
-
tokens.push({ type: 'url', value: match[6] });
|
|
31
|
-
}
|
|
32
|
-
else if (match[7]) {
|
|
33
|
-
tokens.push({ type: 'tag', value: match[7] });
|
|
34
|
-
}
|
|
35
|
-
else if (match[8]) {
|
|
36
|
-
tokens.push({ type: 'bracket', value: match[8] });
|
|
37
|
-
}
|
|
38
|
-
else if (match[9]) {
|
|
39
|
-
tokens.push({ type: 'plain', value: match[9] });
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return tokens;
|
|
43
|
-
};
|
|
44
|
-
const getTokenColor = (type) => {
|
|
45
|
-
switch (type) {
|
|
46
|
-
case 'key':
|
|
47
|
-
return AppColors.sky600 || '#0369a1';
|
|
48
|
-
case 'string':
|
|
49
|
-
return AppColors.emerald600 || '#059669';
|
|
50
|
-
case 'number':
|
|
51
|
-
return AppColors.amber600 || '#d97706';
|
|
52
|
-
case 'boolean':
|
|
53
|
-
return AppColors.purple || '#7c3aed';
|
|
54
|
-
case 'null':
|
|
55
|
-
return AppColors.red600 || '#dc2626';
|
|
56
|
-
case 'url':
|
|
57
|
-
return '#0284c7';
|
|
58
|
-
case 'tag':
|
|
59
|
-
return AppColors.violet600 || '#7c3aed';
|
|
60
|
-
case 'bracket':
|
|
61
|
-
return AppColors.slate500 || '#64748b';
|
|
62
|
-
case 'plain':
|
|
63
|
-
default:
|
|
64
|
-
return AppColors.primaryBlack || '#1e293b';
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
export const LogSyntaxHighlighter = React.memo(({ text, search, numberOfLines, style, detectLinks = true }) => {
|
|
68
|
-
if (!text)
|
|
69
|
-
return null;
|
|
70
|
-
const tokens = React.useMemo(() => tokenizeText(text), [text]);
|
|
71
|
-
const renderToken = (token, tokenIdx) => {
|
|
72
|
-
const baseColor = getTokenColor(token.type);
|
|
73
|
-
const isUrl = token.type === 'url';
|
|
74
|
-
const isKey = token.type === 'key';
|
|
75
|
-
const tokenStyle = {
|
|
76
|
-
color: baseColor,
|
|
77
|
-
fontFamily: isKey ? AppFonts.interBold : AppFonts.interRegular,
|
|
78
|
-
textDecorationLine: isUrl ? 'underline' : 'none',
|
|
79
|
-
};
|
|
80
|
-
if (!search || search.trim().length === 0) {
|
|
81
|
-
return (<Text key={tokenIdx} style={tokenStyle} onPress={isUrl && detectLinks
|
|
82
|
-
? () => handleOpenExternalLink(token.value)
|
|
83
|
-
: undefined}>
|
|
84
|
-
{token.value}
|
|
85
|
-
</Text>);
|
|
86
|
-
}
|
|
87
|
-
const regex = new RegExp(`(${escapeRegex(search.trim())})`, 'gi');
|
|
88
|
-
const parts = token.value.split(regex);
|
|
89
|
-
return (<Text key={tokenIdx} style={tokenStyle}>
|
|
90
|
-
{parts.map((part, partIdx) => {
|
|
91
|
-
const isMatch = part.toLowerCase() === search.trim().toLowerCase();
|
|
92
|
-
return isMatch ? (<Text key={partIdx} style={[
|
|
93
|
-
tokenStyle,
|
|
94
|
-
styles.searchHighlight,
|
|
95
|
-
]}>
|
|
96
|
-
{part}
|
|
97
|
-
</Text>) : (<Text key={partIdx} style={tokenStyle} onPress={isUrl && detectLinks
|
|
98
|
-
? () => handleOpenExternalLink(token.value)
|
|
99
|
-
: undefined}>
|
|
100
|
-
{part}
|
|
101
|
-
</Text>);
|
|
102
|
-
})}
|
|
103
|
-
</Text>);
|
|
104
|
-
};
|
|
105
|
-
return (<Text style={[styles.containerText, style]} numberOfLines={numberOfLines}>
|
|
106
|
-
{tokens.map(renderToken)}
|
|
107
|
-
</Text>);
|
|
108
|
-
});
|
|
109
|
-
const styles = StyleSheet.create({
|
|
110
|
-
containerText: {
|
|
111
|
-
fontFamily: AppFonts.interRegular,
|
|
112
|
-
fontSize: 12,
|
|
113
|
-
lineHeight: 18,
|
|
114
|
-
color: AppColors.primaryBlack,
|
|
115
|
-
},
|
|
116
|
-
searchHighlight: {
|
|
117
|
-
backgroundColor: '#fef08a',
|
|
118
|
-
color: '#854d0e',
|
|
119
|
-
fontFamily: AppFonts.interBold,
|
|
120
|
-
borderRadius: 2,
|
|
121
|
-
},
|
|
122
|
-
});
|
|
123
|
-
export default LogSyntaxHighlighter;
|
|
1
|
+
import F from"react";import{StyleSheet as G,Text as T}from"react-native";import{AppColors as r}from"../styles/AppColors";import{AppFonts as w}from"../styles/AppFonts";import{escapeRegex as U,handleOpenExternalLink as H}from"../helpers";const M=/("(?:\\.|[^"\\])*"(?=\s*:))|("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')|(\b-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|(\b(?:true|false)\b)|(\b(?:null|undefined|NaN)\b)|(https?:\/\/[^\s"',]+)|(\[[\w\s_-]+\])|([{}[\],:])|([^"'\d\s{}[\],:]+|[ \t\r\n]+)/g;export const tokenizeText=l=>{if(!l)return[];const t=[];let e;for(M.lastIndex=0;(e=M.exec(l))!==null;)e[1]?t.push({type:"key",value:e[1]}):e[2]?t.push({type:"string",value:e[2]}):e[3]?t.push({type:"number",value:e[3]}):e[4]?t.push({type:"boolean",value:e[4]}):e[5]?t.push({type:"null",value:e[5]}):e[6]?t.push({type:"url",value:e[6]}):e[7]?t.push({type:"tag",value:e[7]}):e[8]?t.push({type:"bracket",value:e[8]}):e[9]&&t.push({type:"plain",value:e[9]});return t};const X=l=>{switch(l){case"key":return r.sky600||"#0369a1";case"string":return r.emerald600||"#059669";case"number":return r.amber600||"#d97706";case"boolean":return r.purple||"#7c3aed";case"null":return r.red600||"#dc2626";case"url":return"#0284c7";case"tag":return r.violet600||"#7c3aed";case"bracket":return r.slate500||"#64748b";default:return r.primaryBlack||"#1e293b"}};export const LogSyntaxHighlighter=F.memo(({text:l,search:t,numberOfLines:e,style:O,detectLinks:L=!0})=>{if(!l)return null;const z=F.useMemo(()=>tokenizeText(l),[l]),A=(n,S)=>{const K=X(n.type),C=n.type==="url",P=n.type==="key",R={color:K,fontFamily:P?w.interBold:w.interRegular,textDecorationLine:C?"underline":"none"};if(!t||t.trim().length===0)return<T key={S}style={R}onPress={C&&L?()=>H(n.value):void 0}>
|
|
2
|
+
{n.value}
|
|
3
|
+
</T>;const _=new RegExp(`(${U(t.trim())})`,"gi"),D=n.value.split(_);return<T key={S}style={R}>
|
|
4
|
+
{D.map((E,B)=>E.toLowerCase()===t.trim().toLowerCase()?<T key={B}style={[R,N.searchHighlight]}>
|
|
5
|
+
{E}
|
|
6
|
+
</T>:<T key={B}style={R}onPress={C&&L?()=>H(n.value):void 0}>
|
|
7
|
+
{E}
|
|
8
|
+
</T>)}
|
|
9
|
+
</T>};return<T style={[N.containerText,O]}numberOfLines={e}>
|
|
10
|
+
{z.map(A)}
|
|
11
|
+
</T>});const N=G.create({containerText:{fontFamily:w.interRegular,fontSize:12,lineHeight:18,color:r.primaryBlack},searchHighlight:{backgroundColor:"#fef08a",color:"#854d0e",fontFamily:w.interBold,borderRadius:2}});export default LogSyntaxHighlighter;
|
|
@@ -1,283 +1,152 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const renderFormattedUrl = (rawUrl) => {
|
|
19
|
-
if (!rawUrl)
|
|
20
|
-
return '—';
|
|
21
|
-
try {
|
|
22
|
-
const doubleSlashIndex = rawUrl.indexOf('//');
|
|
23
|
-
let temp = rawUrl;
|
|
24
|
-
let protocol = '';
|
|
25
|
-
if (doubleSlashIndex !== -1) {
|
|
26
|
-
protocol = rawUrl.substring(0, doubleSlashIndex + 2);
|
|
27
|
-
temp = rawUrl.substring(doubleSlashIndex + 2);
|
|
28
|
-
}
|
|
29
|
-
const slashIndex = temp.indexOf('/');
|
|
30
|
-
let host = temp;
|
|
31
|
-
let pathAndSearch = '';
|
|
32
|
-
if (slashIndex !== -1) {
|
|
33
|
-
host = temp.substring(0, slashIndex);
|
|
34
|
-
pathAndSearch = temp.substring(slashIndex);
|
|
35
|
-
}
|
|
36
|
-
const queryIndex = pathAndSearch.indexOf('?');
|
|
37
|
-
let pathname = pathAndSearch;
|
|
38
|
-
let search = '';
|
|
39
|
-
if (queryIndex !== -1) {
|
|
40
|
-
pathname = pathAndSearch.substring(0, queryIndex);
|
|
41
|
-
search = pathAndSearch.substring(queryIndex);
|
|
42
|
-
}
|
|
43
|
-
return (<Text style={{ lineHeight: 16 }}>
|
|
44
|
-
{protocol ? (<Text style={{ color: AppColors.slate400, fontFamily: AppFonts.interRegular }}>{protocol}</Text>) : null}
|
|
45
|
-
<Text style={{ color: AppColors.purple, fontFamily: AppFonts.interBold }}>{host}</Text>
|
|
46
|
-
<Text style={{ color: AppColors.slate700, fontFamily: AppFonts.interMedium }}>{pathname}</Text>
|
|
47
|
-
{search ? (<Text style={{ color: AppColors.teal600, fontFamily: AppFonts.interRegular }}>{search}</Text>) : null}
|
|
48
|
-
</Text>);
|
|
49
|
-
}
|
|
50
|
-
catch {
|
|
51
|
-
return rawUrl;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
return (<View style={styles.metaContainer}>
|
|
55
|
-
<Pressable onPress={toggleOpen} hitSlop={12}>
|
|
56
|
-
<View style={styles.metaHeader}>
|
|
57
|
-
<Text style={styles.metaTitle}>Metadata</Text>
|
|
58
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
59
|
-
<CopyButton value={{
|
|
60
|
-
status: status ?? 0,
|
|
61
|
-
duration: duration != null ? `${duration} ms` : '—',
|
|
62
|
-
size: size || '—',
|
|
63
|
-
triggeredAt: triggeredAt || '',
|
|
64
|
-
method: method || 'GET',
|
|
65
|
-
contentType: contentType || 'application/json',
|
|
66
|
-
url: url || '',
|
|
67
|
-
}} label="Metadata"/>
|
|
68
|
-
<View style={chevronStyle}>
|
|
69
|
-
<ChevronIcon color={AppColors.grayTextWeak} size={14}/>
|
|
70
|
-
</View>
|
|
71
|
-
</View>
|
|
72
|
-
</View>
|
|
73
|
-
</Pressable>
|
|
1
|
+
import{useState as oe}from"react";import{useTranslation as le}from"../i18n";import{View as T,Pressable as Te,Text as V}from"react-native";import{DURATION_FAST_MS as J,DURATION_SLOW_MS as K}from"../constants";import ue from"../customHooks/useAccordion";import{getDurationColor as D,handleOpenExternalLink as be}from"../helpers";import{ChevronIcon as Ve,CalendarIcon as Se,StatusIcon as Re,ClockIcon as Ce,SizeIcon as Le,TerminalIcon as Ie,GlobeIcon as Q}from"./NetworkIcons";import U from"./TouchableScale";import De from"./CopyButton";import{AppColors as h}from"../styles/AppColors";import{AppFonts as C}from"../styles/AppFonts";import e from"../styles";const Fe=({status:B,statusColor:M,duration:S,size:P,triggeredAt:E,method:j,contentType:_,url:z})=>{const{t:R}=le(),[G,X]=oe(!1),{isOpen:Y,toggleOpen:Z,chevronStyle:ee}=ue(!0),I=B===0||B==null,te=L=>{if(!L)return"\u2014";try{const $=L.indexOf("//");let F=L,v="";$!==-1&&(v=L.substring(0,$+2),F=L.substring($+2));const A=F.indexOf("/");let N=F,W="";A!==-1&&(N=F.substring(0,A),W=F.substring(A));const O=W.indexOf("?");let q=W,H="";return O!==-1&&(q=W.substring(0,O),H=W.substring(O)),<V style={{lineHeight:16}}>
|
|
2
|
+
{v?<V style={{color:h.slate400,fontFamily:C.interRegular}}>{v}</V>:null}
|
|
3
|
+
<V style={{color:h.purple,fontFamily:C.interBold}}>{N}</V>
|
|
4
|
+
<V style={{color:h.slate700,fontFamily:C.interMedium}}>{q}</V>
|
|
5
|
+
{H?<V style={{color:h.teal600,fontFamily:C.interRegular}}>{H}</V>:null}
|
|
6
|
+
</V>}catch{return L}};return<T style={e.metaContainer}>
|
|
7
|
+
<Te onPress={Z}hitSlop={12}>
|
|
8
|
+
<T style={e.metaHeader}>
|
|
9
|
+
<V style={e.metaTitle}>Metadata</V>
|
|
10
|
+
<T style={{flexDirection:"row",alignItems:"center",gap:8}}>
|
|
11
|
+
<De value={{status:B??0,duration:S!=null?`${S} ms`:"\u2014",size:P||"\u2014",triggeredAt:E||"",method:j||"GET",contentType:_||"application/json",url:z||""}}label="Metadata"/>
|
|
12
|
+
<T style={ee}>
|
|
13
|
+
<Ve color={h.grayTextWeak}size={14}/>
|
|
14
|
+
</T>
|
|
15
|
+
</T>
|
|
16
|
+
</T>
|
|
17
|
+
</Te>
|
|
74
18
|
|
|
75
|
-
{
|
|
76
|
-
<
|
|
77
|
-
<
|
|
78
|
-
<
|
|
79
|
-
<
|
|
80
|
-
</
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
</Text>
|
|
87
|
-
</View>
|
|
88
|
-
<View style={styles.metaDivider}/>
|
|
19
|
+
{Y&&<T style={e.metaBody}>
|
|
20
|
+
<T style={e.metaRow}>
|
|
21
|
+
<T style={e.metaLabelRow}>
|
|
22
|
+
<Se color={h.grayTextWeak}size={14}/>
|
|
23
|
+
<V style={e.metaLabel}>{R("network.triggeredAt")}</V>
|
|
24
|
+
</T>
|
|
25
|
+
<V style={[e.metaValue,{color:h.purple,fontSize:12}]}>
|
|
26
|
+
{E}
|
|
27
|
+
</V>
|
|
28
|
+
</T>
|
|
29
|
+
<T style={e.metaDivider}/>
|
|
89
30
|
|
|
90
|
-
<
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
</
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<Text style={[
|
|
103
|
-
styles.statusText,
|
|
104
|
-
{ color: AppColors.purple, fontFamily: AppFonts.interBold },
|
|
105
|
-
]}>
|
|
106
|
-
{method || 'GET'}
|
|
107
|
-
</Text>
|
|
108
|
-
</View>
|
|
109
|
-
</View>
|
|
110
|
-
<View style={styles.metaDivider}/>
|
|
31
|
+
<T style={e.metaRow}>
|
|
32
|
+
<T style={e.metaLabelRow}>
|
|
33
|
+
<Ie color={h.grayTextWeak}size={14}/>
|
|
34
|
+
<V style={e.metaLabel}>{R("network.methodHeader")}</V>
|
|
35
|
+
</T>
|
|
36
|
+
<T style={[e.statusChip,{borderColor:`${h.brandPurple}40`,backgroundColor:`${h.brandPurple}14`}]}>
|
|
37
|
+
<V style={[e.statusText,{color:h.purple,fontFamily:C.interBold}]}>
|
|
38
|
+
{j||"GET"}
|
|
39
|
+
</V>
|
|
40
|
+
</T>
|
|
41
|
+
</T>
|
|
42
|
+
<T style={e.metaDivider}/>
|
|
111
43
|
|
|
112
|
-
<
|
|
113
|
-
<
|
|
114
|
-
<
|
|
115
|
-
<
|
|
116
|
-
</
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
{
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
? `${AppColors.errorColor}15`
|
|
125
|
-
: `${statusColor}15`,
|
|
126
|
-
},
|
|
127
|
-
]}>
|
|
128
|
-
<Text style={[
|
|
129
|
-
styles.statusText,
|
|
130
|
-
{ color: isFailed ? AppColors.errorColor : statusColor },
|
|
131
|
-
]}>
|
|
132
|
-
{isFailed ? t('network.failedNetworkError') : String(status)}
|
|
133
|
-
</Text>
|
|
134
|
-
</View>
|
|
135
|
-
</View>
|
|
136
|
-
<View style={styles.metaDivider}/>
|
|
44
|
+
<T style={e.metaRow}>
|
|
45
|
+
<T style={e.metaLabelRow}>
|
|
46
|
+
<Re color={h.grayTextWeak}/>
|
|
47
|
+
<V style={e.metaLabel}>{R("network.statusHeader")}</V>
|
|
48
|
+
</T>
|
|
49
|
+
<T style={[e.statusChip,{borderColor:I?`${h.errorColor}40`:`${M}40`,backgroundColor:I?`${h.errorColor}15`:`${M}15`}]}>
|
|
50
|
+
<V style={[e.statusText,{color:I?h.errorColor:M}]}>
|
|
51
|
+
{I?R("network.failedNetworkError"):String(B)}
|
|
52
|
+
</V>
|
|
53
|
+
</T>
|
|
54
|
+
</T>
|
|
55
|
+
<T style={e.metaDivider}/>
|
|
137
56
|
|
|
138
|
-
<
|
|
139
|
-
<
|
|
140
|
-
<
|
|
141
|
-
<
|
|
142
|
-
</
|
|
143
|
-
<
|
|
144
|
-
{
|
|
145
|
-
</
|
|
146
|
-
</
|
|
147
|
-
<
|
|
57
|
+
<T style={e.metaRow}>
|
|
58
|
+
<T style={e.metaLabelRow}>
|
|
59
|
+
<Q color={h.grayTextWeak}size={14}/>
|
|
60
|
+
<V style={e.metaLabel}>{R("network.contentType")}</V>
|
|
61
|
+
</T>
|
|
62
|
+
<V style={e.metaValue}>
|
|
63
|
+
{_||"application/json"}
|
|
64
|
+
</V>
|
|
65
|
+
</T>
|
|
66
|
+
<T style={e.metaDivider}/>
|
|
148
67
|
|
|
149
|
-
<
|
|
150
|
-
<
|
|
151
|
-
<
|
|
152
|
-
<
|
|
153
|
-
</
|
|
154
|
-
<
|
|
155
|
-
{
|
|
156
|
-
|
|
157
|
-
{
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
]}>
|
|
166
|
-
{duration < DURATION_FAST_MS
|
|
167
|
-
? t('network.perf.fast')
|
|
168
|
-
: duration < DURATION_SLOW_MS
|
|
169
|
-
? t('network.perf.moderate')
|
|
170
|
-
: t('network.perf.slow')}
|
|
171
|
-
</Text>
|
|
172
|
-
</View>)}
|
|
173
|
-
<Text style={styles.metaValue}>
|
|
174
|
-
{duration != null ? `${duration} ms` : '—'}
|
|
175
|
-
</Text>
|
|
176
|
-
</View>
|
|
177
|
-
</View>
|
|
68
|
+
<T style={e.metaRow}>
|
|
69
|
+
<T style={e.metaLabelRow}>
|
|
70
|
+
<Ce color={h.grayTextWeak}size={14}/>
|
|
71
|
+
<V style={e.metaLabel}>{R("network.durationHeader")}</V>
|
|
72
|
+
</T>
|
|
73
|
+
<T style={e.metaValueRow}>
|
|
74
|
+
{S!=null&&!I&&<T style={[e.perfBadge,{backgroundColor:`${D(S)}15`,borderColor:`${D(S)}40`}]}>
|
|
75
|
+
<V style={[e.perfBadgeText,{color:D(S)}]}>
|
|
76
|
+
{S<J?R("network.perf.fast"):S<K?R("network.perf.moderate"):R("network.perf.slow")}
|
|
77
|
+
</V>
|
|
78
|
+
</T>}
|
|
79
|
+
<V style={e.metaValue}>
|
|
80
|
+
{S!=null?`${S} ms`:"\u2014"}
|
|
81
|
+
</V>
|
|
82
|
+
</T>
|
|
83
|
+
</T>
|
|
178
84
|
|
|
179
85
|
|
|
180
|
-
{
|
|
181
|
-
<
|
|
182
|
-
<
|
|
183
|
-
{
|
|
184
|
-
</
|
|
185
|
-
<
|
|
186
|
-
{
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
? t('network.perf.moderate')
|
|
190
|
-
: t('network.perf.slow')}
|
|
191
|
-
</Text>
|
|
192
|
-
</View>
|
|
86
|
+
{S!=null&&!I&&<T style={{paddingVertical:8,gap:6}}>
|
|
87
|
+
<T style={{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}}>
|
|
88
|
+
<V style={{fontFamily:C.interBold,fontSize:11,color:h.primaryBlack}}>
|
|
89
|
+
{R("network.timingWaterfall")}
|
|
90
|
+
</V>
|
|
91
|
+
<V style={{fontFamily:C.interMedium,fontSize:10.5,color:D(S)}}>
|
|
92
|
+
{S<J?R("network.perf.fast"):S<K?R("network.perf.moderate"):R("network.perf.slow")}
|
|
93
|
+
</V>
|
|
94
|
+
</T>
|
|
193
95
|
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
borderRadius: 3,
|
|
198
|
-
overflow: 'hidden',
|
|
199
|
-
}}>
|
|
200
|
-
<View style={{
|
|
201
|
-
height: '100%',
|
|
202
|
-
width: `${Math.min(100, Math.max(8, (duration / 1200) * 100))}%`,
|
|
203
|
-
backgroundColor: getDurationColor(duration),
|
|
204
|
-
borderRadius: 3,
|
|
205
|
-
}}/>
|
|
206
|
-
</View>
|
|
96
|
+
<T style={{height:6,backgroundColor:h.grayBorderSecondary,borderRadius:3,overflow:"hidden"}}>
|
|
97
|
+
<T style={{height:"100%",width:`${Math.min(100,Math.max(8,S/1200*100))}%`,backgroundColor:D(S),borderRadius:3}}/>
|
|
98
|
+
</T>
|
|
207
99
|
|
|
208
|
-
<
|
|
209
|
-
<
|
|
100
|
+
<T style={{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginTop:1}}>
|
|
101
|
+
<V style={{fontFamily:C.interRegular,fontSize:9.5,color:h.grayTextWeak}}>
|
|
210
102
|
0 ms
|
|
211
|
-
</
|
|
212
|
-
<
|
|
213
|
-
{
|
|
214
|
-
</
|
|
215
|
-
<
|
|
103
|
+
</V>
|
|
104
|
+
<V style={{fontFamily:C.interBold,fontSize:10,color:D(S)}}>
|
|
105
|
+
{S} ms
|
|
106
|
+
</V>
|
|
107
|
+
<V style={{fontFamily:C.interRegular,fontSize:9.5,color:h.grayTextWeak}}>
|
|
216
108
|
1,200+ ms
|
|
217
|
-
</
|
|
218
|
-
</
|
|
219
|
-
</
|
|
220
|
-
<
|
|
109
|
+
</V>
|
|
110
|
+
</T>
|
|
111
|
+
</T>}
|
|
112
|
+
<T style={e.metaDivider}/>
|
|
221
113
|
|
|
222
|
-
<
|
|
223
|
-
<
|
|
224
|
-
<
|
|
225
|
-
<
|
|
226
|
-
</
|
|
227
|
-
<
|
|
228
|
-
</
|
|
229
|
-
<
|
|
114
|
+
<T style={e.metaRow}>
|
|
115
|
+
<T style={e.metaLabelRow}>
|
|
116
|
+
<Le color={h.grayTextWeak}/>
|
|
117
|
+
<V style={e.metaLabel}>{R("network.sizeHeader")}</V>
|
|
118
|
+
</T>
|
|
119
|
+
<V style={e.metaValue}>{P}</V>
|
|
120
|
+
</T>
|
|
121
|
+
<T style={e.metaDivider}/>
|
|
230
122
|
|
|
231
|
-
<
|
|
232
|
-
<
|
|
233
|
-
<
|
|
234
|
-
<
|
|
235
|
-
<
|
|
236
|
-
</
|
|
123
|
+
<T style={[e.metaRow,{alignItems:"flex-start",flexDirection:"column",gap:6}]}>
|
|
124
|
+
<T style={{flexDirection:"row",justifyContent:"space-between",width:"100%",alignItems:"center"}}>
|
|
125
|
+
<T style={e.metaLabelRow}>
|
|
126
|
+
<Q color={h.grayTextWeak}size={14}/>
|
|
127
|
+
<V style={e.metaLabel}>{R("network.fullUrl")}</V>
|
|
128
|
+
</T>
|
|
237
129
|
|
|
238
|
-
<
|
|
239
|
-
{
|
|
240
|
-
<
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}}>
|
|
245
|
-
{urlExpanded ? t('network.showLess') : t('network.showMore')}
|
|
246
|
-
</Text>
|
|
247
|
-
</TouchableScale>)}
|
|
130
|
+
<T style={{flexDirection:"row",alignItems:"center",gap:10}}>
|
|
131
|
+
{z&&z.length>50&&<U onPress={()=>X(L=>!L)}hitSlop={8}>
|
|
132
|
+
<V style={{fontFamily:C.interBold,fontSize:10.5,color:h.purple}}>
|
|
133
|
+
{R(G?"network.showLess":"network.showMore")}
|
|
134
|
+
</V>
|
|
135
|
+
</U>}
|
|
248
136
|
|
|
249
|
-
{
|
|
250
|
-
<
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
{t('network.open')}
|
|
257
|
-
</Text>
|
|
258
|
-
</TouchableScale>)}
|
|
259
|
-
</View>
|
|
260
|
-
</View>
|
|
137
|
+
{z&&<U onPress={()=>be(z)}hitSlop={8}>
|
|
138
|
+
<V style={{fontFamily:C.interBold,fontSize:10.5,color:h.purple,textDecorationLine:"underline"}}>
|
|
139
|
+
{R("network.open")}
|
|
140
|
+
</V>
|
|
141
|
+
</U>}
|
|
142
|
+
</T>
|
|
143
|
+
</T>
|
|
261
144
|
|
|
262
|
-
<
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}}>
|
|
271
|
-
<Text selectable={true} numberOfLines={urlExpanded ? undefined : 2} ellipsizeMode="tail" style={{
|
|
272
|
-
fontSize: 11,
|
|
273
|
-
textAlign: 'left',
|
|
274
|
-
lineHeight: 16.5,
|
|
275
|
-
}}>
|
|
276
|
-
{renderFormattedUrl(url)}
|
|
277
|
-
</Text>
|
|
278
|
-
</View>
|
|
279
|
-
</View>
|
|
280
|
-
</View>)}
|
|
281
|
-
</View>);
|
|
282
|
-
};
|
|
283
|
-
export default MetaAccordion;
|
|
145
|
+
<T style={{backgroundColor:h.slate50,borderRadius:8,padding:8,borderWidth:1.5,borderColor:h.slate200,width:"100%",marginTop:2}}>
|
|
146
|
+
<V selectable={!0}numberOfLines={G?void 0:2}ellipsizeMode="tail"style={{fontSize:11,textAlign:"left",lineHeight:16.5}}>
|
|
147
|
+
{te(z)}
|
|
148
|
+
</V>
|
|
149
|
+
</T>
|
|
150
|
+
</T>
|
|
151
|
+
</T>}
|
|
152
|
+
</T>};export default Fe;
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (!data || data.length === 0)
|
|
5
|
-
return <Svg width={40} height={16}/>;
|
|
6
|
-
const max = maxVal || Math.max(...data, 1);
|
|
7
|
-
const paddedData = data.length < 10
|
|
8
|
-
? [...Array(10 - data.length).fill(0), ...data]
|
|
9
|
-
: data.slice(-10);
|
|
10
|
-
return (<Svg width={40} height={16} viewBox="0 0 40 16">
|
|
11
|
-
{paddedData.map((val, i) => {
|
|
12
|
-
const h = Math.max((val / max) * 16, 2);
|
|
13
|
-
const opacity = val === 0 && maxVal === 1 ? 0.2 : 1;
|
|
14
|
-
return (<Rect key={i} x={i * 4} y={16 - h} width={2.5} height={h} fill={color} rx={1} opacity={opacity}/>);
|
|
15
|
-
})}
|
|
16
|
-
</Svg>);
|
|
17
|
-
};
|
|
18
|
-
export default MiniBarChart;
|
|
1
|
+
import"react";import M,{Rect as A}from"react-native-svg";const C=({data:t,color:v,maxVal:e})=>{if(!t||t.length===0)return<M width={40}height={16}/>;const B=e||Math.max(...t,1),R=t.length<10?[...Array(10-t.length).fill(0),...t]:t.slice(-10);return<M width={40}height={16}viewBox="0 0 40 16">
|
|
2
|
+
{R.map((h,i)=>{const r=Math.max(h/B*16,2),S=h===0&&e===1?.2:1;return<A key={i}x={i*4}y={16-r}width={2.5}height={r}fill={v}rx={1}opacity={S}/>})}
|
|
3
|
+
</M>};export default C;
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (!data || data.length === 0)
|
|
5
|
-
return <Svg width={40} height={16}/>;
|
|
6
|
-
const paddedData = data.length < 10
|
|
7
|
-
? [...Array(10 - data.length).fill(data[0] || 0), ...data]
|
|
8
|
-
: data.slice(-10);
|
|
9
|
-
const max = Math.max(...paddedData, 1);
|
|
10
|
-
const min = Math.min(...paddedData, 0);
|
|
11
|
-
const range = max - min || 1;
|
|
12
|
-
const dx = 40 / 9;
|
|
13
|
-
const points = paddedData
|
|
14
|
-
.map((d, i) => `${i * dx},${14 - ((d - min) / range) * 12}`)
|
|
15
|
-
.join(' L ');
|
|
16
|
-
return (<Svg width={40} height={16} viewBox="0 0 40 16">
|
|
17
|
-
<Path d={`M ${points}`} fill="none" stroke={color} strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round"/>
|
|
18
|
-
</Svg>);
|
|
19
|
-
};
|
|
20
|
-
export default MiniLineChart;
|
|
1
|
+
import"react";import L,{Path as A}from"react-native-svg";const B=({data:n,color:M})=>{if(!n||n.length===0)return<L width={40}height={16}/>;const t=n.length<10?[...Array(10-n.length).fill(n[0]||0),...n]:n.slice(-10),a=Math.max(...t,1),o=Math.min(...t,0),v=a-o||1,w=40/9,$=t.map((j,S)=>`${S*w},${14-(j-o)/v*12}`).join(" L ");return<L width={40}height={16}viewBox="0 0 40 16">
|
|
2
|
+
<A d={`M ${$}`}fill="none"stroke={M}strokeWidth={1.5}strokeLinecap="round"strokeLinejoin="round"/>
|
|
3
|
+
</L>};export default B;
|
|
@@ -33,6 +33,7 @@ export declare const FailIcon: ({ color, size }: IconProps) => React.JSX.Element
|
|
|
33
33
|
export declare const TrashIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
34
34
|
export declare const HeaderPauseIcon: ({ isPaused, color, size, }: IconProps) => React.JSX.Element;
|
|
35
35
|
export declare const ExportIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
36
|
+
export declare const ShareIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
36
37
|
export declare const SignalIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
37
38
|
export declare const DiffIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
38
39
|
export declare const GlobeIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
@@ -128,6 +129,8 @@ export declare const TagIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
|
128
129
|
export declare const NpmIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
129
130
|
export declare const ResetIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
130
131
|
export declare const ChevronDownIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
132
|
+
export declare const MaximizeIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
133
|
+
export declare const MinimizeIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
131
134
|
export declare const CpuIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
132
135
|
export declare const WifiIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
133
136
|
export declare const ShieldCheckIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
@@ -151,3 +154,7 @@ export declare const PlayIcon: ({ color, size, }: IconProps) => React.JSX.Elemen
|
|
|
151
154
|
export declare const PauseIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
152
155
|
export declare const ImageIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
153
156
|
export declare const FilmIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
157
|
+
export declare const ScreencastIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
158
|
+
export declare const ListIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
159
|
+
export declare const GridIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
160
|
+
export declare const MinimizeWindowIcon: ({ color, size }: IconProps) => React.JSX.Element;
|