refactor(lesson-preparation): 配色统一到中性令牌(移除 Material 鲜艳色)

This commit is contained in:
SpecialX
2026-07-04 11:17:07 +08:00
parent ef1be6d04f
commit 4f00e566df
2 changed files with 50 additions and 33 deletions

View File

@@ -48,23 +48,38 @@
--chart-5: 27 87% 67%;
/* Lesson Plan Node Colors (V4 P1-4 修复:从硬编码提取到设计令牌) */
--lesson-node-objective: #4caf50;
--lesson-node-key-point: #f44336;
--lesson-node-import: #2196f3;
--lesson-node-new-teaching: #9c27b0;
--lesson-node-consolidation: #ff9800;
--lesson-node-summary: #607d8b;
--lesson-node-homework: #795548;
--lesson-node-blackboard: #009688;
--lesson-node-text-study: #3f51b5;
--lesson-node-exercise: #e91e63;
--lesson-node-rich-text: #9e9e9e;
--lesson-node-reflection: #cddc39;
--lesson-node-textbook-content: #455a64;
--lesson-node-selected: #1976d2;
--lesson-node-default: #9e9e9e;
--lesson-canvas-bg: #ccc;
/* V4 纸感重构:原 --lesson-node-* 已删除,改为 --lp-dot-* 中性色点令牌 */
/* V4 备课编辑器:纸感令牌(替代 --lesson-node-* */
--lp-paper: #fefefe;
--lp-paper-edge: #f8f8f7;
--lp-paper-shadow: 0 1px 2px rgba(15,15,15,0.04), 0 8px 24px rgba(15,15,15,0.04);
--lp-paper-shadow-active: 0 1px 2px rgba(15,15,15,0.06), 0 12px 36px rgba(15,15,15,0.08);
--lp-anchor-range: rgba(28, 25, 23, 0.08);
--lp-anchor-range-active: rgba(28, 25, 23, 0.16);
--lp-anchor-point: #1c1917;
--lp-inline-node-border: #d6d3d1;
--lp-inline-node-text: #44403c;
--lp-inline-node-meta: #a8a29e;
--lp-interaction: #6366f1;
/* V4 节点类型色点(极克制) */
--lp-dot-objective: #4b5563;
--lp-dot-key-point: #525252;
--lp-dot-import: #6b7280;
--lp-dot-new-teaching: #1c1917;
--lp-dot-consolidation: #6b7280;
--lp-dot-summary: #525252;
--lp-dot-homework: #525252;
--lp-dot-blackboard: #44403c;
--lp-dot-text-study: #4b5563;
--lp-dot-exercise: #6b7280;
--lp-dot-rich-text: #a8a29e;
--lp-dot-reflection: #6b7280;
--lp-dot-interaction: #6366f1;
--lp-dot-textbook: #44403c;
--lp-dot-default: #a8a29e;
/* Sidebar Specific */
--sidebar-background: 0 0% 98%;
--sidebar-foreground: 240 5.3% 26.1%;

View File

@@ -113,29 +113,31 @@ export function getTextbookContentSummary(
/**
* 节点类型 → CSS 变量名V4 P1-4 修复:从硬编码 hex 提取到 globals.css 设计令牌)。
* V4 纸感重构:原 --lesson-node-* 已替换为 --lp-dot-* 中性色点令牌。
* 供 lesson-node 和 minimap 复用。
*/
export const NODE_COLOR_VARS: Record<string, string> = {
objective: "var(--lesson-node-objective)",
key_point: "var(--lesson-node-key-point)",
import: "var(--lesson-node-import)",
new_teaching: "var(--lesson-node-new-teaching)",
consolidation: "var(--lesson-node-consolidation)",
summary: "var(--lesson-node-summary)",
homework: "var(--lesson-node-homework)",
blackboard: "var(--lesson-node-blackboard)",
text_study: "var(--lesson-node-text-study)",
exercise: "var(--lesson-node-exercise)",
rich_text: "var(--lesson-node-rich-text)",
reflection: "var(--lesson-node-reflection)",
textbook_content: "var(--lesson-node-textbook-content)",
objective: "var(--lp-dot-objective)",
key_point: "var(--lp-dot-key-point)",
import: "var(--lp-dot-import)",
new_teaching: "var(--lp-dot-new-teaching)",
consolidation: "var(--lp-dot-consolidation)",
summary: "var(--lp-dot-summary)",
homework: "var(--lp-dot-homework)",
blackboard: "var(--lp-dot-blackboard)",
text_study: "var(--lp-dot-text-study)",
exercise: "var(--lp-dot-exercise)",
rich_text: "var(--lp-dot-rich-text)",
reflection: "var(--lp-dot-reflection)",
interaction: "var(--lp-dot-interaction)",
textbook_content: "var(--lp-dot-textbook)",
}
/** 选中态颜色变量 */
export const NODE_SELECTED_COLOR_VAR = "var(--lesson-node-selected)"
/** 选中态颜色变量V4复用 lp-anchor-point 作为强调色) */
export const NODE_SELECTED_COLOR_VAR = "var(--lp-anchor-point)"
/** 默认颜色变量(未匹配类型时使用) */
export const NODE_DEFAULT_COLOR_VAR = "var(--lesson-node-default)"
export const NODE_DEFAULT_COLOR_VAR = "var(--lp-dot-default)"
/**
* @deprecated 使用 `getNodeColorVar` 替代。保留是为了向后兼容旧代码引用。