feat(S6-P21): 组件族参数化(13族/44成员/导航族15文件同源/79→48概念组件)

【本次核心 · S6-P21】
- 族层数据:families.json + 44 份契约注入 family/familyRole/familyParams;
  data.json / data.js / site/details 同步。13 族 / 44 成员 / 35 独立 → 概念组件 79→48。
- 79 个 slug 全保留、集合逐一不变(铁律 5 对外承诺未破);frameworks 仍 395 文件、薄壳仍 79。
- 归族判据为契约中可核对字段(semanticTypeCandidates 重叠 / anatomy 为同一骨架子集 /
  变体维度同构 / doNotInvent 显式从属声明),每族 mergeBasis 写明依据,不按名字猜。
- 实现层合并(导航族端到端切片):tools/gen-family-impl.mjs 从 5 端模板生成
  TopMenu / SideMenu / MixedNavigation 共 15 文件,参数 direction=top|side|mixed;
  三份 CSS md5 完全相同 = 一份样式表服务三个组件。
- 新增 tools/gen-families.mjs、tools/gen-family-impl.mjs、tools/verify-families.mjs、
  tools/lib/family-model.mjs、tools/lib/family-impl/nav-menu/*.tpl。

【同时清掉此前已完成但未提交的批次】
生成物(data.json / data.js / site/sources / site/components 薄壳 / sitemap.xml / tests 报告)
跨阶段交织,无法拆成互相自洽的多个提交,故按既有批量风格合并提交:
- Package:三端可 import(S5-P18)+ 发布到私有 npm 源
- Docs site:导航语言改下拉(S5-P19)、详情页代码块默认展开、中英切换完整性
- Security:生产部署链审计修复(2026-09-19)+ 线上部署
- Theme modes 日间/夜间/自动;S1-P4 data.js 瘦身;S2-P5 暗色;S2-P6 跨端一致性;
  S2-P7 行为断言;S2-P9 FAQ;S3-P8 RTL;S3-P9 契约缺口解释层;S4-P12 发布流程
- 补入 tools/pack-deploy.mjs、run-site-smoke.mjs、verify-*.mjs,.dockerignore、
  安全审计修复与待决策项.md

【验收】
- node tools/verify-families.mjs → OK: 族层端到端一致(13 族 / 44 成员 / 79 组件不变 / 395 文件不变)
- node tools/verify-cross-platform.mjs → 79/79 identical(HEAD 基线 high 44)
- node tools/run-regression.mjs → 100%(79/79 页,1017/1017 断言,N/A 34),连跑 8 次一致,0 超时
- 逐页实测:topmenu / sidemenu / mixednavigation 各 13/13,帧内 direction 参数正确,0 JS 错误
- 零运行时依赖 OK;build-site.ps1 ASCII-only OK

【未纳入】site/components/<slug>/ 平台薄壳 316 个 —— 历史从未跟踪且属构建产物,保持现状。
This commit is contained in:
aurora-admin
2026-09-20 03:32:31 +08:00
parent 7e3d442dab
commit eb25feedaf
372 changed files with 16928 additions and 12810 deletions
+40 -7
View File
@@ -31,7 +31,7 @@
<option value="vue3">Vue 3</option>
</select>
</label>
<nav class="topnav">
<nav class="topnav" id="topnav">
<a href="#/" data-nav="home">首页</a>
<a href="#/overview" data-nav="overview">组件</a>
<a href="#/guide" data-nav="guide">快速开始</a>
@@ -40,10 +40,34 @@
<a href="#/changelog" data-nav="changelog">更新日志</a>
<a href="#/agents" data-nav="agents">AI 消费</a>
</nav>
<button id="lang-toggle" class="lang-toggle" type="button" title="中文 / English">
<span class="lang-zh">中</span><span class="lang-sep">/</span><span class="lang-en">EN</span>
<div class="lang-select" id="lang-select">
<button id="lang-trigger" class="lang-trigger" type="button" title="界面语言" aria-label="选择语言" aria-haspopup="listbox" aria-expanded="false">
<svg class="lang-globe" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M3 12h18"/><path d="M12 3a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>
<span class="lang-cur" id="lang-cur">简体中文</span>
<svg class="lang-caret" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
</button>
<div id="lang-menu" class="lang-menu hidden" role="listbox" aria-label="界面语言">
<div class="lang-head">界面语言</div>
<button class="lang-opt" type="button" role="option" data-lang="zh" aria-selected="true">
<span class="lang-opt-name">简体中文</span>
<span class="lang-opt-code">ZH</span>
<svg class="lang-check" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>
</button>
<button class="lang-opt" type="button" role="option" data-lang="en" aria-selected="false">
<span class="lang-opt-name">English</span>
<span class="lang-opt-code">EN</span>
<svg class="lang-check" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>
</button>
</div>
</div>
<button id="nav-toggle" class="nav-toggle" type="button" aria-label="打开导航菜单" aria-controls="topnav" aria-expanded="false">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M3 6h18"/><path d="M3 12h18"/><path d="M3 18h18"/></svg>
</button>
</div>
<!-- 窄屏导航抽屉的遮罩:仅 ≤1366px 且抽屉打开时可见。
必须放在 .topbar 内 —— .topbar 有 z-index:100 会形成层叠上下文,
放到外面会让遮罩(110)压住抽屉(120),抽屉可见却点不动。 -->
<div id="nav-backdrop" class="nav-backdrop"></div>
</header>
<div class="body-wrap">
@@ -79,10 +103,19 @@
</div>
<div class="tp-note">覆盖代码可直接粘贴到令牌文件之后,即完成整站换色。</div>
</div>
<button id="fab-mode" class="fab" type="button" title="深色 / 浅色模式切换">
<svg id="icon-moon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
<svg id="icon-sun" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:none"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/></svg>
</button>
<div class="mode-control">
<button id="fab-mode" class="fab" type="button" title="主题模式" aria-label="主题模式" aria-expanded="false" aria-haspopup="true">
<svg id="icon-moon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
<svg id="icon-sun" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:none"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/></svg>
<svg id="icon-auto" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:none"><rect x="3" y="4" width="18" height="13" rx="2"/><path d="M8 21h8M12 17v4"/></svg>
</button>
<div id="mode-menu" class="mode-menu hidden" role="radiogroup" aria-label="主题模式">
<div id="mode-current" class="mode-current" aria-live="polite"></div>
<button type="button" role="radio" data-mode="light" aria-checked="false"><span class="mode-dot mode-dot-light"></span><span data-mode-label="light">日间模式</span></button>
<button type="button" role="radio" data-mode="dark" aria-checked="false"><span class="mode-dot mode-dot-dark"></span><span data-mode-label="dark">夜间模式</span></button>
<button type="button" role="radio" data-mode="auto" aria-checked="false"><span class="mode-dot mode-dot-auto">A</span><span data-mode-label="auto">自动模式</span></button>
</div>
</div>
<button id="fab-theme" class="fab" type="button" title="主题定制">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M12 3a9 9 0 0 0 0 18c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01a1.5 1.5 0 0 1 1.12-2.49H16a5 5 0 0 0 5-5c0-4.42-4.03-8-9-8z"/></svg>
</button>