> ## Documentation Index
> Fetch the complete documentation index at: https://niceeval.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 报告外观与安全边界

> 用 Report theme token 调整外观，同时保留唯一的产品 CSS、离线阅读与 View shell 边界。

Report 的主题只选择 token 值。产品 CSS 仍是唯一的 reset、基础排版、组件样式和响应式布局 owner；View shell 只管理浏览器语言切换、reload 状态和 Host 提示。

```tsx theme={null}
import { chalk, defineReport, type HeadTag } from "niceeval/report";

const head: readonly HeadTag[] = [{
  tag: "style",
  children: ".release-note { font-weight: 700; }",
}];

export default defineReport({
  title: { en: "Release", "zh-CN": "发布" },
  theme: chalk,
  head,
  pages: [{
    id: "overview",
    path: "/",
    title: { en: "Overview", "zh-CN": "概览" },
    render: () => null,
  }],
});
```

官方提供 `basalt` 和 `chalk`。需要自己的 token 时，调用 `defineTheme()` 并声明颜色、字体、字号和圆角等值：

```ts theme={null}
import { defineTheme } from "niceeval/report";

export const brandTheme = defineTheme({
  appearance: "light",
  accent: "#2a78d6",
  positive: "#087f5b",
  negative: "#b42318",
  page: "#fafafa",
  surface: "#ffffff",
  text: "#111113",
  font: { sans: "ui-sans-serif, system-ui, sans-serif" },
  fontSize: "14px",
  radius: "8px",
});
```

## 可以声明的资源

Report 可以通过结构化 `head` 声明 `meta`、`link`、`style` 和 `script`。内联内容、属性顺序和本地资源进入站点闭包，因此 view 与静态导出使用相同 bytes。

上例的 `head` 是结构化声明。这类样式只能服务作者自己具名的内容。不要加入全局 reset、替换 theme token、重画内建组件或修改 View shell。script 只能渐进增强；正文、导航、Evidence 和机器 JSON 不能依赖它。

## 不会改变的边界

主题不会改变 `MetricValue`、分母、state、Evidence 或终端文字语义。`show` 仍关闭一个目标 Page；`view` 与 `view --out` 仍构建完整站点。相同 revision 的 HTTP 页面、导出页面、CSS 与 reload client bytes 一致。

静态目录没有 view reload 端点时，reload client 会安静停用。断开网络或禁用 JavaScript 后，页面仍要保留正文、导航、详情、问题和下载。

## 下一步

* [报告 API](/docs/zh/reference/report-components)：Page、head、组件和完整站点边界。
* [发布静态报告](/docs/zh/tutorials/publish-report)：验证静态目录中的离线阅读。
