--- title: Eidos — the visual layer type: reference audience: human + agent authority: E1 architecture — the visual layer as a module: ActiveEidos runtime, wrappers, API conventions, picker patterns status: current source: migrated from src/uix/eidos/README.md (2026-07-02, docs-book F7.2) --- # Eidos `Eidos` is UIX's **visual layer**. It covers what the dead `air/` branch called the "visual runtime" plus the token system — inheriting no code. It reads from the DOM what the previous layers wrote (the morfo runtime + sema's visual channel) and applies styles, animations and ergonomic wrappers. ``` Morfo declares the genetics ↓ Soma transcribes the behavior → DOM (data-state, data-color, aria-*) ↓ Sema emits perceptual signals → DOM (data-event-*) during the hold ↓ Eidos applies the visual: tokens, themes, recipes, archetypes, wrappers ``` Eidos never imports soma or sema internals. Its source of truth is **what is written in the DOM** (parts, data-attrs, ARIA, archetypes, event signals) plus the public Soma types it needs to compose wrappers. ## Not just CSS The first mental model was "eidos = reactive CSS". Insufficient: there are purely visual concerns (variant, size, layout flags, icon slots) that are not part of the headless behavior yet are orthogonal to the CSS. Eidos hosts them as **Svelte wrappers over Soma**. ``` src/uix/eidos/ active-eidos.svelte.ts → visual runtime/context and CSS generation index.css → entrypoint importing the aggregated CSS archetypes.css → rules common to [data-archetype=*] events.css → global hints for [data-event-*] (sema visual) generated/base.css → static output generated from the base EidosConfig (incl. @font-face) lib/ → config support, recipes, CSS contract and shared types components/{x}/ → per-component recipe + wrapper + types {x}.css recipe CSS (selectors [data-{x}], etc.) {x}.svelte Svelte wrapper over the Soma component types.ts wrapper props (extends Soma's public contract) index.ts public namespace (default + attached parts) ``` `lib/` contains the pure visual-configuration support: primitives, visual semantics, themes, the CSS contract and rendering. `generated/base.css` is the static artifact generated from that configuration (`npm run generate:eidos-css`). The old `contracts/` and `themes/base/` CSS were retired from the active tree: the public contract is obtained with `ActiveEidos.getCssContract()` / `renderContractCss()` and the visual base comes out of `generated/base.css`. The old `tokens/components/*` were retired too: recipe custom-property names (`--toast-*`, `--dialog-*`, etc.) remain the stable contract, but their base values live in `EidosConfig.recipes` and are generated into `generated/base.css`. ## The active runtime Eidos has one active class: - `ActiveEidos` is the active runtime and the visual context of the Svelte wrappers. It manages pure visual configuration, primitives, semantic roles, themes, validation, CSS rendering and persistence. It connects that configuration with `ActiveUix` services when there is a context: `prefs`, `dom`, `langs`, `format` and visual helpers like `resolve(...)`, `breakpoint(...)` or `isBelow(...)`. When `applyDom` is active, it injects/removes `