react-native-inapp-inspector 2.3.19 → 2.3.21
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/README.md +14 -14
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +67 -0
- package/dist/commonjs/analytics.js +1 -24
- package/dist/commonjs/bundle.js +1 -16
- package/dist/commonjs/capture.js +1 -35
- 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.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 +243 -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 +74 -875
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +143 -907
- package/dist/commonjs/components/Inspector/FabLauncher.js +42 -466
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +6 -99
- package/dist/commonjs/components/Inspector/InspectorContext.js +1 -21
- package/dist/commonjs/components/Inspector/InspectorHeader.js +191 -1110
- package/dist/commonjs/components/Inspector/LogDetail.js +168 -994
- package/dist/commonjs/components/Inspector/MainScreen.js +52 -335
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +97 -644
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +90 -605
- package/dist/commonjs/components/Inspector/NavigationTracker.js +1 -12
- package/dist/commonjs/components/Inspector/NetworkDetail.js +89 -411
- 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 +18 -434
- 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 +427 -3807
- 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 +36 -334
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +37 -412
- package/dist/commonjs/components/JsonViewer.js +168 -381
- 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 +13 -0
- package/dist/commonjs/components/NetworkIcons.js +521 -1022
- package/dist/commonjs/components/QRCodeView.js +5 -79
- package/dist/commonjs/components/SectionHeader.js +15 -37
- package/dist/commonjs/components/SegmentedTabs.js +7 -62
- 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.d.ts +1 -0
- 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 -1140
- package/dist/commonjs/index.js +5 -2168
- package/dist/commonjs/metro.js +6 -468
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/native/NativeInspector.js +1 -415
- 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 +0 -1
- package/dist/commonjs/types/enums.js +1 -152
- package/dist/commonjs/types/index.js +1 -18
- package/dist/commonjs/types/interfaces.d.ts +2 -2
- 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.js +1 -32
- 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.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 +243 -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 +164 -925
- package/dist/esm/components/Inspector/DeviceInfoTab.js +199 -924
- package/dist/esm/components/Inspector/FabLauncher.js +68 -454
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +14 -70
- package/dist/esm/components/Inspector/InspectorContext.js +1 -12
- package/dist/esm/components/Inspector/InspectorHeader.js +282 -1163
- package/dist/esm/components/Inspector/LogDetail.js +235 -1023
- package/dist/esm/components/Inspector/MainScreen.js +78 -323
- package/dist/esm/components/Inspector/MediaGalleryTab.js +143 -650
- package/dist/esm/components/Inspector/MediaPreviewModal.js +138 -613
- package/dist/esm/components/Inspector/NavigationTracker.js +1 -10
- package/dist/esm/components/Inspector/NetworkDetail.js +138 -455
- 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 +643 -3985
- 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 +45 -305
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +80 -418
- package/dist/esm/components/JsonViewer.js +179 -354
- 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 +13 -0
- package/dist/esm/components/NetworkIcons.js +523 -838
- package/dist/esm/components/QRCodeView.js +8 -45
- package/dist/esm/components/SectionHeader.js +22 -39
- package/dist/esm/components/SegmentedTabs.js +8 -58
- 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.d.ts +1 -0
- 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 -1140
- package/dist/esm/index.js +7 -1982
- package/dist/esm/metro.js +6 -459
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/native/NativeInspector.js +1 -382
- 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 +0 -1
- package/dist/esm/types/enums.js +1 -149
- package/dist/esm/types/index.js +1 -2
- package/dist/esm/types/interfaces.d.ts +2 -2
- package/dist/esm/types/interfaces.js +1 -1
- package/ios/NetworkInspectorModule.mm +60 -12
- package/package.json +5 -3
- package/src/native/NativeInspector.ts +18 -0
- package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +0 -7
- package/dist/commonjs/components/Inspector/FeedbackModal.js +0 -552
- package/dist/esm/components/Inspector/FeedbackModal.d.ts +0 -7
- package/dist/esm/components/Inspector/FeedbackModal.js +0 -515
- package/src/analytics.ts +0 -35
- package/src/bundle.ts +0 -25
- package/src/capture.ts +0 -109
- 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 -97
- 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 -590
- 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 -1583
- package/src/components/Inspector/LogDetail.tsx +0 -1431
- package/src/components/Inspector/MainScreen.tsx +0 -460
- package/src/components/Inspector/MediaGalleryTab.tsx +0 -829
- package/src/components/Inspector/MediaPreviewModal.tsx +0 -783
- package/src/components/Inspector/NavigationTracker.tsx +0 -13
- package/src/components/Inspector/NetworkDetail.tsx +0 -778
- 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 -5136
- package/src/components/Inspector/SkeletonPlaceholder.tsx +0 -206
- package/src/components/Inspector/StorageTab.tsx +0 -1159
- package/src/components/Inspector/TabBar.tsx +0 -431
- package/src/components/Inspector/UpdateAvailableModal.tsx +0 -555
- package/src/components/JsonViewer.tsx +0 -549
- 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 -2655
- package/src/components/QRCodeView.tsx +0 -75
- package/src/components/SectionHeader.tsx +0 -101
- package/src/components/SegmentedTabs.tsx +0 -84
- 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 -1141
- package/src/index.tsx +0 -2650
- 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 -210
- package/src/types/index.ts +0 -34
- package/src/types/interfaces.ts +0 -535
|
@@ -1,645 +1,70 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}))
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
const react_1 = __importStar(require("react"));
|
|
40
|
-
const react_native_1 = require("react-native");
|
|
41
|
-
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
42
|
-
const NetworkIcons_1 = require("./NetworkIcons");
|
|
43
|
-
const CopyButton_1 = __importDefault(require("./CopyButton"));
|
|
44
|
-
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
45
|
-
const AppColors_1 = require("../styles/AppColors");
|
|
46
|
-
const AppFonts_1 = require("../styles/AppFonts");
|
|
47
|
-
const escapeRegExp = (string) => {
|
|
48
|
-
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
49
|
-
};
|
|
50
|
-
const formatHTML = (html) => {
|
|
51
|
-
if (!html)
|
|
52
|
-
return '';
|
|
53
|
-
let indent = 0;
|
|
54
|
-
const cleaned = html
|
|
55
|
-
.replace(/<([a-zA-Z0-9:-]+)([^>]*)>\s*<\/([a-zA-Z0-9:-]+)>/g, '<$1$2></$3>')
|
|
56
|
-
.replace(/(<[^>]+>)/g, '\n$1\n')
|
|
57
|
-
.replace(/\n+/g, '\n');
|
|
58
|
-
const lines = cleaned.split('\n');
|
|
59
|
-
const formatted = [];
|
|
60
|
-
const selfClosingTags = /^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/i;
|
|
61
|
-
for (let i = 0; i < lines.length; i++) {
|
|
62
|
-
const line = lines[i].trim();
|
|
63
|
-
if (!line)
|
|
64
|
-
continue;
|
|
65
|
-
if (line.startsWith('</')) {
|
|
66
|
-
indent = Math.max(0, indent - 1);
|
|
67
|
-
}
|
|
68
|
-
formatted.push(' '.repeat(indent) + line);
|
|
69
|
-
if (line.startsWith('<') &&
|
|
70
|
-
!line.startsWith('</') &&
|
|
71
|
-
!line.startsWith('<!') &&
|
|
72
|
-
!line.endsWith('/>')) {
|
|
73
|
-
const tagNameMatch = line.match(/^<([a-zA-Z0-9:-]+)/);
|
|
74
|
-
if (tagNameMatch) {
|
|
75
|
-
const tagName = tagNameMatch[1];
|
|
76
|
-
if (!selfClosingTags.test(tagName)) {
|
|
77
|
-
const closeTagRegex = new RegExp(`</${escapeRegExp(tagName)}>`);
|
|
78
|
-
if (!closeTagRegex.test(line)) {
|
|
79
|
-
indent++;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return formatted.join('\n');
|
|
86
|
-
};
|
|
87
|
-
const formatCSS = (css) => {
|
|
88
|
-
if (!css)
|
|
89
|
-
return '';
|
|
90
|
-
const cleaned = css
|
|
91
|
-
.replace(/\s*\{\s*/g, ' {\n')
|
|
92
|
-
.replace(/\s*;\s*/g, ';\n')
|
|
93
|
-
.replace(/\s*\}\s*/g, '\n}\n')
|
|
94
|
-
.replace(/\n+/g, '\n');
|
|
95
|
-
const lines = cleaned.split('\n');
|
|
96
|
-
let indent = 0;
|
|
97
|
-
const formatted = [];
|
|
98
|
-
for (let i = 0; i < lines.length; i++) {
|
|
99
|
-
const line = lines[i].trim();
|
|
100
|
-
if (!line)
|
|
101
|
-
continue;
|
|
102
|
-
if (line.startsWith('}')) {
|
|
103
|
-
indent = Math.max(0, indent - 1);
|
|
104
|
-
}
|
|
105
|
-
formatted.push(' '.repeat(indent) + line);
|
|
106
|
-
if (line.endsWith('{')) {
|
|
107
|
-
indent++;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return formatted.join('\n');
|
|
111
|
-
};
|
|
112
|
-
const formatJS = (js) => {
|
|
113
|
-
if (!js)
|
|
114
|
-
return '';
|
|
115
|
-
const lines = js.split(/\r?\n/);
|
|
116
|
-
let indent = 0;
|
|
117
|
-
const formatted = [];
|
|
118
|
-
for (let i = 0; i < lines.length; i++) {
|
|
119
|
-
const line = lines[i].trim();
|
|
120
|
-
if (!line)
|
|
121
|
-
continue;
|
|
122
|
-
let openCount = (line.match(/\{|\[/g) || []).length;
|
|
123
|
-
let closeCount = (line.match(/\}|\]/g) || []).length;
|
|
124
|
-
if (line.startsWith('}') || line.startsWith(']')) {
|
|
125
|
-
indent = Math.max(0, indent - 1);
|
|
126
|
-
}
|
|
127
|
-
else if (closeCount > openCount) {
|
|
128
|
-
indent = Math.max(0, indent - (closeCount - openCount));
|
|
129
|
-
}
|
|
130
|
-
formatted.push(' '.repeat(indent) + line);
|
|
131
|
-
if (openCount > closeCount &&
|
|
132
|
-
!line.startsWith('}') &&
|
|
133
|
-
!line.startsWith(']')) {
|
|
134
|
-
indent += openCount - closeCount;
|
|
135
|
-
}
|
|
136
|
-
else if (line.endsWith('{') || line.endsWith('[')) {
|
|
137
|
-
indent++;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return formatted.join('\n');
|
|
141
|
-
};
|
|
142
|
-
const tokenizeJS = (text) => {
|
|
143
|
-
const tokens = [];
|
|
144
|
-
const regex = /(\/\/.*|\/\*[\s\S]*?\*\/)|(\"(?:\\.|[^\"\\])*\"|\'(?:\\.|[^\'\\])*\'|\`(?:\\.|[^\`\\])*\`)|(\b(const|let|var|function|return|if|else|for|while|import|export|class|try|catch|new|this|async|await|break|continue|switch|case|default|throw|typeof|yield)\b)|(\b(console|window|document|fetch|global|require|module|exports|Promise|Map|Set|Array|Object|String|Number|Boolean)\b)|(\b\d+(?:\.\d+)?\b)/g;
|
|
145
|
-
let lastIndex = 0;
|
|
146
|
-
let match;
|
|
147
|
-
while ((match = regex.exec(text)) !== null) {
|
|
148
|
-
if (regex.lastIndex === match.index) {
|
|
149
|
-
regex.lastIndex++;
|
|
150
|
-
}
|
|
151
|
-
if (match.index > lastIndex) {
|
|
152
|
-
tokens.push({
|
|
153
|
-
text: text.substring(lastIndex, match.index),
|
|
154
|
-
type: 'plain',
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
const matchedText = match[0];
|
|
158
|
-
if (match[1])
|
|
159
|
-
tokens.push({ text: matchedText, type: 'comment' });
|
|
160
|
-
else if (match[2])
|
|
161
|
-
tokens.push({ text: matchedText, type: 'string' });
|
|
162
|
-
else if (match[3])
|
|
163
|
-
tokens.push({ text: matchedText, type: 'keyword' });
|
|
164
|
-
else if (match[4])
|
|
165
|
-
tokens.push({ text: matchedText, type: 'builtin' });
|
|
166
|
-
else if (match[5])
|
|
167
|
-
tokens.push({ text: matchedText, type: 'number' });
|
|
168
|
-
lastIndex = regex.lastIndex;
|
|
169
|
-
}
|
|
170
|
-
if (lastIndex < text.length) {
|
|
171
|
-
tokens.push({ text: text.substring(lastIndex), type: 'plain' });
|
|
172
|
-
}
|
|
173
|
-
return tokens;
|
|
174
|
-
};
|
|
175
|
-
const tokenizeCSS = (text) => {
|
|
176
|
-
const tokens = [];
|
|
177
|
-
const regex = /(\/\*[\s\S]*?\*\/)|(\.[a-zA-Z0-9_-]+|#[a-zA-Z0-9_-]+|[a-zA-Z0-9_-]+(?=\s*\{))|([a-zA-Z0-9_-]+(?=\s*:))|(:[^;]+;)/g;
|
|
178
|
-
let lastIndex = 0;
|
|
179
|
-
let match;
|
|
180
|
-
while ((match = regex.exec(text)) !== null) {
|
|
181
|
-
if (regex.lastIndex === match.index) {
|
|
182
|
-
regex.lastIndex++;
|
|
183
|
-
}
|
|
184
|
-
if (match.index > lastIndex) {
|
|
185
|
-
tokens.push({
|
|
186
|
-
text: text.substring(lastIndex, match.index),
|
|
187
|
-
type: 'plain',
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
const matchedText = match[0];
|
|
191
|
-
if (match[1])
|
|
192
|
-
tokens.push({ text: matchedText, type: 'comment' });
|
|
193
|
-
else if (match[2])
|
|
194
|
-
tokens.push({ text: matchedText, type: 'selector' });
|
|
195
|
-
else if (match[3])
|
|
196
|
-
tokens.push({ text: matchedText, type: 'property' });
|
|
197
|
-
else if (match[4]) {
|
|
198
|
-
tokens.push({ text: ':', type: 'plain' });
|
|
199
|
-
tokens.push({ text: matchedText.substring(1), type: 'value' });
|
|
200
|
-
}
|
|
201
|
-
lastIndex = regex.lastIndex;
|
|
202
|
-
}
|
|
203
|
-
if (lastIndex < text.length) {
|
|
204
|
-
tokens.push({ text: text.substring(lastIndex), type: 'plain' });
|
|
205
|
-
}
|
|
206
|
-
return tokens;
|
|
207
|
-
};
|
|
208
|
-
const tokenizeHTML = (text) => {
|
|
209
|
-
const tokens = [];
|
|
210
|
-
const regex = /(<!--[\s\S]*?-->)|(<\/?[a-zA-Z0-9:-]+>?)|(\"(?:\\.|[^\"\\])*\"|\'(?:\\.|[^\'\\])*\')|([a-zA-Z0-9:-]+(?=\s*=))/g;
|
|
211
|
-
let lastIndex = 0;
|
|
212
|
-
let match;
|
|
213
|
-
while ((match = regex.exec(text)) !== null) {
|
|
214
|
-
if (regex.lastIndex === match.index) {
|
|
215
|
-
regex.lastIndex++;
|
|
216
|
-
}
|
|
217
|
-
if (match.index > lastIndex) {
|
|
218
|
-
tokens.push({
|
|
219
|
-
text: text.substring(lastIndex, match.index),
|
|
220
|
-
type: 'plain',
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
const matchedText = match[0];
|
|
224
|
-
if (match[1])
|
|
225
|
-
tokens.push({ text: matchedText, type: 'comment' });
|
|
226
|
-
else if (match[2])
|
|
227
|
-
tokens.push({ text: matchedText, type: 'tag' });
|
|
228
|
-
else if (match[3])
|
|
229
|
-
tokens.push({ text: matchedText, type: 'string' });
|
|
230
|
-
else if (match[4])
|
|
231
|
-
tokens.push({ text: matchedText, type: 'attribute' });
|
|
232
|
-
lastIndex = regex.lastIndex;
|
|
233
|
-
}
|
|
234
|
-
if (lastIndex < text.length) {
|
|
235
|
-
tokens.push({ text: text.substring(lastIndex), type: 'plain' });
|
|
236
|
-
}
|
|
237
|
-
return tokens;
|
|
238
|
-
};
|
|
239
|
-
const getStyleForType = (type) => {
|
|
240
|
-
switch (type) {
|
|
241
|
-
case 'comment':
|
|
242
|
-
return styles.comment;
|
|
243
|
-
case 'string':
|
|
244
|
-
return styles.string;
|
|
245
|
-
case 'keyword':
|
|
246
|
-
return styles.keyword;
|
|
247
|
-
case 'builtin':
|
|
248
|
-
return styles.builtin;
|
|
249
|
-
case 'number':
|
|
250
|
-
return styles.number;
|
|
251
|
-
case 'tag':
|
|
252
|
-
return styles.tag;
|
|
253
|
-
case 'attribute':
|
|
254
|
-
return styles.attribute;
|
|
255
|
-
case 'selector':
|
|
256
|
-
return styles.selector;
|
|
257
|
-
case 'property':
|
|
258
|
-
return styles.property;
|
|
259
|
-
case 'value':
|
|
260
|
-
return styles.value;
|
|
261
|
-
default:
|
|
262
|
-
return [styles.plain, { color: AppColors_1.AppColors.primaryBlack }];
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
const ArrowUpIcon = ({ color = AppColors_1.AppColors.slate500, size = 16 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
266
|
-
<react_native_svg_1.Path d="M18 15l-6-6-6 6" stroke={color} strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"/>
|
|
267
|
-
</react_native_svg_1.default>);
|
|
268
|
-
const ArrowDownIcon = ({ color = AppColors_1.AppColors.slate500, size = 16 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
269
|
-
<react_native_svg_1.Path d="M6 9l6 6 6-6" stroke={color} strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"/>
|
|
270
|
-
</react_native_svg_1.default>);
|
|
271
|
-
const CodeSnippetLine = react_1.default.memo(({ line, lineIndex, language, search, isActiveMatch, }) => {
|
|
272
|
-
const tokens = (0, react_1.useMemo)(() => {
|
|
273
|
-
if (language === 'html')
|
|
274
|
-
return tokenizeHTML(line);
|
|
275
|
-
if (language === 'css')
|
|
276
|
-
return tokenizeCSS(line);
|
|
277
|
-
return tokenizeJS(line);
|
|
278
|
-
}, [line, language]);
|
|
279
|
-
const renderTokenText = (text, type) => {
|
|
280
|
-
const baseStyle = getStyleForType(type);
|
|
281
|
-
if (!search) {
|
|
282
|
-
return <react_native_1.Text style={baseStyle}>{text}</react_native_1.Text>;
|
|
283
|
-
}
|
|
284
|
-
const parts = text.split(new RegExp(`(${escapeRegExp(search)})`, 'gi'));
|
|
285
|
-
return (<react_native_1.Text style={baseStyle}>
|
|
286
|
-
{parts.map((part, index) => {
|
|
287
|
-
const isMatch = part.toLowerCase() === search.toLowerCase();
|
|
288
|
-
return isMatch ? (<react_native_1.Text key={index} style={styles.highlight}>
|
|
289
|
-
{part}
|
|
290
|
-
</react_native_1.Text>) : (part);
|
|
291
|
-
})}
|
|
292
|
-
</react_native_1.Text>);
|
|
293
|
-
};
|
|
294
|
-
return (<react_native_1.View style={[styles.lineRow, isActiveMatch && styles.activeMatchRow]}>
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),__importStar=this&&this.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var o=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[o.length]=r);return o},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var o=t(e),r=0;r<o.length;r++)o[r]!=="default"&&__createBinding(n,e,o[r]);return __setModuleDefault(n,e),n}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),react_native_svg_1=__importStar(require("react-native-svg")),NetworkIcons_1=require("./NetworkIcons"),CopyButton_1=__importDefault(require("./CopyButton")),TouchableScale_1=__importDefault(require("./TouchableScale")),AppColors_1=require("../styles/AppColors"),AppFonts_1=require("../styles/AppFonts"),escapeRegExp=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),formatHTML=t=>{if(!t)return"";let e=0;const o=t.replace(/<([a-zA-Z0-9:-]+)([^>]*)>\s*<\/([a-zA-Z0-9:-]+)>/g,"<$1$2></$3>").replace(/(<[^>]+>)/g,`
|
|
2
|
+
$1
|
|
3
|
+
`).replace(/\n+/g,`
|
|
4
|
+
`).split(`
|
|
5
|
+
`),r=[],i=/^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/i;for(let s=0;s<o.length;s++){const l=o[s].trim();if(l&&(l.startsWith("</")&&(e=Math.max(0,e-1)),r.push(" ".repeat(e)+l),l.startsWith("<")&&!l.startsWith("</")&&!l.startsWith("<!")&&!l.endsWith("/>"))){const u=l.match(/^<([a-zA-Z0-9:-]+)/);if(u){const d=u[1];i.test(d)||new RegExp(`</${escapeRegExp(d)}>`).test(l)||e++}}}return r.join(`
|
|
6
|
+
`)},formatCSS=t=>{if(!t)return"";const n=t.replace(/\s*\{\s*/g,` {
|
|
7
|
+
`).replace(/\s*;\s*/g,`;
|
|
8
|
+
`).replace(/\s*\}\s*/g,`
|
|
9
|
+
}
|
|
10
|
+
`).replace(/\n+/g,`
|
|
11
|
+
`).split(`
|
|
12
|
+
`);let o=0;const r=[];for(let i=0;i<n.length;i++){const s=n[i].trim();s&&(s.startsWith("}")&&(o=Math.max(0,o-1)),r.push(" ".repeat(o)+s),s.endsWith("{")&&o++)}return r.join(`
|
|
13
|
+
`)},formatJS=t=>{if(!t)return"";const e=t.split(/\r?\n/);let n=0;const o=[];for(let r=0;r<e.length;r++){const i=e[r].trim();if(!i)continue;let s=(i.match(/\{|\[/g)||[]).length,l=(i.match(/\}|\]/g)||[]).length;i.startsWith("}")||i.startsWith("]")?n=Math.max(0,n-1):l>s&&(n=Math.max(0,n-(l-s))),o.push(" ".repeat(n)+i),s>l&&!i.startsWith("}")&&!i.startsWith("]")?n+=s-l:(i.endsWith("{")||i.endsWith("["))&&n++}return o.join(`
|
|
14
|
+
`)},tokenizeJS=t=>{const e=[],n=/(\/\/.*|\/\*[\s\S]*?\*\/)|(\"(?:\\.|[^\"\\])*\"|\'(?:\\.|[^\'\\])*\'|\`(?:\\.|[^\`\\])*\`)|(\b(const|let|var|function|return|if|else|for|while|import|export|class|try|catch|new|this|async|await|break|continue|switch|case|default|throw|typeof|yield)\b)|(\b(console|window|document|fetch|global|require|module|exports|Promise|Map|Set|Array|Object|String|Number|Boolean)\b)|(\b\d+(?:\.\d+)?\b)/g;let o=0,r;for(;(r=n.exec(t))!==null;){n.lastIndex===r.index&&n.lastIndex++,r.index>o&&e.push({text:t.substring(o,r.index),type:"plain"});const i=r[0];r[1]?e.push({text:i,type:"comment"}):r[2]?e.push({text:i,type:"string"}):r[3]?e.push({text:i,type:"keyword"}):r[4]?e.push({text:i,type:"builtin"}):r[5]&&e.push({text:i,type:"number"}),o=n.lastIndex}return o<t.length&&e.push({text:t.substring(o),type:"plain"}),e},tokenizeCSS=t=>{const e=[],n=/(\/\*[\s\S]*?\*\/)|(\.[a-zA-Z0-9_-]+|#[a-zA-Z0-9_-]+|[a-zA-Z0-9_-]+(?=\s*\{))|([a-zA-Z0-9_-]+(?=\s*:))|(:[^;]+;)/g;let o=0,r;for(;(r=n.exec(t))!==null;){n.lastIndex===r.index&&n.lastIndex++,r.index>o&&e.push({text:t.substring(o,r.index),type:"plain"});const i=r[0];r[1]?e.push({text:i,type:"comment"}):r[2]?e.push({text:i,type:"selector"}):r[3]?e.push({text:i,type:"property"}):r[4]&&(e.push({text:":",type:"plain"}),e.push({text:i.substring(1),type:"value"})),o=n.lastIndex}return o<t.length&&e.push({text:t.substring(o),type:"plain"}),e},tokenizeHTML=t=>{const e=[],n=/(<!--[\s\S]*?-->)|(<\/?[a-zA-Z0-9:-]+>?)|(\"(?:\\.|[^\"\\])*\"|\'(?:\\.|[^\'\\])*\')|([a-zA-Z0-9:-]+(?=\s*=))/g;let o=0,r;for(;(r=n.exec(t))!==null;){n.lastIndex===r.index&&n.lastIndex++,r.index>o&&e.push({text:t.substring(o,r.index),type:"plain"});const i=r[0];r[1]?e.push({text:i,type:"comment"}):r[2]?e.push({text:i,type:"tag"}):r[3]?e.push({text:i,type:"string"}):r[4]&&e.push({text:i,type:"attribute"}),o=n.lastIndex}return o<t.length&&e.push({text:t.substring(o),type:"plain"}),e},getStyleForType=t=>{switch(t){case"comment":return styles.comment;case"string":return styles.string;case"keyword":return styles.keyword;case"builtin":return styles.builtin;case"number":return styles.number;case"tag":return styles.tag;case"attribute":return styles.attribute;case"selector":return styles.selector;case"property":return styles.property;case"value":return styles.value;default:return[styles.plain,{color:AppColors_1.AppColors.primaryBlack}]}},ArrowUpIcon=({color:t=AppColors_1.AppColors.slate500,size:e=16})=><react_native_svg_1.default width={e}height={e}viewBox="0 0 24 24"fill="none">
|
|
15
|
+
<react_native_svg_1.Path d="M18 15l-6-6-6 6"stroke={t}strokeWidth="2.5"strokeLinecap="round"strokeLinejoin="round"/>
|
|
16
|
+
</react_native_svg_1.default>,ArrowDownIcon=({color:t=AppColors_1.AppColors.slate500,size:e=16})=><react_native_svg_1.default width={e}height={e}viewBox="0 0 24 24"fill="none">
|
|
17
|
+
<react_native_svg_1.Path d="M6 9l6 6 6-6"stroke={t}strokeWidth="2.5"strokeLinecap="round"strokeLinejoin="round"/>
|
|
18
|
+
</react_native_svg_1.default>,CodeSnippetLine=react_1.default.memo(({line:t,lineIndex:e,language:n,search:o,isActiveMatch:r})=>{const i=(0,react_1.useMemo)(()=>n==="html"?tokenizeHTML(t):n==="css"?tokenizeCSS(t):tokenizeJS(t),[t,n]),s=(l,u)=>{const d=getStyleForType(u);if(!o)return<react_native_1.Text style={d}>{l}</react_native_1.Text>;const y=l.split(new RegExp(`(${escapeRegExp(o)})`,"gi"));return<react_native_1.Text style={d}>
|
|
19
|
+
{y.map((f,m)=>f.toLowerCase()===o.toLowerCase()?<react_native_1.Text key={m}style={styles.highlight}>
|
|
20
|
+
{f}
|
|
21
|
+
</react_native_1.Text>:f)}
|
|
22
|
+
</react_native_1.Text>};return<react_native_1.View style={[styles.lineRow,r&&styles.activeMatchRow]}>
|
|
295
23
|
|
|
296
|
-
<react_native_1.View style={[styles.gutter,
|
|
297
|
-
<react_native_1.Text style={[styles.lineNumber,
|
|
24
|
+
<react_native_1.View style={[styles.gutter,{backgroundColor:AppColors_1.AppColors.grayBackground,borderRightColor:AppColors_1.AppColors.grayBorderSecondary},r&&styles.activeMatchGutter]}>
|
|
25
|
+
<react_native_1.Text style={[styles.lineNumber,{color:AppColors_1.AppColors.grayTextWeak},r&&styles.activeMatchLineNumber]}>{e+1}</react_native_1.Text>
|
|
298
26
|
</react_native_1.View>
|
|
299
27
|
|
|
300
28
|
|
|
301
29
|
<react_native_1.View style={styles.codeLine}>
|
|
302
|
-
<react_native_1.Text style={[styles.codeLineText,
|
|
303
|
-
{
|
|
304
|
-
{
|
|
305
|
-
</react_1.default.Fragment>)
|
|
30
|
+
<react_native_1.Text style={[styles.codeLineText,{color:AppColors_1.AppColors.primaryBlack}]}>
|
|
31
|
+
{i.length===0?<react_native_1.Text style={[styles.plain,{color:AppColors_1.AppColors.primaryBlack}]}> </react_native_1.Text>:i.map((l,u)=><react_1.default.Fragment key={u}>
|
|
32
|
+
{s(l.text,l.type)}
|
|
33
|
+
</react_1.default.Fragment>)}
|
|
306
34
|
</react_native_1.Text>
|
|
307
35
|
</react_native_1.View>
|
|
308
|
-
</react_native_1.View>);
|
|
309
|
-
});
|
|
310
|
-
const CodeSnippet = ({ code, language, search, }) => {
|
|
311
|
-
const [searchQuery, setSearchQuery] = (0, react_1.useState)('');
|
|
312
|
-
const [debouncedQuery, setDebouncedQuery] = (0, react_1.useState)('');
|
|
313
|
-
const [currentMatchIdx, setCurrentMatchIdx] = (0, react_1.useState)(-1);
|
|
314
|
-
const [visibleLinesCount, setVisibleLinesCount] = (0, react_1.useState)(200);
|
|
315
|
-
const flatListRef = (0, react_1.useRef)(null);
|
|
316
|
-
(0, react_1.useEffect)(() => {
|
|
317
|
-
if (search !== undefined) {
|
|
318
|
-
setSearchQuery(search);
|
|
319
|
-
}
|
|
320
|
-
}, [search]);
|
|
321
|
-
(0, react_1.useEffect)(() => {
|
|
322
|
-
const timer = setTimeout(() => {
|
|
323
|
-
setDebouncedQuery(searchQuery);
|
|
324
|
-
}, 300);
|
|
325
|
-
return () => clearTimeout(timer);
|
|
326
|
-
}, [searchQuery]);
|
|
327
|
-
const formattedCode = (0, react_1.useMemo)(() => {
|
|
328
|
-
if (!code)
|
|
329
|
-
return '';
|
|
330
|
-
if (code.length > 150000) {
|
|
331
|
-
return code;
|
|
332
|
-
}
|
|
333
|
-
if (language === 'html')
|
|
334
|
-
return formatHTML(code);
|
|
335
|
-
if (language === 'css')
|
|
336
|
-
return formatCSS(code);
|
|
337
|
-
if (language === 'javascript')
|
|
338
|
-
return formatJS(code);
|
|
339
|
-
return code;
|
|
340
|
-
}, [code, language]);
|
|
341
|
-
const lines = (0, react_1.useMemo)(() => {
|
|
342
|
-
if (!formattedCode)
|
|
343
|
-
return [];
|
|
344
|
-
return formattedCode.split(/\r?\n/);
|
|
345
|
-
}, [formattedCode]);
|
|
346
|
-
const matches = (0, react_1.useMemo)(() => {
|
|
347
|
-
if (!debouncedQuery.trim() || debouncedQuery.length < 2)
|
|
348
|
-
return [];
|
|
349
|
-
const query = debouncedQuery.toLowerCase();
|
|
350
|
-
const indices = [];
|
|
351
|
-
for (let i = 0; i < lines.length; i++) {
|
|
352
|
-
if (lines[i].toLowerCase().includes(query)) {
|
|
353
|
-
indices.push(i);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
return indices;
|
|
357
|
-
}, [debouncedQuery, lines]);
|
|
358
|
-
(0, react_1.useEffect)(() => {
|
|
359
|
-
setVisibleLinesCount(200);
|
|
360
|
-
setSearchQuery(search || '');
|
|
361
|
-
setCurrentMatchIdx(-1);
|
|
362
|
-
}, [code, language]);
|
|
363
|
-
(0, react_1.useEffect)(() => {
|
|
364
|
-
if (matches.length > 0) {
|
|
365
|
-
setCurrentMatchIdx(0);
|
|
366
|
-
scrollToMatch(0);
|
|
367
|
-
}
|
|
368
|
-
else {
|
|
369
|
-
setCurrentMatchIdx(-1);
|
|
370
|
-
}
|
|
371
|
-
}, [matches]);
|
|
372
|
-
const scrollToMatch = (matchIdx) => {
|
|
373
|
-
if (matches.length === 0 || matchIdx < 0 || matchIdx >= matches.length)
|
|
374
|
-
return;
|
|
375
|
-
const lineIdx = matches[matchIdx];
|
|
376
|
-
if (lineIdx >= visibleLinesCount) {
|
|
377
|
-
setVisibleLinesCount(lineIdx + 100);
|
|
378
|
-
}
|
|
379
|
-
setTimeout(() => {
|
|
380
|
-
try {
|
|
381
|
-
flatListRef.current?.scrollToIndex({
|
|
382
|
-
index: lineIdx,
|
|
383
|
-
animated: false,
|
|
384
|
-
viewPosition: 0.3,
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
catch (e) {
|
|
388
|
-
}
|
|
389
|
-
}, 50);
|
|
390
|
-
};
|
|
391
|
-
const onScrollToIndexFailed = (error) => {
|
|
392
|
-
flatListRef.current?.scrollToOffset({
|
|
393
|
-
offset: error.averageItemLength * error.index,
|
|
394
|
-
animated: false,
|
|
395
|
-
});
|
|
396
|
-
setTimeout(() => {
|
|
397
|
-
try {
|
|
398
|
-
flatListRef.current?.scrollToIndex({
|
|
399
|
-
index: error.index,
|
|
400
|
-
animated: false,
|
|
401
|
-
viewPosition: 0.3,
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
catch (err) {
|
|
405
|
-
console.warn('Scroll to line index failed after fallback retry:', err);
|
|
406
|
-
}
|
|
407
|
-
}, 60);
|
|
408
|
-
};
|
|
409
|
-
const handleNextMatch = () => {
|
|
410
|
-
if (matches.length === 0)
|
|
411
|
-
return;
|
|
412
|
-
const nextIdx = (currentMatchIdx + 1) % matches.length;
|
|
413
|
-
setCurrentMatchIdx(nextIdx);
|
|
414
|
-
scrollToMatch(nextIdx);
|
|
415
|
-
};
|
|
416
|
-
const handlePrevMatch = () => {
|
|
417
|
-
if (matches.length === 0)
|
|
418
|
-
return;
|
|
419
|
-
const prevIdx = (currentMatchIdx - 1 + matches.length) % matches.length;
|
|
420
|
-
setCurrentMatchIdx(prevIdx);
|
|
421
|
-
scrollToMatch(prevIdx);
|
|
422
|
-
};
|
|
423
|
-
const visibleLines = (0, react_1.useMemo)(() => {
|
|
424
|
-
return lines.slice(0, visibleLinesCount);
|
|
425
|
-
}, [lines, visibleLinesCount]);
|
|
426
|
-
const handleEndReached = () => {
|
|
427
|
-
if (visibleLinesCount < lines.length) {
|
|
428
|
-
setVisibleLinesCount(prev => Math.min(prev + 150, lines.length));
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
const renderLine = ({ item, index }) => {
|
|
432
|
-
const isActiveMatch = matches.length > 0 && currentMatchIdx >= 0 && index === matches[currentMatchIdx];
|
|
433
|
-
return (<CodeSnippetLine line={item} lineIndex={index} language={language} search={debouncedQuery} isActiveMatch={isActiveMatch}/>);
|
|
434
|
-
};
|
|
435
|
-
return (<react_native_1.View style={{ flex: 1 }}>
|
|
36
|
+
</react_native_1.View>}),CodeSnippet=({code:t,language:e,search:n})=>{const[o,r]=(0,react_1.useState)(""),[i,s]=(0,react_1.useState)(""),[l,u]=(0,react_1.useState)(-1),[d,y]=(0,react_1.useState)(200),f=(0,react_1.useRef)(null);(0,react_1.useEffect)(()=>{n!==void 0&&r(n)},[n]),(0,react_1.useEffect)(()=>{const a=setTimeout(()=>{s(o)},300);return()=>clearTimeout(a)},[o]);const m=(0,react_1.useMemo)(()=>t?t.length>15e4?t:e==="html"?formatHTML(t):e==="css"?formatCSS(t):e==="javascript"?formatJS(t):t:"",[t,e]),h=(0,react_1.useMemo)(()=>m?m.split(/\r?\n/):[],[m]),c=(0,react_1.useMemo)(()=>{if(!i.trim()||i.length<2)return[];const a=i.toLowerCase(),p=[];for(let g=0;g<h.length;g++)h[g].toLowerCase().includes(a)&&p.push(g);return p},[i,h]);(0,react_1.useEffect)(()=>{y(200),r(n||""),u(-1)},[t,e]),(0,react_1.useEffect)(()=>{c.length>0?(u(0),x(0)):u(-1)},[c]);const x=a=>{if(c.length===0||a<0||a>=c.length)return;const p=c[a];p>=d&&y(p+100),setTimeout(()=>{try{f.current?.scrollToIndex({index:p,animated:!1,viewPosition:.3})}catch{}},50)},b=a=>{f.current?.scrollToOffset({offset:a.averageItemLength*a.index,animated:!1}),setTimeout(()=>{try{f.current?.scrollToIndex({index:a.index,animated:!1,viewPosition:.3})}catch(p){console.warn("Scroll to line index failed after fallback retry:",p)}},60)},C=()=>{if(c.length===0)return;const a=(l+1)%c.length;u(a),x(a)},_=()=>{if(c.length===0)return;const a=(l-1+c.length)%c.length;u(a),x(a)},w=(0,react_1.useMemo)(()=>h.slice(0,d),[h,d]),A=()=>{d<h.length&&y(a=>Math.min(a+150,h.length))},v=({item:a,index:p})=>{const g=c.length>0&&l>=0&&p===c[l];return<CodeSnippetLine line={a}lineIndex={p}language={e}search={i}isActiveMatch={g}/>};return<react_native_1.View style={{flex:1}}>
|
|
436
37
|
|
|
437
38
|
<react_native_1.View style={styles.searchRow}>
|
|
438
|
-
<react_native_1.View style={[styles.searchBar,
|
|
439
|
-
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak}
|
|
440
|
-
<react_native_1.TextInput placeholder={`Search ${
|
|
39
|
+
<react_native_1.View style={[styles.searchBar,{backgroundColor:AppColors_1.AppColors.primaryLight,borderColor:AppColors_1.AppColors.grayBorderSecondary}]}>
|
|
40
|
+
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak}size={15}/>
|
|
41
|
+
<react_native_1.TextInput placeholder={`Search ${e.toUpperCase()}...`}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={o}onChangeText={r}style={[styles.searchInput,{color:AppColors_1.AppColors.primaryBlack}]}autoCorrect={!1}autoCapitalize="none"/>
|
|
441
42
|
|
|
442
43
|
|
|
443
|
-
{
|
|
444
|
-
{
|
|
445
|
-
</react_native_1.Text>
|
|
44
|
+
{i.length>=2&&<react_native_1.Text style={[styles.matchCountText,{backgroundColor:AppColors_1.AppColors.grayBackground,color:AppColors_1.AppColors.grayTextWeak}]}>
|
|
45
|
+
{c.length>0?`${l+1}/${c.length}`:"0/0"}
|
|
46
|
+
</react_native_1.Text>}
|
|
446
47
|
|
|
447
|
-
{
|
|
448
|
-
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak}
|
|
449
|
-
</react_native_1.Pressable>
|
|
48
|
+
{o.length>0&&<react_native_1.Pressable onPress={()=>r("")}hitSlop={8}style={styles.clearBtn}>
|
|
49
|
+
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak}size={12}/>
|
|
50
|
+
</react_native_1.Pressable>}
|
|
450
51
|
</react_native_1.View>
|
|
451
52
|
|
|
452
53
|
|
|
453
|
-
{
|
|
454
|
-
<TouchableScale_1.default onPress={
|
|
455
|
-
<ArrowUpIcon color={AppColors_1.AppColors.grayTextStrong}
|
|
54
|
+
{c.length>0&&<react_native_1.View style={[styles.navArrowsGroup,{backgroundColor:AppColors_1.AppColors.primaryLight,borderColor:AppColors_1.AppColors.grayBorderSecondary}]}>
|
|
55
|
+
<TouchableScale_1.default onPress={_}hitSlop={8}style={styles.navArrowBtn}>
|
|
56
|
+
<ArrowUpIcon color={AppColors_1.AppColors.grayTextStrong}size={14}/>
|
|
456
57
|
</TouchableScale_1.default>
|
|
457
|
-
<TouchableScale_1.default onPress={
|
|
458
|
-
<ArrowDownIcon color={AppColors_1.AppColors.grayTextStrong}
|
|
58
|
+
<TouchableScale_1.default onPress={C}hitSlop={8}style={styles.navArrowBtn}>
|
|
59
|
+
<ArrowDownIcon color={AppColors_1.AppColors.grayTextStrong}size={14}/>
|
|
459
60
|
</TouchableScale_1.default>
|
|
460
|
-
</react_native_1.View>
|
|
61
|
+
</react_native_1.View>}
|
|
461
62
|
|
|
462
|
-
<CopyButton_1.default value={
|
|
63
|
+
<CopyButton_1.default value={t}label={`${e.toUpperCase()} Source`}/>
|
|
463
64
|
</react_native_1.View>
|
|
464
65
|
|
|
465
66
|
|
|
466
|
-
<react_native_1.View style={[styles.container,
|
|
467
|
-
<react_native_1.FlatList ref={
|
|
67
|
+
<react_native_1.View style={[styles.container,{backgroundColor:AppColors_1.AppColors.grayBackground,borderColor:AppColors_1.AppColors.grayBorderSecondary}]}>
|
|
68
|
+
<react_native_1.FlatList ref={f}data={w}renderItem={v}keyExtractor={(a,p)=>String(p)}maxToRenderPerBatch={30}windowSize={5}initialNumToRender={50}removeClippedSubviews={react_native_1.Platform.OS==="android"}onEndReached={A}onEndReachedThreshold={.5}onScrollToIndexFailed={b}/>
|
|
468
69
|
</react_native_1.View>
|
|
469
|
-
</react_native_1.View>);
|
|
470
|
-
};
|
|
471
|
-
const monoFont = AppFonts_1.AppFonts.interRegular;
|
|
472
|
-
const styles = react_native_1.StyleSheet.create({
|
|
473
|
-
container: {
|
|
474
|
-
flex: 1,
|
|
475
|
-
backgroundColor: AppColors_1.AppColors.slate50,
|
|
476
|
-
borderRadius: 8,
|
|
477
|
-
borderWidth: 1,
|
|
478
|
-
borderColor: AppColors_1.AppColors.slate200,
|
|
479
|
-
overflow: 'hidden',
|
|
480
|
-
},
|
|
481
|
-
searchRow: {
|
|
482
|
-
flexDirection: 'row',
|
|
483
|
-
alignItems: 'center',
|
|
484
|
-
marginBottom: 6,
|
|
485
|
-
gap: 8,
|
|
486
|
-
},
|
|
487
|
-
searchBar: {
|
|
488
|
-
flex: 1,
|
|
489
|
-
flexDirection: 'row',
|
|
490
|
-
alignItems: 'center',
|
|
491
|
-
backgroundColor: AppColors_1.AppColors.white,
|
|
492
|
-
borderRadius: 8,
|
|
493
|
-
borderWidth: 1,
|
|
494
|
-
borderColor: AppColors_1.AppColors.slate200,
|
|
495
|
-
paddingHorizontal: 8,
|
|
496
|
-
height: 32,
|
|
497
|
-
},
|
|
498
|
-
searchInput: {
|
|
499
|
-
flex: 1,
|
|
500
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
501
|
-
fontSize: 12,
|
|
502
|
-
color: AppColors_1.AppColors.slate900,
|
|
503
|
-
marginLeft: 6,
|
|
504
|
-
paddingVertical: 0,
|
|
505
|
-
},
|
|
506
|
-
matchCountText: {
|
|
507
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
508
|
-
fontSize: 10,
|
|
509
|
-
color: AppColors_1.AppColors.slate500,
|
|
510
|
-
marginHorizontal: 6,
|
|
511
|
-
backgroundColor: AppColors_1.AppColors.slate100,
|
|
512
|
-
paddingHorizontal: 6,
|
|
513
|
-
paddingVertical: 2,
|
|
514
|
-
borderRadius: 4,
|
|
515
|
-
},
|
|
516
|
-
clearBtn: {
|
|
517
|
-
padding: 4,
|
|
518
|
-
},
|
|
519
|
-
navArrowsGroup: {
|
|
520
|
-
flexDirection: 'row',
|
|
521
|
-
alignItems: 'center',
|
|
522
|
-
backgroundColor: AppColors_1.AppColors.white,
|
|
523
|
-
borderRadius: 8,
|
|
524
|
-
borderWidth: 1,
|
|
525
|
-
borderColor: AppColors_1.AppColors.slate200,
|
|
526
|
-
height: 32,
|
|
527
|
-
paddingHorizontal: 2,
|
|
528
|
-
},
|
|
529
|
-
navArrowBtn: {
|
|
530
|
-
padding: 5,
|
|
531
|
-
borderRadius: 6,
|
|
532
|
-
alignItems: 'center',
|
|
533
|
-
justifyContent: 'center',
|
|
534
|
-
},
|
|
535
|
-
lineRow: {
|
|
536
|
-
flexDirection: 'row',
|
|
537
|
-
alignItems: 'stretch',
|
|
538
|
-
minHeight: 20,
|
|
539
|
-
paddingVertical: 1,
|
|
540
|
-
},
|
|
541
|
-
activeMatchRow: {
|
|
542
|
-
backgroundColor: `${AppColors_1.AppColors.amber600}38`,
|
|
543
|
-
borderLeftWidth: 4,
|
|
544
|
-
borderLeftColor: AppColors_1.AppColors.amber600,
|
|
545
|
-
},
|
|
546
|
-
gutter: {
|
|
547
|
-
width: 40,
|
|
548
|
-
backgroundColor: AppColors_1.AppColors.slate100,
|
|
549
|
-
borderRightWidth: 1,
|
|
550
|
-
borderRightColor: AppColors_1.AppColors.slate200,
|
|
551
|
-
justifyContent: 'flex-start',
|
|
552
|
-
alignItems: 'flex-end',
|
|
553
|
-
paddingRight: 6,
|
|
554
|
-
paddingTop: 1,
|
|
555
|
-
},
|
|
556
|
-
activeMatchGutter: {
|
|
557
|
-
backgroundColor: `${AppColors_1.AppColors.amber600}59`,
|
|
558
|
-
borderRightColor: `${AppColors_1.AppColors.amber600}80`,
|
|
559
|
-
},
|
|
560
|
-
lineNumber: {
|
|
561
|
-
fontFamily: monoFont,
|
|
562
|
-
fontSize: 9,
|
|
563
|
-
color: AppColors_1.AppColors.slate400,
|
|
564
|
-
},
|
|
565
|
-
activeMatchLineNumber: {
|
|
566
|
-
color: AppColors_1.AppColors.amber800,
|
|
567
|
-
fontWeight: 'bold',
|
|
568
|
-
},
|
|
569
|
-
codeLine: {
|
|
570
|
-
flex: 1,
|
|
571
|
-
paddingLeft: 10,
|
|
572
|
-
paddingRight: 12,
|
|
573
|
-
justifyContent: 'center',
|
|
574
|
-
},
|
|
575
|
-
codeLineText: {
|
|
576
|
-
fontFamily: monoFont,
|
|
577
|
-
fontSize: 10.5,
|
|
578
|
-
color: AppColors_1.AppColors.slate700,
|
|
579
|
-
flexWrap: 'wrap',
|
|
580
|
-
},
|
|
581
|
-
plain: {
|
|
582
|
-
fontFamily: monoFont,
|
|
583
|
-
fontSize: 10.5,
|
|
584
|
-
color: AppColors_1.AppColors.slate700,
|
|
585
|
-
},
|
|
586
|
-
comment: {
|
|
587
|
-
fontFamily: monoFont,
|
|
588
|
-
fontSize: 10.5,
|
|
589
|
-
color: AppColors_1.AppColors.slate500,
|
|
590
|
-
fontStyle: 'italic',
|
|
591
|
-
},
|
|
592
|
-
string: {
|
|
593
|
-
fontFamily: monoFont,
|
|
594
|
-
fontSize: 10.5,
|
|
595
|
-
color: AppColors_1.AppColors.amber700,
|
|
596
|
-
},
|
|
597
|
-
keyword: {
|
|
598
|
-
fontFamily: monoFont,
|
|
599
|
-
fontSize: 10.5,
|
|
600
|
-
color: AppColors_1.AppColors.violet600,
|
|
601
|
-
fontWeight: 'bold',
|
|
602
|
-
},
|
|
603
|
-
builtin: {
|
|
604
|
-
fontFamily: monoFont,
|
|
605
|
-
fontSize: 10.5,
|
|
606
|
-
color: AppColors_1.AppColors.teal600,
|
|
607
|
-
},
|
|
608
|
-
number: {
|
|
609
|
-
fontFamily: monoFont,
|
|
610
|
-
fontSize: 10.5,
|
|
611
|
-
color: AppColors_1.AppColors.blue600,
|
|
612
|
-
},
|
|
613
|
-
tag: {
|
|
614
|
-
fontFamily: monoFont,
|
|
615
|
-
fontSize: 10.5,
|
|
616
|
-
color: AppColors_1.AppColors.indigo600,
|
|
617
|
-
fontWeight: 'bold',
|
|
618
|
-
},
|
|
619
|
-
attribute: {
|
|
620
|
-
fontFamily: monoFont,
|
|
621
|
-
fontSize: 10.5,
|
|
622
|
-
color: AppColors_1.AppColors.teal600,
|
|
623
|
-
},
|
|
624
|
-
selector: {
|
|
625
|
-
fontFamily: monoFont,
|
|
626
|
-
fontSize: 10.5,
|
|
627
|
-
color: AppColors_1.AppColors.violet600,
|
|
628
|
-
fontWeight: 'bold',
|
|
629
|
-
},
|
|
630
|
-
property: {
|
|
631
|
-
fontFamily: monoFont,
|
|
632
|
-
fontSize: 10.5,
|
|
633
|
-
color: AppColors_1.AppColors.teal600,
|
|
634
|
-
},
|
|
635
|
-
value: {
|
|
636
|
-
fontFamily: monoFont,
|
|
637
|
-
fontSize: 10.5,
|
|
638
|
-
color: AppColors_1.AppColors.orange600,
|
|
639
|
-
},
|
|
640
|
-
highlight: {
|
|
641
|
-
backgroundColor: AppColors_1.AppColors.highlightYellow,
|
|
642
|
-
color: AppColors_1.AppColors.black,
|
|
643
|
-
},
|
|
644
|
-
});
|
|
645
|
-
exports.default = CodeSnippet;
|
|
70
|
+
</react_native_1.View>},monoFont=AppFonts_1.AppFonts.interRegular,styles=react_native_1.StyleSheet.create({container:{flex:1,backgroundColor:AppColors_1.AppColors.slate50,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.slate200,overflow:"hidden"},searchRow:{flexDirection:"row",alignItems:"center",marginBottom:6,gap:8},searchBar:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.white,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.slate200,paddingHorizontal:8,height:32},searchInput:{flex:1,fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:12,color:AppColors_1.AppColors.slate900,marginLeft:6,paddingVertical:0},matchCountText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.slate500,marginHorizontal:6,backgroundColor:AppColors_1.AppColors.slate100,paddingHorizontal:6,paddingVertical:2,borderRadius:4},clearBtn:{padding:4},navArrowsGroup:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.white,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.slate200,height:32,paddingHorizontal:2},navArrowBtn:{padding:5,borderRadius:6,alignItems:"center",justifyContent:"center"},lineRow:{flexDirection:"row",alignItems:"stretch",minHeight:20,paddingVertical:1},activeMatchRow:{backgroundColor:`${AppColors_1.AppColors.amber600}38`,borderLeftWidth:4,borderLeftColor:AppColors_1.AppColors.amber600},gutter:{width:40,backgroundColor:AppColors_1.AppColors.slate100,borderRightWidth:1,borderRightColor:AppColors_1.AppColors.slate200,justifyContent:"flex-start",alignItems:"flex-end",paddingRight:6,paddingTop:1},activeMatchGutter:{backgroundColor:`${AppColors_1.AppColors.amber600}59`,borderRightColor:`${AppColors_1.AppColors.amber600}80`},lineNumber:{fontFamily:monoFont,fontSize:9,color:AppColors_1.AppColors.slate400},activeMatchLineNumber:{color:AppColors_1.AppColors.amber800,fontWeight:"bold"},codeLine:{flex:1,paddingLeft:10,paddingRight:12,justifyContent:"center"},codeLineText:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.slate700,flexWrap:"wrap"},plain:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.slate700},comment:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.slate500,fontStyle:"italic"},string:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.amber700},keyword:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.violet600,fontWeight:"bold"},builtin:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.teal600},number:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.blue600},tag:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.indigo600,fontWeight:"bold"},attribute:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.teal600},selector:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.violet600,fontWeight:"bold"},property:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.teal600},value:{fontFamily:monoFont,fontSize:10.5,color:AppColors_1.AppColors.orange600},highlight:{backgroundColor:AppColors_1.AppColors.highlightYellow,color:AppColors_1.AppColors.black}});exports.default=CodeSnippet;
|