react-native-inapp-inspector 1.1.23 → 1.1.25
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/AnalyticsEventCard.js +94 -88
- package/dist/commonjs/components/ConsoleLogCard.js +49 -25
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.d.ts +7 -0
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1002 -0
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +637 -10
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +1 -1
- package/dist/commonjs/components/Inspector/BundleTab.js +859 -402
- package/dist/commonjs/components/Inspector/InspectorContext.js +6 -1
- package/dist/commonjs/components/Inspector/InspectorHeader.js +13 -5
- package/dist/commonjs/components/Inspector/LogDetail.js +223 -111
- package/dist/commonjs/components/Inspector/MainScreen.js +1 -1
- package/dist/commonjs/components/Inspector/NetworkDetail.js +131 -81
- package/dist/commonjs/components/Inspector/PerformanceTab.js +20 -10
- package/dist/commonjs/components/NetworkIcons.d.ts +14 -0
- package/dist/commonjs/components/NetworkIcons.js +93 -1
- package/dist/commonjs/components/SegmentedTabs.js +31 -22
- package/dist/commonjs/components/TreeNode.js +13 -12
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +6 -2
- package/dist/commonjs/customHooks/bundleAnalyzer.js +552 -114
- package/dist/commonjs/customHooks/consoleLogger.js +83 -45
- package/dist/commonjs/customHooks/networkLogger.js +10 -1
- package/dist/commonjs/customHooks/performanceTracker.d.ts +8 -0
- package/dist/commonjs/customHooks/performanceTracker.js +44 -3
- package/dist/commonjs/decorators/index.d.ts +49 -0
- package/dist/commonjs/decorators/index.js +142 -0
- package/dist/commonjs/helpers/gaAnalyticsRegistry.d.ts +18 -0
- package/dist/commonjs/helpers/gaAnalyticsRegistry.js +174 -0
- package/dist/commonjs/helpers/index.d.ts +7 -4
- package/dist/commonjs/helpers/index.js +102 -64
- package/dist/commonjs/i18n/locales/en.json +53 -4
- package/dist/commonjs/index.d.ts +4 -0
- package/dist/commonjs/index.js +216 -8
- package/dist/commonjs/styles/index.d.ts +4 -1
- package/dist/commonjs/styles/index.js +22 -19
- package/dist/commonjs/types/enums.d.ts +115 -9
- package/dist/commonjs/types/enums.js +103 -2
- package/dist/commonjs/types/interfaces.d.ts +19 -0
- package/dist/esm/components/AnalyticsEventCard.js +95 -89
- package/dist/esm/components/ConsoleLogCard.js +49 -25
- package/dist/esm/components/Inspector/AnalyticsFilterModal.d.ts +7 -0
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +964 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +639 -12
- package/dist/esm/components/Inspector/BundleTab.d.ts +1 -1
- package/dist/esm/components/Inspector/BundleTab.js +860 -403
- package/dist/esm/components/Inspector/InspectorContext.js +1 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +14 -6
- package/dist/esm/components/Inspector/LogDetail.js +223 -111
- package/dist/esm/components/Inspector/MainScreen.js +2 -2
- package/dist/esm/components/Inspector/NetworkDetail.js +132 -49
- package/dist/esm/components/Inspector/PerformanceTab.js +20 -10
- package/dist/esm/components/NetworkIcons.d.ts +14 -0
- package/dist/esm/components/NetworkIcons.js +78 -0
- package/dist/esm/components/SegmentedTabs.js +31 -22
- package/dist/esm/components/TreeNode.js +13 -12
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +6 -2
- package/dist/esm/customHooks/bundleAnalyzer.js +549 -114
- package/dist/esm/customHooks/consoleLogger.js +83 -45
- package/dist/esm/customHooks/networkLogger.js +10 -1
- package/dist/esm/customHooks/performanceTracker.d.ts +8 -0
- package/dist/esm/customHooks/performanceTracker.js +38 -1
- package/dist/esm/decorators/index.d.ts +49 -0
- package/dist/esm/decorators/index.js +137 -0
- package/dist/esm/helpers/gaAnalyticsRegistry.d.ts +18 -0
- package/dist/esm/helpers/gaAnalyticsRegistry.js +169 -0
- package/dist/esm/helpers/index.d.ts +7 -4
- package/dist/esm/helpers/index.js +100 -63
- package/dist/esm/i18n/locales/en.json +53 -4
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +190 -8
- package/dist/esm/styles/index.d.ts +4 -1
- package/dist/esm/styles/index.js +22 -19
- package/dist/esm/types/enums.d.ts +115 -9
- package/dist/esm/types/enums.js +102 -3
- package/dist/esm/types/interfaces.d.ts +19 -0
- package/package.json +1 -1
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
4
|
};
|
|
@@ -39,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
6
|
const react_1 = __importDefault(require("react"));
|
|
40
7
|
const i18n_1 = require("../../i18n");
|
|
41
8
|
const react_native_1 = require("react-native");
|
|
42
|
-
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
43
9
|
const InspectorContext_1 = require("./InspectorContext");
|
|
44
10
|
const TouchableScale_1 = __importDefault(require("../TouchableScale"));
|
|
45
11
|
const SegmentedTabs_1 = __importDefault(require("../SegmentedTabs"));
|
|
@@ -111,70 +77,122 @@ const NetworkDetail = react_1.default.memo(() => {
|
|
|
111
77
|
<react_native_1.View style={{
|
|
112
78
|
flexDirection: 'row',
|
|
113
79
|
alignItems: 'center',
|
|
114
|
-
gap:
|
|
80
|
+
gap: 6,
|
|
81
|
+
flexWrap: 'wrap',
|
|
82
|
+
flex: 1,
|
|
115
83
|
}}>
|
|
84
|
+
{/* Method Chip */}
|
|
116
85
|
<react_native_1.View style={[
|
|
117
86
|
styles_1.default.methodBadge,
|
|
118
87
|
{
|
|
119
88
|
backgroundColor: constants_1.METHOD_COLORS[selected.method] ?? constants_1.METHOD_COLORS.ALL,
|
|
89
|
+
paddingHorizontal: 8,
|
|
90
|
+
paddingVertical: 4,
|
|
91
|
+
borderRadius: 7,
|
|
120
92
|
},
|
|
121
93
|
]}>
|
|
122
94
|
<react_native_1.Text style={[
|
|
123
95
|
styles_1.default.methodBadgeText,
|
|
124
96
|
{
|
|
125
97
|
color: AppColors_1.AppColors.white,
|
|
98
|
+
fontSize: 10.5,
|
|
126
99
|
},
|
|
127
100
|
]}>
|
|
128
101
|
{selected.method}
|
|
129
102
|
</react_native_1.Text>
|
|
130
103
|
</react_native_1.View>
|
|
131
104
|
|
|
105
|
+
{/* Status Pill */}
|
|
132
106
|
{selected.status != null && (<react_native_1.View style={[
|
|
133
107
|
styles_1.default.chip,
|
|
134
108
|
{
|
|
135
109
|
backgroundColor: selected.status === 0
|
|
136
|
-
? `${AppColors_1.AppColors.errorColor}
|
|
137
|
-
: `${(0, helpers_1.getStatusColor)(selected.status)}
|
|
110
|
+
? `${AppColors_1.AppColors.errorColor}18`
|
|
111
|
+
: `${(0, helpers_1.getStatusColor)(selected.status)}18`,
|
|
138
112
|
borderColor: selected.status === 0
|
|
139
113
|
? `${AppColors_1.AppColors.errorColor}40`
|
|
140
114
|
: `${(0, helpers_1.getStatusColor)(selected.status)}40`,
|
|
115
|
+
paddingHorizontal: 7,
|
|
116
|
+
paddingVertical: 3.5,
|
|
117
|
+
borderRadius: 7,
|
|
141
118
|
},
|
|
142
119
|
]}>
|
|
143
|
-
{selected.status === 0 ? (<NetworkIcons_1.FailIcon size={8} color={AppColors_1.AppColors.errorColor}/>) : (<
|
|
144
|
-
|
|
145
|
-
|
|
120
|
+
{selected.status === 0 ? (<NetworkIcons_1.FailIcon size={8} color={AppColors_1.AppColors.errorColor}/>) : (<react_native_1.View style={{
|
|
121
|
+
width: 6,
|
|
122
|
+
height: 6,
|
|
123
|
+
borderRadius: 3,
|
|
124
|
+
backgroundColor: (0, helpers_1.getStatusColor)(selected.status),
|
|
125
|
+
}}/>)}
|
|
146
126
|
<react_native_1.Text style={[
|
|
147
127
|
styles_1.default.chipText,
|
|
148
128
|
{
|
|
149
129
|
color: selected.status === 0
|
|
150
130
|
? AppColors_1.AppColors.errorColor
|
|
151
131
|
: (0, helpers_1.getStatusColor)(selected.status),
|
|
132
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
133
|
+
fontSize: 10.5,
|
|
152
134
|
},
|
|
153
135
|
]}>
|
|
154
136
|
{selected.status === 0
|
|
155
137
|
? 'Failed'
|
|
156
|
-
:
|
|
138
|
+
: `${selected.status} ${selected.status === 200 ? 'OK' : ''}`}
|
|
157
139
|
</react_native_1.Text>
|
|
158
140
|
</react_native_1.View>)}
|
|
159
141
|
|
|
142
|
+
{/* Duration Pill */}
|
|
160
143
|
{selected.duration != null && (<react_native_1.View style={[
|
|
161
144
|
styles_1.default.chip,
|
|
162
145
|
{
|
|
163
|
-
backgroundColor: `${AppColors_1.AppColors.
|
|
164
|
-
borderColor: `${AppColors_1.AppColors.
|
|
146
|
+
backgroundColor: `${AppColors_1.AppColors.brandPurple}14`,
|
|
147
|
+
borderColor: `${AppColors_1.AppColors.brandPurple}30`,
|
|
148
|
+
paddingHorizontal: 7,
|
|
149
|
+
paddingVertical: 3.5,
|
|
150
|
+
borderRadius: 7,
|
|
151
|
+
gap: 4,
|
|
165
152
|
},
|
|
166
153
|
]}>
|
|
154
|
+
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.brandPurple} size={10}/>
|
|
167
155
|
<react_native_1.Text style={[
|
|
168
156
|
styles_1.default.chipText,
|
|
169
|
-
{
|
|
157
|
+
{
|
|
158
|
+
color: AppColors_1.AppColors.brandPurple,
|
|
159
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
160
|
+
fontSize: 10.5,
|
|
161
|
+
},
|
|
170
162
|
]}>
|
|
171
163
|
{selected.duration}ms
|
|
172
164
|
</react_native_1.Text>
|
|
173
165
|
</react_native_1.View>)}
|
|
166
|
+
|
|
167
|
+
{/* Size Pill */}
|
|
168
|
+
{selected.response != null && (<react_native_1.View style={[
|
|
169
|
+
styles_1.default.chip,
|
|
170
|
+
{
|
|
171
|
+
backgroundColor: `${AppColors_1.AppColors.sky600}14`,
|
|
172
|
+
borderColor: `${AppColors_1.AppColors.sky600}30`,
|
|
173
|
+
paddingHorizontal: 7,
|
|
174
|
+
paddingVertical: 3.5,
|
|
175
|
+
borderRadius: 7,
|
|
176
|
+
gap: 4,
|
|
177
|
+
},
|
|
178
|
+
]}>
|
|
179
|
+
<NetworkIcons_1.SizeIcon color={AppColors_1.AppColors.sky600} size={10}/>
|
|
180
|
+
<react_native_1.Text style={[
|
|
181
|
+
styles_1.default.chipText,
|
|
182
|
+
{
|
|
183
|
+
color: AppColors_1.AppColors.sky600,
|
|
184
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
185
|
+
fontSize: 10.5,
|
|
186
|
+
},
|
|
187
|
+
]}>
|
|
188
|
+
{(0, helpers_1.getSize)(selected.response)}
|
|
189
|
+
</react_native_1.Text>
|
|
190
|
+
</react_native_1.View>)}
|
|
174
191
|
</react_native_1.View>
|
|
192
|
+
|
|
175
193
|
<react_native_1.View style={styles_1.default.detailInfoRight}>
|
|
176
|
-
<TouchableScale_1.default style={styles_1.default.iconSquareBtn} onPress={() => react_native_1.Linking.openURL(detailDisplayUrl)} hitSlop={12}>
|
|
177
|
-
<NetworkIcons_1.
|
|
194
|
+
<TouchableScale_1.default style={[styles_1.default.iconSquareBtn, { backgroundColor: `${AppColors_1.AppColors.sky600}15` }]} onPress={() => react_native_1.Linking.openURL(detailDisplayUrl)} hitSlop={12}>
|
|
195
|
+
<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600} size={14}/>
|
|
178
196
|
</TouchableScale_1.default>
|
|
179
197
|
<CopyButton_1.default value={(0, helpers_1.getFetchCommand)(selected)} label="fetch()" iconType="fetch"/>
|
|
180
198
|
<CopyButton_1.default value={(0, helpers_1.getCurlCommand)(selected)} label="cURL" iconType="terminal"/>
|
|
@@ -182,67 +200,99 @@ const NetworkDetail = react_1.default.memo(() => {
|
|
|
182
200
|
</react_native_1.View>
|
|
183
201
|
</react_native_1.View>
|
|
184
202
|
|
|
203
|
+
{/* Full Live URL Analysis Card */}
|
|
185
204
|
<react_native_1.Pressable style={{
|
|
186
205
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
187
206
|
borderRadius: 10,
|
|
188
207
|
borderWidth: 1,
|
|
189
208
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
190
209
|
padding: 10,
|
|
191
|
-
marginTop:
|
|
210
|
+
marginTop: 8,
|
|
211
|
+
gap: 6,
|
|
192
212
|
}} onPress={() => react_native_1.Linking.openURL(detailDisplayUrl)}>
|
|
193
213
|
<react_native_1.View style={{
|
|
194
214
|
flexDirection: 'row',
|
|
195
215
|
alignItems: 'center',
|
|
196
216
|
justifyContent: 'space-between',
|
|
197
|
-
marginBottom: 2,
|
|
198
217
|
}}>
|
|
199
|
-
<react_native_1.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
218
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
219
|
+
{schemeStr ? (<react_native_1.View style={{
|
|
220
|
+
backgroundColor: schemeStr.startsWith('https')
|
|
221
|
+
? `${AppColors_1.AppColors.green600}18`
|
|
222
|
+
: `${AppColors_1.AppColors.amber500}18`,
|
|
223
|
+
paddingHorizontal: 6,
|
|
224
|
+
paddingVertical: 2,
|
|
225
|
+
borderRadius: 4,
|
|
226
|
+
}}>
|
|
206
227
|
<react_native_1.Text style={{
|
|
207
|
-
|
|
208
|
-
|
|
228
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
229
|
+
fontSize: 9,
|
|
230
|
+
color: schemeStr.startsWith('https')
|
|
231
|
+
? AppColors_1.AppColors.green600
|
|
232
|
+
: AppColors_1.AppColors.amber500,
|
|
209
233
|
}}>
|
|
210
|
-
{schemeStr}
|
|
234
|
+
{schemeStr.replace('://', '').toUpperCase()}
|
|
211
235
|
</react_native_1.Text>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
236
|
+
</react_native_1.View>) : null}
|
|
237
|
+
|
|
238
|
+
<react_native_1.Text style={{
|
|
239
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
240
|
+
fontSize: 10,
|
|
241
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
242
|
+
letterSpacing: 0.4,
|
|
243
|
+
textTransform: 'uppercase',
|
|
244
|
+
}}>
|
|
245
|
+
ENDPOINT URL ↗
|
|
246
|
+
</react_native_1.Text>
|
|
247
|
+
</react_native_1.View>
|
|
248
|
+
|
|
249
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
250
|
+
{queryStr ? (<react_native_1.View style={{
|
|
216
251
|
backgroundColor: `${AppColors_1.AppColors.purple}14`,
|
|
217
|
-
paddingHorizontal:
|
|
218
|
-
paddingVertical:
|
|
252
|
+
paddingHorizontal: 6,
|
|
253
|
+
paddingVertical: 2,
|
|
219
254
|
borderRadius: 4,
|
|
220
255
|
}}>
|
|
221
|
-
|
|
256
|
+
<react_native_1.Text style={{
|
|
222
257
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
223
258
|
fontSize: 8.5,
|
|
224
259
|
color: AppColors_1.AppColors.purple,
|
|
225
260
|
}}>
|
|
226
|
-
|
|
261
|
+
{t('network.queryParams')}
|
|
262
|
+
</react_native_1.Text>
|
|
263
|
+
</react_native_1.View>) : null}
|
|
264
|
+
|
|
265
|
+
<react_native_1.View style={{
|
|
266
|
+
flexDirection: 'row',
|
|
267
|
+
alignItems: 'center',
|
|
268
|
+
gap: 3,
|
|
269
|
+
backgroundColor: `${AppColors_1.AppColors.sky600}14`,
|
|
270
|
+
paddingHorizontal: 6,
|
|
271
|
+
paddingVertical: 2,
|
|
272
|
+
borderRadius: 4,
|
|
273
|
+
}}>
|
|
274
|
+
<NetworkIcons_1.ExternalLinkIcon color={AppColors_1.AppColors.sky600} size={10}/>
|
|
275
|
+
<react_native_1.Text style={{
|
|
276
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
277
|
+
fontSize: 9,
|
|
278
|
+
color: AppColors_1.AppColors.sky600,
|
|
279
|
+
}}>
|
|
280
|
+
Open ↗
|
|
227
281
|
</react_native_1.Text>
|
|
228
|
-
</react_native_1.View>
|
|
282
|
+
</react_native_1.View>
|
|
283
|
+
</react_native_1.View>
|
|
229
284
|
</react_native_1.View>
|
|
285
|
+
|
|
286
|
+
{/* Full Clickable Hyperlink */}
|
|
230
287
|
<react_native_1.Text selectable={true} style={{
|
|
231
|
-
fontFamily: AppFonts_1.AppFonts.
|
|
232
|
-
fontSize: 12,
|
|
233
|
-
color: AppColors_1.AppColors.
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
288
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
289
|
+
fontSize: 12.5,
|
|
290
|
+
color: AppColors_1.AppColors.skyBlue,
|
|
291
|
+
textDecorationLine: 'underline',
|
|
292
|
+
lineHeight: 18,
|
|
293
|
+
}}>
|
|
294
|
+
{detailDisplayUrl}
|
|
237
295
|
</react_native_1.Text>
|
|
238
|
-
{queryStr ? (<react_native_1.Text selectable={true} style={{
|
|
239
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
240
|
-
fontSize: 10,
|
|
241
|
-
color: AppColors_1.AppColors.grayTextWeak,
|
|
242
|
-
marginTop: 4,
|
|
243
|
-
}} numberOfLines={1}>
|
|
244
|
-
{queryStr}
|
|
245
|
-
</react_native_1.Text>) : null}
|
|
246
296
|
</react_native_1.Pressable>
|
|
247
297
|
</>);
|
|
248
298
|
})()}
|
|
@@ -47,6 +47,7 @@ const AppFonts_1 = require("../../styles/AppFonts");
|
|
|
47
47
|
const i18n_1 = require("../../i18n");
|
|
48
48
|
const helpers_1 = require("../../helpers");
|
|
49
49
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
50
|
+
const performanceTracker_1 = require("../../customHooks/performanceTracker");
|
|
50
51
|
const PerformanceTab = react_1.default.memo(() => {
|
|
51
52
|
const { t } = (0, i18n_1.useTranslation)();
|
|
52
53
|
// ─── Real-Time FPS Tracking ────────────────────────────────────────────────
|
|
@@ -72,10 +73,16 @@ const PerformanceTab = react_1.default.memo(() => {
|
|
|
72
73
|
const [fpsHistory, setFpsHistory] = (0, react_1.useState)([
|
|
73
74
|
60, 59, 60, 60, 58, 60, 59, 60, 60, 60, 57, 60, 59, 60, 60, 58, 60, 60, 59, 60,
|
|
74
75
|
]);
|
|
75
|
-
// Performance Log Events
|
|
76
|
-
const [events, setEvents] = (0, react_1.useState)(
|
|
76
|
+
// Performance Log Events (Initialized with benchmark & diagnostics events)
|
|
77
|
+
const [events, setEvents] = (0, react_1.useState)(performanceTracker_1.INITIAL_EVENTS);
|
|
77
78
|
const [filterCategory, setFilterCategory] = (0, react_1.useState)('ALL');
|
|
78
79
|
const [search, setSearch] = (0, react_1.useState)('');
|
|
80
|
+
(0, react_1.useEffect)(() => {
|
|
81
|
+
const unsub = (0, performanceTracker_1.subscribePerformanceEvents)(liveEvents => {
|
|
82
|
+
setEvents(liveEvents);
|
|
83
|
+
});
|
|
84
|
+
return unsub;
|
|
85
|
+
}, []);
|
|
79
86
|
// ─── Live Frame Measurement Loop (1-Second Batch Interval) ────────────────
|
|
80
87
|
const lastFrameTimeRef = (0, react_1.useRef)(Date.now());
|
|
81
88
|
const rafIdRef = (0, react_1.useRef)(null);
|
|
@@ -119,9 +126,7 @@ const PerformanceTab = react_1.default.memo(() => {
|
|
|
119
126
|
// Trigger log if noticeable frame drop
|
|
120
127
|
if (measuredFps < 50) {
|
|
121
128
|
const durationStr = (1000 / measuredFps).toFixed(1);
|
|
122
|
-
|
|
123
|
-
id: `drop-${Date.now()}`,
|
|
124
|
-
timestamp: Date.now(),
|
|
129
|
+
(0, performanceTracker_1.logPerformanceEvent)({
|
|
125
130
|
type: 'fps_drop',
|
|
126
131
|
category: 'render',
|
|
127
132
|
fps: measuredFps,
|
|
@@ -135,8 +140,7 @@ const PerformanceTab = react_1.default.memo(() => {
|
|
|
135
140
|
},
|
|
136
141
|
advice: t('performance.liveFpsDipAdvice'),
|
|
137
142
|
severity: measuredFps < 30 ? 'critical' : 'warning',
|
|
138
|
-
};
|
|
139
|
-
setEvents(prev => [newEvent, ...prev.slice(0, 49)]);
|
|
143
|
+
});
|
|
140
144
|
}
|
|
141
145
|
frameCount = 0;
|
|
142
146
|
maxLagInSecond = 0;
|
|
@@ -246,7 +250,7 @@ const PerformanceTab = react_1.default.memo(() => {
|
|
|
246
250
|
};
|
|
247
251
|
}, [avgFps, jsLagMs]);
|
|
248
252
|
const clearEvents = () => {
|
|
249
|
-
|
|
253
|
+
(0, performanceTracker_1.clearPerformanceEvents)();
|
|
250
254
|
};
|
|
251
255
|
return (<react_native_1.View style={perfStyles.container}>
|
|
252
256
|
{/* Search & Live Control Header */}
|
|
@@ -291,9 +295,9 @@ const PerformanceTab = react_1.default.memo(() => {
|
|
|
291
295
|
</react_native_1.View>
|
|
292
296
|
</react_native_1.View>
|
|
293
297
|
|
|
294
|
-
{/* Filter Tabs */}
|
|
298
|
+
{/* ─── Frozen Interactive Filter Tabs Under Search Component ─── */}
|
|
295
299
|
<react_native_1.View style={perfStyles.filterRow}>
|
|
296
|
-
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={
|
|
300
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={perfStyles.filterScrollContent}>
|
|
297
301
|
{[
|
|
298
302
|
{ key: 'ALL', label: t('performance.allLogs'), Icon: NetworkIcons_1.BoltIcon, count: events.length },
|
|
299
303
|
{
|
|
@@ -690,6 +694,12 @@ const perfStyles = react_native_1.StyleSheet.create({
|
|
|
690
694
|
backgroundColor: AppColors_1.AppColors.white,
|
|
691
695
|
borderBottomWidth: 1,
|
|
692
696
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
697
|
+
paddingVertical: 5,
|
|
698
|
+
},
|
|
699
|
+
filterScrollContent: {
|
|
700
|
+
gap: 6,
|
|
701
|
+
paddingHorizontal: 12,
|
|
702
|
+
paddingVertical: 2,
|
|
693
703
|
},
|
|
694
704
|
filterPill: {
|
|
695
705
|
flexDirection: 'row',
|
|
@@ -62,6 +62,7 @@ export declare const ForwardChevronIcon: ({ color, size, }: any) => React.JSX.El
|
|
|
62
62
|
export declare const BundleIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
63
63
|
export declare const LiveStateIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
64
64
|
export declare const TimelineIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
65
|
+
export declare const RefreshCcwIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
65
66
|
export declare const StorageIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
66
67
|
export declare const MetadataIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
67
68
|
export declare const ReduxIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
@@ -78,3 +79,16 @@ export declare const BrainIcon: ({ color, size }: any) => React.JSX.Element;
|
|
|
78
79
|
export declare const TextAaIcon: ({ color, size }: any) => React.JSX.Element;
|
|
79
80
|
export declare const CartIcon: ({ color, size }: any) => React.JSX.Element;
|
|
80
81
|
export declare const MoneyIcon: ({ color, size }: any) => React.JSX.Element;
|
|
82
|
+
export declare const ExternalLinkIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
83
|
+
export declare const PackageBoxIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
84
|
+
export declare const GitHubIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
85
|
+
export declare const LinkChainIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
86
|
+
export declare const AppleIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
87
|
+
export declare const AndroidIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
88
|
+
export declare const CodeBracketsIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
89
|
+
export declare const FlameIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
90
|
+
export declare const HourglassIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
91
|
+
export declare const PinIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
92
|
+
export declare const RepeatIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
93
|
+
export declare const TargetGoalIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
94
|
+
export declare const UserCheckIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.InfoCircleIcon = exports.UserIcon = exports.LayersIcon = exports.WipeIcon = exports.FolderIcon = exports.SettingsIcon = exports.EyeIcon = exports.JsIcon = exports.CssIcon = exports.HtmlIcon = exports.BrandSquareIcon = exports.BrandCircleIcon = exports.MoonIcon = exports.SunIcon = exports.DebugIcon = exports.InsightsIcon = exports.AnalyticsIcon = exports.WhiteBackNavigation = exports.CloseWhite = exports.DownloadIcon = exports.FilterIcon = exports.ChevronIcon = exports.SortArrowIcon = exports.GlobeIcon = exports.DiffIcon = exports.SignalIcon = exports.ExportIcon = exports.HeaderPauseIcon = exports.TrashIcon = exports.FailIcon = exports.CircleAlertIcon = exports.CircleXIcon = exports.CircleCheckIcon = exports.CheckIcon = exports.TerminalIcon = exports.FetchIcon = exports.CopyIcon = exports.HeadersIcon = exports.ResponseIcon = exports.RequestIcon = exports.SizeIcon = exports.StatusIcon = exports.CalendarIcon = exports.ClockIcon = exports.ClearIcon = exports.SearchIcon = exports.ExpandCollapseIcon = exports.ScreenIcon = exports.MapPinIcon = exports.EmptyRadarIcon = void 0;
|
|
40
|
-
exports.MoneyIcon = exports.CartIcon = exports.TextAaIcon = exports.BrainIcon = exports.AtomIcon = exports.MapIcon = exports.SparkleIcon = exports.LightbulbIcon = exports.DocIcon = exports.FolderOpenIcon = exports.BanIcon = exports.BoltIcon = exports.PerformanceIcon = exports.ReduxIcon = exports.MetadataIcon = exports.StorageIcon = exports.TimelineIcon = exports.LiveStateIcon = exports.BundleIcon = exports.ForwardChevronIcon = exports.PackageIcon = exports.TableIcon = exports.RawIcon = exports.PrettyIcon = exports.SortIcon = exports.MotionIcon = exports.TrendingUpIcon = exports.ErrorCircleIcon = exports.WarningTriangleIcon = void 0;
|
|
40
|
+
exports.UserCheckIcon = exports.TargetGoalIcon = exports.RepeatIcon = exports.PinIcon = exports.HourglassIcon = exports.FlameIcon = exports.CodeBracketsIcon = exports.AndroidIcon = exports.AppleIcon = exports.LinkChainIcon = exports.GitHubIcon = exports.PackageBoxIcon = exports.ExternalLinkIcon = exports.MoneyIcon = exports.CartIcon = exports.TextAaIcon = exports.BrainIcon = exports.AtomIcon = exports.MapIcon = exports.SparkleIcon = exports.LightbulbIcon = exports.DocIcon = exports.FolderOpenIcon = exports.BanIcon = exports.BoltIcon = exports.PerformanceIcon = exports.ReduxIcon = exports.MetadataIcon = exports.StorageIcon = exports.RefreshCcwIcon = exports.TimelineIcon = exports.LiveStateIcon = exports.BundleIcon = exports.ForwardChevronIcon = exports.PackageIcon = exports.TableIcon = exports.RawIcon = exports.PrettyIcon = exports.SortIcon = exports.MotionIcon = exports.TrendingUpIcon = exports.ErrorCircleIcon = exports.WarningTriangleIcon = void 0;
|
|
41
41
|
const react_1 = __importDefault(require("react"));
|
|
42
42
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
43
43
|
// Stylesheet
|
|
@@ -475,6 +475,12 @@ const TimelineIcon = ({ color = AppColors_1.AppColors.purple, size = 14, }) => {
|
|
|
475
475
|
</react_native_svg_1.default>);
|
|
476
476
|
};
|
|
477
477
|
exports.TimelineIcon = TimelineIcon;
|
|
478
|
+
const RefreshCcwIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => {
|
|
479
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
480
|
+
<react_native_svg_1.Path d="M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
481
|
+
</react_native_svg_1.default>);
|
|
482
|
+
};
|
|
483
|
+
exports.RefreshCcwIcon = RefreshCcwIcon;
|
|
478
484
|
const StorageIcon = ({ color = AppColors_1.AppColors.purple, size = 14, }) => {
|
|
479
485
|
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
480
486
|
<react_native_svg_1.Ellipse cx="12" cy="6" rx="8" ry="2.8" stroke={color} strokeWidth="1.8"/>
|
|
@@ -599,3 +605,89 @@ const MoneyIcon = ({ color = AppColors_1.AppColors.emerald500, size = 14 }) => {
|
|
|
599
605
|
</react_native_svg_1.default>);
|
|
600
606
|
};
|
|
601
607
|
exports.MoneyIcon = MoneyIcon;
|
|
608
|
+
const ExternalLinkIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => {
|
|
609
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
610
|
+
<react_native_svg_1.Path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
611
|
+
<react_native_svg_1.Path d="M15 3h6v6M10 14L21 3" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
612
|
+
</react_native_svg_1.default>);
|
|
613
|
+
};
|
|
614
|
+
exports.ExternalLinkIcon = ExternalLinkIcon;
|
|
615
|
+
const PackageBoxIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => {
|
|
616
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
617
|
+
<react_native_svg_1.Path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
618
|
+
<react_native_svg_1.Path d="M3.27 6.96L12 12.01l8.73-5.05M12 22.08V12" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
619
|
+
</react_native_svg_1.default>);
|
|
620
|
+
};
|
|
621
|
+
exports.PackageBoxIcon = PackageBoxIcon;
|
|
622
|
+
const GitHubIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => {
|
|
623
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
624
|
+
<react_native_svg_1.Path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
625
|
+
</react_native_svg_1.default>);
|
|
626
|
+
};
|
|
627
|
+
exports.GitHubIcon = GitHubIcon;
|
|
628
|
+
const LinkChainIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => {
|
|
629
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
630
|
+
<react_native_svg_1.Path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
631
|
+
<react_native_svg_1.Path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
632
|
+
</react_native_svg_1.default>);
|
|
633
|
+
};
|
|
634
|
+
exports.LinkChainIcon = LinkChainIcon;
|
|
635
|
+
const AppleIcon = ({ color = AppColors_1.AppColors.white, size = 12, }) => {
|
|
636
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill={color}>
|
|
637
|
+
<react_native_svg_1.Path d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M15.97 6.37c.61-.75 1.04-1.8 0.92-2.87-.9.04-1.99.6-2.63 1.35-.56.65-1.06 1.71-.93 2.74 1.01.08 2.03-.47 2.64-1.22z"/>
|
|
638
|
+
</react_native_svg_1.default>);
|
|
639
|
+
};
|
|
640
|
+
exports.AppleIcon = AppleIcon;
|
|
641
|
+
const AndroidIcon = ({ color = AppColors_1.AppColors.white, size = 12, }) => {
|
|
642
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill={color}>
|
|
643
|
+
<react_native_svg_1.Path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v6c0 .83.67 1.5 1.5 1.5S5 16.33 5 15.5v-6C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v6c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-6c0-.83-.67-1.5-1.5-1.5zm-4.97-4.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 2.23 12.95 2 12 2c-.96 0-1.86.23-2.66.63L7.85 1.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.73 4.26 5.54 6 5.16 8h13.68c-.38-2-1.57-3.74-3.31-4.84zM9 6c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/>
|
|
644
|
+
</react_native_svg_1.default>);
|
|
645
|
+
};
|
|
646
|
+
exports.AndroidIcon = AndroidIcon;
|
|
647
|
+
const CodeBracketsIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => {
|
|
648
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
649
|
+
<react_native_svg_1.Path d="M16 18l6-6-6-6M8 6l-6 6 6 6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
650
|
+
</react_native_svg_1.default>);
|
|
651
|
+
};
|
|
652
|
+
exports.CodeBracketsIcon = CodeBracketsIcon;
|
|
653
|
+
const FlameIcon = ({ color = AppColors_1.AppColors.darkOrange, size = 14, }) => {
|
|
654
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
655
|
+
<react_native_svg_1.Path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 3z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
656
|
+
</react_native_svg_1.default>);
|
|
657
|
+
};
|
|
658
|
+
exports.FlameIcon = FlameIcon;
|
|
659
|
+
const HourglassIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => {
|
|
660
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
661
|
+
<react_native_svg_1.Path d="M5 22h14M5 2h14M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
662
|
+
</react_native_svg_1.default>);
|
|
663
|
+
};
|
|
664
|
+
exports.HourglassIcon = HourglassIcon;
|
|
665
|
+
const PinIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => {
|
|
666
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
667
|
+
<react_native_svg_1.Path d="M12 21s-6-5.333-6-10a6 6 0 0 1 12 0c0 4.667-6 10-6 10z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
668
|
+
<react_native_svg_1.Circle cx="12" cy="11" r="2" fill={color}/>
|
|
669
|
+
</react_native_svg_1.default>);
|
|
670
|
+
};
|
|
671
|
+
exports.PinIcon = PinIcon;
|
|
672
|
+
const RepeatIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => {
|
|
673
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
674
|
+
<react_native_svg_1.Path d="M17 2l4 4-4 4M3 11v-1a4 4 0 0 1 4-4h14M7 22l-4-4 4-4M21 13v1a4 4 0 0 1-4 4H3" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
675
|
+
</react_native_svg_1.default>);
|
|
676
|
+
};
|
|
677
|
+
exports.RepeatIcon = RepeatIcon;
|
|
678
|
+
const TargetGoalIcon = ({ color = AppColors_1.AppColors.brandPurple, size = 14, }) => {
|
|
679
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
680
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="10" stroke={color} strokeWidth="1.8"/>
|
|
681
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="6" stroke={color} strokeWidth="1.8"/>
|
|
682
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="2" fill={color}/>
|
|
683
|
+
</react_native_svg_1.default>);
|
|
684
|
+
};
|
|
685
|
+
exports.TargetGoalIcon = TargetGoalIcon;
|
|
686
|
+
const UserCheckIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => {
|
|
687
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
688
|
+
<react_native_svg_1.Path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
689
|
+
<react_native_svg_1.Circle cx="9" cy="7" r="4" stroke={color} strokeWidth="1.8"/>
|
|
690
|
+
<react_native_svg_1.Path d="M16 11l2 2 4-4" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
691
|
+
</react_native_svg_1.default>);
|
|
692
|
+
};
|
|
693
|
+
exports.UserCheckIcon = UserCheckIcon;
|
|
@@ -10,39 +10,48 @@ const AppFonts_1 = require("../styles/AppFonts");
|
|
|
10
10
|
const SegmentedTabs = react_1.default.memo(({ tabs, activeKey, onChange, style }) => (<react_native_1.View style={[
|
|
11
11
|
{
|
|
12
12
|
flexDirection: 'row',
|
|
13
|
-
borderRadius:
|
|
14
|
-
|
|
13
|
+
borderRadius: 10,
|
|
14
|
+
backgroundColor: `${AppColors_1.AppColors.slate200}80`,
|
|
15
|
+
padding: 3,
|
|
15
16
|
borderWidth: 1,
|
|
16
17
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
17
|
-
|
|
18
|
+
gap: 3,
|
|
18
19
|
},
|
|
19
20
|
style,
|
|
20
21
|
]}>
|
|
21
|
-
{tabs.map((tab
|
|
22
|
+
{tabs.map((tab) => {
|
|
22
23
|
const isActive = activeKey === tab.key;
|
|
23
|
-
return (<react_native_1.Pressable key={tab.key} onPress={() => onChange(tab.key)} style={{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
return (<react_native_1.Pressable key={tab.key} onPress={() => onChange(tab.key)} style={({ pressed }) => [
|
|
25
|
+
{
|
|
26
|
+
flex: 1,
|
|
27
|
+
paddingVertical: 7,
|
|
28
|
+
paddingHorizontal: 6,
|
|
29
|
+
borderRadius: 7,
|
|
30
|
+
backgroundColor: isActive
|
|
31
|
+
? AppColors_1.AppColors.brandPurple
|
|
32
|
+
: 'transparent',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
gap: 4.5,
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
opacity: pressed ? 0.8 : 1,
|
|
38
|
+
},
|
|
39
|
+
isActive && {
|
|
40
|
+
shadowColor: AppColors_1.AppColors.brandPurple,
|
|
41
|
+
shadowOffset: { width: 0, height: 1 },
|
|
42
|
+
shadowOpacity: 0.25,
|
|
43
|
+
shadowRadius: 3,
|
|
44
|
+
elevation: 2,
|
|
45
|
+
},
|
|
46
|
+
]}>
|
|
37
47
|
{tab.icon ? tab.icon(isActive) : null}
|
|
38
48
|
<react_native_1.Text style={{
|
|
39
49
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
40
|
-
fontSize: 10,
|
|
50
|
+
fontSize: 10.5,
|
|
41
51
|
color: isActive
|
|
42
52
|
? AppColors_1.AppColors.white
|
|
43
|
-
: AppColors_1.AppColors.
|
|
44
|
-
|
|
45
|
-
letterSpacing: 0.3,
|
|
53
|
+
: AppColors_1.AppColors.grayText,
|
|
54
|
+
letterSpacing: 0.2,
|
|
46
55
|
}}>
|
|
47
56
|
{tab.label}
|
|
48
57
|
</react_native_1.Text>
|