本页还没有译文
本页 7 段还没译成Português (BR),下面显示的是英文原文。Upstream Output Contracts
还没翻译译自英文(tanstack.com)本页 7 段都还没译
Upstream Output Contracts
These are the borrowed ideas that shape the local tests. The goal is not to copy implementation details or exact tokenization. It is to preserve the useful output properties that make mature highlighters practical in docs.
Inspected package tarballs:
| Package | Version | Borrowed Contract |
|---|---|---|
prismjs | 1.30.0 | CSS-addressable token spans and explicit language-* targeting. |
highlight.js | 11.11.1 | Stable semantic class names such as keyword, string, comment, tag, property, type, and literal. |
sugar-high | 1.2.1 | Tiny JS/JSX-first scanner model and CSS-variable-driven token color hooks. |
@speed-highlight/core | 1.2.17 | Small explicit language modules, fast class-based output, and cheap client-side execution. |
Local choices:
- Use
th-*class names instead of adopting another library's class namespace. - Emit no inline
styleattributes. - Emit one HTML tree for light and dark themes.
- Theme through CSS variables from
createThemeCss(). - Use real TanStack docs fixtures for language coverage.
- Keep the browser bundle budget enforced by
pnpm run size. - Keep throughput enforced by
pnpm run bench.
AI 翻译查看英文原文