mirror of
https://github.com/jhbruhn/respira.git
synced 2026-01-27 10:23:41 +00:00
- Install Tailwind CSS and configure Vite plugin - Replace all custom CSS classes with Tailwind utility classes - Migrate all components to use Tailwind styling: - App.tsx: Responsive layout with modern styling - MachineConnection: Status badges and action buttons - FileUpload: File input and progress bars with shimmer effect - ProgressMonitor: Color blocks, state indicators, and actions - ConfirmDialog: Modal overlay with backdrop blur - PatternCanvas: Canvas viewer with floating controls - Add custom shimmer animation for progress bars - Fix canvas resizing issue during zoom operations: - Add ResizeObserver for stable container dimensions - Use clientWidth/clientHeight instead of offset dimensions - Cache container size to prevent layout thrashing - Improve zoom button behavior to zoom towards viewport center - Maintain consistent design with shadows, borders, and transitions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
946 B
TypeScript
38 lines
946 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy'
|
|
import { dirname, join } from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
const PYODIDE_EXCLUDE = [
|
|
'!**/*.{md,html}',
|
|
'!**/*.d.ts',
|
|
'!**/node_modules',
|
|
]
|
|
|
|
function viteStaticCopyPyodide() {
|
|
const pyodideDir = dirname(fileURLToPath(import.meta.resolve('pyodide')))
|
|
return viteStaticCopy({
|
|
targets: [
|
|
{
|
|
src: [join(pyodideDir, '*').replace(/\\/g, '/')].concat(PYODIDE_EXCLUDE),
|
|
dest: 'assets',
|
|
},
|
|
],
|
|
})
|
|
}
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss(), viteStaticCopyPyodide()],
|
|
optimizeDeps: {
|
|
exclude: ['pyodide'],
|
|
},
|
|
server: {
|
|
headers: {
|
|
'Cross-Origin-Opener-Policy': 'same-origin',
|
|
'Cross-Origin-Embedder-Policy': 'require-corp',
|
|
},
|
|
},
|
|
})
|