react-native-inapp-inspector 1.1.33 → 1.1.35
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/dist/commonjs/components/ConsoleLogCard.js +57 -56
- package/dist/commonjs/components/CopyButton.js +7 -1
- package/dist/commonjs/components/Inspector/BundleTab.js +268 -27
- package/dist/commonjs/components/Inspector/CrashDetail.js +16 -12
- package/dist/commonjs/components/Inspector/InspectorHeader.js +16 -16
- package/dist/commonjs/components/Inspector/MainScreen.js +6 -2
- package/dist/commonjs/components/Inspector/NetworkTab.js +97 -1
- package/dist/commonjs/components/Inspector/ReduxDetail.js +24 -19
- package/dist/commonjs/components/Inspector/ReduxTab.js +12 -8
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1243 -673
- package/dist/commonjs/components/LogCard.js +27 -9
- package/dist/commonjs/components/MetaAccordion.js +42 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +9 -0
- package/dist/commonjs/components/NetworkIcons.js +48 -1
- package/dist/commonjs/components/Toast.js +3 -3
- package/dist/commonjs/components/TouchableScale.d.ts +4 -2
- package/dist/commonjs/components/TouchableScale.js +4 -4
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +10 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +2 -0
- package/dist/commonjs/customHooks/bundleAnalyzer.js +80 -33
- package/dist/commonjs/customHooks/consoleLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/consoleLogger.js +10 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +2 -0
- package/dist/commonjs/customHooks/crashHandler.js +10 -1
- package/dist/commonjs/customHooks/networkLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/networkLogger.js +12 -1
- package/dist/commonjs/customHooks/performanceTracker.d.ts +3 -1
- package/dist/commonjs/customHooks/performanceTracker.js +18 -4
- package/dist/commonjs/customHooks/reduxLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/reduxLogger.js +10 -1
- package/dist/commonjs/i18n/locales/en.json +96 -28
- package/dist/commonjs/index.js +78 -34
- package/dist/commonjs/styles/AppColors.d.ts +28 -0
- package/dist/commonjs/styles/AppColors.js +30 -0
- package/dist/esm/components/ConsoleLogCard.js +58 -57
- package/dist/esm/components/CopyButton.js +7 -1
- package/dist/esm/components/Inspector/BundleTab.js +268 -27
- package/dist/esm/components/Inspector/CrashDetail.js +16 -12
- package/dist/esm/components/Inspector/InspectorHeader.js +16 -16
- package/dist/esm/components/Inspector/MainScreen.js +6 -2
- package/dist/esm/components/Inspector/NetworkTab.js +99 -3
- package/dist/esm/components/Inspector/ReduxDetail.js +24 -19
- package/dist/esm/components/Inspector/ReduxTab.js +12 -8
- package/dist/esm/components/Inspector/SettingsPanel.js +1246 -676
- package/dist/esm/components/LogCard.js +27 -9
- package/dist/esm/components/MetaAccordion.js +42 -0
- package/dist/esm/components/NetworkIcons.d.ts +9 -0
- package/dist/esm/components/NetworkIcons.js +38 -0
- package/dist/esm/components/Toast.js +3 -3
- package/dist/esm/components/TouchableScale.d.ts +4 -2
- package/dist/esm/components/TouchableScale.js +4 -4
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.d.ts +2 -0
- package/dist/esm/customHooks/analyticsLogger.js +7 -0
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +2 -0
- package/dist/esm/customHooks/bundleAnalyzer.js +77 -32
- package/dist/esm/customHooks/consoleLogger.d.ts +2 -0
- package/dist/esm/customHooks/consoleLogger.js +7 -0
- package/dist/esm/customHooks/crashHandler.d.ts +2 -0
- package/dist/esm/customHooks/crashHandler.js +7 -0
- package/dist/esm/customHooks/networkLogger.d.ts +2 -0
- package/dist/esm/customHooks/networkLogger.js +9 -0
- package/dist/esm/customHooks/performanceTracker.d.ts +3 -1
- package/dist/esm/customHooks/performanceTracker.js +15 -3
- package/dist/esm/customHooks/reduxLogger.d.ts +2 -0
- package/dist/esm/customHooks/reduxLogger.js +7 -0
- package/dist/esm/i18n/locales/en.json +96 -28
- package/dist/esm/index.js +64 -20
- package/dist/esm/styles/AppColors.d.ts +28 -0
- package/dist/esm/styles/AppColors.js +30 -0
- package/package.json +3 -2
|
@@ -26,44 +26,45 @@ 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: AppColors_1.AppColors.emerald600,
|
|
29
|
+
return { color: AppColors_1.AppColors.emerald600, Icon: NetworkIcons_1.ZapIcon, label: 'AXIOS' };
|
|
30
30
|
}
|
|
31
31
|
if (clean === 'API' || clean === 'FETCH' || clean === 'HTTP' || clean === 'NETWORK') {
|
|
32
|
-
return { color: AppColors_1.AppColors.sky600,
|
|
32
|
+
return { color: AppColors_1.AppColors.sky600, Icon: NetworkIcons_1.GlobeIcon, label: clean };
|
|
33
33
|
}
|
|
34
34
|
if (clean === 'SAMPLE' || clean === 'BATCH') {
|
|
35
|
-
return { color: AppColors_1.AppColors.indigo600Alt,
|
|
35
|
+
return { color: AppColors_1.AppColors.indigo600Alt, Icon: NetworkIcons_1.DiceIcon, label: clean };
|
|
36
36
|
}
|
|
37
37
|
if (clean === 'REDUX' || clean === 'STORE' || clean === 'STATE') {
|
|
38
|
-
return { color: AppColors_1.AppColors.violet600,
|
|
38
|
+
return { color: AppColors_1.AppColors.violet600, Icon: NetworkIcons_1.AtomIcon, label: clean };
|
|
39
39
|
}
|
|
40
40
|
if (clean === 'ANALYTICS' || clean === 'FIREBASE' || clean === 'GA4' || clean === 'GA') {
|
|
41
|
-
return { color: AppColors_1.AppColors.teal600,
|
|
41
|
+
return { color: AppColors_1.AppColors.teal600, Icon: NetworkIcons_1.BarChartIcon, label: clean };
|
|
42
42
|
}
|
|
43
43
|
if (clean === 'AUTH' || clean === 'TOKEN' || clean === 'SESSION') {
|
|
44
|
-
return { color: AppColors_1.AppColors.amber600,
|
|
44
|
+
return { color: AppColors_1.AppColors.amber600, Icon: NetworkIcons_1.KeyIcon, label: clean };
|
|
45
45
|
}
|
|
46
46
|
if (clean === 'APP') {
|
|
47
|
-
return { color: AppColors_1.AppColors.indigo600Alt,
|
|
47
|
+
return { color: AppColors_1.AppColors.indigo600Alt, Icon: NetworkIcons_1.SmartphoneIcon, label: 'APP' };
|
|
48
48
|
}
|
|
49
49
|
if (clean === 'TEST') {
|
|
50
|
-
return { color: AppColors_1.AppColors.emerald500,
|
|
50
|
+
return { color: AppColors_1.AppColors.emerald500, Icon: NetworkIcons_1.FlaskIcon, label: 'TEST' };
|
|
51
51
|
}
|
|
52
52
|
if (clean === 'WARN' || clean === 'WARNING') {
|
|
53
|
-
return { color: AppColors_1.AppColors.amber600,
|
|
53
|
+
return { color: AppColors_1.AppColors.amber600, Icon: NetworkIcons_1.AlertTriangleIcon, label: 'WARN' };
|
|
54
54
|
}
|
|
55
55
|
if (clean === 'ERROR' || clean === 'CRASH' || clean === 'BUG') {
|
|
56
|
-
return { color: AppColors_1.AppColors.red600,
|
|
56
|
+
return { color: AppColors_1.AppColors.red600, Icon: NetworkIcons_1.BugIcon, label: 'ERROR' };
|
|
57
57
|
}
|
|
58
58
|
if (clean === 'PERF' || clean === 'RENDER') {
|
|
59
|
-
return { color: AppColors_1.AppColors.violet500,
|
|
59
|
+
return { color: AppColors_1.AppColors.violet500, Icon: NetworkIcons_1.ZapIcon, label: clean };
|
|
60
60
|
}
|
|
61
|
-
return { color: AppColors_1.AppColors.slate600,
|
|
61
|
+
return { color: AppColors_1.AppColors.slate600, Icon: NetworkIcons_1.TagIcon, label: clean };
|
|
62
62
|
};
|
|
63
63
|
return (<react_native_1.View style={{ flexDirection: 'column', gap: 6 }}>
|
|
64
64
|
<react_native_1.View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 5 }}>
|
|
65
65
|
{tags.map((tag, i) => {
|
|
66
66
|
const dec = getTagDecorator(tag);
|
|
67
|
+
const IconComp = dec.Icon;
|
|
67
68
|
return (<react_native_1.View key={i} style={[
|
|
68
69
|
styles.prefixTag,
|
|
69
70
|
{
|
|
@@ -71,7 +72,7 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
|
|
|
71
72
|
borderColor: `${dec.color}35`,
|
|
72
73
|
},
|
|
73
74
|
]}>
|
|
74
|
-
<
|
|
75
|
+
<IconComp color={dec.color} size={10}/>
|
|
75
76
|
<react_native_1.Text style={[styles.prefixTagText, { color: dec.color }]}>
|
|
76
77
|
{dec.label}
|
|
77
78
|
</react_native_1.Text>
|
|
@@ -99,67 +100,67 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
99
100
|
const method = (item.sourceMethod || type).toLowerCase();
|
|
100
101
|
if (isAnalyticsError || type === 'error' || method === 'error') {
|
|
101
102
|
return {
|
|
102
|
-
border:
|
|
103
|
-
badgeBg:
|
|
104
|
-
badgeText:
|
|
103
|
+
border: AppColors_1.AppColors.errorColor,
|
|
104
|
+
badgeBg: AppColors_1.AppColors.errorCardBg,
|
|
105
|
+
badgeText: AppColors_1.AppColors.rose600,
|
|
105
106
|
label: 'ERROR',
|
|
106
|
-
cardBg:
|
|
107
|
-
methodBorder:
|
|
108
|
-
methodBg:
|
|
109
|
-
methodText:
|
|
110
|
-
textColor:
|
|
107
|
+
cardBg: AppColors_1.AppColors.errorCardBg,
|
|
108
|
+
methodBorder: AppColors_1.AppColors.errorBorder,
|
|
109
|
+
methodBg: AppColors_1.AppColors.errorCardBg,
|
|
110
|
+
methodText: AppColors_1.AppColors.rose600,
|
|
111
|
+
textColor: AppColors_1.AppColors.redErrorText,
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
if (type === 'warn' || method === 'warn') {
|
|
114
115
|
return {
|
|
115
|
-
border:
|
|
116
|
-
badgeBg:
|
|
117
|
-
badgeText:
|
|
116
|
+
border: AppColors_1.AppColors.amber600,
|
|
117
|
+
badgeBg: AppColors_1.AppColors.amberBg,
|
|
118
|
+
badgeText: AppColors_1.AppColors.amber700,
|
|
118
119
|
label: 'WARN',
|
|
119
|
-
cardBg:
|
|
120
|
-
methodBorder:
|
|
121
|
-
methodBg:
|
|
122
|
-
methodText:
|
|
123
|
-
textColor:
|
|
120
|
+
cardBg: AppColors_1.AppColors.amberWarmBg,
|
|
121
|
+
methodBorder: AppColors_1.AppColors.amberWarmBorder,
|
|
122
|
+
methodBg: AppColors_1.AppColors.amberBg,
|
|
123
|
+
methodText: AppColors_1.AppColors.amber700,
|
|
124
|
+
textColor: AppColors_1.AppColors.amberWarmText,
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
127
|
if (type === 'debug' || method === 'debug') {
|
|
127
128
|
return {
|
|
128
|
-
border:
|
|
129
|
-
badgeBg:
|
|
130
|
-
badgeText:
|
|
129
|
+
border: AppColors_1.AppColors.purple500,
|
|
130
|
+
badgeBg: AppColors_1.AppColors.violetSoftBg,
|
|
131
|
+
badgeText: AppColors_1.AppColors.violetSoftText,
|
|
131
132
|
label: 'DEBUG',
|
|
132
|
-
cardBg:
|
|
133
|
-
methodBorder:
|
|
134
|
-
methodBg:
|
|
135
|
-
methodText:
|
|
136
|
-
textColor:
|
|
133
|
+
cardBg: AppColors_1.AppColors.purpleShade50,
|
|
134
|
+
methodBorder: AppColors_1.AppColors.violetSoftBorder,
|
|
135
|
+
methodBg: AppColors_1.AppColors.violetSoftBg,
|
|
136
|
+
methodText: AppColors_1.AppColors.violetSoftText,
|
|
137
|
+
textColor: AppColors_1.AppColors.purpleText,
|
|
137
138
|
};
|
|
138
139
|
}
|
|
139
140
|
if (type === 'info' || method === 'info') {
|
|
140
141
|
return {
|
|
141
|
-
border:
|
|
142
|
-
badgeBg:
|
|
143
|
-
badgeText:
|
|
142
|
+
border: AppColors_1.AppColors.sky500,
|
|
143
|
+
badgeBg: AppColors_1.AppColors.skySoftBg,
|
|
144
|
+
badgeText: AppColors_1.AppColors.skySoftText,
|
|
144
145
|
label: 'INFO',
|
|
145
|
-
cardBg:
|
|
146
|
-
methodBorder:
|
|
147
|
-
methodBg:
|
|
148
|
-
methodText:
|
|
149
|
-
textColor:
|
|
146
|
+
cardBg: AppColors_1.AppColors.blueBg,
|
|
147
|
+
methodBorder: AppColors_1.AppColors.skySoftBorder,
|
|
148
|
+
methodBg: AppColors_1.AppColors.skySoftBg,
|
|
149
|
+
methodText: AppColors_1.AppColors.skySoftText,
|
|
150
|
+
textColor: AppColors_1.AppColors.blue800,
|
|
150
151
|
};
|
|
151
152
|
}
|
|
152
153
|
// Default / Standard console.log
|
|
153
154
|
return {
|
|
154
|
-
border:
|
|
155
|
-
badgeBg:
|
|
156
|
-
badgeText:
|
|
155
|
+
border: AppColors_1.AppColors.indigo500,
|
|
156
|
+
badgeBg: AppColors_1.AppColors.indigo50,
|
|
157
|
+
badgeText: AppColors_1.AppColors.indigo600Alt,
|
|
157
158
|
label: 'LOG',
|
|
158
|
-
cardBg:
|
|
159
|
-
methodBorder:
|
|
160
|
-
methodBg:
|
|
161
|
-
methodText:
|
|
162
|
-
textColor:
|
|
159
|
+
cardBg: AppColors_1.AppColors.primaryLight,
|
|
160
|
+
methodBorder: AppColors_1.AppColors.dividerColor,
|
|
161
|
+
methodBg: AppColors_1.AppColors.indigo50,
|
|
162
|
+
methodText: AppColors_1.AppColors.indigo600Alt,
|
|
163
|
+
textColor: AppColors_1.AppColors.primaryBlack,
|
|
163
164
|
};
|
|
164
165
|
};
|
|
165
166
|
const colors = getLogColors();
|
|
@@ -204,11 +205,11 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
204
205
|
{jsonContent && (<react_native_1.View style={[
|
|
205
206
|
styles.metaChip,
|
|
206
207
|
{
|
|
207
|
-
backgroundColor:
|
|
208
|
-
borderColor:
|
|
208
|
+
backgroundColor: AppColors_1.AppColors.mintGreenBg,
|
|
209
|
+
borderColor: AppColors_1.AppColors.mintGreenBorder,
|
|
209
210
|
},
|
|
210
211
|
]}>
|
|
211
|
-
<react_native_1.Text style={[styles.metaChipText, { color:
|
|
212
|
+
<react_native_1.Text style={[styles.metaChipText, { color: AppColors_1.AppColors.mintGreenText, fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
212
213
|
{Array.isArray(jsonContent.data)
|
|
213
214
|
? `Array[${jsonContent.data.length}]`
|
|
214
215
|
: `Object{${Object.keys(jsonContent.data).length}}`}
|
|
@@ -77,7 +77,13 @@ const CopyButton = react_1.default.memo(({ value, label, iconType = 'copy' }) =>
|
|
|
77
77
|
: iconType === 'fetch'
|
|
78
78
|
? NetworkIcons_1.FetchIcon
|
|
79
79
|
: NetworkIcons_1.CopyIcon;
|
|
80
|
-
return (<TouchableScale_1.default
|
|
80
|
+
return (<TouchableScale_1.default accessible={true} accessibilityRole="button" accessibilityLabel={label
|
|
81
|
+
? copied
|
|
82
|
+
? `${label} copied`
|
|
83
|
+
: `Copy ${label}`
|
|
84
|
+
: copied
|
|
85
|
+
? 'Copied to clipboard'
|
|
86
|
+
: 'Copy to clipboard'} accessibilityHint="Double tap to copy, long press to share" onPress={handlePress} onLongPress={handleLongPress} hitSlop={12} style={containerStyle}>
|
|
81
87
|
{copied ? (<NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.greenColor} size={14}/>) : (<IconComponent color={AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
82
88
|
</TouchableScale_1.default>);
|
|
83
89
|
});
|