diff --git a/docs/handover/README.md b/docs/handover/README.md index 37c268e..9cefb10 100644 --- a/docs/handover/README.md +++ b/docs/handover/README.md @@ -11,3 +11,4 @@ | agent-tooling-todo-bridge.md | SDK → SSE → DB 事件流、TodoWrite 字段映射、去重策略 | | bridge-system.md | 多 IM 远程桥接系统架构(目录结构、数据流、设计决策) | | assistant-workspace.md | 助理工作区:人格/记忆文件、对话式引导、自动触发、确定性落盘 | +| theme-system.md | 主题家族系统:两层架构、JSON schema、代码高亮三条渲染链、12 个主题清单 | diff --git a/docs/handover/theme-system.md b/docs/handover/theme-system.md new file mode 100644 index 0000000..542a23e --- /dev/null +++ b/docs/handover/theme-system.md @@ -0,0 +1,82 @@ +# Theme Family System / 主题家族系统 + +## 概述 + +两层主题系统:`mode`(light/dark/system,由 next-themes 管理)+ `theme family`(色板,由自定义 context + CSS 变量管理)。 + +## 架构 + +``` +themes/*.json → 定义色板(OKLCH)、代码主题映射 +src/lib/theme/loader.ts → 服务端读取 + 校验 JSON,按 order 排序 +src/lib/theme/render-css.ts → 生成 html[data-theme-family="x"] 规则 +src/app/layout.tsx →
注入反闪烁脚本 +