react-native-inapp-inspector 1.1.28 → 1.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.java +29 -80
- package/dist/commonjs/components/AnalyticsDetail.js +668 -108
- package/dist/commonjs/components/AppHeaderLogo.js +15 -15
- package/dist/commonjs/components/ConsoleLogCard.js +112 -66
- package/dist/commonjs/components/CopyButton.js +15 -1
- package/dist/commonjs/components/DomainHeader.js +64 -32
- package/dist/commonjs/components/HighlightText.js +7 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +332 -221
- package/dist/commonjs/components/Inspector/ConsoleTab.js +162 -56
- package/dist/commonjs/components/Inspector/InspectorHeader.js +70 -119
- package/dist/commonjs/components/Inspector/LogDetail.js +53 -17
- package/dist/commonjs/components/Inspector/MainScreen.js +4 -0
- package/dist/commonjs/components/Inspector/NetworkDetail.js +24 -24
- package/dist/commonjs/components/Inspector/NetworkTab.js +4 -1
- package/dist/commonjs/components/Inspector/ReduxDetail.js +237 -42
- package/dist/commonjs/components/Inspector/ReduxTab.js +456 -35
- package/dist/commonjs/components/JsonViewer.js +26 -4
- package/dist/commonjs/components/LogCard.js +103 -11
- package/dist/commonjs/components/NetworkIcons.js +19 -10
- package/dist/commonjs/components/Toast.d.ts +3 -0
- package/dist/commonjs/components/Toast.js +152 -0
- package/dist/commonjs/components/TouchableScale.d.ts +1 -0
- package/dist/commonjs/components/TouchableScale.js +3 -3
- package/dist/commonjs/components/TreeNode.js +12 -2
- package/dist/commonjs/constants/index.js +6 -6
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/reduxLogger.js +128 -5
- package/dist/commonjs/helpers/index.d.ts +4 -0
- package/dist/commonjs/helpers/index.js +107 -92
- package/dist/commonjs/helpers/toast.d.ts +4 -0
- package/dist/commonjs/helpers/toast.js +20 -0
- package/dist/commonjs/i18n/locales/en.json +49 -3
- package/dist/commonjs/styles/AppColors.d.ts +6 -0
- package/dist/commonjs/styles/AppColors.js +6 -0
- package/dist/commonjs/styles/index.d.ts +82 -15
- package/dist/commonjs/styles/index.js +92 -26
- package/dist/commonjs/types/interfaces.d.ts +7 -0
- package/dist/esm/components/AnalyticsDetail.js +670 -110
- package/dist/esm/components/AppHeaderLogo.js +15 -15
- package/dist/esm/components/ConsoleLogCard.js +114 -68
- package/dist/esm/components/CopyButton.js +15 -1
- package/dist/esm/components/DomainHeader.js +64 -32
- package/dist/esm/components/HighlightText.js +7 -1
- package/dist/esm/components/Inspector/AnalyticsTab.js +334 -223
- package/dist/esm/components/Inspector/ConsoleTab.js +163 -57
- package/dist/esm/components/Inspector/InspectorHeader.js +71 -120
- package/dist/esm/components/Inspector/LogDetail.js +55 -19
- package/dist/esm/components/Inspector/MainScreen.js +4 -0
- package/dist/esm/components/Inspector/NetworkDetail.js +25 -25
- package/dist/esm/components/Inspector/NetworkTab.js +4 -1
- package/dist/esm/components/Inspector/ReduxDetail.js +239 -44
- package/dist/esm/components/Inspector/ReduxTab.js +458 -37
- package/dist/esm/components/JsonViewer.js +26 -4
- package/dist/esm/components/LogCard.js +105 -13
- package/dist/esm/components/NetworkIcons.js +19 -10
- package/dist/esm/components/Toast.d.ts +3 -0
- package/dist/esm/components/Toast.js +117 -0
- package/dist/esm/components/TouchableScale.d.ts +1 -0
- package/dist/esm/components/TouchableScale.js +3 -3
- package/dist/esm/components/TreeNode.js +12 -2
- package/dist/esm/constants/index.js +6 -6
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/reduxLogger.js +128 -5
- package/dist/esm/helpers/index.d.ts +4 -0
- package/dist/esm/helpers/index.js +102 -92
- package/dist/esm/helpers/toast.d.ts +4 -0
- package/dist/esm/helpers/toast.js +15 -0
- package/dist/esm/i18n/locales/en.json +49 -3
- package/dist/esm/styles/AppColors.d.ts +6 -0
- package/dist/esm/styles/AppColors.js +6 -0
- package/dist/esm/styles/index.d.ts +82 -15
- package/dist/esm/styles/index.js +92 -26
- package/dist/esm/types/interfaces.d.ts +7 -0
- package/ios/NetworkInspectorModule.m +0 -10
- package/package.json +13 -10
|
@@ -40,13 +40,12 @@ exports.AppHeaderLogo = void 0;
|
|
|
40
40
|
const react_1 = __importStar(require("react"));
|
|
41
41
|
const react_native_1 = require("react-native");
|
|
42
42
|
const BrandSquareIcon_1 = __importDefault(require("./BrandSquareIcon"));
|
|
43
|
-
const AppColors_1 = require("../styles/AppColors");
|
|
44
43
|
const AppHeaderLogo = ({ size = 46, customIcon, }) => {
|
|
45
44
|
const [loadError, setLoadError] = (0, react_1.useState)(false);
|
|
46
|
-
// 1. If customIcon is explicitly provided, render it directly
|
|
45
|
+
// 1. If customIcon is explicitly provided, render it directly edge-to-edge
|
|
47
46
|
if (customIcon) {
|
|
48
47
|
return (<react_native_1.View style={[logoStyles.container, { width: size, height: size }]}>
|
|
49
|
-
<react_native_1.Image source={customIcon} style={
|
|
48
|
+
<react_native_1.Image source={customIcon} style={logoStyles.image} resizeMode="cover"/>
|
|
50
49
|
</react_native_1.View>);
|
|
51
50
|
}
|
|
52
51
|
// 2. Dynamically query installed native app icon (AppIcon on iOS, ic_launcher on Android)
|
|
@@ -57,29 +56,30 @@ const AppHeaderLogo = ({ size = 46, customIcon, }) => {
|
|
|
57
56
|
default: { uri: 'AppIcon' },
|
|
58
57
|
});
|
|
59
58
|
return (<react_native_1.View style={[logoStyles.container, { width: size, height: size }]}>
|
|
60
|
-
<react_native_1.Image source={nativeSource} style={
|
|
59
|
+
<react_native_1.Image source={nativeSource} style={logoStyles.image} resizeMode="cover" onError={() => setLoadError(true)}/>
|
|
61
60
|
</react_native_1.View>);
|
|
62
61
|
}
|
|
63
62
|
// 3. Fallback: Inspector's Signature Owl Brand Logo
|
|
64
63
|
return (<react_native_1.View style={[logoStyles.container, { width: size, height: size }]}>
|
|
65
|
-
<BrandSquareIcon_1.default size={size
|
|
64
|
+
<BrandSquareIcon_1.default size={size}/>
|
|
66
65
|
</react_native_1.View>);
|
|
67
66
|
};
|
|
68
67
|
exports.AppHeaderLogo = AppHeaderLogo;
|
|
69
68
|
const logoStyles = react_native_1.StyleSheet.create({
|
|
70
69
|
container: {
|
|
70
|
+
borderRadius: 10,
|
|
71
|
+
overflow: 'hidden',
|
|
72
|
+
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
73
|
+
borderWidth: 1,
|
|
74
|
+
borderColor: 'rgba(255, 255, 255, 0.28)',
|
|
75
|
+
padding: 2.5,
|
|
71
76
|
alignItems: 'center',
|
|
72
77
|
justifyContent: 'center',
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
shadowColor: AppColors_1.AppColors.primaryBlack,
|
|
79
|
-
shadowOffset: { width: 0, height: 2 },
|
|
80
|
-
shadowOpacity: 0.15,
|
|
81
|
-
shadowRadius: 4,
|
|
82
|
-
elevation: 3,
|
|
78
|
+
},
|
|
79
|
+
image: {
|
|
80
|
+
width: '100%',
|
|
81
|
+
height: '100%',
|
|
82
|
+
borderRadius: 7.5,
|
|
83
83
|
},
|
|
84
84
|
});
|
|
85
85
|
exports.default = exports.AppHeaderLogo;
|
|
@@ -26,37 +26,37 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
|
|
|
26
26
|
const getTagDecorator = (tag) => {
|
|
27
27
|
const clean = tag.replace(/[\[\]]/g, '').trim().toUpperCase();
|
|
28
28
|
if (clean === 'AXIOS') {
|
|
29
|
-
return { color:
|
|
29
|
+
return { color: AppColors_1.AppColors.emerald600, icon: '⚡', label: 'AXIOS' };
|
|
30
30
|
}
|
|
31
31
|
if (clean === 'API' || clean === 'FETCH' || clean === 'HTTP' || clean === 'NETWORK') {
|
|
32
|
-
return { color:
|
|
32
|
+
return { color: AppColors_1.AppColors.sky600, icon: '🌐', label: clean };
|
|
33
33
|
}
|
|
34
34
|
if (clean === 'SAMPLE' || clean === 'BATCH') {
|
|
35
|
-
return { color:
|
|
35
|
+
return { color: AppColors_1.AppColors.indigo600Alt, icon: '🎲', label: clean };
|
|
36
36
|
}
|
|
37
37
|
if (clean === 'REDUX' || clean === 'STORE' || clean === 'STATE') {
|
|
38
|
-
return { color:
|
|
38
|
+
return { color: AppColors_1.AppColors.violet600, icon: '⚛️', label: clean };
|
|
39
39
|
}
|
|
40
40
|
if (clean === 'ANALYTICS' || clean === 'FIREBASE' || clean === 'GA4' || clean === 'GA') {
|
|
41
|
-
return { color:
|
|
41
|
+
return { color: AppColors_1.AppColors.teal600, icon: '📊', label: clean };
|
|
42
42
|
}
|
|
43
43
|
if (clean === 'AUTH' || clean === 'TOKEN' || clean === 'SESSION') {
|
|
44
|
-
return { color:
|
|
44
|
+
return { color: AppColors_1.AppColors.amber600, icon: '🔑', label: clean };
|
|
45
45
|
}
|
|
46
46
|
if (clean === 'APP') {
|
|
47
|
-
return { color:
|
|
47
|
+
return { color: AppColors_1.AppColors.indigo600Alt, icon: '📱', label: 'APP' };
|
|
48
48
|
}
|
|
49
49
|
if (clean === 'TEST') {
|
|
50
|
-
return { color:
|
|
50
|
+
return { color: AppColors_1.AppColors.emerald500, icon: '🧪', label: 'TEST' };
|
|
51
51
|
}
|
|
52
52
|
if (clean === 'WARN' || clean === 'WARNING') {
|
|
53
|
-
return { color:
|
|
53
|
+
return { color: AppColors_1.AppColors.amber600, icon: '⚠️', label: 'WARN' };
|
|
54
54
|
}
|
|
55
55
|
if (clean === 'ERROR' || clean === 'CRASH' || clean === 'BUG') {
|
|
56
|
-
return { color:
|
|
56
|
+
return { color: AppColors_1.AppColors.red600, icon: '💥', label: 'ERROR' };
|
|
57
57
|
}
|
|
58
58
|
if (clean === 'PERF' || clean === 'RENDER') {
|
|
59
|
-
return { color:
|
|
59
|
+
return { color: AppColors_1.AppColors.violet500, icon: '⚡', label: clean };
|
|
60
60
|
}
|
|
61
61
|
return { color: AppColors_1.AppColors.slate600, icon: '🏷️', label: clean };
|
|
62
62
|
};
|
|
@@ -95,51 +95,72 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
95
95
|
? (0, helpers_1.parseStackLine)(item.caller, true)
|
|
96
96
|
: null;
|
|
97
97
|
const getLogColors = () => {
|
|
98
|
-
const
|
|
99
|
-
|
|
98
|
+
const type = (item.type || 'log').toLowerCase();
|
|
99
|
+
const method = (item.sourceMethod || type).toLowerCase();
|
|
100
|
+
if (isAnalyticsError || type === 'error' || method === 'error') {
|
|
100
101
|
return {
|
|
101
|
-
border:
|
|
102
|
-
badgeBg:
|
|
103
|
-
badgeText:
|
|
102
|
+
border: '#EF4444',
|
|
103
|
+
badgeBg: '#FEE2E2',
|
|
104
|
+
badgeText: '#DC2626',
|
|
104
105
|
label: 'ERROR',
|
|
105
|
-
cardBg:
|
|
106
|
+
cardBg: '#FEF2F2',
|
|
107
|
+
methodBorder: '#FECACA',
|
|
108
|
+
methodBg: '#FEE2E2',
|
|
109
|
+
methodText: '#DC2626',
|
|
110
|
+
textColor: '#991B1B',
|
|
106
111
|
};
|
|
107
112
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
113
|
+
if (type === 'warn' || method === 'warn') {
|
|
114
|
+
return {
|
|
115
|
+
border: '#F59E0B',
|
|
116
|
+
badgeBg: '#FEF3C7',
|
|
117
|
+
badgeText: '#D97706',
|
|
118
|
+
label: 'WARN',
|
|
119
|
+
cardBg: '#FFFBEB',
|
|
120
|
+
methodBorder: '#FDE68A',
|
|
121
|
+
methodBg: '#FEF3C7',
|
|
122
|
+
methodText: '#D97706',
|
|
123
|
+
textColor: '#92400E',
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
if (type === 'debug' || method === 'debug') {
|
|
127
|
+
return {
|
|
128
|
+
border: '#8B5CF6',
|
|
129
|
+
badgeBg: '#EDE9FE',
|
|
130
|
+
badgeText: '#7C3AED',
|
|
131
|
+
label: 'DEBUG',
|
|
132
|
+
cardBg: '#F5F3FF',
|
|
133
|
+
methodBorder: '#DDD6FE',
|
|
134
|
+
methodBg: '#EDE9FE',
|
|
135
|
+
methodText: '#7C3AED',
|
|
136
|
+
textColor: '#4C1D95',
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
if (type === 'info' || method === 'info') {
|
|
140
|
+
return {
|
|
141
|
+
border: '#0EA5E9',
|
|
142
|
+
badgeBg: '#E0F2FE',
|
|
143
|
+
badgeText: '#0284C7',
|
|
144
|
+
label: 'INFO',
|
|
145
|
+
cardBg: '#F0F9FF',
|
|
146
|
+
methodBorder: '#BAE6FD',
|
|
147
|
+
methodBg: '#E0F2FE',
|
|
148
|
+
methodText: '#0284C7',
|
|
149
|
+
textColor: '#075985',
|
|
150
|
+
};
|
|
142
151
|
}
|
|
152
|
+
// Default / Standard console.log
|
|
153
|
+
return {
|
|
154
|
+
border: '#6366F1',
|
|
155
|
+
badgeBg: '#EEF2FF',
|
|
156
|
+
badgeText: '#4F46E5',
|
|
157
|
+
label: 'LOG',
|
|
158
|
+
cardBg: '#FFFFFF',
|
|
159
|
+
methodBorder: '#E0E7FF',
|
|
160
|
+
methodBg: '#EEF2FF',
|
|
161
|
+
methodText: '#4F46E5',
|
|
162
|
+
textColor: '#0F172A',
|
|
163
|
+
};
|
|
143
164
|
};
|
|
144
165
|
const colors = getLogColors();
|
|
145
166
|
const jsonPreview = jsonContent
|
|
@@ -153,6 +174,7 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
153
174
|
styles.card,
|
|
154
175
|
{
|
|
155
176
|
borderLeftColor: colors.border,
|
|
177
|
+
borderLeftWidth: 3.5,
|
|
156
178
|
backgroundColor: colors.cardBg,
|
|
157
179
|
},
|
|
158
180
|
pressed && styles.cardPressed,
|
|
@@ -161,18 +183,18 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
161
183
|
<react_native_1.View style={styles.headerLeft}>
|
|
162
184
|
<react_native_1.View style={[styles.typeChip, { backgroundColor: colors.badgeBg }]}>
|
|
163
185
|
<react_native_1.View style={[styles.typeDot, { backgroundColor: colors.badgeText }]}/>
|
|
164
|
-
<react_native_1.Text style={[styles.typeChipText, { color: colors.badgeText }]}>
|
|
186
|
+
<react_native_1.Text style={[styles.typeChipText, { color: colors.badgeText, fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
165
187
|
{colors.label}
|
|
166
188
|
</react_native_1.Text>
|
|
167
189
|
</react_native_1.View>
|
|
168
190
|
<react_native_1.View style={[
|
|
169
191
|
styles.metaChip,
|
|
170
192
|
{
|
|
171
|
-
backgroundColor:
|
|
172
|
-
borderColor:
|
|
193
|
+
backgroundColor: colors.methodBg,
|
|
194
|
+
borderColor: colors.methodBorder,
|
|
173
195
|
},
|
|
174
196
|
]}>
|
|
175
|
-
<react_native_1.Text style={[styles.metaChipText, { color:
|
|
197
|
+
<react_native_1.Text style={[styles.metaChipText, { color: colors.methodText, fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
176
198
|
console.
|
|
177
199
|
{('sourceMethod' in item ? item.sourceMethod : undefined) ||
|
|
178
200
|
item.type ||
|
|
@@ -182,11 +204,11 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
182
204
|
{jsonContent && (<react_native_1.View style={[
|
|
183
205
|
styles.metaChip,
|
|
184
206
|
{
|
|
185
|
-
backgroundColor:
|
|
186
|
-
borderColor:
|
|
207
|
+
backgroundColor: '#ECFDF5',
|
|
208
|
+
borderColor: '#A7F3D0',
|
|
187
209
|
},
|
|
188
210
|
]}>
|
|
189
|
-
<react_native_1.Text style={[styles.metaChipText, { color:
|
|
211
|
+
<react_native_1.Text style={[styles.metaChipText, { color: '#059669', fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
190
212
|
{Array.isArray(jsonContent.data)
|
|
191
213
|
? `Array[${jsonContent.data.length}]`
|
|
192
214
|
: `Object{${Object.keys(jsonContent.data).length}}`}
|
|
@@ -201,7 +223,7 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
201
223
|
borderColor: `${AppColors_1.AppColors.purple}3D`,
|
|
202
224
|
},
|
|
203
225
|
]}>
|
|
204
|
-
<react_native_1.Text style={[styles.metaChipText, { color: AppColors_1.AppColors.purple }]}>
|
|
226
|
+
<react_native_1.Text style={[styles.metaChipText, { color: AppColors_1.AppColors.purple, fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
205
227
|
×{item.duplicateCount}
|
|
206
228
|
</react_native_1.Text>
|
|
207
229
|
</react_native_1.View>)}
|
|
@@ -232,18 +254,34 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
232
254
|
<react_native_1.Text style={styles.footerText}>{(0, helpers_1.formatTime)(item.timestamp)}</react_native_1.Text>
|
|
233
255
|
{parsedCaller && (<>
|
|
234
256
|
<react_native_1.View style={styles.footerDot}/>
|
|
235
|
-
<react_native_1.
|
|
257
|
+
<react_native_1.Pressable onPress={e => {
|
|
258
|
+
e.stopPropagation?.();
|
|
259
|
+
(0, helpers_1.openInVSCode)(parsedCaller.rawFilePath ||
|
|
260
|
+
parsedCaller.fullPath ||
|
|
261
|
+
parsedCaller.fileName, parsedCaller.lineNumber, parsedCaller.columnNumber);
|
|
262
|
+
}} hitSlop={8} style={{
|
|
263
|
+
flexDirection: 'row',
|
|
264
|
+
alignItems: 'center',
|
|
265
|
+
gap: 4,
|
|
266
|
+
maxWidth: 185,
|
|
267
|
+
backgroundColor: `${AppColors_1.AppColors.sky600}10`,
|
|
268
|
+
borderColor: `${AppColors_1.AppColors.sky600}2B`,
|
|
269
|
+
borderWidth: 1,
|
|
270
|
+
borderRadius: 5,
|
|
271
|
+
paddingHorizontal: 5,
|
|
272
|
+
paddingVertical: 1.5,
|
|
273
|
+
}}>
|
|
236
274
|
{parsedCaller.fileExt && parsedCaller.fileExt !== 'other' && (<react_native_1.View style={{
|
|
237
275
|
backgroundColor: parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
|
|
238
|
-
? `${AppColors_1.AppColors.brandPurple}
|
|
239
|
-
: `${AppColors_1.AppColors.teal600}
|
|
276
|
+
? `${AppColors_1.AppColors.brandPurple}22`
|
|
277
|
+
: `${AppColors_1.AppColors.teal600}22`,
|
|
240
278
|
borderRadius: 3,
|
|
241
279
|
paddingHorizontal: 3.5,
|
|
242
|
-
paddingVertical:
|
|
280
|
+
paddingVertical: 0.5,
|
|
243
281
|
}}>
|
|
244
282
|
<react_native_1.Text style={{
|
|
245
283
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
246
|
-
fontSize: 8
|
|
284
|
+
fontSize: 8,
|
|
247
285
|
color: parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
|
|
248
286
|
? AppColors_1.AppColors.brandPurple
|
|
249
287
|
: AppColors_1.AppColors.teal600,
|
|
@@ -251,11 +289,19 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
251
289
|
{parsedCaller.fileExt.toUpperCase()}
|
|
252
290
|
</react_native_1.Text>
|
|
253
291
|
</react_native_1.View>)}
|
|
254
|
-
<react_native_1.Text style={[
|
|
292
|
+
<react_native_1.Text style={[
|
|
293
|
+
styles.footerText,
|
|
294
|
+
{
|
|
295
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
296
|
+
color: AppColors_1.AppColors.sky600,
|
|
297
|
+
fontSize: 9.5,
|
|
298
|
+
},
|
|
299
|
+
]} numberOfLines={1} ellipsizeMode="middle">
|
|
255
300
|
{parsedCaller.fileName}
|
|
256
301
|
{parsedCaller.lineNumber ? `:${parsedCaller.lineNumber}` : ''}
|
|
257
302
|
</react_native_1.Text>
|
|
258
|
-
|
|
303
|
+
<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600} size={8.5}/>
|
|
304
|
+
</react_native_1.Pressable>
|
|
259
305
|
</>)}
|
|
260
306
|
</react_native_1.View>
|
|
261
307
|
|
|
@@ -37,6 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
|
+
const react_native_1 = require("react-native");
|
|
40
41
|
// Components
|
|
41
42
|
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
42
43
|
// Helpers
|
|
@@ -54,6 +55,19 @@ const CopyButton = react_1.default.memo(({ value, label, iconType = 'copy' }) =>
|
|
|
54
55
|
setCopied(true);
|
|
55
56
|
setTimeout(() => setCopied(false), 1200);
|
|
56
57
|
}, [value, label]);
|
|
58
|
+
const handleLongPress = (0, react_1.useCallback)(() => {
|
|
59
|
+
try {
|
|
60
|
+
const resolvedValue = typeof value === 'function' ? value() : value;
|
|
61
|
+
const textToShare = typeof resolvedValue === 'string'
|
|
62
|
+
? resolvedValue
|
|
63
|
+
: JSON.stringify(resolvedValue, null, 2);
|
|
64
|
+
react_native_1.Share.share({
|
|
65
|
+
message: textToShare,
|
|
66
|
+
title: label,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
catch { }
|
|
70
|
+
}, [value, label]);
|
|
57
71
|
const containerStyle = [
|
|
58
72
|
styles_1.default.iconSquareBtn,
|
|
59
73
|
copied && styles_1.default.iconSquareBtnSuccess,
|
|
@@ -63,7 +77,7 @@ const CopyButton = react_1.default.memo(({ value, label, iconType = 'copy' }) =>
|
|
|
63
77
|
: iconType === 'fetch'
|
|
64
78
|
? NetworkIcons_1.FetchIcon
|
|
65
79
|
: NetworkIcons_1.CopyIcon;
|
|
66
|
-
return (<TouchableScale_1.default onPress={handlePress} hitSlop={12} style={containerStyle}>
|
|
80
|
+
return (<TouchableScale_1.default onPress={handlePress} onLongPress={handleLongPress} hitSlop={12} style={containerStyle}>
|
|
67
81
|
{copied ? (<NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.greenColor} size={14}/>) : (<IconComponent color={AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
68
82
|
</TouchableScale_1.default>);
|
|
69
83
|
});
|
|
@@ -40,6 +40,7 @@ const react_1 = __importStar(require("react"));
|
|
|
40
40
|
const react_native_1 = require("react-native");
|
|
41
41
|
// Stylesheet
|
|
42
42
|
const AppColors_1 = require("../styles/AppColors");
|
|
43
|
+
const AppFonts_1 = require("../styles/AppFonts");
|
|
43
44
|
// Helpers
|
|
44
45
|
const helpers_1 = require("../helpers");
|
|
45
46
|
// Assets
|
|
@@ -64,20 +65,75 @@ const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, i
|
|
|
64
65
|
const pctSuccess = total > 0 ? Math.round((stats.success / total) * 100) : 0;
|
|
65
66
|
const pctFailed = total > 0 ? Math.round((stats.failed / total) * 100) : 0;
|
|
66
67
|
const pctLoading = total > 0 ? Math.round((stats.loading / total) * 100) : 0;
|
|
67
|
-
return (<react_native_1.Pressable style={
|
|
68
|
+
return (<react_native_1.Pressable style={[
|
|
69
|
+
styles_1.default.domainHeaderCard,
|
|
70
|
+
!isCollapsed && styles_1.default.domainHeaderCardExpanded,
|
|
71
|
+
]} onPress={() => onToggleCollapse(pageName)}>
|
|
68
72
|
<react_native_1.View style={styles_1.default.domainHeaderTopRow}>
|
|
69
73
|
<react_native_1.View style={styles_1.default.domainHeaderLeft}>
|
|
70
|
-
<react_native_1.Animated.View style={{ transform: [{ rotate: chevronRotate }] }}>
|
|
74
|
+
<react_native_1.Animated.View style={{ transform: [{ rotate: chevronRotate }], flexShrink: 0 }}>
|
|
71
75
|
<NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
72
76
|
</react_native_1.Animated.View>
|
|
73
|
-
<react_native_1.View style={[styles_1.default.domainIconWrap, { backgroundColor: `${color}18
|
|
77
|
+
<react_native_1.View style={[styles_1.default.domainIconWrap, { backgroundColor: `${color}18`, flexShrink: 0 }]}>
|
|
74
78
|
<NetworkIcons_1.ScreenIcon color={color} size={14}/>
|
|
75
79
|
</react_native_1.View>
|
|
76
|
-
<react_native_1.View style={{ flex: 1, justifyContent: 'center' }}>
|
|
77
|
-
<react_native_1.
|
|
78
|
-
{
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
<react_native_1.View style={{ flex: 1, justifyContent: 'center', minWidth: 0 }}>
|
|
81
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, minWidth: 0 }}>
|
|
82
|
+
<react_native_1.Text style={[styles_1.default.domainTitleText, { flexShrink: 1 }]} numberOfLines={1} ellipsizeMode="tail">
|
|
83
|
+
{pageName}
|
|
84
|
+
</react_native_1.Text>
|
|
85
|
+
{total > 0 && (<react_native_1.View style={{
|
|
86
|
+
flexDirection: 'row',
|
|
87
|
+
alignItems: 'center',
|
|
88
|
+
gap: 4,
|
|
89
|
+
backgroundColor: stats.failed > 0
|
|
90
|
+
? AppColors_1.AppColors.red100
|
|
91
|
+
: stats.loading > 0
|
|
92
|
+
? AppColors_1.AppColors.amber100
|
|
93
|
+
: AppColors_1.AppColors.emerald100,
|
|
94
|
+
paddingHorizontal: 5,
|
|
95
|
+
paddingVertical: 1.5,
|
|
96
|
+
borderRadius: 4,
|
|
97
|
+
flexShrink: 0,
|
|
98
|
+
}}>
|
|
99
|
+
<react_native_1.View style={{
|
|
100
|
+
width: 22,
|
|
101
|
+
height: 3.5,
|
|
102
|
+
borderRadius: 2,
|
|
103
|
+
backgroundColor: AppColors_1.AppColors.gray200,
|
|
104
|
+
flexDirection: 'row',
|
|
105
|
+
overflow: 'hidden',
|
|
106
|
+
}}>
|
|
107
|
+
{pctSuccess > 0 && (<react_native_1.View style={{
|
|
108
|
+
width: `${pctSuccess}%`,
|
|
109
|
+
height: '100%',
|
|
110
|
+
backgroundColor: AppColors_1.AppColors.emerald500,
|
|
111
|
+
}}/>)}
|
|
112
|
+
{pctFailed > 0 && (<react_native_1.View style={{
|
|
113
|
+
width: `${pctFailed}%`,
|
|
114
|
+
height: '100%',
|
|
115
|
+
backgroundColor: AppColors_1.AppColors.red500,
|
|
116
|
+
}}/>)}
|
|
117
|
+
{pctLoading > 0 && (<react_native_1.View style={{
|
|
118
|
+
width: `${pctLoading}%`,
|
|
119
|
+
height: '100%',
|
|
120
|
+
backgroundColor: AppColors_1.AppColors.amber500,
|
|
121
|
+
}}/>)}
|
|
122
|
+
</react_native_1.View>
|
|
123
|
+
<react_native_1.Text style={{
|
|
124
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
125
|
+
fontSize: 8.5,
|
|
126
|
+
color: stats.failed > 0
|
|
127
|
+
? AppColors_1.AppColors.redErrorText
|
|
128
|
+
: stats.loading > 0
|
|
129
|
+
? AppColors_1.AppColors.amber800Warm
|
|
130
|
+
: AppColors_1.AppColors.emerald700,
|
|
131
|
+
}}>
|
|
132
|
+
{pctSuccess}%
|
|
133
|
+
</react_native_1.Text>
|
|
134
|
+
</react_native_1.View>)}
|
|
135
|
+
</react_native_1.View>
|
|
136
|
+
<react_native_1.Text style={styles_1.default.domainSummaryText} numberOfLines={1} ellipsizeMode="tail">
|
|
81
137
|
{(0, helpers_1.formatDateTime)(timestamp)}
|
|
82
138
|
</react_native_1.Text>
|
|
83
139
|
</react_native_1.View>
|
|
@@ -132,30 +188,6 @@ const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, i
|
|
|
132
188
|
})}
|
|
133
189
|
</react_native_1.View>
|
|
134
190
|
</react_native_1.View>
|
|
135
|
-
|
|
136
|
-
{total > 0 && (<react_native_1.View style={styles_1.default.domainProgressTrack}>
|
|
137
|
-
{pctSuccess > 0 && (<react_native_1.View style={[
|
|
138
|
-
styles_1.default.domainProgressSegment,
|
|
139
|
-
{
|
|
140
|
-
width: `${pctSuccess}%`,
|
|
141
|
-
backgroundColor: AppColors_1.AppColors.greenColor,
|
|
142
|
-
},
|
|
143
|
-
]}/>)}
|
|
144
|
-
{pctFailed > 0 && (<react_native_1.View style={[
|
|
145
|
-
styles_1.default.domainProgressSegment,
|
|
146
|
-
{
|
|
147
|
-
width: `${pctFailed}%`,
|
|
148
|
-
backgroundColor: AppColors_1.AppColors.errorColor,
|
|
149
|
-
},
|
|
150
|
-
]}/>)}
|
|
151
|
-
{pctLoading > 0 && (<react_native_1.View style={[
|
|
152
|
-
styles_1.default.domainProgressSegment,
|
|
153
|
-
{
|
|
154
|
-
width: `${pctLoading}%`,
|
|
155
|
-
backgroundColor: AppColors_1.AppColors.darkOrange,
|
|
156
|
-
},
|
|
157
|
-
]}/>)}
|
|
158
|
-
</react_native_1.View>)}
|
|
159
191
|
</react_native_1.Pressable>);
|
|
160
192
|
};
|
|
161
193
|
exports.default = DomainHeader;
|
|
@@ -8,6 +8,12 @@ const react_native_1 = require("react-native");
|
|
|
8
8
|
// Helpers
|
|
9
9
|
const helpers_1 = require("../helpers");
|
|
10
10
|
const HighlightText = react_1.default.memo(function HighlightText({ text, search, style, highlightStyle, detectLinks, numberOfLines, ...rest }) {
|
|
11
|
+
// Optimization: For huge strings (> 20KB) with no active search, bypass all splitting/regex overhead
|
|
12
|
+
if (!text || (text.length > 20000 && !search && !detectLinks)) {
|
|
13
|
+
return (<react_native_1.Text style={style} numberOfLines={numberOfLines} {...rest}>
|
|
14
|
+
{text}
|
|
15
|
+
</react_native_1.Text>);
|
|
16
|
+
}
|
|
11
17
|
// Regex to detect absolute URLs
|
|
12
18
|
const URL_REGEX = /(https?:\/\/[^\s]+)/g;
|
|
13
19
|
const renderNormalOrHighlighted = (subText, keyPrefix) => {
|
|
@@ -22,7 +28,7 @@ const HighlightText = react_1.default.memo(function HighlightText({ text, search
|
|
|
22
28
|
</react_native_1.Text>) : (<react_native_1.Text key={i}>{part}</react_native_1.Text>))}
|
|
23
29
|
</react_native_1.Text>);
|
|
24
30
|
};
|
|
25
|
-
if (detectLinks && text) {
|
|
31
|
+
if (detectLinks && text && text.length < 20000) {
|
|
26
32
|
const parts = text.split(URL_REGEX);
|
|
27
33
|
return (<react_native_1.Text style={style} numberOfLines={numberOfLines} {...rest}>
|
|
28
34
|
{parts.map((part, i) => {
|