Skip to content

@directededges/specs-schema v0.35.0

Choose a tag to compare

@nathanacurtis nathanacurtis released this 14 Oct 13:35
· 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.storybook carries a workspace's Storybook settings, typed as StorybookConventions — an open concern-keyed map loaded from conventions/storybook.yaml, also on ResolvedConventions. Adding a concern needs no change to the type or its schema (ADR-098)
  • Settings.curation states which components of a library a run specs, with defaultSelection (READY_FOR_DEV or ALL), preserveManualSelections for whether hand edits outrank a changed Figma status, and includeDependencies. Every default matches today's behaviour (ADR-093)
  • SpecsConventions.slots.default.match names the patterns identifying a component's designated default slot, authored in conventions/specs.yaml. It is a spec convention, not a platform one — what it names is a SlotProp the spec declares, so every platform reads the same answer (ADR-099)
  • MetadataConventions.specs records 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.defaultSlot marks a slot prop that matched specs.slots.default.match, set at generation time and read by consumers with no dependency on Conventions (ADR-099)
  • PrimitiveEntry.match selects a promotion entry by layer-name prefix, ahead of style scoring; the longest prefix wins (ADR-100)
  • PlatformConventions.glyphs.structure derives glyph membership from child structure and fill, typed as GlyphStructure, naming the glyph from the main component's name (ADR-103)

Changed

  • PlatformConventions.glyphs.match becomes optional, and a declared glyphs block now requires at least one of match or structure (ADR-103)

Migration

  • glyphs.match → glyphs.match or glyphs.structure: existing declarations stay valid; code reading glyphs.match must handle its absence when only structure is 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.structure convention