05 — Component System
State Machine
Component states in IDL are declared as a finite state machine. Legal states are enumerated explicitly. Legal transitions between states are declared as an explicit set — no transition that is not declared is permitted. State machines are the mechanism by which behavioral invariants are enforced: a component that enters an undeclared state or makes an undeclared transition has violated a behavioral invariant.
State Declaration
Every component MUST declare at least one state. States are named according to their semantic role: default, hover, focus, active, disabled, loading, error, success. Custom state names are permitted but MUST be documented in the component specification. The initial state MUST be explicitly declared. A component may have more than one legal initial state (for stateful multi-instance components); all legal initial states MUST be declared.
Transition Declaration
Each legal transition is declared as a from-to pair with an optional trigger declaration. A trigger is a named event (user interaction, system event, or data change) that causes the transition. Transitions without declared triggers are valid — they represent programmatic or unconditional transitions. The compiler validates that all transition targets are declared states.
Invalid Transitions
A transition not declared in the state machine is an invalid transition. Platform implementations MUST NOT implement undeclared transitions. If a platform implementation receives a trigger that would cause an invalid transition, the component MUST remain in its current state. Invalid transition handling is a conformance requirement; it is not left to platform discretion.