windjammer-ui 0.3.6

Cross-platform UI framework for Windjammer (Web, Desktop, Mobile)
Documentation
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Windjammer UI - Interactive Counter</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        }
        
        #app {
            min-width: 400px;
            max-width: 600px;
        }
        
        .counter-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.3);
        }
        
        .counter-button:active {
            transform: translateY(0);
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        #app {
            animation: fadeIn 0.5s ease-out;
        }
        
        #loading {
            color: white;
            text-align: center;
            font-size: 24px;
            padding: 40px;
            background: rgba(255,255,255,0.1);
            border-radius: 15px;
            backdrop-filter: blur(10px);
        }
        
        .spinner {
            border: 4px solid rgba(255,255,255,0.3);
            border-top: 4px solid white;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 20px auto;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
    </style>
</head>
<body>
    <div id="app">
        <div id="loading">
            <div class="spinner"></div>
            <p>Loading Windjammer UI...</p>
        </div>
    </div>
    
    <script type="module">
        import init from '../pkg/windjammer_ui.js';
        
        async function run() {
            try {
                console.log('🚀 Initializing WASM module...');
                await init();
                console.log('✅ WASM module loaded successfully!');
                
                // The main() function in Rust will automatically run
                // and replace the loading indicator with the counter
                
            } catch (error) {
                console.error('❌ Failed to initialize:', error);
                document.getElementById('app').innerHTML = `
                    <div style="padding: 40px; text-align: center; color: white; background: rgba(244, 67, 54, 0.9); border-radius: 15px;">
                        <h2 style="margin-bottom: 20px;"> Failed to Load</h2>
                        <p style="margin-bottom: 10px;">${error.message}</p>
                        <p style="font-size: 14px; opacity: 0.8; margin-top: 20px;">
                            Make sure you've built the WASM module:
                        </p>
                        <code style="display: block; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 5px; margin-top: 10px; font-family: 'Courier New', monospace;">
                            cd crates/windjammer-ui<br>
                            wasm-pack build --target web --dev
                        </code>
                    </div>
                `;
            }
        }
        
        run();
    </script>
</body>
</html>