Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions docs/distribution/consumer-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ A consumer may ship a temporary mitigation while the DS issue is open. It has **
lives until the release that resolves the issue.

Going beyond a DS component's API needs an issue-backed guard allowlist entry as a temporary mitigation. For example,
an app class that changes a DS component's appearance or layout goes beyond the API. The guard reports DS046 when its
CSS sets anything other than custom properties or placement-only declarations (`margin` and `margin-*`, `align-self`,
an app class that changes a DS component's appearance or layout outside its documented `className` contract goes beyond
the API. Under the base list, the guard reports DS046 when CSS sets anything other than custom properties or
placement-only declarations (`margin` and `margin-*`, `align-self`,
`justify-self`, `place-self`, `flex`, `flex-grow`, `flex-shrink`, `flex-basis`, `order`, `grid-area`, `grid-column*`
and `grid-row*`). `min-width` and `min-height` are also allowed at literal zero, optionally followed by `%` or a CSS
length unit, and with optional `!important`; other values remain findings. DS047 also reports selectors that use a
length unit, and with optional `!important`; other values remain findings under the base list. A component's published
`classNameAllows` can extend that list (amendment `odd/tasks/app-side-consumer-flow.md` S9): DS046 reads it from the
project's vendored `@egdev/system/design-system.json`, resolved from the project. A missing, unreadable or invalid
artifact or missing entry silently falls back to the base list. DS047 also reports selectors that use a
class on an imported `@egdev/ui` JSX component to reach its internal markup through a descendant or child combinator,
even for placement-only declarations. A last compound with an app-owned class is allowed; a sibling immediately after
the component is outside it, and DS041 covers a final `.eg-*` class. Both checks scan matching rules outside the theme
Expand All @@ -55,7 +59,8 @@ styles are not yet covered. See the [guard reference](../../packages/cli/README.

**Allowed**

- Local composition of existing DS components and tokens, within their APIs and the placement-only allowance.
- Local composition of existing DS components and tokens, within their APIs, the base placement allowance and any
published component-specific `classNameAllows`.
- A guard allowlist entry in `<sourceDirectory>/design-system-allowlist.ts` that names the DS
issue, with a reason. For a missing component use `kind: 'component-gap'` and the matching
comment in code:
Expand Down
4 changes: 4 additions & 0 deletions docs/distribution/design-system-artifact.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The artifact uses compact, deterministic JSON to preserve the existing single-fi

The `schemaVersion` describes the shape; `packages` gives the actual versions of tokens, UI and effects. `catalog` joins the generated catalog with public value exports. `components` describes public exports, their source, own props and CVA recipes. `types` records naming-registry usages that are not public values. `tokens` copies source values and their CSS block group. `materialRecipes` records curated Material semantics and referenced tokens. `propNaming` comes from the naming registry.

A component entry may include `classNameAllows`, a sorted, deduplicated array of literal lowercase CSS property names declared by one `@classNameAllows` JSDoc tag on its root props type or on the exported part's own/shared props type. These properties are additional to DS046's base placement list, not permission for arbitrary appearance or internal selectors. Absence supplies no additional machine-readable properties: the base list still applies. Existing prose and conditional limitations remain authoritative; an unconditional property array cannot encode a value or state restriction. The generator validates names against the installed `csstype` hyphenated property list and rejects unknown names, duplicate tags and empty tags. Tag text is not part of prop descriptions.

The optional field is additive, so `schemaVersion` remains `1.0.0`, matching prior additive fields and preserving existing consumers. Under the [package version policy](versioning.md), a future release of this backwards-compatible capability is a minor release; this change does not bump package versions.

The additive `typographyRoles` array records representative named Heading, Text eyebrow, SectionHeader and Hero ledes, and ProjectCard code recipes. Each role names its source file and resolved family, size, line-height, weight and tracking token; null denotes an unresolved mapping. Extraction reads the named CVA bases and static variant fields, not an inherited or computed CSS cascade. The list is not exhaustive and card headings can use sans. A universal document-body recipe is not established by these extracted sources; WebSection accepts consumer-supplied heading content, so it does not establish a heading font of its own. Source recipe changes produce artifact drift.

Each component has an additive `composedOf` array of `{ name, source }` entries, sorted by public name: public values referenced as JSX tags in its implementation file, resolved through TypeScript symbols. This does not discover components in helpers, dynamic references, or consumer-supplied slots; a shared implementation file can describe more than one export. Empty arrays do not prove absence of composition. Catalog composition descriptions and own props/parts remain separate source facts.
Expand Down
Loading