Skip to content

Artifact: Heading entry lists Text-only recipes from the shared types.ts #547

Closed

Description

@egdev6

Problem

scripts/build-artifact.mjs attaches every CVA recipe declared in a shared types.ts to every component exported from that file. In packages/ui/src/primitives/text/types.ts, the Heading artifact entry therefore lists Text-only recipes in its variants and anatomy:

Heading's props are unchanged and it does not support truncation, so its raw design-system.json entry misdescribes it. Today @egdev/mcp serves only system.md, whose Heading section is correct, so agents querying the MCP are not misled. Anyone reading the raw artifact anatomy would be, and so would future tools that read it.

Found by independent verification of #546 (see odd/tasks/consumer-request-specs.md L14).

Expected

Each component's artifact entry lists only the recipes that the component actually uses. Possible approaches, for the generator owner to decide:

  • resolve recipe usage per component from its hook or JSX;
  • add an explicit per-component recipe declaration.

Acceptance

  • In scripts/design-system-artifact.test.mjs, the Heading entry's anatomy has no truncate axis and no textBodyVariants; the test fails today.
  • The Text entry keeps its recipes.
  • The artifact is regenerated, and pnpm artifact --check, pnpm system:check and pnpm test:artifact pass.
  • Other shared types.ts files that export multiple components get the same audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions