05 — Component System

Slot Architecture


Slots define typed insertion points within a component. A slot declaration specifies the type of content the slot accepts — either a primitive content type (text, image) or a reference to another component type. Slot graphs — the network of slot-to-component references across a composition — MUST be acyclic. The compiler validates slot graph acyclicity during Transform.

Slot Declarations

A slot declaration specifies: a stable name, the accepted content type (primitive or component reference), whether the slot is required or optional, whether the slot accepts multiple instances or a single instance, and any composition constraints that govern what may appear in the slot.

Slot Graph Validation

The compiler builds a slot graph from all component declarations and validates that no cycle exists. A cycle occurs when component A has a slot that accepts component B, and component B (directly or via further slot references) has a slot that accepts component A. Cycles produce a Transform error regardless of depth. The error message identifies the full cycle path.

Named vs. Default Slots

A component may declare a single unnamed (default) slot and any number of named slots. The default slot accepts content that does not specify a target slot. Named slots accept only content that explicitly targets them by name. In the IDL composition model, slot targeting is always explicit — implicit slot assignment based on content type is not permitted.