Found while completing the container-declaration census for #6764. Out of that card's scope (that one is about isContainer) and out of its fence (content/docs/ and examples/), so it is filed rather than fixed.
Measured
packages/components/src/renderers/layout/aspect-ratio.tsx reads exactly four keys off the schema: ratio, className, image (with alt), and then
{schema.image ? (
...an img...
) : (
renderChildren(schema.children || schema.body)
)}
There is no read of schema.content anywhere in the file, and content is not among its declared inputs either.
Every shipped demo authors content and nothing else:
| fixture | keys authored | renderer reads them? |
|---|
examples/schema-catalog/src/schemas/components-layout-aspect-ratio/16-9-aspect-ratio.json | ratio, content | ratio yes, contentno |
.../square.json | ratio, content | same |
.../4-3.json | ratio, content | same |
.../ultrawide.json | ratio, content | same |
.../video-aspect-ratio.json | ratio, content | same |
5 of 5. None authors children, body or image — the three spellings that would actually put something inside the box. So each demo renders a correctly-proportioned empty box, and the docs page content/docs/components/layout/aspect-ratio.mdx renders all five.
The same page's "Schema" block publishes the phantom key as contract:
interface AspectRatioSchema {
type: 'aspect-ratio';
ratio: number; // Width / Height ratio
content: ComponentSchema; // Content to display
className?: string;
}
image / alt, which the renderer does read and does declare as inputs, are absent from that block. So the documented surface and the implemented surface are disjoint on the content half.
Contrast that makes this a reading and not a scan artifact
The sibling family measured in the same pass goes the other way: all 9components-layout-semantic fixtures author children, which those renderers do read. So the catalog is not uniformly authored against a phantom key — this one component is.
Why it stayed invisible
Nothing draws a diagnostic that a reader would act on. content is not a declared input, so the manifest tier reports it as unknown-prop — the same warning it gives a typo — and an empty box on a page of ratio demos looks like a ratio demo.
Not proposed here, because the direction is a choice
Either the fixtures and the docs block move to the keys the renderer reads (image for the photo demo, children for the four card demos), or aspect-ratio grows a content read and declares it. The first is the AGENTS.md #0.1 direction (fix the metadata, not the renderer); the second would add a third spelling of the same concept beside children and body. Whoever takes it should also check whether these five files are part of the population already counted in #6318.
Related
#6764 (the census that surfaced it) · #5931 (same class — catalog fixtures declaring keys the renderer never reads; that card names button-group / breadcrumb / command, not this one) · #6318 (in-repo schema files that fail safeValidateSchema)
Found while completing the container-declaration census for #6764. Out of that card's scope (that one is about
isContainer) and out of its fence (content/docs/andexamples/), so it is filed rather than fixed.Measured
packages/components/src/renderers/layout/aspect-ratio.tsxreads exactly four keys off the schema:ratio,className,image(withalt), and thenThere is no read of
schema.contentanywhere in the file, andcontentis not among its declaredinputseither.Every shipped demo authors
contentand nothing else:examples/schema-catalog/src/schemas/components-layout-aspect-ratio/16-9-aspect-ratio.jsonratio,contentratioyes,contentno.../square.jsonratio,content.../4-3.jsonratio,content.../ultrawide.jsonratio,content.../video-aspect-ratio.jsonratio,content5 of 5. None authors
children,bodyorimage— the three spellings that would actually put something inside the box. So each demo renders a correctly-proportioned empty box, and the docs pagecontent/docs/components/layout/aspect-ratio.mdxrenders all five.The same page's "Schema" block publishes the phantom key as contract:
image/alt, which the renderer does read and does declare as inputs, are absent from that block. So the documented surface and the implemented surface are disjoint on the content half.Contrast that makes this a reading and not a scan artifact
The sibling family measured in the same pass goes the other way: all 9
components-layout-semanticfixtures authorchildren, which those renderers do read. So the catalog is not uniformly authored against a phantom key — this one component is.Why it stayed invisible
Nothing draws a diagnostic that a reader would act on.
contentis not a declared input, so the manifest tier reports it asunknown-prop— the same warning it gives a typo — and an empty box on a page of ratio demos looks like a ratio demo.Not proposed here, because the direction is a choice
Either the fixtures and the docs block move to the keys the renderer reads (
imagefor the photo demo,childrenfor the four card demos), oraspect-ratiogrows acontentread and declares it. The first is the AGENTS.md #0.1 direction (fix the metadata, not the renderer); the second would add a third spelling of the same concept besidechildrenandbody. Whoever takes it should also check whether these five files are part of the population already counted in #6318.Related
#6764 (the census that surfaced it) · #5931 (same class — catalog fixtures declaring keys the renderer never reads; that card names button-group / breadcrumb / command, not this one) · #6318 (in-repo schema files that fail
safeValidateSchema)