react-native-inapp-inspector 1.1.13 → 1.1.15
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 +9 -34
- package/dist/commonjs/assets/svgAssets.d.ts +3 -0
- package/dist/commonjs/assets/svgAssets.js +17 -0
- package/dist/commonjs/components/AnalyticsEventCard.d.ts +1 -14
- package/dist/commonjs/components/AnalyticsEventCard.js +120 -50
- package/dist/commonjs/components/AnalyticsGraph.d.ts +2 -6
- package/dist/commonjs/components/AnalyticsGraph.js +8 -8
- package/dist/commonjs/components/AnalyticsTabView.d.ts +15 -0
- package/dist/commonjs/components/AnalyticsTabView.js +157 -0
- package/dist/commonjs/components/AnimatedEntrance.d.ts +1 -1
- package/dist/commonjs/components/AnimatedEntrance.js +2 -2
- package/dist/commonjs/components/ApiDetailView.d.ts +22 -0
- package/dist/commonjs/components/ApiDetailView.js +304 -0
- package/dist/commonjs/components/ApisTabView.d.ts +33 -0
- package/dist/commonjs/components/ApisTabView.js +235 -0
- package/dist/commonjs/components/CodeSnippet.d.ts +1 -5
- package/dist/commonjs/components/CodeSnippet.js +34 -34
- package/dist/commonjs/components/ConsoleLogCard.d.ts +1 -8
- package/dist/commonjs/components/ConsoleLogCard.js +262 -442
- package/dist/commonjs/components/ConsoleLogDetailView.d.ts +9 -0
- package/dist/commonjs/components/ConsoleLogDetailView.js +278 -0
- package/dist/commonjs/components/ConsoleLogsTabView.d.ts +24 -0
- package/dist/commonjs/components/ConsoleLogsTabView.js +354 -0
- package/dist/commonjs/components/DiffViewer.js +4 -2
- package/dist/commonjs/components/DomainHeader.js +66 -41
- package/dist/commonjs/components/EmptyState.d.ts +2 -2
- package/dist/commonjs/components/EmptyState.js +2 -2
- package/dist/commonjs/components/EndOfListFooter.d.ts +8 -0
- package/dist/commonjs/components/EndOfListFooter.js +90 -0
- package/dist/commonjs/components/ErrorBoundary.d.ts +5 -14
- package/dist/commonjs/components/ErrorBoundary.js +28 -28
- package/dist/commonjs/components/FloatingBubble.d.ts +14 -0
- package/dist/commonjs/components/FloatingBubble.js +75 -0
- package/dist/commonjs/components/HeadersSection.js +5 -3
- package/dist/commonjs/components/HighlightText.d.ts +1 -1
- package/dist/commonjs/components/HighlightText.js +5 -7
- package/dist/commonjs/components/Inspector/AnalyticsTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +232 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +410 -0
- package/dist/commonjs/components/Inspector/FabLauncher.d.ts +3 -0
- package/dist/commonjs/components/Inspector/FabLauncher.js +54 -0
- package/dist/commonjs/components/Inspector/InsightsDashboard.d.ts +3 -0
- package/dist/commonjs/components/Inspector/InsightsDashboard.js +619 -0
- package/dist/commonjs/components/Inspector/InspectorContext.d.ts +5 -0
- package/dist/commonjs/components/Inspector/InspectorContext.js +18 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.d.ts +3 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +452 -0
- package/dist/commonjs/components/Inspector/LogDetail.d.ts +3 -0
- package/dist/commonjs/components/Inspector/LogDetail.js +963 -0
- package/dist/commonjs/components/Inspector/MainScreen.d.ts +3 -0
- package/dist/commonjs/components/Inspector/MainScreen.js +68 -0
- package/dist/commonjs/components/Inspector/NavigationTracker.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NavigationTracker.js +12 -0
- package/dist/commonjs/components/Inspector/NetworkDetail.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NetworkDetail.js +405 -0
- package/dist/commonjs/components/Inspector/NetworkTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +281 -0
- package/dist/commonjs/components/Inspector/ReduxTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/ReduxTab.js +75 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1476 -0
- package/dist/commonjs/components/Inspector/TabBar.d.ts +3 -0
- package/dist/commonjs/components/Inspector/TabBar.js +95 -0
- package/dist/commonjs/components/Inspector/WebViewTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/WebViewTab.js +757 -0
- package/dist/commonjs/components/InspectorHeader.d.ts +19 -0
- package/dist/commonjs/components/InspectorHeader.js +329 -0
- package/dist/commonjs/components/InspectorTabBar.d.ts +16 -0
- package/dist/commonjs/components/InspectorTabBar.js +90 -0
- package/dist/commonjs/components/JsonViewer.d.ts +4 -1
- package/dist/commonjs/components/JsonViewer.js +110 -171
- package/dist/commonjs/components/LogCard.js +109 -86
- package/dist/commonjs/components/MetaAccordion.d.ts +1 -10
- package/dist/commonjs/components/MetaAccordion.js +23 -21
- package/dist/commonjs/components/NavigationTracker.d.ts +7 -0
- package/dist/commonjs/components/NavigationTracker.js +76 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
- package/dist/commonjs/components/NetworkIcons.js +54 -8
- package/dist/commonjs/components/ReduxTabView.d.ts +9 -0
- package/dist/commonjs/components/ReduxTabView.js +56 -0
- package/dist/commonjs/components/ReduxTreeView.js +241 -200
- package/dist/commonjs/components/SegmentedTabs.d.ts +15 -0
- package/dist/commonjs/components/SegmentedTabs.js +52 -0
- package/dist/commonjs/components/SettingsView.d.ts +13 -0
- package/dist/commonjs/components/SettingsView.js +328 -0
- package/dist/commonjs/components/TouchableScale.d.ts +2 -2
- package/dist/commonjs/components/TouchableScale.js +2 -2
- package/dist/commonjs/components/TreeNode.js +2 -2
- package/dist/commonjs/constants/index.js +1 -12
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +8 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +42 -1
- package/dist/commonjs/customHooks/consoleLogger.js +137 -13
- package/dist/commonjs/customHooks/networkLogger.d.ts +0 -1
- package/dist/commonjs/customHooks/networkLogger.js +0 -1
- package/dist/commonjs/customHooks/reduxLogger.d.ts +2 -9
- package/dist/commonjs/enums/index.d.ts +39 -0
- package/dist/commonjs/enums/index.js +50 -0
- package/dist/commonjs/helpers/index.d.ts +27 -1
- package/dist/commonjs/helpers/index.js +187 -12
- package/dist/commonjs/helpers/settingsStore.d.ts +2 -24
- package/dist/commonjs/i18n/en.json +144 -0
- package/dist/commonjs/i18n/index.d.ts +2 -0
- package/dist/commonjs/i18n/index.js +27 -0
- package/dist/commonjs/i18n/locales/en.json +314 -0
- package/dist/commonjs/index.d.ts +2 -3
- package/dist/commonjs/index.js +207 -4927
- package/dist/commonjs/styles/AppColors.d.ts +148 -0
- package/dist/commonjs/styles/AppColors.js +176 -0
- package/dist/commonjs/styles/common.d.ts +3 -0
- package/dist/commonjs/styles/common.js +201 -0
- package/dist/commonjs/styles/index.d.ts +219 -435
- package/dist/commonjs/styles/index.js +312 -488
- package/dist/commonjs/types/enums.d.ts +9 -0
- package/dist/commonjs/types/enums.js +4 -0
- package/dist/commonjs/types/index.d.ts +4 -111
- package/dist/commonjs/types/index.js +16 -0
- package/dist/commonjs/types/interfaces.d.ts +337 -0
- package/dist/commonjs/types/interfaces.js +2 -0
- package/dist/esm/assets/svgAssets.d.ts +3 -0
- package/dist/esm/assets/svgAssets.js +14 -0
- package/dist/esm/components/AnalyticsEventCard.d.ts +1 -14
- package/dist/esm/components/AnalyticsEventCard.js +118 -48
- package/dist/esm/components/AnalyticsGraph.d.ts +2 -6
- package/dist/esm/components/AnalyticsGraph.js +8 -8
- package/dist/esm/components/AnalyticsTabView.d.ts +15 -0
- package/dist/esm/components/AnalyticsTabView.js +151 -0
- package/dist/esm/components/AnimatedEntrance.d.ts +1 -1
- package/dist/esm/components/AnimatedEntrance.js +2 -2
- package/dist/esm/components/ApiDetailView.d.ts +22 -0
- package/dist/esm/components/ApiDetailView.js +264 -0
- package/dist/esm/components/ApisTabView.d.ts +33 -0
- package/dist/esm/components/ApisTabView.js +196 -0
- package/dist/esm/components/CodeSnippet.d.ts +1 -5
- package/dist/esm/components/CodeSnippet.js +34 -34
- package/dist/esm/components/ConsoleLogCard.d.ts +1 -8
- package/dist/esm/components/ConsoleLogCard.js +262 -409
- package/dist/esm/components/ConsoleLogDetailView.d.ts +9 -0
- package/dist/esm/components/ConsoleLogDetailView.js +271 -0
- package/dist/esm/components/ConsoleLogsTabView.d.ts +24 -0
- package/dist/esm/components/ConsoleLogsTabView.js +348 -0
- package/dist/esm/components/DiffViewer.js +4 -2
- package/dist/esm/components/DomainHeader.js +66 -41
- package/dist/esm/components/EmptyState.d.ts +2 -2
- package/dist/esm/components/EmptyState.js +2 -2
- package/dist/esm/components/EndOfListFooter.d.ts +8 -0
- package/dist/esm/components/EndOfListFooter.js +83 -0
- package/dist/esm/components/ErrorBoundary.d.ts +5 -14
- package/dist/esm/components/ErrorBoundary.js +29 -29
- package/dist/esm/components/FloatingBubble.d.ts +14 -0
- package/dist/esm/components/FloatingBubble.js +68 -0
- package/dist/esm/components/HeadersSection.js +5 -3
- package/dist/esm/components/HighlightText.d.ts +1 -1
- package/dist/esm/components/HighlightText.js +5 -7
- package/dist/esm/components/Inspector/AnalyticsTab.d.ts +3 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +194 -0
- package/dist/esm/components/Inspector/ConsoleTab.d.ts +3 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +372 -0
- package/dist/esm/components/Inspector/FabLauncher.d.ts +3 -0
- package/dist/esm/components/Inspector/FabLauncher.js +49 -0
- package/dist/esm/components/Inspector/InsightsDashboard.d.ts +3 -0
- package/dist/esm/components/Inspector/InsightsDashboard.js +614 -0
- package/dist/esm/components/Inspector/InspectorContext.d.ts +5 -0
- package/dist/esm/components/Inspector/InspectorContext.js +13 -0
- package/dist/esm/components/Inspector/InspectorHeader.d.ts +3 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +447 -0
- package/dist/esm/components/Inspector/LogDetail.d.ts +3 -0
- package/dist/esm/components/Inspector/LogDetail.js +925 -0
- package/dist/esm/components/Inspector/MainScreen.d.ts +3 -0
- package/dist/esm/components/Inspector/MainScreen.js +63 -0
- package/dist/esm/components/Inspector/NavigationTracker.d.ts +3 -0
- package/dist/esm/components/Inspector/NavigationTracker.js +10 -0
- package/dist/esm/components/Inspector/NetworkDetail.d.ts +3 -0
- package/dist/esm/components/Inspector/NetworkDetail.js +367 -0
- package/dist/esm/components/Inspector/NetworkTab.d.ts +3 -0
- package/dist/esm/components/Inspector/NetworkTab.js +243 -0
- package/dist/esm/components/Inspector/ReduxTab.d.ts +3 -0
- package/dist/esm/components/Inspector/ReduxTab.js +70 -0
- package/dist/esm/components/Inspector/SettingsPanel.d.ts +3 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +1438 -0
- package/dist/esm/components/Inspector/TabBar.d.ts +3 -0
- package/dist/esm/components/Inspector/TabBar.js +90 -0
- package/dist/esm/components/Inspector/WebViewTab.d.ts +3 -0
- package/dist/esm/components/Inspector/WebViewTab.js +752 -0
- package/dist/esm/components/InspectorHeader.d.ts +19 -0
- package/dist/esm/components/InspectorHeader.js +323 -0
- package/dist/esm/components/InspectorTabBar.d.ts +16 -0
- package/dist/esm/components/InspectorTabBar.js +84 -0
- package/dist/esm/components/JsonViewer.d.ts +4 -1
- package/dist/esm/components/JsonViewer.js +111 -172
- package/dist/esm/components/LogCard.js +111 -88
- package/dist/esm/components/MetaAccordion.d.ts +1 -10
- package/dist/esm/components/MetaAccordion.js +23 -21
- package/dist/esm/components/NavigationTracker.d.ts +7 -0
- package/dist/esm/components/NavigationTracker.js +39 -0
- package/dist/esm/components/NetworkIcons.d.ts +6 -0
- package/dist/esm/components/NetworkIcons.js +46 -6
- package/dist/esm/components/ReduxTabView.d.ts +9 -0
- package/dist/esm/components/ReduxTabView.js +50 -0
- package/dist/esm/components/ReduxTreeView.js +243 -202
- package/dist/esm/components/SegmentedTabs.d.ts +15 -0
- package/dist/esm/components/SegmentedTabs.js +47 -0
- package/dist/esm/components/SettingsView.d.ts +13 -0
- package/dist/esm/components/SettingsView.js +321 -0
- package/dist/esm/components/TouchableScale.d.ts +2 -2
- package/dist/esm/components/TouchableScale.js +2 -2
- package/dist/esm/components/TreeNode.js +2 -2
- package/dist/esm/constants/index.js +1 -12
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.d.ts +8 -0
- package/dist/esm/customHooks/analyticsLogger.js +37 -0
- package/dist/esm/customHooks/consoleLogger.js +137 -13
- package/dist/esm/customHooks/networkLogger.d.ts +0 -1
- package/dist/esm/customHooks/networkLogger.js +0 -1
- package/dist/esm/customHooks/reduxLogger.d.ts +2 -9
- package/dist/esm/enums/index.d.ts +39 -0
- package/dist/esm/enums/index.js +47 -0
- package/dist/esm/helpers/index.d.ts +27 -1
- package/dist/esm/helpers/index.js +180 -11
- package/dist/esm/helpers/settingsStore.d.ts +2 -24
- package/dist/esm/i18n/en.json +144 -0
- package/dist/esm/i18n/index.d.ts +2 -0
- package/dist/esm/i18n/index.js +22 -0
- package/dist/esm/i18n/locales/en.json +314 -0
- package/dist/esm/index.d.ts +2 -3
- package/dist/esm/index.js +207 -4923
- package/dist/esm/styles/AppColors.d.ts +148 -0
- package/dist/esm/styles/AppColors.js +176 -0
- package/dist/esm/styles/common.d.ts +3 -0
- package/dist/esm/styles/common.js +197 -0
- package/dist/esm/styles/index.d.ts +219 -435
- package/dist/esm/styles/index.js +312 -488
- package/dist/esm/types/enums.d.ts +9 -0
- package/dist/esm/types/enums.js +3 -0
- package/dist/esm/types/index.d.ts +4 -111
- package/dist/esm/types/index.js +2 -1
- package/dist/esm/types/interfaces.d.ts +337 -0
- package/dist/esm/types/interfaces.js +1 -0
- package/example/App.tsx +88 -1
- package/example/android/app/build.gradle +29 -1
- package/example/android/app/src/main/java/com/example/MainApplication.kt +25 -0
- package/example/android/build.gradle +31 -4
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/android/gradle.properties +1 -0
- package/example/android/settings.gradle +20 -1
- package/example/package-lock.json +1 -1
- package/package.json +3 -1
|
@@ -1,65 +1,13 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { Pressable, StyleSheet, Text, View, } from 'react-native';
|
|
3
4
|
import { AppColors } from '../styles/AppColors';
|
|
4
5
|
import { AppFonts } from '../styles/AppFonts';
|
|
6
|
+
import { formatTime, getJsonContent, getJsonPreviewText, parseStackLine, } from '../helpers';
|
|
5
7
|
import HighlightText from './HighlightText';
|
|
6
8
|
import CopyButton from './CopyButton';
|
|
7
9
|
import { ChevronIcon } from './NetworkIcons';
|
|
8
|
-
import
|
|
9
|
-
const formatTime = (ts) => {
|
|
10
|
-
const d = new Date(ts);
|
|
11
|
-
const hh = String(d.getHours()).padStart(2, '0');
|
|
12
|
-
const mm = String(d.getMinutes()).padStart(2, '0');
|
|
13
|
-
const ss = String(d.getSeconds()).padStart(2, '0');
|
|
14
|
-
const ms = String(d.getMilliseconds()).padStart(3, '0');
|
|
15
|
-
return `${hh}:${mm}:${ss}.${ms}`;
|
|
16
|
-
};
|
|
17
|
-
const getJsonContent = (message) => {
|
|
18
|
-
if (!message)
|
|
19
|
-
return null;
|
|
20
|
-
const indices = [];
|
|
21
|
-
for (let i = 0; i < message.length; i++) {
|
|
22
|
-
if (message[i] === '{' || message[i] === '[') {
|
|
23
|
-
indices.push(i);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
for (const index of indices) {
|
|
27
|
-
const candidate = message.substring(index).trim();
|
|
28
|
-
try {
|
|
29
|
-
const parsed = JSON.parse(candidate);
|
|
30
|
-
if (parsed !== null && typeof parsed === 'object') {
|
|
31
|
-
const header = message.substring(0, index).trim();
|
|
32
|
-
return { header, data: parsed };
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
// Ignore
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return null;
|
|
40
|
-
};
|
|
41
|
-
const getJsonPreviewText = (data) => {
|
|
42
|
-
try {
|
|
43
|
-
const formatted = JSON.stringify(data, null, 2);
|
|
44
|
-
const lines = formatted.split('\n');
|
|
45
|
-
if (lines.length > 3) {
|
|
46
|
-
return {
|
|
47
|
-
text: lines.slice(0, 3).join('\n') + '\n...',
|
|
48
|
-
hasMore: true,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
text: formatted,
|
|
53
|
-
hasMore: false,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
catch (e) {
|
|
57
|
-
return {
|
|
58
|
-
text: String(data),
|
|
59
|
-
hasMore: false,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
};
|
|
10
|
+
import { useInspector } from './Inspector/InspectorContext';
|
|
63
11
|
const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle, numberOfLines) => {
|
|
64
12
|
if (!message)
|
|
65
13
|
return null;
|
|
@@ -75,94 +23,59 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
|
|
|
75
23
|
.trim()
|
|
76
24
|
.toUpperCase();
|
|
77
25
|
if (cleanTag === 'API')
|
|
78
|
-
return
|
|
26
|
+
return AppColors.sky600;
|
|
79
27
|
if (cleanTag === 'TEST')
|
|
80
|
-
return
|
|
28
|
+
return AppColors.green600;
|
|
81
29
|
if (cleanTag === 'APP')
|
|
82
|
-
return
|
|
83
|
-
if (cleanTag === '
|
|
84
|
-
return
|
|
85
|
-
if (cleanTag === '
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
return '#DB2777';
|
|
89
|
-
let hash = 0;
|
|
90
|
-
for (let i = 0; i < cleanTag.length; i++) {
|
|
91
|
-
hash = cleanTag.charCodeAt(i) + ((hash << 5) - hash);
|
|
92
|
-
}
|
|
93
|
-
const colors = [
|
|
94
|
-
'#0891B2',
|
|
95
|
-
'#0D9488',
|
|
96
|
-
'#2563EB',
|
|
97
|
-
'#D97706',
|
|
98
|
-
'#E11D48',
|
|
99
|
-
'#8B5CF6',
|
|
100
|
-
];
|
|
101
|
-
return colors[Math.abs(hash) % colors.length];
|
|
30
|
+
return AppColors.indigo600;
|
|
31
|
+
if (cleanTag === 'WARN')
|
|
32
|
+
return AppColors.darkOrange || AppColors.lightOrange;
|
|
33
|
+
if (cleanTag === 'ERROR')
|
|
34
|
+
return AppColors.errorColor;
|
|
35
|
+
return AppColors.slate600;
|
|
102
36
|
};
|
|
103
|
-
return (<
|
|
104
|
-
{
|
|
37
|
+
return (<View style={{ flexDirection: 'column', gap: 6 }}>
|
|
38
|
+
<View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 4 }}>
|
|
39
|
+
{tags.map((tag, i) => {
|
|
105
40
|
const color = getTagColor(tag);
|
|
106
|
-
return (<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
41
|
+
return (<View key={i} style={[
|
|
42
|
+
styles.prefixTag,
|
|
43
|
+
{
|
|
44
|
+
backgroundColor: `${color}15`,
|
|
45
|
+
borderColor: `${color}35`,
|
|
46
|
+
},
|
|
47
|
+
]}>
|
|
48
|
+
<Text style={[styles.prefixTagText, { color }]}>
|
|
49
|
+
{tag.replace(/[\[\]]/g, '')}
|
|
50
|
+
</Text>
|
|
51
|
+
</View>);
|
|
113
52
|
})}
|
|
114
|
-
|
|
115
|
-
|
|
53
|
+
</View>
|
|
54
|
+
<HighlightText text={remainingText} search={searchStr} style={textStyle} highlightStyle={highlightStyle} numberOfLines={numberOfLines} detectLinks={true}/>
|
|
55
|
+
</View>);
|
|
116
56
|
}
|
|
117
57
|
return (<HighlightText text={message} search={searchStr} style={textStyle} highlightStyle={highlightStyle} numberOfLines={numberOfLines} detectLinks={true}/>);
|
|
118
58
|
};
|
|
119
|
-
export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchStr = '',
|
|
120
|
-
const
|
|
121
|
-
const
|
|
59
|
+
export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchStr = '', }) {
|
|
60
|
+
const { setSelectedLog } = useInspector();
|
|
61
|
+
const { t } = useTranslation();
|
|
122
62
|
const jsonContent = getJsonContent(item.message);
|
|
123
63
|
const isAnalyticsError = item.message
|
|
124
64
|
.toLowerCase()
|
|
125
65
|
.includes('[analytics error]');
|
|
126
|
-
const isUserLog =
|
|
127
|
-
const
|
|
66
|
+
const isUserLog = item.sourceMethod === 'log';
|
|
67
|
+
const parsedCaller = item.caller && item.caller !== 'Unknown'
|
|
68
|
+
? parseStackLine(item.caller, true)
|
|
69
|
+
: null;
|
|
128
70
|
const getLogColors = () => {
|
|
129
|
-
const isDark = AppColors.primaryLight !==
|
|
130
|
-
if (isWebView) {
|
|
131
|
-
const label = item.type.toUpperCase();
|
|
132
|
-
switch (item.type) {
|
|
133
|
-
case 'error':
|
|
134
|
-
return {
|
|
135
|
-
border: AppColors.errorColor,
|
|
136
|
-
badgeBg: `${AppColors.errorColor}15`,
|
|
137
|
-
badgeText: AppColors.errorColor,
|
|
138
|
-
label,
|
|
139
|
-
cardBg: isDark ? 'rgba(239, 68, 68, 0.15)' : '#FFF5F6',
|
|
140
|
-
};
|
|
141
|
-
case 'warn':
|
|
142
|
-
return {
|
|
143
|
-
border: AppColors.lightOrange,
|
|
144
|
-
badgeBg: `${AppColors.lightOrange}15`,
|
|
145
|
-
badgeText: AppColors.darkOrange || AppColors.lightOrange,
|
|
146
|
-
label,
|
|
147
|
-
cardBg: isDark ? 'rgba(245, 158, 11, 0.15)' : '#FFFDF6',
|
|
148
|
-
};
|
|
149
|
-
default:
|
|
150
|
-
return {
|
|
151
|
-
border: '#475569',
|
|
152
|
-
badgeBg: isDark ? '#374151' : '#F1F5F9',
|
|
153
|
-
badgeText: isDark ? '#9CA3AF' : '#475569',
|
|
154
|
-
label,
|
|
155
|
-
cardBg: isDark ? '#1E1E24' : '#F8FAFC',
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
}
|
|
71
|
+
const isDark = AppColors.primaryLight !== AppColors.white;
|
|
159
72
|
if (isAnalyticsError) {
|
|
160
73
|
return {
|
|
161
74
|
border: AppColors.skyBlue,
|
|
162
75
|
badgeBg: `${AppColors.skyBlue}15`,
|
|
163
76
|
badgeText: AppColors.skyBlue,
|
|
164
77
|
label: 'ERROR',
|
|
165
|
-
cardBg: isDark ?
|
|
78
|
+
cardBg: isDark ? `${AppColors.skyBlue}26` : AppColors.blueTintBg,
|
|
166
79
|
};
|
|
167
80
|
}
|
|
168
81
|
switch (item.type) {
|
|
@@ -172,7 +85,7 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
|
|
|
172
85
|
badgeBg: `${AppColors.errorColor}15`,
|
|
173
86
|
badgeText: AppColors.errorColor,
|
|
174
87
|
label: 'ERROR',
|
|
175
|
-
cardBg: isDark ?
|
|
88
|
+
cardBg: isDark ? `${AppColors.errorColor}26` : AppColors.errorCardBg,
|
|
176
89
|
};
|
|
177
90
|
case 'warn':
|
|
178
91
|
return {
|
|
@@ -180,16 +93,16 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
|
|
|
180
93
|
badgeBg: `${AppColors.lightOrange}15`,
|
|
181
94
|
badgeText: AppColors.darkOrange || AppColors.lightOrange,
|
|
182
95
|
label: 'WARN',
|
|
183
|
-
cardBg: isDark ?
|
|
96
|
+
cardBg: isDark ? `${AppColors.amber500}26` : AppColors.warnCardBg,
|
|
184
97
|
};
|
|
185
98
|
default:
|
|
186
99
|
if (isUserLog) {
|
|
187
100
|
return {
|
|
188
|
-
border:
|
|
189
|
-
badgeBg: isDark ?
|
|
190
|
-
badgeText: isDark ?
|
|
101
|
+
border: AppColors.slate600,
|
|
102
|
+
badgeBg: isDark ? AppColors.gray700 : AppColors.slate200,
|
|
103
|
+
badgeText: isDark ? AppColors.gray300 : AppColors.slate700,
|
|
191
104
|
label: 'INFO',
|
|
192
|
-
cardBg: isDark ?
|
|
105
|
+
cardBg: isDark ? AppColors.primaryLight : AppColors.slate100,
|
|
193
106
|
};
|
|
194
107
|
}
|
|
195
108
|
return {
|
|
@@ -197,279 +110,185 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({ item, searchS
|
|
|
197
110
|
badgeBg: `${AppColors.purple}15`,
|
|
198
111
|
badgeText: AppColors.purple,
|
|
199
112
|
label: 'INFO',
|
|
200
|
-
cardBg: isDark ?
|
|
113
|
+
cardBg: isDark ? `${AppColors.purple}1F` : AppColors.purpleShade50,
|
|
201
114
|
};
|
|
202
115
|
}
|
|
203
116
|
};
|
|
204
117
|
const colors = getLogColors();
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
useEffect(() => {
|
|
211
|
-
Animated.timing(chevronAnim, {
|
|
212
|
-
toValue: expanded ? 1 : 0,
|
|
213
|
-
duration: 180,
|
|
214
|
-
useNativeDriver: true,
|
|
215
|
-
}).start();
|
|
216
|
-
}, [chevronAnim, expanded]);
|
|
217
|
-
const toggleExpanded = () => {
|
|
218
|
-
if (Platform.OS === 'ios') {
|
|
219
|
-
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
220
|
-
}
|
|
221
|
-
setExpanded(prev => !prev);
|
|
118
|
+
const jsonPreview = jsonContent
|
|
119
|
+
? getJsonPreviewText(jsonContent.data)
|
|
120
|
+
: null;
|
|
121
|
+
const openDetail = () => {
|
|
122
|
+
setSelectedLog(item);
|
|
222
123
|
};
|
|
223
|
-
const chevronRotate = chevronAnim.interpolate({
|
|
224
|
-
inputRange: [0, 1],
|
|
225
|
-
outputRange: ['0deg', '180deg'],
|
|
226
|
-
});
|
|
227
|
-
// Show limited lines unless expanded
|
|
228
|
-
const numLines = expanded ? undefined : 5;
|
|
229
|
-
const hasLongMessage = jsonContent
|
|
230
|
-
? getJsonPreviewText(jsonContent.data).hasMore ||
|
|
231
|
-
jsonContent.header.length > 120 ||
|
|
232
|
-
jsonContent.header.includes('\n')
|
|
233
|
-
: item.message.length > 120 || item.message.includes('\n');
|
|
234
124
|
return (<View style={styles.container}>
|
|
235
|
-
<
|
|
125
|
+
<Pressable onPress={openDetail} style={({ pressed }) => [
|
|
236
126
|
styles.card,
|
|
237
127
|
{
|
|
238
|
-
borderLeftWidth: 4,
|
|
239
128
|
borderLeftColor: colors.border,
|
|
240
129
|
backgroundColor: colors.cardBg,
|
|
241
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
242
|
-
flexDirection: 'row',
|
|
243
|
-
alignItems: 'center',
|
|
244
|
-
paddingRight: 4,
|
|
245
130
|
},
|
|
131
|
+
pressed && styles.cardPressed,
|
|
246
132
|
]}>
|
|
247
|
-
{
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
<
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
<View style={[
|
|
258
|
-
styles.badge,
|
|
133
|
+
<View style={styles.cardHeader}>
|
|
134
|
+
<View style={styles.headerLeft}>
|
|
135
|
+
<View style={[styles.typeChip, { backgroundColor: colors.badgeBg }]}>
|
|
136
|
+
<View style={[styles.typeDot, { backgroundColor: colors.badgeText }]}/>
|
|
137
|
+
<Text style={[styles.typeChipText, { color: colors.badgeText }]}>
|
|
138
|
+
{colors.label}
|
|
139
|
+
</Text>
|
|
140
|
+
</View>
|
|
141
|
+
<View style={[
|
|
142
|
+
styles.metaChip,
|
|
259
143
|
{
|
|
260
|
-
backgroundColor:
|
|
261
|
-
borderColor:
|
|
262
|
-
borderWidth: 1,
|
|
144
|
+
backgroundColor: `${AppColors.brandPurple}12`,
|
|
145
|
+
borderColor: `${AppColors.brandPurple}30`,
|
|
263
146
|
},
|
|
264
147
|
]}>
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
148
|
+
<Text style={[styles.metaChipText, { color: AppColors.brandPurple }]}>
|
|
149
|
+
console.
|
|
150
|
+
{('sourceMethod' in item ? item.sourceMethod : undefined) ||
|
|
268
151
|
item.type ||
|
|
269
152
|
'log'}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
styles.
|
|
153
|
+
</Text>
|
|
154
|
+
</View>
|
|
155
|
+
{jsonContent && (<View style={[
|
|
156
|
+
styles.metaChip,
|
|
274
157
|
{
|
|
275
|
-
backgroundColor:
|
|
276
|
-
borderColor:
|
|
277
|
-
borderWidth: 1,
|
|
158
|
+
backgroundColor: `${AppColors.teal600}12`,
|
|
159
|
+
borderColor: `${AppColors.teal600}2B`,
|
|
278
160
|
},
|
|
279
161
|
]}>
|
|
280
|
-
|
|
281
|
-
|
|
162
|
+
<Text style={[styles.metaChipText, { color: AppColors.teal600 }]}>
|
|
163
|
+
{Array.isArray(jsonContent.data)
|
|
282
164
|
? `Array[${jsonContent.data.length}]`
|
|
283
165
|
: `Object{${Object.keys(jsonContent.data).length}}`}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
{'duplicateCount' in item &&
|
|
166
|
+
</Text>
|
|
167
|
+
</View>)}
|
|
168
|
+
{'duplicateCount' in item &&
|
|
288
169
|
item.duplicateCount != null &&
|
|
289
170
|
item.duplicateCount > 1 && (<View style={[
|
|
290
|
-
styles.
|
|
171
|
+
styles.metaChip,
|
|
291
172
|
{
|
|
292
|
-
backgroundColor:
|
|
293
|
-
borderColor:
|
|
294
|
-
borderWidth: 1,
|
|
173
|
+
backgroundColor: `${AppColors.purple}1A`,
|
|
174
|
+
borderColor: `${AppColors.purple}3D`,
|
|
295
175
|
},
|
|
296
176
|
]}>
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
{ color: AppColors.purple, fontWeight: '700' },
|
|
300
|
-
]}>
|
|
301
|
-
×{item.duplicateCount}
|
|
302
|
-
</Text>
|
|
303
|
-
</View>)}
|
|
304
|
-
{isAnalyticsError && (<View style={[
|
|
305
|
-
styles.badge,
|
|
306
|
-
{ backgroundColor: `${AppColors.skyBlue}15` },
|
|
307
|
-
]}>
|
|
308
|
-
<Text style={[styles.badgeText, { color: AppColors.skyBlue }]}>
|
|
309
|
-
Analytics
|
|
177
|
+
<Text style={[styles.metaChipText, { color: AppColors.purple }]}>
|
|
178
|
+
×{item.duplicateCount}
|
|
310
179
|
</Text>
|
|
311
180
|
</View>)}
|
|
312
|
-
|
|
313
|
-
styles.badge,
|
|
314
|
-
{
|
|
315
|
-
backgroundColor: AppColors.grayBackground,
|
|
316
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
317
|
-
borderWidth: 1,
|
|
318
|
-
},
|
|
319
|
-
]}>
|
|
320
|
-
<Text style={[
|
|
321
|
-
styles.badgeText,
|
|
322
|
-
{ color: AppColors.grayTextStrong },
|
|
323
|
-
]}>
|
|
324
|
-
user-log
|
|
325
|
-
</Text>
|
|
326
|
-
</View>)}
|
|
327
|
-
{isWebView && (<View style={[
|
|
328
|
-
styles.badge,
|
|
329
|
-
{
|
|
330
|
-
backgroundColor: AppColors.grayBackground,
|
|
331
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
332
|
-
borderWidth: 1,
|
|
333
|
-
},
|
|
334
|
-
]}>
|
|
335
|
-
<Text style={[styles.badgeText, { color: AppColors.grayText }]}>
|
|
336
|
-
webview
|
|
337
|
-
</Text>
|
|
338
|
-
</View>)}
|
|
339
|
-
<Text style={[styles.serialNumber, { color: AppColors.grayTextWeak }]}>
|
|
340
|
-
#{item.id + 1}
|
|
341
|
-
</Text>
|
|
342
|
-
<Text style={[styles.timestamp, { color: AppColors.grayTextWeak }]}>
|
|
343
|
-
{formatTime(item.timestamp)}
|
|
344
|
-
</Text>
|
|
345
|
-
</View>
|
|
181
|
+
</View>
|
|
346
182
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
]} numberOfLines={1} ellipsizeMode="middle">
|
|
351
|
-
{caller.split('/').pop() || caller}
|
|
352
|
-
</Text>)}
|
|
183
|
+
<View style={styles.headerRight}>
|
|
184
|
+
<CopyButton value={item.message} label={t('console.logMessage')}/>
|
|
185
|
+
<ChevronIcon color={AppColors.grayTextWeak} size={14}/>
|
|
353
186
|
</View>
|
|
187
|
+
</View>
|
|
354
188
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
},
|
|
361
|
-
]}>
|
|
362
|
-
{jsonContent ? (<>
|
|
363
|
-
{jsonContent.header ? (<Pressable onPress={toggleExpanded}>
|
|
364
|
-
{getLogMessageWithBadges(jsonContent.header, searchStr, [styles.messageText, { color: AppColors.primaryBlack }], styles.highlight, numLines)}
|
|
365
|
-
</Pressable>) : null}
|
|
366
|
-
{expanded ? (<View style={[
|
|
367
|
-
styles.jsonContainer,
|
|
368
|
-
{
|
|
369
|
-
backgroundColor: AppColors.grayBackground,
|
|
370
|
-
borderColor: AppColors.dividerColor,
|
|
371
|
-
},
|
|
372
|
-
]}>
|
|
373
|
-
<JsonViewer data={jsonContent.data} search={searchStr} forceOpen={expanded}/>
|
|
374
|
-
</View>) : (<Pressable onPress={toggleExpanded} style={[
|
|
375
|
-
styles.jsonPreviewContainer,
|
|
376
|
-
{
|
|
377
|
-
backgroundColor: AppColors.grayBackground,
|
|
378
|
-
borderColor: AppColors.dividerColor,
|
|
379
|
-
},
|
|
380
|
-
]}>
|
|
381
|
-
<HighlightText text={getJsonPreviewText(jsonContent.data).text} search={searchStr} style={[
|
|
189
|
+
<View style={styles.cardBody}>
|
|
190
|
+
{jsonContent ? (<>
|
|
191
|
+
{jsonContent.header ? (getLogMessageWithBadges(jsonContent.header, searchStr, [styles.messageText, { color: AppColors.primaryBlack }], styles.highlight, 2)) : null}
|
|
192
|
+
{jsonPreview && (<View style={styles.jsonPreviewContainer}>
|
|
193
|
+
<HighlightText text={jsonPreview.text} search={searchStr} style={[
|
|
382
194
|
styles.jsonPreviewText,
|
|
383
195
|
{ color: AppColors.primaryBlack },
|
|
384
|
-
]} highlightStyle={styles.highlight} detectLinks={
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
</Pressable>)}
|
|
389
|
-
{hasLongMessage && (<Pressable onPress={toggleExpanded} style={styles.seeMoreBtn} hitSlop={8}>
|
|
390
|
-
<Text style={styles.seeMoreText}>
|
|
391
|
-
{expanded ? 'See Less' : 'See More'}
|
|
392
|
-
</Text>
|
|
393
|
-
</Pressable>)}
|
|
394
|
-
</View>
|
|
196
|
+
]} highlightStyle={styles.highlight} detectLinks={false} numberOfLines={5}/>
|
|
197
|
+
</View>)}
|
|
198
|
+
</>) : (getLogMessageWithBadges(item.message, searchStr, [styles.messageText, { color: AppColors.primaryBlack }], styles.highlight, 3))}
|
|
199
|
+
</View>
|
|
395
200
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
alignItems: 'center',
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
justifyContent: 'space-between',
|
|
419
|
-
marginTop: 4,
|
|
201
|
+
<View style={styles.cardFooter}>
|
|
202
|
+
<View style={styles.footerLeft}>
|
|
203
|
+
<Text style={styles.footerText}>#{item.id + 1}</Text>
|
|
204
|
+
<View style={styles.footerDot}/>
|
|
205
|
+
<Text style={styles.footerText}>{formatTime(item.timestamp)}</Text>
|
|
206
|
+
{parsedCaller && (<>
|
|
207
|
+
<View style={styles.footerDot}/>
|
|
208
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4, maxWidth: 170 }}>
|
|
209
|
+
{parsedCaller.fileExt && parsedCaller.fileExt !== 'other' && (<View style={{
|
|
210
|
+
backgroundColor: parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
|
|
211
|
+
? `${AppColors.brandPurple}18`
|
|
212
|
+
: `${AppColors.teal600}18`,
|
|
213
|
+
borderRadius: 3,
|
|
214
|
+
paddingHorizontal: 3.5,
|
|
215
|
+
paddingVertical: 1,
|
|
216
|
+
}}>
|
|
217
|
+
<Text style={{
|
|
218
|
+
fontFamily: AppFonts.interBold,
|
|
219
|
+
fontSize: 8.5,
|
|
220
|
+
color: parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
|
|
221
|
+
? AppColors.brandPurple
|
|
222
|
+
: AppColors.teal600,
|
|
420
223
|
}}>
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
224
|
+
{parsedCaller.fileExt.toUpperCase()}
|
|
225
|
+
</Text>
|
|
226
|
+
</View>)}
|
|
227
|
+
<Text style={[styles.footerText, styles.footerCaller]} numberOfLines={1} ellipsizeMode="middle">
|
|
228
|
+
{parsedCaller.fileName}
|
|
229
|
+
{parsedCaller.lineNumber ? `:${parsedCaller.lineNumber}` : ''}
|
|
426
230
|
</Text>
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
</Pressable>
|
|
231
|
+
</View>
|
|
232
|
+
</>)}
|
|
233
|
+
</View>
|
|
431
234
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
235
|
+
<View style={styles.footerRight}>
|
|
236
|
+
{isAnalyticsError && (<View style={[
|
|
237
|
+
styles.footerBadge,
|
|
238
|
+
{
|
|
239
|
+
backgroundColor: `${AppColors.skyBlue}15`,
|
|
240
|
+
borderColor: `${AppColors.skyBlue}30`,
|
|
241
|
+
},
|
|
242
|
+
]}>
|
|
243
|
+
<Text style={[styles.footerBadgeText, { color: AppColors.skyBlue }]}>
|
|
244
|
+
{t('console.analyticsBadge')}
|
|
245
|
+
</Text>
|
|
246
|
+
</View>)}
|
|
247
|
+
{isUserLog && (<View style={[
|
|
248
|
+
styles.footerBadge,
|
|
249
|
+
{
|
|
250
|
+
backgroundColor: `${AppColors.slate600}12`,
|
|
251
|
+
borderColor: `${AppColors.slate600}26`,
|
|
252
|
+
},
|
|
253
|
+
]}>
|
|
254
|
+
<Text style={[styles.footerBadgeText, { color: AppColors.grayTextStrong }]}>
|
|
255
|
+
{t('console.userLogBadge')}
|
|
256
|
+
</Text>
|
|
257
|
+
</View>)}
|
|
258
|
+
</View>
|
|
259
|
+
</View>
|
|
260
|
+
</Pressable>
|
|
446
261
|
</View>);
|
|
447
262
|
});
|
|
448
263
|
const styles = StyleSheet.create({
|
|
449
264
|
container: {
|
|
450
265
|
paddingHorizontal: 12,
|
|
451
|
-
paddingVertical:
|
|
266
|
+
paddingVertical: 4,
|
|
452
267
|
},
|
|
453
268
|
card: {
|
|
454
269
|
alignSelf: 'stretch',
|
|
455
|
-
|
|
456
|
-
borderRadius: 8,
|
|
270
|
+
borderRadius: 12,
|
|
457
271
|
borderWidth: 1,
|
|
458
|
-
borderColor:
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
272
|
+
borderColor: AppColors.grayBorderSecondary,
|
|
273
|
+
borderLeftWidth: 3.5,
|
|
274
|
+
padding: 12,
|
|
275
|
+
backgroundColor: AppColors.primaryLight,
|
|
276
|
+
shadowColor: AppColors.black,
|
|
277
|
+
shadowOpacity: 0.05,
|
|
278
|
+
shadowRadius: 4,
|
|
279
|
+
shadowOffset: { width: 0, height: 2 },
|
|
280
|
+
elevation: 2,
|
|
281
|
+
},
|
|
282
|
+
cardPressed: {
|
|
283
|
+
opacity: 0.85,
|
|
284
|
+
transform: [{ scale: 0.99 }],
|
|
466
285
|
},
|
|
467
286
|
cardHeader: {
|
|
468
|
-
alignSelf: 'stretch',
|
|
469
287
|
flexDirection: 'row',
|
|
470
288
|
justifyContent: 'space-between',
|
|
471
289
|
alignItems: 'center',
|
|
472
|
-
marginBottom:
|
|
290
|
+
marginBottom: 8,
|
|
291
|
+
gap: 8,
|
|
473
292
|
},
|
|
474
293
|
headerLeft: {
|
|
475
294
|
flexDirection: 'row',
|
|
@@ -478,93 +297,127 @@ const styles = StyleSheet.create({
|
|
|
478
297
|
gap: 6,
|
|
479
298
|
flex: 1,
|
|
480
299
|
},
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
300
|
+
headerRight: {
|
|
301
|
+
flexDirection: 'row',
|
|
302
|
+
alignItems: 'center',
|
|
303
|
+
gap: 4,
|
|
304
|
+
},
|
|
305
|
+
typeChip: {
|
|
306
|
+
flexDirection: 'row',
|
|
307
|
+
alignItems: 'center',
|
|
308
|
+
gap: 4,
|
|
309
|
+
paddingHorizontal: 7,
|
|
310
|
+
paddingVertical: 2.5,
|
|
311
|
+
borderRadius: 6,
|
|
312
|
+
},
|
|
313
|
+
typeDot: {
|
|
314
|
+
width: 5,
|
|
315
|
+
height: 5,
|
|
316
|
+
borderRadius: 2.5,
|
|
485
317
|
},
|
|
486
|
-
|
|
318
|
+
typeChipText: {
|
|
487
319
|
fontFamily: AppFonts.interBold,
|
|
488
|
-
fontSize: 9,
|
|
320
|
+
fontSize: 9.5,
|
|
489
321
|
letterSpacing: 0.5,
|
|
490
322
|
},
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
323
|
+
metaChip: {
|
|
324
|
+
paddingHorizontal: 6,
|
|
325
|
+
paddingVertical: 2.5,
|
|
326
|
+
borderRadius: 6,
|
|
327
|
+
borderWidth: 1,
|
|
495
328
|
},
|
|
496
|
-
|
|
329
|
+
metaChipText: {
|
|
497
330
|
fontFamily: AppFonts.interBold,
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
},
|
|
501
|
-
callerText: {
|
|
502
|
-
fontFamily: AppFonts.interRegular,
|
|
503
|
-
fontSize: 10,
|
|
504
|
-
color: AppColors.grayTextWeak,
|
|
505
|
-
maxWidth: '50%',
|
|
331
|
+
fontSize: 9.5,
|
|
332
|
+
letterSpacing: 0.2,
|
|
506
333
|
},
|
|
507
334
|
cardBody: {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
borderRadius: 6,
|
|
335
|
+
backgroundColor: AppColors.primaryLight,
|
|
336
|
+
paddingHorizontal: 10,
|
|
337
|
+
paddingVertical: 8,
|
|
338
|
+
borderRadius: 9,
|
|
513
339
|
borderWidth: 1,
|
|
514
|
-
borderColor:
|
|
340
|
+
borderColor: AppColors.grayBorderSecondary,
|
|
515
341
|
},
|
|
516
342
|
messageText: {
|
|
517
|
-
fontFamily:
|
|
518
|
-
fontSize: 12,
|
|
343
|
+
fontFamily: AppFonts.interMedium,
|
|
344
|
+
fontSize: 12.5,
|
|
519
345
|
color: AppColors.primaryBlack,
|
|
520
|
-
lineHeight:
|
|
346
|
+
lineHeight: 18,
|
|
521
347
|
},
|
|
522
348
|
highlight: {
|
|
523
|
-
backgroundColor:
|
|
349
|
+
backgroundColor: AppColors.yellowHighlight,
|
|
524
350
|
color: AppColors.primaryBlack,
|
|
525
351
|
borderRadius: 2,
|
|
526
352
|
},
|
|
527
|
-
jsonContainer: {
|
|
528
|
-
marginTop: 4,
|
|
529
|
-
backgroundColor: '#FFFFFF',
|
|
530
|
-
borderRadius: 4,
|
|
531
|
-
borderWidth: 1,
|
|
532
|
-
borderColor: '#E2E8F0',
|
|
533
|
-
padding: 6,
|
|
534
|
-
},
|
|
535
353
|
jsonPreviewContainer: {
|
|
536
|
-
marginTop:
|
|
537
|
-
backgroundColor:
|
|
538
|
-
borderRadius:
|
|
354
|
+
marginTop: 6,
|
|
355
|
+
backgroundColor: AppColors.grayBackground,
|
|
356
|
+
borderRadius: 7,
|
|
539
357
|
borderWidth: 1,
|
|
540
|
-
borderColor:
|
|
541
|
-
padding:
|
|
358
|
+
borderColor: AppColors.grayBorderSecondary,
|
|
359
|
+
padding: 8,
|
|
542
360
|
},
|
|
543
361
|
jsonPreviewText: {
|
|
544
|
-
fontFamily:
|
|
362
|
+
fontFamily: AppFonts.interRegular,
|
|
545
363
|
fontSize: 11,
|
|
546
364
|
color: AppColors.primaryBlack,
|
|
547
|
-
lineHeight:
|
|
365
|
+
lineHeight: 16,
|
|
548
366
|
},
|
|
549
367
|
cardFooter: {
|
|
368
|
+
flexDirection: 'row',
|
|
369
|
+
alignItems: 'center',
|
|
370
|
+
justifyContent: 'space-between',
|
|
550
371
|
marginTop: 8,
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
372
|
+
gap: 6,
|
|
373
|
+
},
|
|
374
|
+
footerLeft: {
|
|
375
|
+
flexDirection: 'row',
|
|
376
|
+
alignItems: 'center',
|
|
377
|
+
gap: 5,
|
|
378
|
+
flex: 1,
|
|
379
|
+
flexWrap: 'wrap',
|
|
554
380
|
},
|
|
555
|
-
|
|
381
|
+
footerRight: {
|
|
382
|
+
flexDirection: 'row',
|
|
383
|
+
alignItems: 'center',
|
|
384
|
+
gap: 4,
|
|
385
|
+
},
|
|
386
|
+
footerDot: {
|
|
387
|
+
width: 3,
|
|
388
|
+
height: 3,
|
|
389
|
+
borderRadius: 1.5,
|
|
390
|
+
backgroundColor: AppColors.grayTextWeak,
|
|
391
|
+
opacity: 0.6,
|
|
392
|
+
},
|
|
393
|
+
footerText: {
|
|
556
394
|
fontFamily: AppFonts.interRegular,
|
|
557
395
|
fontSize: 10,
|
|
558
|
-
color: AppColors.
|
|
396
|
+
color: AppColors.grayTextWeak,
|
|
397
|
+
letterSpacing: 0.1,
|
|
559
398
|
},
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
399
|
+
footerCaller: {
|
|
400
|
+
flexShrink: 1,
|
|
401
|
+
},
|
|
402
|
+
footerBadge: {
|
|
403
|
+
paddingHorizontal: 6,
|
|
404
|
+
paddingVertical: 1.5,
|
|
405
|
+
borderRadius: 5,
|
|
406
|
+
borderWidth: 1,
|
|
563
407
|
},
|
|
564
|
-
|
|
408
|
+
footerBadgeText: {
|
|
565
409
|
fontFamily: AppFonts.interBold,
|
|
566
|
-
fontSize:
|
|
567
|
-
|
|
568
|
-
|
|
410
|
+
fontSize: 9,
|
|
411
|
+
},
|
|
412
|
+
prefixTag: {
|
|
413
|
+
paddingHorizontal: 6,
|
|
414
|
+
paddingVertical: 1.5,
|
|
415
|
+
borderRadius: 4,
|
|
416
|
+
borderWidth: 1,
|
|
417
|
+
},
|
|
418
|
+
prefixTagText: {
|
|
419
|
+
fontFamily: AppFonts.interBold,
|
|
420
|
+
fontSize: 9.5,
|
|
421
|
+
letterSpacing: 0.3,
|
|
569
422
|
},
|
|
570
423
|
});
|