JSON Schemas
@sigx/zero-kit ships JSON Schemas (draft 2020-12) for every authoring and
artifact surface. The copies below are the ones each schema's $id and each artifact's
$schema point at, so an editor, a validator or a generator resolves them without the
package installed.
| Schema | Governs | URL |
|---|---|---|
| tokens | TokensInput — the design system's token declaration | /zero/schemas/tokens.schema.json |
| recipe | RecipeInput — one component's recipe | /zero/schemas/recipe.schema.json |
| manifest | the @sigx/zero anatomy manifest (@sigx/zero/manifest.json) | /zero/schemas/manifest.schema.json |
| ds-manifest | a compiled design system's dist/manifest.json (manifestVersion: 1) | /zero/schemas/ds-manifest.schema.json |
| report | the coverage report, dist/report.json (reportVersion: 1) | /zero/schemas/report.schema.json |
| fragment | an ecosystem manifest fragment (version: 1) | /zero/schemas/fragment.schema.json |
| lynx-manifest | a compiled design system's dist/lynx/manifest.json | /zero/schemas/lynx-manifest.schema.json |
The same files ship in the package at dist/schemas/. Their $ids use the
https://signalxjs.github.io/zero/schemas/… origin, which serves this site; the paths are
identical here.
Using them
Point an editor at a schema for autocompletion and structural checks while authoring tokens or recipes as JSON:
{
"$schema": "https://signalxjs.github.io/zero/schemas/tokens.schema.json",
"roles": { "primary": {}, "surface": { "content": false, "soft": false } },
"defaultLight": "acme",
"themes": { "acme": { "colorScheme": "light", "colors": { "…": "…" } } }
}
A schema checks shape; sigx zero:validate checks meaning — completeness, WCAG contrast,
anatomy and token-reference rules a schema cannot see. The two together are the JSON-first
authoring loop: emit JSON, validate against the schema, wrap in defineTokens /
defineRecipe, run zero:validate. See Manifests and schemas for
what each artifact contains and Validate and build for the
semantic half.
The kit's test suite validates every shipped design system's tokens and recipes, the real anatomy manifest, and every emitted design-system manifest and report against these schemas, so they stay honest against the code that produces the artifacts.
