fix(motion): DEC-N3 的 8 条动效违反归零,判据从令牌声明移到消费点
6 处写死贝塞尔收进 ease-ink [0.22,1,0.36,1](各处注释标 CONTEXT.md:77 出处); globals.css:1486 的裸时长 opacity 0.6s 改 var(--transition-slower)。 --transition-gentle = 1000ms 这一条量过再定:实测 src/ 里零消费 (只有 tailwind.config.js 的 duration-gentle 映射,无一处使用),入场消费点 0 ⇒ 原「令牌声明一律 ≤700ms」是把 CONTEXT.md:82 的**入场**红线读成了对调色板的禁令。 现口径改为按用途在消费点判红:非 infinite 的声明(含 var() 解析出的时长)>700ms 必红, infinite 循环环境动效维持豁免。 负对照(真树注入→还原):塞回 [0.16,1,0.3,1] + opacity 900ms 裸字面量 + opacity var(--transition-gentle) ⇒ check:motion EXIT=1,4 红命中 easing-palette×1、 css-transition-token×1、entrance-cap×2;还原后 EXIT=0、违规 0。 读数:check:motion EXIT=0(0 违反)、check:motion:test EXIT=0(21/21)。
This commit is contained in:
1 parent
f3e66f7d36
commit
4afab7c929
6 files changed
+73
-23
No files matched your search
@@ -13,7 +13,9 @@ const pageVariants: Variants = {
|
||||
y: 0,
|
||||
transition: {
|
||||
duration: 0.28,
|
||||
ease: [0.16, 1, 0.3, 1] as [number, number, number, number],
|
||||
// DEC-N3(2026-10-08):原 [0.16, 1, 0.3, 1] 是令牌层之外的写死曲线,
|
||||
// 归口到 CONTEXT.md:77 的统一缓动 ease-ink = [0.22, 1, 0.36, 1](globals.css --ease-ink)。
|
||||
ease: [0.22, 1, 0.36, 1] as [number, number, number, number],
|
||||
},
|
||||
},
|
||||
exit: {
|
||||
@@ -21,7 +23,8 @@ const pageVariants: Variants = {
|
||||
y: -4,
|
||||
transition: {
|
||||
duration: 0.2,
|
||||
ease: [0.16, 1, 0.3, 1] as [number, number, number, number],
|
||||
// 同上:退场同样走 ease-ink(与 page-transition.tsx exit 的曲线一致)。
|
||||
ease: [0.22, 1, 0.36, 1] as [number, number, number, number],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
+10
-1
@@ -289,6 +289,12 @@ body {
|
||||
--transition-normal: 280ms;
|
||||
--transition-slow: 450ms;
|
||||
--transition-slower: 700ms;
|
||||
/* --transition-gentle(DEC-N3,2026-10-08 拍定口径):
|
||||
1000ms 这档**不违反** CONTEXT.md:82「禁止 >700ms 入场动效」——前提是它不用于入场。
|
||||
实测消费点(本树):仅下方 tailwind.config.js 的 duration-gentle 映射,src/ 零引用,
|
||||
即入场/循环环境/其他三类**均无消费者**。故闸改为**按消费点用途分类判定**:
|
||||
任何非 infinite 的 transition/animation 声明解析到 >700ms 即判红;
|
||||
infinite 循环环境动效按既有口径豁免。**禁止**把本档接入任何入场动效声明。 */
|
||||
--transition-gentle: 1000ms;
|
||||
|
||||
/* 缓动曲线(按性格分类) */
|
||||
@@ -1483,7 +1489,10 @@ p, li, span {
|
||||
-webkit-mask-composite: xor;
|
||||
mask-composite: exclude;
|
||||
opacity: 0;
|
||||
transition: opacity 0.6s var(--ease-out);
|
||||
/* DEC-N3(2026-10-08):原 `opacity 0.6s` 是裸时长字面量,归口令牌层。
|
||||
600ms 取最近档 --transition-slower(700ms)——光晕渐显属环境性淡入而非入场/可操作反馈,
|
||||
曲线沿用令牌层 --ease-out(=ease-ink,「背景过渡、光晕变化」正是其声明用途)。 */
|
||||
transition: opacity var(--transition-slower) var(--ease-out);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ export function DataBar({ value, max = 100, label, color = 'brand' }: { value: n
|
||||
initial={{ width: 0 }}
|
||||
whileInView={{ width: `${percentage}%` }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.28, ease: [0.16, 1, 0.3, 1], delay: 0.2 }}
|
||||
// DEC-N3(2026-10-08):[0.16, 1, 0.3, 1] 不在令牌层,统一收编为 ease-ink [0.22, 1, 0.36, 1]
|
||||
transition={{ duration: 0.28, ease: [0.22, 1, 0.36, 1], delay: 0.2 }}
|
||||
className="h-full rounded-full"
|
||||
style={{ backgroundColor: colorMap[color] }}
|
||||
/>
|
||||
@@ -92,7 +93,8 @@ export function BrandStamp({ children }: { children: React.ReactNode }) {
|
||||
initial={shouldReduceMotion ? {} : { scale: 1.3, opacity: 0, rotate: -12 }}
|
||||
whileInView={{ scale: 1, opacity: 1, rotate: -5 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.28, ease: [0.16, 1, 0.3, 1] }}
|
||||
// DEC-N3(2026-10-08):同上,曲线归口令牌层 ease-ink。
|
||||
transition={{ duration: 0.28, ease: [0.22, 1, 0.36, 1] }}
|
||||
className="inline-block px-3 py-1.5 border-2 border-[var(--color-brand)] rounded-sm"
|
||||
style={{
|
||||
transform: 'rotate(-5deg)',
|
||||
|
||||
@@ -17,7 +17,8 @@ const pageVariants = {
|
||||
scale: 1,
|
||||
transition: {
|
||||
duration: 0.28,
|
||||
ease: [0.25, 1, 0.5, 1] as const,
|
||||
// DEC-N3(2026-10-08):原 [0.25, 1, 0.5, 1] 收编进令牌层统一缓动 ease-ink(CONTEXT.md:77)。
|
||||
ease: [0.22, 1, 0.36, 1] as const,
|
||||
staggerChildren: 0.05,
|
||||
},
|
||||
},
|
||||
@@ -73,7 +74,8 @@ const sectionVariants = {
|
||||
transition: {
|
||||
delay: i * 0.06,
|
||||
duration: 0.28,
|
||||
ease: [0.25, 1, 0.5, 1] as const,
|
||||
// DEC-N3(2026-10-08):同 animate 变体,归口 ease-ink。
|
||||
ease: [0.22, 1, 0.36, 1] as const,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user