import type { ThemeTokens } from '../../context/ThemeContext'; /** 舞台态强制深空(Bloomberg 黑屏模式):图谱与看板共用同一套语义色,不随用户主题漂移 */ export const DEEP: Partial = { text: '#e8eefc', textSub: '#a9b8d0', textMuted: 'rgba(154,172,199,0.82)', accent: '#56ace0', accentGlow: 'rgba(86,172,224,0.75)', accentBg: 'rgba(86,172,224,0.10)', border: 'rgba(86,172,224,0.16)', borderSub: 'rgba(86,172,224,0.08)', borderAccent: 'rgba(86,172,224,0.34)', panelBg: 'rgba(8,13,28,0.92)', panelBgAlt: 'rgba(10,16,32,0.72)', cardBg: 'rgba(20,29,54,0.66)', success: '#34d399', warning: '#fbbf24', danger: '#f87171', info: '#38bdf8', }; export const DEEP_BG = 'radial-gradient(120% 95% at 50% 40%, #0a1022 0%, #060a16 52%, #03060e 100%)'; /** 达成率弧:从 12 点顺时针的 donut 弧(节点形态即数据:环弧长度=达成率) */ export function arcPath(cx: number, cy: number, r: number, frac: number): string { const f = Math.min(0.9999, Math.max(0.0001, frac)); const a0 = -Math.PI / 2, a1 = a0 + f * Math.PI * 2; const x0 = cx + r * Math.cos(a0), y0 = cy + r * Math.sin(a0); const x1 = cx + r * Math.cos(a1), y1 = cy + r * Math.sin(a1); return `M ${x0.toFixed(2)},${y0.toFixed(2)} A ${r},${r} 0 ${f > 0.5 ? 1 : 0} 1 ${x1.toFixed(2)},${y1.toFixed(2)}`; }