1- < div class ="editor-container h-screen flex flex-col bg-gray-900 ">
1+ < div class ="editor-container h-screen flex flex-col relative bg-gray-900 ">
22 <!-- Header with title and actions -->
3- < div class ="editor-header bg-gray-800 px-6 py-4 border-b border-gray-700 ">
3+ < div class ="editor-header editor-header-gradient px-4 sm:px- 6 py-4 border-b border-gray-700/50 ">
44 < div class ="flex items-center justify-between ">
5- < div >
6- < h2 class ="text-xl font-semibold text-white "> Soroban Smart Contract Editor</ h2 >
7- < p class ="text-sm text-gray-400 mt-1 "> Write and test your Rust smart contracts</ p >
5+ < div class ="flex items-center space-x-4 ">
6+ < div class ="hidden sm:flex w-10 h-10 bg-gradient-to-br from-blue-500 to-purple-600 rounded-lg items-center justify-center ">
7+ < svg class ="w-6 h-6 text-white " fill ="currentColor " viewBox ="0 0 24 24 ">
8+ < path d ="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5 "/>
9+ </ svg >
10+ </ div >
11+ < div >
12+ < h2 class ="text-xl sm:text-2xl font-bold text-white tracking-tight "> Soroban Smart Contract Editor</ h2 >
13+ < p class ="text-sm text-gray-300 mt-1 hidden sm:block "> Write and test your Rust smart contracts</ p >
14+ </ div >
815 </ div >
916
10- < div class ="flex gap-3 " role ="toolbar " aria-label ="Editor actions ">
17+ < div class ="flex gap-2 sm:gap- 3 " role ="toolbar " aria-label ="Editor actions ">
1118 < button
1219 (click) ="onCompile() "
1320 [disabled] ="isLoading || !code.trim() "
14- class ="px-6 py-2 bg-blue-500 text-white font-medium rounded-lg hover:bg-blue-600 disabled:bg-gray-600 disabled:cursor-not-allowed transition-colors duration-200 flex items-center gap-2 "
15- [class.opacity-50] ="isLoading "
21+ class ="btn-ripple focus-ring-editor px-4 sm:px-6 py-2 bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-600 hover:to-blue-700 text-white font-medium rounded-lg disabled:from-gray-600 disabled:to-gray-600 disabled:cursor-not-allowed transition-all duration-200 flex items-center gap-2 shadow-lg hover:shadow-xl transform hover:scale-105 active:scale-95 "
22+ [class.opacity-75] ="isLoading "
23+ [class.animate-pulse] ="isLoading "
1624 aria-label ="Compile Rust smart contract "
1725 [attr.aria-busy] ="isLoading "
1826 >
@@ -23,14 +31,15 @@ <h2 class="text-xl font-semibold text-white">Soroban Smart Contract Editor</h2>
2331 < svg *ngIf ="!isLoading " class ="h-4 w-4 " fill ="none " stroke ="currentColor " viewBox ="0 0 24 24 " xmlns ="http://www.w3.org/2000/svg ">
2432 < path stroke-linecap ="round " stroke-linejoin ="round " stroke-width ="2 " d ="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z "> </ path >
2533 </ svg >
26- < span > {{ isLoading ? 'Compiling...' : 'Compile' }}</ span >
34+ < span class =" btn-text-shown " > {{ isLoading ? 'Compiling...' : 'Compile' }}</ span >
2735 </ button >
2836
2937 < button
3038 (click) ="onTest() "
3139 [disabled] ="isLoading || !code.trim() "
32- class ="px-6 py-2 bg-green-500 text-white font-medium rounded-lg hover:bg-green-600 disabled:bg-gray-600 disabled:cursor-not-allowed transition-colors duration-200 flex items-center gap-2 "
33- [class.opacity-50] ="isLoading "
40+ class ="btn-ripple focus-ring-editor px-4 sm:px-6 py-2 bg-gradient-to-r from-green-500 to-green-600 hover:from-green-600 hover:to-green-700 text-white font-medium rounded-lg disabled:from-gray-600 disabled:to-gray-600 disabled:cursor-not-allowed transition-all duration-200 flex items-center gap-2 shadow-lg hover:shadow-xl transform hover:scale-105 active:scale-95 "
41+ [class.opacity-75] ="isLoading "
42+ [class.animate-pulse] ="isLoading "
3443 aria-label ="Test Rust smart contract "
3544 [attr.aria-busy] ="isLoading "
3645 >
@@ -41,7 +50,7 @@ <h2 class="text-xl font-semibold text-white">Soroban Smart Contract Editor</h2>
4150 < svg *ngIf ="!isLoading " class ="h-4 w-4 " fill ="none " stroke ="currentColor " viewBox ="0 0 24 24 " xmlns ="http://www.w3.org/2000/svg ">
4251 < path stroke-linecap ="round " stroke-linejoin ="round " stroke-width ="2 " d ="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z "> </ path >
4352 </ svg >
44- < span > {{ isLoading ? 'Testing...' : 'Test' }}</ span >
53+ < span class =" btn-text-shown " > {{ isLoading ? 'Testing...' : 'Test' }}</ span >
4554 </ button >
4655 </ div >
4756 </ div >
@@ -51,29 +60,47 @@ <h2 class="text-xl font-semibold text-white">Soroban Smart Contract Editor</h2>
5160 < div class ="flex-1 overflow-hidden " role ="main " aria-label ="Code editor ">
5261 < ngx-monaco-editor
5362 *ngIf ="isBrowser "
54- class ="h-full "
63+ class ="h-full w-full "
5564 [(ngModel)] ="code "
5665 [options] ="editorOptions "
5766 > </ ngx-monaco-editor >
58- < div *ngIf ="!isBrowser " class ="h-full flex items-center justify-center bg-gray-800 text-gray-400 ">
59- Loading editor...
67+ < div *ngIf ="!isBrowser " class ="h-full w-full flex flex-col items-center justify-center bg-gray-800 text-gray-400 ">
68+ < svg class ="animate-spin h-8 w-8 text-blue-500 mx-auto mb-4 " fill ="none " viewBox ="0 0 24 24 ">
69+ < circle class ="opacity-25 " cx ="12 " cy ="12 " r ="10 " stroke ="currentColor " stroke-width ="4 "> </ circle >
70+ < path class ="opacity-75 " fill ="currentColor " d ="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z "> </ path >
71+ </ svg >
72+ < p class ="text-sm font-medium "> Loading editor...</ p >
6073 </ div >
6174 </ div >
6275
6376 <!-- Status bar -->
64- < div class ="editor-footer bg-gray-800 px-6 py-2 border-t border-gray-700 " role ="status " aria-live ="polite " aria-label ="Editor status ">
77+ < div class ="editor-footer status-bar-glass px-4 sm:px- 6 py-3 " role ="status " aria-live ="polite " aria-label ="Editor status ">
6578 < div class ="flex items-center justify-between text-sm ">
66- < div class ="flex items-center gap-4 text-gray-400 ">
67- < span class ="flex items-center gap-1 ">
79+ < div class ="flex items-center gap-4 sm:gap-6 text-gray-300 ">
80+ < span class ="flex items-center gap-2 bg-orange-500/20 text-orange-300 px-2 py-1 rounded-md ">
6881 < svg class ="h-4 w-4 " fill ="currentColor " viewBox ="0 0 20 20 ">
6982 < path fill-rule ="evenodd " d ="M12.316 3.051a1 1 0 01.633 1.265l-4 12a1 1 0 11-1.898-.632l4-12a1 1 0 011.265-.633zM5.707 6.293a1 1 0 010 1.414L3.414 10l2.293 2.293a1 1 0 11-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0zm8.586 0a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 11-1.414-1.414L16.586 10l-2.293-2.293a1 1 0 010-1.414z " clip-rule ="evenodd "> </ path >
7083 </ svg >
71- Rust
84+ < span class ="font-medium "> Rust</ span >
85+ </ span >
86+ < span class ="flex items-center gap-1 text-gray-400 ">
87+ < svg class ="h-3 w-3 " fill ="currentColor " viewBox ="0 0 20 20 ">
88+ < path d ="M4 4a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2H4z "/>
89+ </ svg >
90+ UTF-8
7291 </ span >
73- < span > UTF-8</ span >
7492 </ div >
75- < div class ="text-gray-400 ">
76- < span *ngIf ="code "> {{ code.split('\n').length }} lines</ span >
93+ < div class ="flex items-center gap-4 text-gray-300 ">
94+ < span *ngIf ="code " class ="flex items-center gap-1 bg-gray-700/50 px-2 py-1 rounded-md ">
95+ < svg class ="h-3 w-3 " fill ="currentColor " viewBox ="0 0 20 20 ">
96+ < path d ="M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z "/>
97+ </ svg >
98+ < span class ="font-mono text-xs "> {{ code.split('\n').length }} lines</ span >
99+ </ span >
100+ < span class ="hidden sm:flex items-center gap-1 text-xs text-gray-500 ">
101+ < div class ="w-2 h-2 bg-green-500 rounded-full animate-pulse "> </ div >
102+ Ready
103+ </ span >
77104 </ div >
78105 </ div >
79106 </ div >
0 commit comments