@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-contractand@forumone/throughline-design-system-payloadtogether; Upgrading from 0.x moves a 0.x site onto it.
| Subpath | Holds |
|---|---|
/contract | ComponentContractSchema, ManifestSchema, loadManifest: the contract every component declares and the manifest they make; see docs/contract.md |
/lint | lintManifest, formatLintIssues, assertManifestClean |
/generate | generateBlocks and friends, manifest to Payload blocks, and fieldOverride for a site's exceptions; see docs/payload.md |
/render | RenderBlocks and coerceBlock: stored blocks back to React |
/client | BlockSummary, BlockGuidance, RowSummary: admin components named in Payload's import map |
/testing | describeBlockInvariants, checkUntouchedBlocks, checkBlockProps: invariants a site runs over its blocks |
| bin | check-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.