react-native-inapp-inspector 2.2.4 → 2.2.5
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/BrandSquareIcon.js +51 -117
- package/dist/commonjs/components/Inspector/TelemetryConsentModal.js +6 -21
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/native/NativeInspector.js +50 -26
- package/dist/esm/components/BrandSquareIcon.js +52 -118
- package/dist/esm/components/Inspector/TelemetryConsentModal.js +6 -21
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/native/NativeInspector.js +51 -27
- package/ios/NetworkInspectorModule.mm +34 -19
- package/package.json +1 -1
- package/src/components/BrandSquareIcon.tsx +109 -118
- package/src/components/Inspector/TelemetryConsentModal.tsx +11 -70
- package/src/constants/version.ts +1 -1
- package/src/native/NativeInspector.ts +56 -24
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { Modal, View, Text, TouchableOpacity, StyleSheet, Animated, Platform, } from 'react-native';
|
|
3
|
-
import Svg, { Path } from 'react-native-svg';
|
|
4
3
|
import { BrandSquareIcon } from '../BrandSquareIcon';
|
|
4
|
+
import { SettingsIcon, ShieldCheckIcon, CheckIcon, ClearIcon, } from '../NetworkIcons';
|
|
5
5
|
import { getTelemetryConsentStatus, setTelemetryConsent, sendSessionTelemetryPing, } from '../../helpers/telemetry';
|
|
6
|
-
// ─── Inline Crisp SVG Icons ───────────────────────────────────────────────────
|
|
7
|
-
const ShieldCheckSvg = ({ size = 15, color = '#7C3AED' }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
8
|
-
<Path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
9
|
-
<Path d="M9 12l2 2 4-4" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
10
|
-
</Svg>);
|
|
11
|
-
const CheckSvg = ({ size = 14, color = '#FFFFFF' }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
12
|
-
<Path d="M20 6L9 17l-5-5" stroke={color} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"/>
|
|
13
|
-
</Svg>);
|
|
14
|
-
const CloseSvg = ({ size = 13, color = '#64748B' }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
15
|
-
<Path d="M18 6L6 18M6 6l12 12" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
16
|
-
</Svg>);
|
|
17
|
-
const GearSvg = ({ size = 13, color = '#6366F1' }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
18
|
-
<Path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
19
|
-
<Path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1Z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
20
|
-
</Svg>);
|
|
21
6
|
export const TelemetryConsentModal = () => {
|
|
22
7
|
const [visible, setVisible] = useState(false);
|
|
23
8
|
const fadeAnim = useState(new Animated.Value(0))[0];
|
|
@@ -80,7 +65,7 @@ export const TelemetryConsentModal = () => {
|
|
|
80
65
|
]}>
|
|
81
66
|
{/* Top-Right Dismiss Icon Button */}
|
|
82
67
|
<TouchableOpacity style={styles.topCloseButton} onPress={() => handleDecision(false)} hitSlop={10} activeOpacity={0.7}>
|
|
83
|
-
<
|
|
68
|
+
<ClearIcon size={12} color="#64748B"/>
|
|
84
69
|
</TouchableOpacity>
|
|
85
70
|
|
|
86
71
|
{/* Centered Enlarged Square Brand Icon Header */}
|
|
@@ -94,7 +79,7 @@ export const TelemetryConsentModal = () => {
|
|
|
94
79
|
|
|
95
80
|
{/* Subheading instruction hint badge */}
|
|
96
81
|
<View style={styles.hintBadge}>
|
|
97
|
-
<
|
|
82
|
+
<SettingsIcon size={12} color="#6366F1"/>
|
|
98
83
|
<Text style={styles.hintBadgeText}>
|
|
99
84
|
You can enable or disable this anytime in Settings
|
|
100
85
|
</Text>
|
|
@@ -111,7 +96,7 @@ export const TelemetryConsentModal = () => {
|
|
|
111
96
|
{/* Privacy Callout Box */}
|
|
112
97
|
<View style={styles.privacyBadge}>
|
|
113
98
|
<View style={styles.privacyShieldWrapper}>
|
|
114
|
-
<
|
|
99
|
+
<ShieldCheckIcon size={15} color="#7C3AED"/>
|
|
115
100
|
</View>
|
|
116
101
|
<Text style={styles.privacyText}>
|
|
117
102
|
<Text style={styles.privacyHighlight}>Privacy Guaranteed:</Text> We
|
|
@@ -123,12 +108,12 @@ export const TelemetryConsentModal = () => {
|
|
|
123
108
|
{/* Enhanced Action Buttons with Icons */}
|
|
124
109
|
<View style={styles.buttonRow}>
|
|
125
110
|
<TouchableOpacity style={styles.declineButton} onPress={() => handleDecision(false)} activeOpacity={0.7}>
|
|
126
|
-
<
|
|
111
|
+
<ClearIcon size={12} color="#64748B"/>
|
|
127
112
|
<Text style={styles.declineText}>Not Now</Text>
|
|
128
113
|
</TouchableOpacity>
|
|
129
114
|
|
|
130
115
|
<TouchableOpacity style={styles.allowButton} onPress={() => handleDecision(true)} activeOpacity={0.85}>
|
|
131
|
-
<
|
|
116
|
+
<CheckIcon size={13} color="#FFFFFF"/>
|
|
132
117
|
<Text style={styles.allowText}>Allow & Share</Text>
|
|
133
118
|
</TouchableOpacity>
|
|
134
119
|
</View>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.2.
|
|
1
|
+
export declare const LIB_VERSION = "2.2.5";
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { NativeModules, NativeEventEmitter } from 'react-native';
|
|
1
|
+
import { NativeModules, NativeEventEmitter, DeviceEventEmitter, } from 'react-native';
|
|
2
2
|
import NativeNetworkInspector from './NativeNetworkInspector';
|
|
3
3
|
// Seamless TurboModule (New Architecture / JSI) & Legacy NativeModules Bridge resolution
|
|
4
4
|
const NativeModule = NativeNetworkInspector || NativeModules.NetworkInspectorModule;
|
|
5
5
|
export const isNativeModuleAvailable = () => {
|
|
6
6
|
return !!NativeModule;
|
|
7
7
|
};
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const getNativeEmitter = () => {
|
|
9
|
+
try {
|
|
10
|
+
if (NativeModules && NativeModules.NetworkInspectorModule) {
|
|
11
|
+
return new NativeEventEmitter(NativeModules.NetworkInspectorModule);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
catch (e) { }
|
|
15
|
+
return null;
|
|
16
|
+
};
|
|
17
|
+
const nativeEmitter = getNativeEmitter();
|
|
12
18
|
/**
|
|
13
19
|
* Retrieves low-level native hardware and system metrics (RAM, Heap, Disk, Battery, CPU).
|
|
14
20
|
*/
|
|
@@ -47,18 +53,27 @@ export const enableNativeCrashProtection = async (options) => {
|
|
|
47
53
|
* Subscribes to fatal native crash events caught by the iOS / Kotlin exception handlers.
|
|
48
54
|
*/
|
|
49
55
|
export const subscribeNativeCrashes = (callback) => {
|
|
50
|
-
|
|
51
|
-
return () => { };
|
|
52
|
-
}
|
|
56
|
+
const cleanups = [];
|
|
53
57
|
try {
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
const sub1 = DeviceEventEmitter.addListener('onNativeCrash', callback);
|
|
59
|
+
cleanups.push(() => sub1.remove());
|
|
60
|
+
}
|
|
61
|
+
catch (e) { }
|
|
62
|
+
if (nativeEmitter) {
|
|
63
|
+
try {
|
|
64
|
+
const sub2 = nativeEmitter.addListener('onNativeCrash', callback);
|
|
65
|
+
cleanups.push(() => sub2.remove());
|
|
66
|
+
}
|
|
67
|
+
catch (e) { }
|
|
68
|
+
}
|
|
69
|
+
return () => {
|
|
70
|
+
cleanups.forEach(fn => {
|
|
71
|
+
try {
|
|
72
|
+
fn();
|
|
73
|
+
}
|
|
74
|
+
catch (e) { }
|
|
75
|
+
});
|
|
76
|
+
};
|
|
62
77
|
};
|
|
63
78
|
/**
|
|
64
79
|
* Displays the 100% native main-thread floating overlay button.
|
|
@@ -110,18 +125,27 @@ export const setNativeFloatingButtonBadge = async (hasBadge) => {
|
|
|
110
125
|
* Subscribes to tap events on the native floating button.
|
|
111
126
|
*/
|
|
112
127
|
export const subscribeNativeFloatingButtonPress = (callback) => {
|
|
113
|
-
|
|
114
|
-
return () => { };
|
|
115
|
-
}
|
|
128
|
+
const cleanups = [];
|
|
116
129
|
try {
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
130
|
+
const sub1 = DeviceEventEmitter.addListener('onFloatingButtonPress', callback);
|
|
131
|
+
cleanups.push(() => sub1.remove());
|
|
132
|
+
}
|
|
133
|
+
catch (e) { }
|
|
134
|
+
if (nativeEmitter) {
|
|
135
|
+
try {
|
|
136
|
+
const sub2 = nativeEmitter.addListener('onFloatingButtonPress', callback);
|
|
137
|
+
cleanups.push(() => sub2.remove());
|
|
138
|
+
}
|
|
139
|
+
catch (e) { }
|
|
140
|
+
}
|
|
141
|
+
return () => {
|
|
142
|
+
cleanups.forEach(fn => {
|
|
143
|
+
try {
|
|
144
|
+
fn();
|
|
145
|
+
}
|
|
146
|
+
catch (e) { }
|
|
147
|
+
});
|
|
148
|
+
};
|
|
125
149
|
};
|
|
126
150
|
/**
|
|
127
151
|
* Starts hardware-accurate native UI thread FPS tracking (CADisplayLink / Choreographer).
|
|
@@ -408,12 +408,28 @@ RCT_EXPORT_MODULE(NetworkInspectorModule);
|
|
|
408
408
|
return YES;
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
- (void)
|
|
412
|
-
if (hasListeners)
|
|
413
|
-
|
|
411
|
+
- (void)safeSendEvent:(NSString *)eventName body:(id)body {
|
|
412
|
+
if (!hasListeners) return;
|
|
413
|
+
@try {
|
|
414
|
+
if (self.bridge != nil) {
|
|
415
|
+
[self sendEventWithName:eventName body:body];
|
|
416
|
+
} else if ([self respondsToSelector:@selector(callableJSModules)]) {
|
|
417
|
+
id callable = [self valueForKey:@"callableJSModules"];
|
|
418
|
+
if (callable && [callable respondsToSelector:@selector(invokeExpectedMethod:method:args:)]) {
|
|
419
|
+
[callable invokeExpectedMethod:@"RCTDeviceEventEmitter"
|
|
420
|
+
method:@"emit"
|
|
421
|
+
args:body ? @[eventName, body] : @[eventName]];
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
} @catch (NSException *ex) {
|
|
425
|
+
NSLog(@"[InAppInspector] Safe sendEvent error: %@", ex.reason);
|
|
414
426
|
}
|
|
415
427
|
}
|
|
416
428
|
|
|
429
|
+
- (void)handleMotionShakeNotification:(NSNotification *)notification {
|
|
430
|
+
[self safeSendEvent:@"onDeviceShake" body:@{}];
|
|
431
|
+
}
|
|
432
|
+
|
|
417
433
|
- (void)startObserving {
|
|
418
434
|
hasListeners = YES;
|
|
419
435
|
}
|
|
@@ -445,15 +461,13 @@ RCT_EXPORT_MODULE(NetworkInspectorModule);
|
|
|
445
461
|
}
|
|
446
462
|
|
|
447
463
|
- (void)emitCrashEventWithMessage:(NSString *)message stackTrace:(NSString *)stackTrace {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}];
|
|
456
|
-
}
|
|
464
|
+
[self safeSendEvent:@"onNativeCrash"
|
|
465
|
+
body:@{
|
|
466
|
+
@"platform": @"ios",
|
|
467
|
+
@"message": message ?: @"Unknown iOS Native Exception",
|
|
468
|
+
@"stack": stackTrace ?: @"",
|
|
469
|
+
@"timestamp": @([[NSDate date] timeIntervalSince1970] * 1000)
|
|
470
|
+
}];
|
|
457
471
|
}
|
|
458
472
|
|
|
459
473
|
RCT_EXPORT_METHOD(enableNativeCrashProtection:(RCTPromiseResolveBlock)resolve
|
|
@@ -586,18 +600,19 @@ RCT_EXPORT_METHOD(showFloatingButton:(NSDictionary *)options
|
|
|
586
600
|
if (floatingButtonView == nil) {
|
|
587
601
|
floatingButtonView = [[InAppInspectorFloatingView alloc] initWithFrame:CGRectMake(initialX, initialY, size, size)];
|
|
588
602
|
floatingButtonView.layer.zPosition = 999999;
|
|
589
|
-
__weak NetworkInspectorModule *weakSelf = self;
|
|
590
|
-
floatingButtonView.onTapBlock = ^{
|
|
591
|
-
NetworkInspectorModule *strongSelf = weakSelf ?: sharedInstance;
|
|
592
|
-
if (strongSelf) {
|
|
593
|
-
[strongSelf sendEventWithName:@"onFloatingButtonPress" body:@{}];
|
|
594
|
-
}
|
|
595
|
-
};
|
|
596
603
|
} else {
|
|
597
604
|
floatingButtonView.layer.zPosition = 999999;
|
|
598
605
|
floatingButtonView.frame = CGRectMake(initialX, initialY, size, size);
|
|
599
606
|
}
|
|
600
607
|
|
|
608
|
+
__weak NetworkInspectorModule *weakSelf = self;
|
|
609
|
+
floatingButtonView.onTapBlock = ^{
|
|
610
|
+
NetworkInspectorModule *strongSelf = weakSelf ?: sharedInstance;
|
|
611
|
+
if (strongSelf) {
|
|
612
|
+
[strongSelf safeSendEvent:@"onFloatingButtonPress" body:@{}];
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
|
|
601
616
|
void (^attachToWindow)(void) = ^{
|
|
602
617
|
UIWindow *activeWin = GetAppActiveWindow();
|
|
603
618
|
if (!activeWin || !floatingButtonView) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-inapp-inspector",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "The zero-config, all-in-one in-app debugger for React Native & Expo. Inspect Network (fetch/axios), Console logs, Stack Traces, Redux State, Firebase Analytics, and JS Bundle size directly on device.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -1,142 +1,133 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Svg, {
|
|
2
|
+
import Svg, {
|
|
3
|
+
Circle,
|
|
4
|
+
Path,
|
|
5
|
+
G,
|
|
6
|
+
Defs,
|
|
7
|
+
LinearGradient,
|
|
8
|
+
RadialGradient,
|
|
9
|
+
Stop,
|
|
10
|
+
Rect,
|
|
11
|
+
Ellipse,
|
|
12
|
+
Line,
|
|
13
|
+
} from 'react-native-svg';
|
|
3
14
|
|
|
4
15
|
export const BrandSquareIcon = ({size = 56}: {size?: number}) => {
|
|
5
16
|
return (
|
|
6
17
|
<Svg width={size} height={size} viewBox="0 0 256 256" fill="none">
|
|
7
18
|
<Defs>
|
|
8
|
-
<LinearGradient id="
|
|
9
|
-
<Stop offset="0" stopColor="#
|
|
10
|
-
<Stop offset="1" stopColor="#
|
|
19
|
+
<LinearGradient id="bs_tile" x1="0" y1="0" x2="256" y2="256" gradientUnits="userSpaceOnUse">
|
|
20
|
+
<Stop offset="0" stopColor="#1E1B4B" />
|
|
21
|
+
<Stop offset="1" stopColor="#0F172A" />
|
|
11
22
|
</LinearGradient>
|
|
12
|
-
<LinearGradient id="
|
|
13
|
-
<Stop offset="0" stopColor="#
|
|
14
|
-
<Stop offset="
|
|
23
|
+
<LinearGradient id="bs_beam" x1="0" y1="0" x2="256" y2="256" gradientUnits="userSpaceOnUse">
|
|
24
|
+
<Stop offset="0" stopColor="#818CF8" />
|
|
25
|
+
<Stop offset="0.5" stopColor="#A855F7" />
|
|
26
|
+
<Stop offset="1" stopColor="#EC4899" />
|
|
15
27
|
</LinearGradient>
|
|
16
|
-
<LinearGradient id="
|
|
17
|
-
<Stop offset="0" stopColor="#
|
|
18
|
-
<Stop offset="
|
|
19
|
-
<Stop offset="1" stopColor="#A78BFA"/>
|
|
28
|
+
<LinearGradient id="bs_body" x1="0" y1="0" x2="0" y2="256" gradientUnits="userSpaceOnUse">
|
|
29
|
+
<Stop offset="0" stopColor="#312E81" />
|
|
30
|
+
<Stop offset="1" stopColor="#1E1B4B" />
|
|
20
31
|
</LinearGradient>
|
|
21
|
-
<RadialGradient id="
|
|
22
|
-
<Stop offset="0" stopColor="#
|
|
23
|
-
<Stop offset="
|
|
32
|
+
<RadialGradient id="bs_iris" cx="40%" cy="40%" r="60%">
|
|
33
|
+
<Stop offset="0" stopColor="#FDE047" />
|
|
34
|
+
<Stop offset="0.7" stopColor="#F59E0B" />
|
|
35
|
+
<Stop offset="1" stopColor="#D97706" />
|
|
24
36
|
</RadialGradient>
|
|
25
|
-
<LinearGradient id="
|
|
26
|
-
<Stop offset="0" stopColor="#
|
|
27
|
-
<Stop offset="1" stopColor="#
|
|
28
|
-
</LinearGradient>
|
|
29
|
-
<LinearGradient id="beakSquare" x1="120" y1="151" x2="136" y2="168" gradientUnits="userSpaceOnUse">
|
|
30
|
-
<Stop offset="0" stopColor="#FCD34D"/>
|
|
31
|
-
<Stop offset="1" stopColor="#FB923C"/>
|
|
32
|
-
</LinearGradient>
|
|
33
|
-
<RadialGradient id="irisSquare" cx="0.42" cy="0.38" r="0.72">
|
|
34
|
-
<Stop offset="0" stopColor="#FDE68A"/>
|
|
35
|
-
<Stop offset="0.5" stopColor="#FBBF24"/>
|
|
36
|
-
<Stop offset="1" stopColor="#F59E0B"/>
|
|
37
|
-
</RadialGradient>
|
|
38
|
-
<RadialGradient id="blushSquare" cx="0.5" cy="0.5" r="0.5">
|
|
39
|
-
<Stop offset="0" stopColor="#FB7185" stopOpacity={0.5}/>
|
|
40
|
-
<Stop offset="1" stopColor="#FB7185" stopOpacity={0}/>
|
|
41
|
-
</RadialGradient>
|
|
42
|
-
<LinearGradient id="wingSquare" x1="70" y1="120" x2="190" y2="206" gradientUnits="userSpaceOnUse">
|
|
43
|
-
<Stop offset="0" stopColor="#1A2545"/>
|
|
44
|
-
<Stop offset="1" stopColor="#0E1530"/>
|
|
45
|
-
</LinearGradient>
|
|
46
|
-
<LinearGradient id="faceplateSquare" x1="70" y1="72" x2="186" y2="152" gradientUnits="userSpaceOnUse">
|
|
47
|
-
<Stop offset="0" stopColor="#35497E"/>
|
|
48
|
-
<Stop offset="1" stopColor="#1E2D4D"/>
|
|
49
|
-
</LinearGradient>
|
|
50
|
-
<RadialGradient id="lensglassSquare" cx="0.4" cy="0.32" r="0.75">
|
|
51
|
-
<Stop offset="0" stopColor="#7DE8FF" stopOpacity={0.22}/>
|
|
52
|
-
<Stop offset="0.7" stopColor="#7DE8FF" stopOpacity={0.05}/>
|
|
53
|
-
<Stop offset="1" stopColor="#7DE8FF" stopOpacity={0}/>
|
|
54
|
-
</RadialGradient>
|
|
55
|
-
<LinearGradient id="bellySquare" x1="94" y1="126" x2="162" y2="212" gradientUnits="userSpaceOnUse">
|
|
56
|
-
<Stop offset="0" stopColor="#33477A"/>
|
|
57
|
-
<Stop offset="1" stopColor="#1D2B53"/>
|
|
37
|
+
<LinearGradient id="bs_beak" x1="0" y1="0" x2="0" y2="20" gradientUnits="userSpaceOnUse">
|
|
38
|
+
<Stop offset="0" stopColor="#FBBF24" />
|
|
39
|
+
<Stop offset="1" stopColor="#F97316" />
|
|
58
40
|
</LinearGradient>
|
|
59
41
|
</Defs>
|
|
60
|
-
<Rect x={8} y={8} width={240} height={240} rx={58} fill="url(#tileSquare)"/>
|
|
61
|
-
<Rect x={8.6} y={8.6} width={238.8} height={238.8} rx={57.4} fill="none" stroke="url(#edgeSquare)" strokeOpacity={0.6} strokeWidth={1.2}/>
|
|
62
|
-
<Circle cx={128} cy={128} r={104} fill="url(#haloSquare)"/>
|
|
63
|
-
<G transform="translate(128 128) scale(1.16) translate(-128 -134)">
|
|
64
|
-
{/* wing 1 */}
|
|
65
|
-
<Path d="M74 124 C58 154 60 190 86 204 C79 176 77 148 88 126 Z" fill="url(#wingSquare)" stroke="url(#beamSquare)" strokeWidth={2.5} strokeOpacity={0.45}/>
|
|
66
|
-
{/* wing 2 */}
|
|
67
|
-
<Path d="M182 124 C198 154 196 190 170 204 C177 176 179 148 168 126 Z" fill="url(#wingSquare)" stroke="url(#beamSquare)" strokeWidth={2.5} strokeOpacity={0.45}/>
|
|
68
|
-
{/* body */}
|
|
69
|
-
<Path d="M62 150 C58 104 70 70 90 58 L98 42 L116 62 Q128 57 140 62 L158 42 L166 58 C186 70 198 104 194 150 C198 180 184 204 152 212 C140 216 116 216 104 212 C72 204 58 180 62 150 Z" fill="url(#owlbodySquare)" stroke="url(#beamSquare)" strokeWidth={4} strokeLinejoin="round"/>
|
|
70
|
-
|
|
71
|
-
{/* inner-ear shadows */}
|
|
72
|
-
<Path d="M99 48 L114 62 L104 63 L98 55 Z" fill="#080F22" opacity={0.5}/>
|
|
73
|
-
<Path d="M157 48 L142 62 L152 63 L158 55 Z" fill="#080F22" opacity={0.5}/>
|
|
74
|
-
|
|
75
|
-
{/* wing feather lines */}
|
|
76
|
-
<G stroke="#22325A" strokeWidth={2.2} fill="none" strokeLinecap="round" opacity={0.75}>
|
|
77
|
-
<Path d="M80 138 q-5 26 3 50"/>
|
|
78
|
-
<Path d="M90 134 q-4 26 3 48"/>
|
|
79
|
-
<Path d="M176 138 q5 26 -3 50"/>
|
|
80
|
-
<Path d="M166 134 q4 26 -3 48"/>
|
|
81
|
-
</G>
|
|
82
42
|
|
|
83
|
-
|
|
84
|
-
|
|
43
|
+
{/* Rounded App Tile Background */}
|
|
44
|
+
<Rect x="8" y="8" width="240" height="240" rx="54" fill="url(#bs_tile)" />
|
|
45
|
+
<Rect
|
|
46
|
+
x="8"
|
|
47
|
+
y="8"
|
|
48
|
+
width="240"
|
|
49
|
+
height="240"
|
|
50
|
+
rx="54"
|
|
51
|
+
fill="none"
|
|
52
|
+
stroke="url(#bs_beam)"
|
|
53
|
+
strokeWidth="3"
|
|
54
|
+
strokeOpacity={0.4}
|
|
55
|
+
/>
|
|
85
56
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<Path d="M128 190 Q136 198 144 190"/>
|
|
95
|
-
</G>
|
|
57
|
+
{/* Owl Outer Body Contour */}
|
|
58
|
+
<Path
|
|
59
|
+
d="M64 148 C60 102 72 68 92 56 L100 40 L118 60 Q128 55 138 60 L156 40 L164 56 C184 68 196 102 192 148 C196 178 182 202 150 210 C138 214 118 214 106 210 C74 202 60 178 64 148 Z"
|
|
60
|
+
fill="url(#bs_body)"
|
|
61
|
+
stroke="url(#bs_beam)"
|
|
62
|
+
strokeWidth="4"
|
|
63
|
+
strokeLinejoin="round"
|
|
64
|
+
/>
|
|
96
65
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
66
|
+
{/* Wings */}
|
|
67
|
+
<Path
|
|
68
|
+
d="M74 124 C58 154 60 190 86 204 C79 176 77 148 88 126 Z"
|
|
69
|
+
fill="#1E1B4B"
|
|
70
|
+
stroke="#818CF8"
|
|
71
|
+
strokeWidth="2.5"
|
|
72
|
+
strokeOpacity={0.6}
|
|
73
|
+
/>
|
|
74
|
+
<Path
|
|
75
|
+
d="M182 124 C198 154 196 190 170 204 C177 176 179 148 168 126 Z"
|
|
76
|
+
fill="#1E1B4B"
|
|
77
|
+
stroke="#818CF8"
|
|
78
|
+
strokeWidth="2.5"
|
|
79
|
+
strokeOpacity={0.6}
|
|
80
|
+
/>
|
|
104
81
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
82
|
+
{/* Belly Screen Plate */}
|
|
83
|
+
<Rect
|
|
84
|
+
x="105"
|
|
85
|
+
y="160"
|
|
86
|
+
width="46"
|
|
87
|
+
height="34"
|
|
88
|
+
rx="8"
|
|
89
|
+
fill="#0B0F19"
|
|
90
|
+
stroke="url(#bs_beam)"
|
|
91
|
+
strokeWidth="2"
|
|
92
|
+
/>
|
|
93
|
+
{/* Code Emblem on Chest */}
|
|
94
|
+
<G stroke="#A5B4FC" strokeWidth="2.8" strokeLinecap="round" strokeLinejoin="round" fill="none">
|
|
95
|
+
<Path d="M120 171 L114 177 L120 183" />
|
|
96
|
+
<Path d="M136 171 L142 177 L136 183" />
|
|
97
|
+
<Path d="M130 169 L126 185" stroke="#EC4899" />
|
|
98
|
+
</G>
|
|
109
99
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
100
|
+
{/* Facial Disc & Mask */}
|
|
101
|
+
<Path
|
|
102
|
+
d="M128 92 C148 70 186 78 186 108 C186 134 160 152 128 152 C96 152 70 134 70 108 C70 78 108 70 128 92 Z"
|
|
103
|
+
fill="#2E1065"
|
|
104
|
+
stroke="#818CF8"
|
|
105
|
+
strokeWidth="2"
|
|
106
|
+
strokeOpacity={0.6}
|
|
107
|
+
/>
|
|
115
108
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
109
|
+
{/* Right Eye (Normal Cute Eye) */}
|
|
110
|
+
<Circle cx="154" cy="108" r="17" fill="url(#bs_iris)" stroke="#0F172A" strokeWidth="2" />
|
|
111
|
+
<Circle cx="154" cy="108" r="8.5" fill="#0F172A" />
|
|
112
|
+
<Circle cx="157" cy="105" r="3" fill="#FFFFFF" />
|
|
113
|
+
<Circle cx="151" cy="111" r="1.5" fill="#FFFFFF" opacity={0.8} />
|
|
121
114
|
|
|
122
|
-
|
|
123
|
-
|
|
115
|
+
{/* Left Eye (Diagnostic Magnifier Lens) */}
|
|
116
|
+
<Circle cx="96" cy="104" r="20" fill="url(#bs_iris)" stroke="#0F172A" strokeWidth="2" />
|
|
117
|
+
<Circle cx="96" cy="104" r="10" fill="#0F172A" />
|
|
118
|
+
<Circle cx="99.5" cy="100.5" r="3.5" fill="#FFFFFF" />
|
|
119
|
+
<Circle cx="92" cy="107" r="1.8" fill="#FFFFFF" opacity={0.8} />
|
|
124
120
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<Circle cx={91} cy={107} r={1.8} fill="#ffffff" opacity={0.7}/>
|
|
130
|
-
<Circle cx={95} cy={103} r={28} fill="url(#lensglassSquare)"/>
|
|
131
|
-
<Path d="M77 87 A28 28 0 0 1 106 79" fill="none" stroke="#ffffff" strokeWidth={4} strokeLinecap="round" strokeOpacity={0.5}/>
|
|
132
|
-
<Line x1={75} y1={123} x2={54} y2={147} stroke="#0A0F1C" strokeWidth={14} strokeLinecap="round"/>
|
|
133
|
-
<Line x1={75} y1={123} x2={54} y2={147} stroke="url(#beamSquare)" strokeWidth={8.5} strokeLinecap="round"/>
|
|
134
|
-
<Circle cx={95} cy={103} r={28} fill="none" stroke="url(#beamSquare)" strokeWidth={7}/>
|
|
121
|
+
{/* Magnifier Glass Ring & Handle */}
|
|
122
|
+
<Line x1="76" y1="124" x2="55" y2="148" stroke="#0F172A" strokeWidth="12" strokeLinecap="round" />
|
|
123
|
+
<Line x1="76" y1="124" x2="55" y2="148" stroke="url(#bs_beam)" strokeWidth="7" strokeLinecap="round" />
|
|
124
|
+
<Circle cx="96" cy="104" r="28" fill="#38BDF8" fillOpacity={0.12} stroke="url(#bs_beam)" strokeWidth="6" />
|
|
135
125
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
126
|
+
{/* Beak */}
|
|
127
|
+
<Path
|
|
128
|
+
d="M123.5 123 Q128 121 132.5 123 Q131 132 128 134.5 Q125 132 123.5 123 Z"
|
|
129
|
+
fill="url(#bs_beak)"
|
|
130
|
+
/>
|
|
140
131
|
</Svg>
|
|
141
132
|
);
|
|
142
133
|
};
|