【本次核心 · 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 个 —— 历史从未跟踪且属构建产物,保持现状。
133 lines
8.9 KiB
HTML
133 lines
8.9 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Aurora Admin · 组件库文档</title>
|
||
<link rel="icon" href="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3E%3Crect%20width='32'%20height='32'%20rx='8'%20fill='%232F54EB'/%3E%3Ctext%20x='16'%20y='23'%20font-size='19'%20font-family='Arial'%20font-weight='bold'%20fill='white'%20text-anchor='middle'%3EA%3C/text%3E%3C/svg%3E">
|
||
<link rel="stylesheet" href="../.design_library/aurora-admin/colors_and_type.css">
|
||
<link rel="stylesheet" href="style.css">
|
||
</head>
|
||
<body>
|
||
<!-- 顶部导航 -->
|
||
<header class="topbar">
|
||
<div class="topbar-inner">
|
||
<a class="logo" href="#/">
|
||
<span class="logo-mark">A</span>
|
||
<span class="logo-text">Aurora Admin <em class="logo-sub">组件库</em></span>
|
||
<span class="ver" id="ver">v1.0.0</span>
|
||
</a>
|
||
<button id="search-trigger" class="search-trigger" type="button">
|
||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>
|
||
<span class="st-text">搜索组件…</span>
|
||
<kbd>Ctrl K</kbd>
|
||
</button>
|
||
<label class="fw-select-wrap" title="选择你的技术栈,文档将只展示对应框架的内容">
|
||
<span class="fw-label">框架</span>
|
||
<select id="fw-select">
|
||
<option value="h5">H5</option>
|
||
<option value="react">React</option>
|
||
<option value="vue2">Vue 2</option>
|
||
<option value="vue3">Vue 3</option>
|
||
</select>
|
||
</label>
|
||
<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>
|
||
<a href="#/design" data-nav="design">设计规范</a>
|
||
<a href="#/faq" data-nav="faq">常见问题</a>
|
||
<a href="#/changelog" data-nav="changelog">更新日志</a>
|
||
<a href="#/agents" data-nav="agents">AI 消费</a>
|
||
</nav>
|
||
<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">
|
||
<aside class="sidebar" id="sidebar"></aside>
|
||
<main class="content" id="content"></main>
|
||
<aside class="toc" id="toc"></aside>
|
||
</div>
|
||
|
||
<!-- 全局搜索弹窗 -->
|
||
<div class="modal-mask hidden" id="search-modal">
|
||
<div class="modal">
|
||
<div class="modal-input-wrap">
|
||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>
|
||
<input id="search-input" placeholder="搜索组件(中文 / 英文 / slug)" autocomplete="off" spellcheck="false">
|
||
</div>
|
||
<div id="search-cats" class="search-cats"></div>
|
||
<div id="search-results" class="search-results"></div>
|
||
<div class="modal-foot"><span>↑↓ 选择</span><span>Enter 跳转</span><span>Esc 关闭</span></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="fatal" class="fatal hidden"></div>
|
||
|
||
<!-- 悬浮工具:深色模式 + 主题定制 + 回到顶部 -->
|
||
<div class="fab-stack">
|
||
<div class="theme-panel hidden" id="theme-panel">
|
||
<div class="tp-head">主题定制</div>
|
||
<div id="theme-presets" class="tp-presets"></div>
|
||
<div id="theme-colors"></div>
|
||
<div class="tp-actions">
|
||
<button id="theme-reset" class="tp-btn" type="button">重置</button>
|
||
<button id="theme-copy" class="tp-btn primary" type="button">复制覆盖代码</button>
|
||
</div>
|
||
<div class="tp-note">覆盖代码可直接粘贴到令牌文件之后,即完成整站换色。</div>
|
||
</div>
|
||
<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>
|
||
<button id="fab-top" class="fab" type="button" title="回到顶部" style="display:none">
|
||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5M5 12l7-7 7 7"/></svg>
|
||
</button>
|
||
</div>
|
||
|
||
<script src="data.js"></script>
|
||
<script src="logger.js"></script>
|
||
<script src="i18n.js"></script>
|
||
<script src="app.js"></script>
|
||
</body>
|
||
</html>
|