Repository navigation
@directededges/specs-schema v0.35.0
·
185 commits
to main
since this release
A library declares the slot its nested layouts fill through. SpecsConventions.slots.default.match names it, SlotProp.defaultSlot marks the prop that matched, and MetadataConventions.specs records the conventions a run used — so a reader holding only a spec can resolve a nested instance's default slot (ADR-099).
Conventions and settings grow two open surfaces. Conventions.storybook is a concern-keyed map a new Storybook concern can join without a schema change, and Settings.curation states which components of a library a run specs (ADR-093, ADR-098).
Glyph membership can be declared by structure rather than by name. PlatformConventions.glyphs.structure derives it from child shapes and fill, which makes glyphs.match optional (ADR-103).
Added
Conventions.storybookcarries a workspace's Storybook settings, typed asStorybookConventions— an open concern-keyed map loaded fromconventions/storybook.yaml, also onResolvedConventions. Adding a concern needs no change to the type or its schema (ADR-098)Settings.curationstates which components of a library a run specs, withdefaultSelection(READY_FOR_DEVorALL),preserveManualSelectionsfor whether hand edits outrank a changed Figma status, andincludeDependencies. Every default matches today's behaviour (ADR-093)SpecsConventions.slots.default.matchnames the patterns identifying a component's designated default slot, authored inconventions/specs.yaml. It is a spec convention, not a platform one — what it names is aSlotPropthe spec declares, so every platform reads the same answer (ADR-099)MetadataConventions.specsrecords the spec conventions a run was performed under, beside the one platform entry, for the reader that cannot re-derive them: a render resolving a nested instance's default slot does not hold that instance's own component spec (ADR-099)SlotProp.defaultSlotmarks a slot prop that matchedspecs.slots.default.match, set at generation time and read by consumers with no dependency onConventions(ADR-099)PrimitiveEntry.matchselects a promotion entry by layer-name prefix, ahead of style scoring; the longest prefix wins (ADR-100)PlatformConventions.glyphs.structurederives glyph membership from child structure and fill, typed asGlyphStructure, naming the glyph from the main component's name (ADR-103)
Changed
PlatformConventions.glyphs.matchbecomes optional, and a declaredglyphsblock now requires at least one ofmatchorstructure(ADR-103)
Migration
glyphs.match→glyphs.matchorglyphs.structure: existing declarations stay valid; code readingglyphs.matchmust handle its absence when onlystructureis declared
ADRs
Accepted
- ADR-093 — Curation is a settings concern
- ADR-094 — Subcomponent Pattern Matching Rules
- ADR-095 — Compositions Are Curated Like Components, From a Smaller Eligible Set
- ADR-096 — The
specs/Directory Names What Kind of Thing Each Folder Is - ADR-097 — A Composition Emits One Story in Its Own Nav Group, and Only Under Pro
- ADR-098 — Storybook Conventions —
config/conventions/storybook.yaml - ADR-099 —
slots.default.match— Naming the Default Slot, and Flattened Instance Nesting - ADR-100 —
PrimitiveEntry.match— Promoting a Layer by Its Name, Short-Circuiting Style Scoring - ADR-101 — The Workspace Stage Graph
- ADR-103 — Structural glyph membership —
glyphs.structureconvention