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
+52 -4
View File
@@ -24,6 +24,9 @@
'AI 消费': 'For Agents',
'选择你的技术栈,文档将只展示对应框架的内容': 'Pick your stack — the docs will only show files for it',
'搜索组件(中文 / 英文 / slug)': 'Search components (name / slug)',
'界面语言': 'Interface language',
'选择语言': 'Select language',
'打开导航菜单': 'Open navigation menu',
'↑↓ 选择': '↑↓ Navigate',
'Enter 跳转': 'Enter Open',
'Esc 关闭': 'Esc Close',
@@ -171,8 +174,9 @@
'Design token array: name (au-*), value, comment (usage note)',
'小写 slug、中文名 + 英文名、core 或 extension':
'Lowercase slug, Chinese + English name, core or extension',
'规格批次 1-10、来源规格文件、规格章节原文(含"何时使用"等)':
'Spec batch 1-10, source spec file, raw spec section text (including “when to use”)',
'规格批次 1-10、来源规格文件、规格章节原文(含"何时使用"等);data.js 外壳不含 specLines,详情见 site/details/<slug>.json':
'Spec batches 1-10, source spec file, and raw spec sections (including “when to use”); data.js omits specLines; see site/details/<slug>.json',
' 条,': ' entries, ',
'核心组件契约:dims(变体维度)、variants、usage(使用要点)、structure、anatomy、doNot(不发明)、unknowns(未明示)':
'Component contract: dims, variants, usage, structure, anatomy, doNot, unknowns',
'5 端实现文件相对路径与字节数:html / css / jsx / vue2 / vue3':
@@ -197,6 +201,10 @@
'Notable changes recorded per SemVer, sourced from the repository CHANGELOG.md (parsed and injected at build time).',
'暂无结构化日志数据:请运行 build-site.ps1 重新生成,构建脚本会解析 CHANGELOG.md 并注入 data.js。':
'No structured changelog data yet — run build-site.ps1 to regenerate; the build parses CHANGELOG.md into data.js.',
'更新日志加载中…': 'Loading changelog…',
'重试': 'Retry',
'更新日志加载失败或为空,请检查 site/changelog.json 后重试。':
'The changelog failed to load or is empty. Check site/changelog.json and retry.',
'暂无数据': 'No data yet',
/* ---------- 常见问题(S2-P9) ---------- */
@@ -207,6 +215,28 @@
'搜索常见问题': 'Search FAQ',
'规范未明示': 'Unspecified by spec',
'不要自行发明': 'Do not invent',
'卡片 hover 交互规范': 'Card hover interaction spec',
'卡片网格间距规范': 'Card grid spacing spec',
'不要自行发明(设计边界):': 'Do not invent (design boundary):',
'规范未明示(待确认):': 'Unspecified by spec (needs decision):',
'这类条目不是待实现功能清单,而是明确禁止把实现细节当成设计规范。': 'These are not an implementation backlog; they mark details that must not be presented as design rules.',
'这类条目不是报错,而是规格还没有给出可执行答案,生成前需要补充设计决策。': 'These are not errors; the spec has no executable answer yet and needs a design decision before generation.',
'这是什么意思': 'What does this mean',
'为什么会出现': 'Why is it here',
'需要确认什么': 'What needs deciding',
'指整张卡片在鼠标悬停和键盘聚焦时是否产生反馈,不是卡片内部链接或按钮自己的 hover 状态。': 'Whether the whole card responds to pointer hover and keyboard focus; this is separate from hover on links or buttons inside the card.',
'现有规范只定义了卡片默认低阴影与悬停中阴影,没有定义整卡是否可点击、边框或位移变化、过渡时长、光标和键盘 focus 的完整状态矩阵。': 'The spec only defines low elevation by default and medium elevation on hover; it does not define whether the whole card is clickable or its border, movement, transition, cursor, and keyboard-focus states.',
'需要先确认卡片的交互语义,再补齐 hover、focus-visible、active 和不可交互卡片的状态规则。': 'Confirm the card interaction semantics first, then define hover, focus-visible, active, and non-interactive card states.',
'指同一栅格中相邻卡片之间的 gap,以及不同容器宽度下 gap 是否保持不变。': 'The gap between adjacent cards in one grid, including whether it stays fixed as the container width changes.',
'通用规范只给出组件之间 16px/24px 的间距梯度,CardList 只说明采用栅格,没有给出卡片专用 gap、列数或响应式断点。': 'The general spec only gives a 16px/24px component-spacing scale, while CardList only says to use a grid; no card-specific gap, column count, or responsive breakpoints are defined.',
'需要确认 CardList 的默认 gap、列数和响应式断点后,才能把实现值升级为正式契约。': 'Confirm CardList’s default gap, column count, and responsive breakpoints before promoting an implementation value into the formal contract.',
'不要自行发明(设计边界):': 'Do not invent (design boundary):',
'规范未明示(待确认):': 'Unspecified by spec (needs decision):',
'这类条目不是待实现功能清单,而是明确禁止把实现细节当成设计规范。': 'These are not an implementation backlog; they mark details that must not be presented as design rules.',
'这类条目不是报错,而是规格还没有给出可执行答案,生成前需要补充设计决策。': 'These are not errors; the spec has no executable answer yet and needs a design decision before generation.',
'这是什么意思': 'What does this mean',
'为什么会出现': 'Why is it here',
'需要确认什么': 'What needs deciding',
'命中': 'Matched',
'条,': ' entries, ',
'个组件': ' components',
@@ -214,8 +244,11 @@
'条,': ' entries, ',
'个组件有条目': ' components have entries',
'加载中…': 'Loading…',
/* ---------- 组件详情页 ---------- */
'核心组件契约:dims(变体维度)、variants、usage(使用要点)、structure、anatomy、doNot(不发明)、unknowns(未明示);data.js 外壳仅留 hasContract,详情见 site/details/<slug>.json':
'Core component contract: dims, variants, usage, structure, anatomy, doNot, unknowns; data.js keeps only hasContract; see site/details/<slug>.json',
'规格说明加载中…': 'Loading specification…',
'避坑指南加载中…': 'Loading guidelines…',
'设计契约加载中…': 'Loading design contract…',
'何时使用': 'When to Use',
'本组件暂无独立规格说明,参见 ': 'No standalone spec for this component; see ',
'代码演示': 'Demos',
@@ -286,6 +319,8 @@
'操作': 'Action',
'查看其他 ': 'View the other ',
' 个端的文件': ' platform files',
'查看源码': 'View source',
'打开该端独立组件页': 'Open the standalone component page for this platform',
'变体维度': 'Variant Dimensions',
'代表变体': 'Representative Variants',
'使用要点': 'Usage Hints',
@@ -324,6 +359,10 @@
'复制覆盖代码': 'Copy override CSS',
'覆盖代码可直接粘贴到令牌文件之后,即完成整站换色。':
'Paste the override CSS after the token file to recolor the whole site.',
'主题模式': 'Theme mode',
'日间模式': 'Light mode',
'夜间模式': 'Dark mode',
'自动模式': 'System mode',
'深色 / 浅色模式切换': 'Toggle dark / light mode',
'回到顶部': 'Back to top',
'品牌主色': 'Brand',
@@ -454,6 +493,15 @@
'避免自行通过 style 强行覆盖组件内边距': 'Avoid forcibly overriding component padding via inline style',
'避免自创非常规控件高度破坏栅格对齐': 'Avoid custom control heights that break grid alignment',
'不要移除原生的键盘焦点可视化轮廓': 'Do not remove the native keyboard focus outline',
'以下为通用键盘交互基线建议,具体组件是否支持弹窗、焦点锁定或方向键导航,请以实现与契约说明为准。':
'Generic keyboard interaction baselines below. Check the implementation and contract for dialog, focus-trapping or arrow-key support.',
'弹窗类组件建议将焦点保持在弹窗内部,实际行为以实现为准':
'Dialog-like components are expected to keep focus inside; check the implementation for actual behavior',
'部分反馈组件支持快捷关闭,实际行为以实现为准':
'Some feedback components support quick dismissal; check the implementation for actual behavior',
'H5 演示源码加载失败,请检查网络或稍后重试。':
'Failed to load the H5 demo source. Check the network connection and retry later.',
'搜索组件': 'Search components',
};
var LANG_KEY = 'aa-lang';