Semantic Runtime Contract 1.4.0
The implemented role, density, layout, theme, and contrast contract consumed by Adapt.
Contract surface
| Attribute | Values / source | Effect |
|---|---|---|
data-velin-role | Section registry roles; dashboard; nav alias | Canonical semantic region |
data-velin-density | compact / comfortable / spacious | Density token and known bridges |
data-velin-layout | stack / split / grid | Known layout bridges |
data-velin-theme | Existing theme contract | Reused by Adapt |
data-velin-contrast | Existing contrast contract | Reused by Adapt |
Markup
<section data-velin-role="hero"
data-velin-density="comfortable"
data-velin-layout="split">
</section>Validation semantics
Valid values become canonical state. Unknown values remain in markup but are ignored for bridges and report invalid; missing values are neutral null.
Read API
const api = getVelinAPI(element);
api.role;
api.density;
api.layout;
api.theme;
api.contrast;
api.getSemanticState();
getSemanticState(element);Lifecycle and events
bootFromDOM(root, { adapt: true }) starts contract observation in the same runtime lifecycle. Recognized attributes and inserted semantic subtrees produce velin-adapt-change.
Continue through the pipeline
- Signals — local aggregates
- Policy — candidate generation
- API & Events — implemented controller surface