feat(home): Hero 动态粒子层(入场浮现后静止)

新增 hero-particle-field 组件作为 Hero L3 层:品牌红点缀、Canvas + rAF
仅在 ~600ms 入场窗运行后冻结为静态帧,遵守「无持续循环动画」动效铁律;
prefers-reduced-motion 退化为一次性静态帧。固定种子 PRNG 保证视觉快照可复现。
同步更新 home-content-v15 接入与单测、home 视觉基线。

Co-Authored-By: 阿睿 <workbuddy@tencent.com>
This commit is contained in:
2026-09-01 07:57:12 +08:00
co-authored by 阿睿
parent ac21936785
commit 549c151c6a
13 changed files with 203 additions and 0 deletions
@@ -98,6 +98,16 @@ describe('HomeContentV15 - 浅色 Hero(暗黑模式 token 友好)', () => {
expect(hero.querySelector('img')).toBeNull();
});
it('mounts the brand-red dynamic particle layer (entrance-only, no continuous loop)', () => {
render(<HomeContentV15 />);
const hero = screen.getByTestId('hero-section');
const particles = screen.getByTestId('hero-particle-field');
expect(particles.tagName).toBe('CANVAS');
expect(particles).toHaveAttribute('aria-hidden', 'true');
expect(hero.contains(particles)).toBe(true);
});
it('keeps a single primary CTA and demotes the secondary action to a text link', () => {
render(<HomeContentV15 />);