statesToContract
disposition: bound, direction: spec-to-code, basis: implementation
A prop rule of the Web Components binding. The kinds named below resolve jointly here — which kind a prop even is, or what platform shape it takes, is decided by this rule rather than per kind.
Keys. boolean, enum
Operands
Every fact the rule reads. Nothing outside this set participates.
| Operand | From |
|---|---|
conventions.specs.states | declared conventions |
concept.contract | the shared state-concept table (from-specs states.ts) |
Cases
Ordered — first match wins.
| # | When | Emits | Why |
|---|---|---|---|
| 1 | concept.contract = omit | nothing — the prop leaves the contract; the CSS binding selects on the browser pseudo-class | Hover, focus, active are the browser’s to drive; a consumer cannot meaningfully set them |
| 2 | concept.contract = keep | the prop stays a property; the element writes the concept's aria attribute when it is set | Disabled, selected, invalid are consumer-set facts the DOM should also state |
Otherwise
the prop is an ordinary property — A prop no state entry names is not a state
Identical rule to the React binding by construction: the concept table — selector and contract disposition per concept — is one shared module, so the two emitters and the CSS transform cannot disagree.