docs: cross-cutting documentation of the sec-dom additions

Surface the layout-read + token-resolution work across the doc corpus, beyond the
per-artifact READMEs already shipped (adom / color / perf):

- CLAUDE.md: `$perf` alias + perf/color in the arts list (the read-timing doctrine
  bullet landed in abf76332).
- arts/README.md: perf + color rows in the artifact map; adom row notes post-layout
  read scheduling (`measure`); `$perf` + `$color` in the aliases block.
- active_architecture.md §7 (Reglas duras): the read-timing discipline — layout
  reads run post-layout (`dom.measure` / `dom.raf`), never sync-after-write; theme
  token → colour via `eidos.resolveToken`; `uix.perf` detects violations. The
  framework now governs READS like `dom.apply` governs writes.
- eidos/README.md: `ActiveEidos.resolveToken` / `resolveTokens` in "Runtime activo".
- COLOR_ENGINE_RFC.md: `uix.color` realized (`EngineColor`) + `resolveToken` consumer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
menubar-v4-safe
dev 3 months ago
parent abf7633200
commit 895d9bcfe3

@ -93,7 +93,7 @@ resolve and the server-test project).
| Alias | Target |
| --- | --- |
| `@` | `src/` |
| `$active-app`, `$adom`, `$auth`, `$bus`, `$cache`, `$clipboard`, `$color`, `$connection`, `$format`, `$http`, `$langs`, `$logger`, `$motion`, `$orca`, `$perm`, `$prefs`, `$session`, `$sium`, `$storage`, `$timer` | `src/arts/{name}` |
| `$active-app`, `$adom`, `$auth`, `$bus`, `$cache`, `$clipboard`, `$color`, `$connection`, `$format`, `$http`, `$langs`, `$logger`, `$motion`, `$orca`, `$perf`, `$perm`, `$prefs`, `$session`, `$sium`, `$storage`, `$timer` | `src/arts/{name}` |
| `$libs`, `$locale`, `$reactive` | `src/libs`, `src/libs/locale`, `src/libs/reactive` |
| `$svrs` | `src/svrs/` |
| `$uix`, `$active-uix`, `$soma` | `src/uix`, `src/uix/active-uix`, `src/uix/soma` |
@ -112,7 +112,7 @@ consume. Each consumer reads the morfo via `compileMorfo(morfo)`, never by
walking the raw declaration.
```
arts/ → runtime artifacts: active-app, adom, motion, perm, prefs, ...
arts/ → runtime artifacts: active-app, adom, color, motion, perf, perm, prefs, ...
libs/ → pure helpers (zero-dep): reactive, days, dom, locale, ...
svrs/ → server-authoritative engines

@ -114,7 +114,7 @@ errors are typed.
| [`logger`](./logger/README.md) | `EngineLogger` | Structured logger: levels, transports, filters, vitals, dispose | — |
| [`timer`](./timer/README.md) | `EngineTimers`, `ActiveTimers` | Deterministic timer scheduler: clock injection, one-shots, intervals, cancellation, snapshots, backoff | `$libs/timers`, `$logger` (optional) |
| [`format`](./format/README.md) | `EngineFormat`, `ActiveFormat` | Localized formatting: numbers, currency, units, dates | `$logger` (currency) |
| [`adom`](./adom/README.md) | `ActiveDom` | Reactive DOM service: viewport, breakpoints, attribute writes, scroll lock | `$libs/dom`, `$reactive` |
| [`adom`](./adom/README.md) | `ActiveDom` | Reactive DOM service: viewport, breakpoints, attribute writes, scroll lock, post-layout read scheduling (`measure`) | `$libs/dom`, `$reactive` |
| [`motion`](./motion/README.md) | `EngineMotion` | Animation runtime: registers + runs `--state` presets (CSS settle / JS drivers — spring / waapi / rect FLIP); the bridge BOTH UIX layers consume via `uix.motion` | `MotionDom` port (injected; `adom` satisfies it) |
| [`clipboard`](./clipboard/README.md) | `ActiveClipboard` | Clipboard write capability with injectable writer and explicit unavailable errors | browser `navigator.clipboard` or injected writer |
| [`sium`](./sium/README.md) | `EngineSium` | Validation contracts: schemas, issues, introspection, Standard Schema interop | `$langs` (optional), `$logger` (optional), `$libs/days`, `$libs/color` |
@ -125,6 +125,8 @@ errors are typed.
| [`auth`](./auth/README.md) | `ActiveAuth` (`EngineAuth` in `$svrs/auth`) | Authentication: password flows, CSRF, current session reflector, devices, logout, server-authoritative auth handlers | `$libs/auth`, `$http`, `$cache`, `$svrs/auth` |
| [`perm`](./perm/README.md) | `ActivePerms` (`EnginePerms` in `$svrs/perm`) | Authorization: policy runtime adapter, HTTP client/handlers, cache snapshot, `<Can />` guard | `$libs/perm`, `$libs/svrs`, `$http`, `$logger` (optional) |
| [`cache`](./cache/README.md) | `ActiveCache` (`EngineCache` in `$svrs/cache`) | Data cache: deterministic keys, policies, scopes, stale/revalidate, tags, memory/storage adapters | `$libs/cache`, `$storage` (adapter), `$logger` (optional) |
| [`color`](./color/README.md) | `$color` namespace (`uix.color`) | Isomorphic colour math: OKLCH↔sRGB, APCA, scale/scheme generation, alpha. Pure + stateless — `Engine`-grade, no class | — (zero-dep; consumed by eidos at build + runtime) |
| [`perf`](./perf/README.md) | `ActivePerf` (`uix.perf`) | Dev forced-reflow detector: Long Animation Frames → attributed `forcedStyleAndLayoutDuration` reports; opt-in, inert in prod | platform LoAF API (Chromium) — zero-dep |
| [`active-app`](./active-app/README.md) | `ActiveApp` | App composition: core Logger + Bus + Timers + Orca + Prefs, plus declared services via factories | every artifact above |
## Composition
@ -240,12 +242,14 @@ alias: {
$auth: 'src/arts/auth',
$cache: 'src/arts/cache',
$clipboard: 'src/arts/clipboard',
$color: 'src/arts/color',
$connection: 'src/arts/connection',
$format: 'src/arts/format',
$http: 'src/arts/http',
$langs: 'src/arts/langs',
$logger: 'src/arts/logger',
$motion: 'src/arts/motion',
$perf: 'src/arts/perf',
$perm: 'src/arts/perm',
$session: 'src/arts/session',
$sium: 'src/arts/sium',

@ -691,6 +691,19 @@ Las invariantes operativas que mantienen el sistema coherente:
`document/window`, consultas globales, foco imperativo y scroll de ventana
pasan por `ActiveDom`.
**Timing, no solo ownership.** Esas lecturas que fuerzan layout
(`getBoundingClientRect`, `getComputedStyle`, `offset*`, `scroll*`, `client*`)
deben correr POST-LAYOUT, nunca síncronas justo tras una escritura de
DOM/estilo — leer-tras-escribir fuerza un reflow a mitad de turno (la familia
`[Violation] Forced reflow while executing JavaScript`). Difiérelas con
`dom.measure(read, node?)` (cola de lecturas coalescida por frame, el vehículo
sancionado) o desde un callback `dom.raf`; un `measure` pelado cumple igual
que `dom.apply` para las escrituras. Para resolver un token de tema a un color
concreto, usa `eidos.resolveToken(token)` (config + el motor `uix.color`) — NO
un probe `getComputedStyle`. El detector dev `uix.perf` (opt-in `reflowDetector`)
atribuye las violaciones en runtime vía Long Animation Frames. Así el framework
gobierna las LECTURAS de layout igual que `dom.apply` gobierna las escrituras.
6. **`Eidos` consume DOM y `data-*`, no internals de Soma ni Sema.** Si lo
necesita, debe estar declarado en morfo o emitido en una señal de sema.

@ -275,6 +275,13 @@ un *art* isomórfico (paralelo a `uix.motion`): servicio puro que consumen el bu
(`render-css`) y el runtime (`ActiveEidos`). Esto absorbe el sueño white-label / live
del documento de bloat **sin** la regresión de CSS-relative-colors.
**Estado 2026-06-29 — realizado.** `uix.color` existe como accessor *stateless* en
`ActiveUix` (tipo `EngineColor` — sin estado, por eso `Engine*` y no `Active*`),
descubrible junto a `uix.motion` / `uix.timers`; `eidos` sigue importando `$color`
directo para build/SSR. El consumidor recíproco —resolver un token de tema a un
color concreto en JS, sin probe `getComputedStyle`— es `eidos.resolveToken(token)`
(config + `$color`).
> **Frontera CSS-nativa (watch, no solución).** `contrast-color()` (CSS Color 5)
> haría el pick de contraste en CSS puro algún día — pero no está listo (prototipo
> Safari 18, nada en Chrome/Firefox en 2026), solo elige blanco/negro puro (no tus

@ -65,6 +65,13 @@ Eidos tiene una clase activa:
`prefs`, `dom`, `langs`, `format` y helpers visuales como `resolve(...)`,
`breakpoint(...)` o `isBelow(...)`. Si `applyDom` esta activo, inyecta/quita
`<style data-uix-eidos>` usando `uix.dom`.
- `ActiveEidos.resolveToken(token)` / `resolveTokens(tokens)` resuelven un token de
color del tema (`--scale-{name}-{step}` / `--primitive-{role}-{step}`) a un hex
sRGB concreto en **JS puro** — config + el motor `uix.color`, SIN tocar el DOM.
Sustituye el round-trip `getComputedStyle(probe)` que los consumidores usaban
para leer el valor de un token (esa lectura fuerza reflow; ésta no toca DOM).
Honra un `applyColorScheme` aplicado (override-first) y resuelve escalas
theme-scoped. Devuelve `null` para slots semánticos / tokens no resolubles.
Regla de dependencia: un componente en `src/uix/eidos/components/*` no importa
`getActiveUix()` directamente. Consume `ActiveEidos.require()` y solo conoce la

Loading…
Cancel
Save

Powered by TurnKey Linux.