nyxora 1.6.13 → 1.7.1

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +2 -2
  3. package/bin/nyxora.mjs +8 -0
  4. package/package.json +1 -2
  5. package/packages/core/package.json +1 -1
  6. package/packages/core/src/agent/limitOrderManager.ts +2 -2
  7. package/packages/core/src/agent/reasoning.ts +36 -14
  8. package/packages/core/src/config/parser.ts +99 -9
  9. package/packages/core/src/gateway/cli.ts +28 -2
  10. package/packages/core/src/gateway/setup.ts +45 -10
  11. package/packages/core/src/gateway/telegram.ts +53 -12
  12. package/packages/core/src/system/skills/searchWeb.ts +187 -21
  13. package/packages/core/src/utils/formatter.ts +12 -5
  14. package/packages/core/src/web3/config.ts +7 -1
  15. package/packages/core/src/web3/skills/bridgeToken.ts +4 -3
  16. package/packages/core/src/web3/skills/checkAddress.ts +2 -2
  17. package/packages/core/src/web3/skills/checkPortfolio.ts +55 -39
  18. package/packages/core/src/web3/skills/checkSecurity.ts +3 -2
  19. package/packages/core/src/web3/skills/customTx.ts +2 -2
  20. package/packages/core/src/web3/skills/getBalance.ts +3 -3
  21. package/packages/core/src/web3/skills/marketAnalysis.ts +2 -2
  22. package/packages/core/src/web3/skills/mintNft.ts +2 -2
  23. package/packages/core/src/web3/skills/swapToken.ts +4 -3
  24. package/packages/core/src/web3/skills/transfer.ts +2 -2
  25. package/packages/core/src/web3/utils/tokens.ts +8 -0
  26. package/packages/dashboard/dist/assets/{index-24OeXn-k.css → index-BSk4CLkG.css} +1 -1
  27. package/packages/dashboard/dist/assets/{index-BuYfTEKE.js → index-Dc3Tu0Te.js} +21 -21
  28. package/packages/dashboard/dist/index.html +2 -2
  29. package/packages/dashboard/package.json +1 -1
  30. package/packages/mcp-server/package.json +1 -1
  31. package/packages/policy/package.json +1 -1
  32. package/packages/signer/package.json +1 -1
  33. package/launcher.js +0 -48
  34. package/packages/core/src/agent/reasoning.d.ts.map +0 -1
  35. package/packages/core/src/config/parser.d.ts.map +0 -1
  36. package/packages/core/src/gateway/cli.d.ts.map +0 -1
  37. package/packages/core/src/memory/logger.d.ts.map +0 -1
  38. package/packages/core/src/utils/safeLogger.js +0 -59
  39. package/packages/core/src/web3/config.d.ts.map +0 -1
  40. package/packages/core/src/web3/skills/getBalance.d.ts.map +0 -1
  41. package/packages/dashboard/public/favicon.svg +0 -10
  42. package/packages/dashboard/public/icons.svg +0 -24
  43. package/packages/dashboard/src/App.css +0 -184
  44. package/packages/dashboard/src/App.tsx +0 -588
  45. package/packages/dashboard/src/BalanceWidget.tsx +0 -65
  46. package/packages/dashboard/src/MarketWidget.tsx +0 -73
  47. package/packages/dashboard/src/NetworkSelector.tsx +0 -64
  48. package/packages/dashboard/src/NyxoraLogo.tsx +0 -25
  49. package/packages/dashboard/src/OsSkills.tsx +0 -352
  50. package/packages/dashboard/src/Overview.tsx +0 -157
  51. package/packages/dashboard/src/PendingTransactions.tsx +0 -75
  52. package/packages/dashboard/src/Settings.tsx +0 -338
  53. package/packages/dashboard/src/Skills.tsx +0 -200
  54. package/packages/dashboard/src/SwapWidget.tsx +0 -141
  55. package/packages/dashboard/src/TransactionWidget.tsx +0 -95
  56. package/packages/dashboard/src/assets/hero.png +0 -0
  57. package/packages/dashboard/src/assets/react.svg +0 -1
  58. package/packages/dashboard/src/assets/vite.svg +0 -1
  59. package/packages/dashboard/src/components/PillSelect.tsx +0 -65
  60. package/packages/dashboard/src/index.css +0 -807
  61. package/packages/dashboard/src/main.tsx +0 -10
  62. package/packages/dashboard/src/overview.css +0 -304
  63. package/packages/dashboard/src/utils/api.ts +0 -31
  64. package/packages/mcp-server/tsconfig.tsbuildinfo +0 -1
  65. package/test-address.ts +0 -11
  66. package/test-all-chains.ts +0 -19
  67. package/test-db.ts +0 -3
  68. package/test-portfolio.ts +0 -14
  69. package/tsconfig.tsbuildinfo +0 -1
@@ -1,200 +0,0 @@
1
- import { apiFetch } from './utils/api';
2
- import React, { useState, useEffect } from 'react';
3
- import { Compass, Search, Wallet, Send, Zap, ArrowRightLeft, RefreshCw, Image, Terminal, MapPin, User, Shield, PieChart, LineChart, WalletCards, Target, ListOrdered, XCircle } from 'lucide-react';
4
-
5
- interface SkillParam {
6
- type: string;
7
- description?: string;
8
- enum?: string[];
9
- }
10
-
11
- interface SkillDefinition {
12
- type: string;
13
- isActive?: boolean;
14
- function: {
15
- name: string;
16
- description: string;
17
- parameters: {
18
- type: string;
19
- properties: Record<string, SkillParam>;
20
- required: string[];
21
- };
22
- };
23
- }
24
-
25
- const formatSkillName = (name: string) => {
26
- return name
27
- .split('_')
28
- .map(word => word.charAt(0).toUpperCase() + word.slice(1))
29
- .join(' ');
30
- };
31
-
32
- const getSkillIcon = (skillName: string, isActive: boolean) => {
33
- const color = isActive !== false ? "#88c0d0" : "#4c566a";
34
- const size = 20;
35
- switch (formatSkillName(skillName).toLowerCase()) {
36
- case 'get balance': return <Wallet size={size} color={color} />;
37
- case 'transfer token': return <Send size={size} color={color} />;
38
- case 'get price': return <Zap size={size} color={color} />;
39
- case 'swap token': return <ArrowRightLeft size={size} color={color} />;
40
- case 'bridge token': return <RefreshCw size={size} color={color} />;
41
- case 'mint nft': return <Image size={size} color={color} />;
42
- case 'custom tx': return <Terminal size={size} color={color} />;
43
- case 'check address': return <Search size={size} color={color} />;
44
- case 'get my address': return <User size={size} color={color} />;
45
- case 'check token security': return <Shield size={size} color={color} />;
46
- case 'check portfolio': return <PieChart size={size} color={color} />;
47
- case 'analyze market': return <LineChart size={size} color={color} />;
48
- case 'create wallet': return <WalletCards size={size} color={color} />;
49
- case 'create limit order': return <Target size={size} color={color} />;
50
- case 'list limit orders': return <ListOrdered size={size} color={color} />;
51
- case 'cancel limit order': return <XCircle size={size} color={color} />;
52
- default: return <Compass size={size} color={color} />;
53
- }
54
- };
55
-
56
- const Skills: React.FC = () => {
57
- const [skills, setSkills] = useState<SkillDefinition[]>([]);
58
- const [searchQuery, setSearchQuery] = useState('');
59
- const [isLoading, setIsLoading] = useState(true);
60
-
61
- useEffect(() => {
62
- const fetchSkills = async () => {
63
- try {
64
- const res = await apiFetch('/api/skills');
65
- if (res.ok) setSkills(await res.json());
66
- } catch (e) {
67
- console.error(e);
68
- } finally {
69
- setIsLoading(false);
70
- }
71
- };
72
- fetchSkills();
73
- }, []);
74
-
75
- const handleToggle = async (skillName: string, currentStatus: boolean) => {
76
- const newStatus = !currentStatus;
77
-
78
- // Optimistic UI update
79
- setSkills(prev => prev.map(s =>
80
- s.function.name === skillName ? { ...s, isActive: newStatus } : s
81
- ));
82
-
83
- try {
84
- await apiFetch('/api/skills/toggle', {
85
- method: 'POST',
86
- headers: { 'Content-Type': 'application/json' },
87
- body: JSON.stringify({ skillName, active: newStatus })
88
- });
89
- } catch (e) {
90
- // Revert on error
91
- setSkills(prev => prev.map(s =>
92
- s.function.name === skillName ? { ...s, isActive: currentStatus } : s
93
- ));
94
- console.error('Failed to toggle skill', e);
95
- }
96
- };
97
-
98
- if (isLoading) return <div className="overview-container">Loading skills...</div>;
99
-
100
- const filteredSkills = skills.filter(skill =>
101
- skill.function.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
102
- skill.function.description.toLowerCase().includes(searchQuery.toLowerCase())
103
- );
104
-
105
- return (
106
- <div className="overview-container" style={{ maxWidth: '1000px', margin: '0 auto', width: '100%' }}>
107
- <div className="overview-header" style={{ marginBottom: '24px' }}>
108
- <h1 style={{ color: '#eceff4' }}>Skills</h1>
109
- <p style={{ color: '#d8dee9' }}>Installed skills and their status.</p>
110
- </div>
111
-
112
- <div style={{
113
- display: 'flex',
114
- alignItems: 'center',
115
- background: 'rgba(46, 52, 64, 0.4)',
116
- border: '1px solid rgba(216, 222, 233, 0.1)',
117
- borderRadius: '8px',
118
- padding: '0 16px',
119
- marginBottom: '24px'
120
- }}>
121
- <Search size={18} color="#9ca3af" />
122
- <input
123
- type="text"
124
- placeholder="Filter installed skills..."
125
- value={searchQuery}
126
- onChange={(e) => setSearchQuery(e.target.value)}
127
- style={{
128
- background: 'transparent',
129
- border: 'none',
130
- outline: 'none',
131
- color: '#eceff4',
132
- padding: '16px',
133
- width: '100%',
134
- fontSize: '0.95rem'
135
- }}
136
- />
137
- <span style={{ color: '#6b7280', fontSize: '0.85rem' }}>{filteredSkills.length} shown</span>
138
- </div>
139
-
140
- <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
141
- {filteredSkills.map((skill, idx) => (
142
- <div key={idx} style={{
143
- display: 'flex',
144
- alignItems: 'center',
145
- justifyContent: 'space-between',
146
- background: '#3b4252',
147
- padding: '20px 24px',
148
- borderRadius: '8px',
149
- border: '1px solid rgba(216, 222, 233, 0.05)'
150
- }}>
151
- <div style={{ display: 'flex', alignItems: 'flex-start', gap: '16px', flex: 1 }}>
152
- <div style={{ marginTop: '2px' }}>
153
- {getSkillIcon(skill.function.name, skill.isActive !== false)}
154
- </div>
155
- <div>
156
- <h3 style={{ margin: '0 0 6px 0', fontSize: '1rem', color: skill.isActive !== false ? '#eceff4' : '#d8dee9', fontWeight: 600 }}>
157
- {formatSkillName(skill.function.name)}
158
- </h3>
159
- <p style={{ margin: 0, color: '#9ca3af', fontSize: '0.85rem', lineHeight: '1.5', maxWidth: '800px' }}>
160
- {skill.function.description}
161
- </p>
162
- </div>
163
- </div>
164
-
165
- <div style={{ marginLeft: '24px' }}>
166
- <button
167
- onClick={() => handleToggle(skill.function.name, skill.isActive !== false)}
168
- style={{
169
- position: 'relative',
170
- width: '40px',
171
- height: '22px',
172
- borderRadius: '11px',
173
- background: skill.isActive !== false ? '#88c0d0' : '#4c566a',
174
- border: 'none',
175
- cursor: 'pointer',
176
- transition: 'background 0.3s ease',
177
- padding: 0
178
- }}
179
- >
180
- <div style={{
181
- position: 'absolute',
182
- top: '2px',
183
- left: skill.isActive !== false ? '20px' : '2px',
184
- width: '18px',
185
- height: '18px',
186
- borderRadius: '50%',
187
- background: '#fff',
188
- transition: 'left 0.3s cubic-bezier(0.4, 0.0, 0.2, 1)',
189
- boxShadow: '0 1px 3px rgba(0,0,0,0.3)'
190
- }} />
191
- </button>
192
- </div>
193
- </div>
194
- ))}
195
- </div>
196
- </div>
197
- );
198
- };
199
-
200
- export default Skills;
@@ -1,141 +0,0 @@
1
- import React from 'react';
2
- import { ArrowDownUp, CheckCircle2, RefreshCcw } from 'lucide-react';
3
-
4
- interface SwapWidgetProps {
5
- data: string;
6
- }
7
-
8
- const SwapWidget: React.FC<SwapWidgetProps> = ({ data }) => {
9
- if (data.startsWith('TRANSACTION_PENDING')) {
10
- return (
11
- <div className="widget-card" style={{ background: '#1e293b', border: '1px solid #eab308' }}>
12
- <h3 className="widget-title" style={{ color: '#eab308', display: 'flex', alignItems: 'center', gap: '8px', margin: 0, marginBottom: '8px' }}>
13
- Action Required
14
- </h3>
15
- <p style={{ color: '#cbd5e1', fontSize: '0.9rem', margin: 0 }}>Please review and approve the swap transaction.</p>
16
- </div>
17
- );
18
- }
19
-
20
- let parsedData = null;
21
- try {
22
- parsedData = JSON.parse(data);
23
- } catch (e) {
24
- return (
25
- <div className="widget-card error">
26
- <h3 className="widget-title">Swap Error</h3>
27
- <p>Failed to parse swap data.</p>
28
- </div>
29
- );
30
- }
31
-
32
- if (parsedData.error) {
33
- return (
34
- <div className="widget-card error">
35
- <h3 className="widget-title">Transaction Failed</h3>
36
- <p>{parsedData.error}</p>
37
- </div>
38
- );
39
- }
40
-
41
- return (
42
- <div className="widget-card swap-widget" style={{
43
- background: 'rgba(30, 41, 59, 0.7)',
44
- backdropFilter: 'blur(20px)',
45
- border: '1px solid rgba(255, 255, 255, 0.1)',
46
- borderRadius: '24px',
47
- padding: '28px',
48
- color: 'white',
49
- boxShadow: '0 25px 50px -12px rgba(0, 0, 0, 0.5)',
50
- width: '100%',
51
- maxWidth: '420px',
52
- margin: '0 auto',
53
- animation: 'fadeIn 0.5s ease-out'
54
- }}>
55
- <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '24px' }}>
56
- <h3 style={{ margin: 0, fontSize: '1.1rem', fontWeight: 600, display: 'flex', alignItems: 'center', gap: '8px' }}>
57
- <RefreshCcw size={18} color="#a855f7" />
58
- DeFi Swap Execution
59
- </h3>
60
- <span style={{
61
- background: 'rgba(34, 197, 94, 0.2)',
62
- color: '#4ade80',
63
- padding: '4px 10px',
64
- borderRadius: '12px',
65
- fontSize: '0.75rem',
66
- fontWeight: 600,
67
- display: 'flex',
68
- alignItems: 'center',
69
- gap: '4px'
70
- }}>
71
- <CheckCircle2 size={14} /> {parsedData.status}
72
- </span>
73
- </div>
74
-
75
- <div style={{ background: 'rgba(15, 23, 42, 0.5)', borderRadius: '16px', padding: '20px', marginBottom: '12px', border: '1px solid rgba(255,255,255,0.03)' }}>
76
- <div style={{ fontSize: '0.8rem', color: '#94a3b8', marginBottom: '8px' }}>Pay</div>
77
- <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
78
- <span style={{ fontSize: '1.8rem', fontWeight: 700 }}>{parsedData.fromAmount}</span>
79
- <span style={{ background: 'rgba(255,255,255,0.1)', padding: '6px 12px', borderRadius: '12px', fontWeight: 600 }}>
80
- {parsedData.fromToken}
81
- </span>
82
- </div>
83
- </div>
84
-
85
- <div style={{ display: 'flex', justifyContent: 'center', margin: '-20px 0', position: 'relative', zIndex: 10 }}>
86
- <div style={{
87
- background: '#1e293b',
88
- border: '1px solid rgba(255,255,255,0.1)',
89
- padding: '8px',
90
- borderRadius: '50%',
91
- display: 'flex',
92
- alignItems: 'center',
93
- justifyContent: 'center',
94
- boxShadow: '0 4px 12px rgba(0,0,0,0.5)'
95
- }}>
96
- <ArrowDownUp size={20} color="#a855f7" />
97
- </div>
98
- </div>
99
-
100
- <div style={{ background: 'rgba(168, 85, 247, 0.1)', borderRadius: '16px', padding: '20px', marginBottom: '24px', border: '1px solid rgba(168, 85, 247, 0.2)' }}>
101
- <div style={{ fontSize: '0.8rem', color: '#c084fc', marginBottom: '8px' }}>Receive</div>
102
- <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
103
- <span style={{ fontSize: '1.8rem', fontWeight: 700, color: '#e9d5ff' }}>{parsedData.toAmount}</span>
104
- <span style={{ background: 'rgba(168, 85, 247, 0.2)', color: '#e9d5ff', padding: '6px 12px', borderRadius: '12px', fontWeight: 600 }}>
105
- {parsedData.toToken}
106
- </span>
107
- </div>
108
- </div>
109
-
110
- <div style={{ display: 'flex', flexDirection: 'column', gap: '12px', fontSize: '0.85rem', color: '#94a3b8' }}>
111
- <div style={{ display: 'flex', justifyContent: 'space-between' }}>
112
- <span>Exchange Rate</span>
113
- <span style={{ color: 'white' }}>1 {parsedData.fromToken} = {parsedData.exchangeRate} {parsedData.toToken}</span>
114
- </div>
115
- <div style={{ display: 'flex', justifyContent: 'space-between' }}>
116
- <span>Network</span>
117
- <span style={{ color: 'white', textTransform: 'capitalize' }}>{parsedData.chain}</span>
118
- </div>
119
- <div style={{ display: 'flex', justifyContent: 'space-between' }}>
120
- <span>Network Fee (Gas)</span>
121
- <span style={{ color: '#f59e0b' }}>{parsedData.gasFee}</span>
122
- </div>
123
- <div style={{ display: 'flex', justifyContent: 'space-between', marginTop: '8px', paddingTop: '12px', borderTop: '1px dashed rgba(255,255,255,0.1)' }}>
124
- <span>Transaction Hash</span>
125
- <a
126
- href={`#`}
127
- style={{ color: '#3b82f6', textDecoration: 'none', display: 'flex', alignItems: 'center', gap: '4px' }}
128
- >
129
- {parsedData.txHash.substring(0, 8)}...{parsedData.txHash.substring(60)}
130
- </a>
131
- </div>
132
- </div>
133
-
134
- <div style={{ marginTop: '24px', width: '100%', height: '4px', background: 'rgba(255,255,255,0.1)', borderRadius: '2px', overflow: 'hidden' }}>
135
- <div style={{ height: '100%', width: '100%', background: 'linear-gradient(90deg, #3b82f6, #a855f7)', animation: 'progress 2s ease-in-out' }}></div>
136
- </div>
137
- </div>
138
- );
139
- };
140
-
141
- export default SwapWidget;
@@ -1,95 +0,0 @@
1
- import React from 'react';
2
- import { ArrowRight, CheckCircle2, Copy } from 'lucide-react';
3
-
4
- interface TransactionWidgetProps {
5
- data: string;
6
- }
7
-
8
- const TransactionWidget: React.FC<TransactionWidgetProps> = ({ data }) => {
9
- if (data.startsWith('TRANSACTION_PENDING')) {
10
- return (
11
- <div className="widget-card" style={{ background: '#1e293b', border: '1px solid #eab308', padding: '24px', borderRadius: '16px' }}>
12
- <h3 className="widget-title" style={{ color: '#eab308', margin: 0, marginBottom: '8px' }}>Action Required</h3>
13
- <p style={{ color: '#cbd5e1', fontSize: '0.9rem', margin: 0 }}>Please review and approve the transfer transaction.</p>
14
- </div>
15
- );
16
- }
17
-
18
- // Format example: "Successfully transferred 0.05 on base to 0x123..."
19
- let amount = '0.00';
20
- let chain = 'UNKNOWN';
21
- let address = '0x...';
22
-
23
- try {
24
- const amountMatch = data.match(/transferred ([\d.]+) on/i);
25
- if (amountMatch) amount = amountMatch[1];
26
-
27
- const chainMatch = data.match(/on (\w+) to/i);
28
- if (chainMatch) chain = chainMatch[1].toUpperCase();
29
-
30
- const addrMatch = data.match(/to (0x[a-fA-F0-9]+)/i);
31
- if (addrMatch) address = addrMatch[1];
32
- } catch (e) {
33
- // fallback
34
- }
35
-
36
- const truncateAddr = (addr: string) => addr.substring(0, 6) + '...' + addr.substring(addr.length - 4);
37
-
38
- return (
39
- <div style={{
40
- background: '#0f172a',
41
- borderRadius: '24px',
42
- padding: '32px',
43
- border: '1px solid rgba(255,255,255,0.1)',
44
- width: '100%',
45
- maxWidth: '400px',
46
- margin: '0 auto',
47
- animation: 'fadeIn 0.5s ease-out forwards',
48
- boxShadow: '0 20px 40px -10px rgba(0,0,0,0.5)',
49
- }}>
50
- <div style={{ textAlign: 'center', marginBottom: '24px' }}>
51
- <div style={{ width: '64px', height: '64px', background: 'rgba(34,197,94,0.1)', borderRadius: '50%', display: 'flex', alignItems: 'center', justifyContent: 'center', margin: '0 auto 16px' }}>
52
- <CheckCircle2 size={32} color="#4ade80" />
53
- </div>
54
- <h2 style={{ color: 'white', margin: 0, fontSize: '1.25rem' }}>Transaction Sent</h2>
55
- <span style={{ color: '#94a3b8', fontSize: '0.9rem' }}>Successfully confirmed on {chain}</span>
56
- </div>
57
-
58
- <div style={{ background: '#1e293b', borderRadius: '16px', padding: '20px', marginBottom: '24px' }}>
59
- <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '16px' }}>
60
- <span style={{ color: '#94a3b8', fontSize: '0.85rem' }}>Amount Sent</span>
61
- <span style={{ color: 'white', fontWeight: 600 }}>{amount} NATIVE</span>
62
- </div>
63
-
64
- <div style={{ display: 'flex', alignItems: 'center', gap: '16px' }}>
65
- <div style={{ flex: 1 }}>
66
- <div style={{ color: '#64748b', fontSize: '0.75rem', marginBottom: '4px' }}>FROM</div>
67
- <div style={{ color: '#e2e8f0', fontSize: '0.85rem', fontFamily: 'monospace' }}>Agent Wallet</div>
68
- </div>
69
- <ArrowRight size={16} color="#64748b" />
70
- <div style={{ flex: 1, textAlign: 'right' }}>
71
- <div style={{ color: '#64748b', fontSize: '0.75rem', marginBottom: '4px' }}>TO</div>
72
- <div style={{ color: '#e2e8f0', fontSize: '0.85rem', fontFamily: 'monospace', display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '4px' }}>
73
- {truncateAddr(address)} <Copy size={12} color="#64748b" style={{cursor: 'pointer'}} />
74
- </div>
75
- </div>
76
- </div>
77
- </div>
78
-
79
- <button style={{
80
- width: '100%',
81
- padding: '14px',
82
- background: 'transparent',
83
- border: '1px solid rgba(255,255,255,0.1)',
84
- color: 'white',
85
- borderRadius: '12px',
86
- fontWeight: 600,
87
- cursor: 'pointer'
88
- }}>
89
- View on Explorer
90
- </button>
91
- </div>
92
- );
93
- }
94
-
95
- export default TransactionWidget;
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="77" height="47" fill="none" aria-labelledby="vite-logo-title" viewBox="0 0 77 47"><title id="vite-logo-title">Vite</title><style>.parenthesis{fill:#000}@media (prefers-color-scheme:dark){.parenthesis{fill:#fff}}</style><path fill="#9135ff" d="M40.151 45.71c-.663.844-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.493c-.92 0-1.457-1.04-.92-1.788l7.479-10.471c1.07-1.498 0-3.578-1.842-3.578H15.443c-.92 0-1.456-1.04-.92-1.788l9.696-13.576c.213-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.472c-1.07 1.497 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.087.89 1.83L40.153 45.712z"/><mask id="a" width="48" height="47" x="14" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M40.047 45.71c-.663.843-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.389c-.92 0-1.457-1.04-.92-1.788l7.479-10.472c1.07-1.497 0-3.578-1.842-3.578H15.34c-.92 0-1.456-1.04-.92-1.788l9.696-13.575c.213-.297.556-.474.92-.474H53.93c.92 0 1.456 1.04.92 1.788L47.37 13.03c-1.07 1.498 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.088.89 1.831L40.049 45.712z"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#eee6ff" rx="5.508" ry="14.704" transform="rotate(269.814 20.96 11.29)scale(-1 1)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#eee6ff" rx="10.399" ry="29.851" transform="rotate(89.814 -16.902 -8.275)scale(1 -1)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#8900ff" rx="5.508" ry="30.487" transform="rotate(89.814 -19.197 -7.127)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.928 4.177)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.738 5.52)scale(1 -1)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#eee6ff" rx="14.072" ry="22.078" transform="rotate(93.35 31.245 55.578)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx="14.592" cy="9.743" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(39.51 14.592 9.743)"/></g><g filter="url(#k)"><ellipse cx="61.728" cy="-5.321" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 61.728 -5.32)"/></g><g filter="url(#l)"><ellipse cx="55.618" cy="7.104" fill="#00c2ff" rx="5.971" ry="9.665" transform="rotate(37.892 55.618 7.104)"/></g><g filter="url(#m)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#n)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#o)"><ellipse cx="49.857" cy="30.678" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 49.857 30.678)"/></g><g filter="url(#p)"><ellipse cx="52.623" cy="33.171" fill="#00c2ff" rx="5.971" ry="15.297" transform="rotate(37.892 52.623 33.17)"/></g></g><path d="M6.919 0c-9.198 13.166-9.252 33.575 0 46.789h6.215c-9.25-13.214-9.196-33.623 0-46.789zm62.424 0h-6.215c9.198 13.166 9.252 33.575 0 46.789h6.215c9.25-13.214 9.196-33.623 0-46.789" class="parenthesis"/><defs><filter id="b" width="60.045" height="41.654" x="-5.564" y="16.92" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-40.407" y="-6.762" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-35.435" y="2.801" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-30.84" y="20.8" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-29.307" y="21.949" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="29.961" y="-17.13" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-13.43" y="-22.082" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="34.321" y="-37.644" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="38.847" y="-10.552" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="22.45" y="-1.645" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="32.919" y="11.36" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter></defs></svg>
@@ -1,65 +0,0 @@
1
- import React, { useState, useRef, useEffect } from 'react';
2
- import { ChevronDown } from 'lucide-react';
3
-
4
- interface PillSelectProps {
5
- value: string;
6
- options: { id: string; label: string; icon?: React.ReactNode }[];
7
- onChange: (val: string) => void;
8
- pillColor?: string; // e.g. #88c0d0
9
- textColor?: string;
10
- }
11
-
12
- export const PillSelect: React.FC<PillSelectProps> = ({ value, options, onChange, pillColor = '#88c0d0', textColor = '#000000' }) => {
13
- const [isOpen, setIsOpen] = useState(false);
14
- const dropdownRef = useRef<HTMLDivElement>(null);
15
-
16
- useEffect(() => {
17
- const handleClickOutside = (event: MouseEvent) => {
18
- if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {
19
- setIsOpen(false);
20
- }
21
- };
22
- document.addEventListener('mousedown', handleClickOutside);
23
- return () => document.removeEventListener('mousedown', handleClickOutside);
24
- }, []);
25
-
26
- const currentOption = options.find(o => o.id === value) || options[0];
27
-
28
- return (
29
- <div className="custom-network-selector" ref={dropdownRef} style={{ width: '100%' }}>
30
- <button
31
- className="network-selector-pill"
32
- style={{ background: pillColor, color: textColor, padding: '10px 20px', fontSize: '0.9rem', width: '100%', justifyContent: 'space-between' }}
33
- onClick={() => setIsOpen(!isOpen)}
34
- type="button"
35
- >
36
- <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
37
- {currentOption?.icon && <div>{currentOption.icon}</div>}
38
- <span className="network-label" style={{ fontWeight: 600 }}>{currentOption?.label}</span>
39
- </div>
40
- <ChevronDown size={14} className="network-chevron" />
41
- </button>
42
-
43
- {isOpen && (
44
- <ul className="network-dropdown-menu" style={{ width: '100%', top: 'calc(100% + 8px)', padding: '8px', zIndex: 1000 }}>
45
- {options.map(opt => (
46
- <li
47
- key={opt.id}
48
- className={`network-dropdown-item ${opt.id === value ? 'active' : ''}`}
49
- onClick={() => {
50
- onChange(opt.id);
51
- setIsOpen(false);
52
- }}
53
- style={{ display: 'flex', alignItems: 'center', gap: '12px', padding: '10px 16px', borderRadius: '8px', cursor: 'pointer', transition: 'background 0.2s', fontWeight: 500 }}
54
- onMouseEnter={(e) => e.currentTarget.style.background = 'rgba(255,255,255,0.05)'}
55
- onMouseLeave={(e) => e.currentTarget.style.background = 'transparent'}
56
- >
57
- {opt.icon && <div>{opt.icon}</div>}
58
- {opt.label}
59
- </li>
60
- ))}
61
- </ul>
62
- )}
63
- </div>
64
- );
65
- };