/**
 * Workspace 语义化颜色 Token（单一事实来源）。
 *
 * 用法说明：
 * 1) Token 键会作为 UI 类名中的颜色标识使用，例如 `bg-ws-surface-base`。
 * 2) 必须在 `src/styles/globals.css` 中存在对应 CSS 变量：
 *    - `:root` 和 `.dark` 下都要有 `--ws-color-<token-suffix>`
 *    - `@theme inline` 下要有 `--color-ws-<token-suffix>`
 * 3) `scripts/color-guard.mjs` 会导入本文件，并校验上述覆盖关系。
 */
export type WorkspaceColorToken = {
  light: `#${string}`;
  dark: `#${string}`;
};

// Token 键保持语义化且稳定：`ws-<role>-<level>`（不要再使用原始 hex 命名）。
export const WORKSPACE_COLOR_TOKENS = {
  "ws-base-1": { light: "#150033", dark: "#f4ebff" },
  "ws-fg-primary": { light: "#333333", dark: "#f5f5f5" },
  "ws-surface-subtle": { light: "#f9f8fa", dark: "#1f1f1f" },
  "ws-surface-elevated": { light: "#fbfafc", dark: "#24222a" },
  "ws-interactive-primary": { light: "#8e47f0", dark: "#b987ff" },
  "ws-line-default": { light: "#e4e7ec", dark: "#3b3f48" },
  "ws-text-muted": { light: "#667085", dark: "#98a2b3" },
  "ws-icon-muted": { light: "#a3a1a1", dark: "#d0d0d0" },
  "ws-overlay-neutral": { light: "#999999", dark: "#c2c2c2" },
  "ws-text-subtle-strong": { light: "#000000c5", dark: "#ffffffcc" },
  "ws-border-hairline": { light: "#00000015", dark: "#ffffff1f" },
  "ws-accent-tint-soft": { light: "#1500331a", dark: "#f4ebff24" },
  "ws-surface-app": { light: "#f8f9fb", dark: "#20242c" },
  "ws-surface-base": { light: "#ffffff", dark: "#2a2731" },
  "ws-text-primary-strong": { light: "#0f172a", dark: "#e6eaf2" },
  "ws-surface-checker": { light: "#f4f4f5", dark: "#2c2f38" },
  "ws-black-solid": { light: "#000000", dark: "#000000" },
  "ws-info-primary": { light: "#2563eb", dark: "#7fb2ff" },
} as const satisfies Record<string, WorkspaceColorToken>;
