@forumone/throughline-design-system

中文文档
2.7.1发布于 2026/11/11MITTypeScriptES Module构建来源已验证近 30 天下载 2308

The design-system side of Throughline: the component contract and manifest a design system publishes, its linter, and the Payload blocks, rendering and admin components generated from it.

原始使用文档

@forumone/throughline-design-system

The design-system side of Throughline. A design system describes its components in a manifest; this package defines that manifest, lints it, and turns it into Payload blocks, rendering and admin components for a Throughline site.

Coming from 0.x? This package is @forumone/throughline-design-contract and @forumone/throughline-design-system-payload together; Upgrading from 0.x moves a 0.x site onto it.

SubpathHolds
/contractComponentContractSchema, ManifestSchema, loadManifest: the contract every component declares and the manifest they make; see docs/contract.md
/lintlintManifest, formatLintIssues, assertManifestClean
/generategenerateBlocks and friends, manifest to Payload blocks, and fieldOverride for a site's exceptions; see docs/payload.md
/renderRenderBlocks and coerceBlock: stored blocks back to React
/clientBlockSummary, BlockGuidance, RowSummary: admin components named in Payload's import map
/testingdescribeBlockInvariants, checkUntouchedBlocks, checkBlockProps: invariants a site runs over its blocks
bincheck-block-props <manifest.json> <components-dir>…: does each contract produce the props its component takes?
pnpm add @forumone/throughline-design-system

/contract and /lint have no peers, so a design system that only publishes a manifest needs nothing else. The rest expects payload and react, /client expects @payloadcms/ui, /generate reads component source with typescript, and /testing is a vitest suite.

Reference: docs/reference/design-system.md.

版本与发布记录

@forumone/throughline-design-system 共发布 104 个版本,首次发布于 2026/10/03;过去 12 个月发布了 104 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.7.1latest2026/11/114 天前
2.7.1-next-ffd51b1next2026/11/0213 天前
2.7.1-next-4a4ebd52026/10/2719 天前
2.7.1-next-2fec9f62026/10/2620 天前
2.7.1-next-1eabdf72026/10/2126 天前
2.7.1-pr-332-911b986pr2026/10/2126 天前

关于 @forumone/throughline-design-system 的常见问题

@forumone/throughline-design-system 是什么?

The design-system side of Throughline: the component contract and manifest a design system publishes, its linter, and the Payload blocks, rendering and admin components generated from it.

如何安装 @forumone/throughline-design-system?

在项目目录运行 npm install @forumone/throughline-design-system,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 check-block-props,可以用 npx check-block-props 直接运行。

@forumone/throughline-design-system 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@forumone/throughline-design-system 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@forumone/throughline-design-system 可以商用吗?

@forumone/throughline-design-system 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@forumone/throughline-design-system 的下载量有多少?

根据 npm 官方下载统计,@forumone/throughline-design-system 在 2026/10/16 – 2026/11/14 这 30 天内被下载 2,308 次,日均约 77 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@forumone/throughline-design-system 还在维护吗?

最新版本 2.7.1 发布于 2026/11/11(4 天前);至今共发布 104 个版本,其中过去 12 个月发布了 104 个;首次发布于 2026/10/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。