diff --git a/src/lib/constants/design-system.ts b/src/lib/constants/design-system.ts index 61aae6b..c58e770 100644 --- a/src/lib/constants/design-system.ts +++ b/src/lib/constants/design-system.ts @@ -1,24 +1,31 @@ // Design System Constants — L3 Detail Pages // Color tokens reference global CSS variables for dark-mode support. // Layout / spacing / animation / easing remain as JS constants. +// +// ⚠️ COMPLIANCE TRAP(Task #16 残留,刻意保留待用): +// 本文件动画令牌与 CONTEXT.md 动效约束冲突(见下方各 ⚠️ 行),且 +// design-system.test.ts 用 `// @ts-nocheck` 断言了这些「错误值」。 +// 它是零生产消费者的死代码,仅作历史参考。请勿照抄带 ⚠️ 的令牌; +// 新代码请直接用 ScrollReveal 默认(duration 0.3 / stagger 0.05 / +// easing ease-ink [0.22, 1, 0.36, 1])。要修正须同步改测试,否则必挂。 export const DESIGN_SYSTEM = Object.freeze({ animation: { duration: { fast: '0.2s', - normal: '0.4s', - slow: '0.6s', - slower: '0.8s', + normal: '0.4s', // ⚠️ 超目标:CONTEXT.md 入场目标 200-300ms,0.4s=400ms 超时 + slow: '0.6s', // ⚠️ P1:>300ms 目标(仍 ≤700ms 硬上限) + slower: '0.8s', // ⚠️ P0:>700ms 硬上限违规(最严重) countUp: '2s', }, easing: { - smooth: 'cubic-bezier(0.4, 0, 0.2, 1)', - bounce: 'cubic-bezier(0.34, 1.56, 0.64, 1)', + smooth: 'cubic-bezier(0.4, 0, 0.2, 1)', // ⚠️ 非 ease-ink [0.22,1,0.36,1] + bounce: 'cubic-bezier(0.34, 1.56, 0.64, 1)', // ⚠️ 弹性缓动,违反「禁 spring 内容入场」 easeOut: 'cubic-bezier(0, 0, 0.2, 1)', easeInOut: 'cubic-bezier(0.4, 0, 0.6, 1)', }, delay: { - stagger: 0.08, + stagger: 0.08, // ⚠️ P2:>60ms(应为 ≤0.06,对齐 ScrollReveal 0.05) section: 0.15, }, }, @@ -73,7 +80,7 @@ export const DESIGN_SYSTEM = Object.freeze({ initial: { opacity: 0, y: 24 }, animate: { opacity: 1, y: 0 }, viewport: { once: true, margin: '-80px' }, - transition: { duration: 0.6, ease: [0.16, 1, 0.3, 1] as const }, + transition: { duration: 0.6, ease: [0.16, 1, 0.3, 1] as const }, // ⚠️ P1:0.6s 超 300ms 目标 }, staggerChildren: { delay: 0.08,