import { motion, AnimatePresence } from "framer-motion"; import type { ThemeProps } from "../../types"; import logo from "../../assets/icon.png"; import "./aurora.css"; // 15 根频谱的交错延迟 const spectrumDelays = [ -0.2, -0.5, -0.1, -0.7, -0.3, -0.6, -0.2, -0.8, -0.4, -0.1, -0.5, -0.3, -0.7, -0.2, -0.6, ]; const mirrorBars = [ { h: 28 }, { h: 22 }, { h: 14 }, { h: 14 }, { h: 22 }, { h: 28 }, ]; export default function AuroraTheme({ config, state }: ThemeProps) { const { step, progress, installPath } = state; const { primaryColor, accentColor, successColor, texts } = config; const getStatusText = () => { for (let i = texts.progressFrames.length - 1; i >= 0; i--) { if (progress <= texts.progressFrames[i].limit) return texts.progressFrames[i].text; } return texts.progressFrames[texts.progressFrames.length - 1]?.text ?? ""; }; // 为每个 theme 实例注入 CSS 变量,让所有内嵌 rgba 也能从 config 派生 const cssVars: React.CSSProperties = { // @ts-expect-error -- CSS 自定义属性 "--theme-primary": primaryColor, "--theme-accent": accentColor, "--theme-success": successColor, }; return (
{texts.welcomeSubtitle}