mirror of
https://github.com/phranck/TUIkit.git
synced 2026-06-20 09:54:37 +00:00
Performance & memory: - HeroTerminal: fix setInterval one-time random (now recursive setTimeout), reuse single Howl for seeks, track all timers via pendingTimersRef - RainOverlay: cap at 30fps, skip on prefers-reduced-motion - SpinnerLights: pre-compute boxShadow at spawn, nextId in useRef - Remove eager audio preloads from <head> (Howler loads lazily) - CloudBackground: remove unnecessary 'use client' (now Server Component) Type safety & correctness: - Import BootStep/SchoolStep/JoshuaStep/TerminalEntry from terminal-parser instead of duplicating interfaces; typed terminal-data.ts export - ThemeProvider: isTheme() type guard replaces unsafe 'as Theme' casts, instanceof guard for event.target, try/catch on localStorage.setItem - useCopyToClipboard: cancel previous timer on rapid clicks, try/catch around clipboard API, cleanup on unmount - TerminalScreen: use config.initialCursorDelay instead of magic 18000, type predicate for filter(), track glitch reset timer for cleanup Accessibility (WCAG): - prefers-reduced-motion: global CSS rule + JS skip in Rain/Spinner/Glitch - aria-hidden on decorative elements (Rain, Spinner, Clouds) - focus-visible ring on ThemeSwitcher, CodePreview, PackageBadge buttons - aria-pressed on active theme button, nav aria-label, main tabIndex Code quality: - Extract useCopyToClipboard hook (CodePreview + PackageBadge) - bg-frosted-glass CSS utility replaces 3x inline color-mix - hover:bg-white/* → hover:bg-foreground/* for theme consistency - Remove dead zoomed prop, stale eslint-disable, move lineRefsRef up - import type for ReactNode in FeatureCard
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.