From d3efdb5c304269fc9f98b72640acb27a9c156472 Mon Sep 17 00:00:00 2001 From: dev Date: Sun, 17 May 2026 01:41:58 +0200 Subject: [PATCH] Remove legacy Eidos CSS layout fallback --- continue.md | 17 ++++++++++++++++ src/uix/eidos/components/README.md | 2 +- src/uix/eidos/components/toast/toast.css | 2 +- src/uix/eidos/events.css | 2 +- src/uix/eidos/lint.test.ts | 26 ++++++++++++------------ 5 files changed, 33 insertions(+), 16 deletions(-) diff --git a/continue.md b/continue.md index 396a3ad29..9c2746d1b 100644 --- a/continue.md +++ b/continue.md @@ -97,6 +97,23 @@ Actualizacion Eidos CSS entry guard 2026-05-17: - `npx vitest run src/uix/eidos/recipe-css-contract.test.ts` -> 6 tests OK. - `npm run check` -> 0 errores, 0 warnings. +Actualizacion Eidos legacy layout guard 2026-05-17: + +- `lint.test.ts` elimina fallback al layout CSS raiz retirado + (`components/{name}.css`) y anade guardia explicita: todo CSS de componente + debe vivir en `components/{name}/{name}.css`. +- Limpieza de comentarios stale: + - `events.css` referencia `EngineSemantic`, no `SemanticEngine`. + - `toast.css` deja de hablar de "phase 2". + - `components/README.md` corrige "retiraled". +- Validado: + - `npx vitest run src/uix/eidos/lint.test.ts src/uix/eidos/recipe-css-contract.test.ts` + -> 2 archivos, 20 tests OK. + - `rg "retiraled|SemanticEngine|phase 2|older flat|flat layout still" src/uix/eidos` + -> 0 resultados. + - `npx vitest run src/uix/eidos` -> 7 archivos, 84 tests OK. + - `npm run check` -> 0 errores, 0 warnings. + Actualizacion Eidos config audit 2026-05-17: - Resuelta la parte no-componente de la auditoria consolidada de diff --git a/src/uix/eidos/components/README.md b/src/uix/eidos/components/README.md index f638bc995..ea53ef2cb 100644 --- a/src/uix/eidos/components/README.md +++ b/src/uix/eidos/components/README.md @@ -330,7 +330,7 @@ si un alias publico queda sin consumidor real, el test --- -## Forma legacy (CSS-only, retiraled) +## Forma legacy (CSS-only, retired) Hubo una fase anterior cuando eidos sólo emitía CSS (`accordion.css`, `dialog.css`, etc., al nivel raíz de `components/`). Todos los diff --git a/src/uix/eidos/components/toast/toast.css b/src/uix/eidos/components/toast/toast.css index b15c76730..4d1e076f1 100644 --- a/src/uix/eidos/components/toast/toast.css +++ b/src/uix/eidos/components/toast/toast.css @@ -1,5 +1,5 @@ /** - * Eidos — Toast component recipe (phase 2). + * Eidos — Toast component recipe. * * Translated from `air/components/toast/toast.css` with substantive * remapping: air's part naming and intent vocabulary differ from the diff --git a/src/uix/eidos/events.css b/src/uix/eidos/events.css index 57a0d51b0..02a39d563 100644 --- a/src/uix/eidos/events.css +++ b/src/uix/eidos/events.css @@ -19,7 +19,7 @@ * - signal / shift / sustain: 600ms * - contact: 120ms * Authors override per signal via `signal.hold`, or globally via - * `new SemanticEngine({ visual: { defaultHold } })`. + * `new EngineSemantic({ visual: { defaultHold } })`. * * Even with the configured hold, prefer `animation: @keyframes` over * `transition` for the visible response: the animation runs to completion diff --git a/src/uix/eidos/lint.test.ts b/src/uix/eidos/lint.test.ts index e8c0cbfa7..f57b9a7c2 100644 --- a/src/uix/eidos/lint.test.ts +++ b/src/uix/eidos/lint.test.ts @@ -9,24 +9,12 @@ import { toggleMorfo } from '../morfo/components/toggle' import { lintEidosCss } from './lint' function readEidos(name: string): string { - // Components migrated to subfolder layout (e.g. toggle/) live at - // `components/{name}/{name}.css`; older flat layout still uses - // `components/{name}.css`. Try the subfolder first, fall back to flat. - const subfolderPath = resolve(`src/uix/eidos/components/${name}/${name}.css`) - const flatPath = resolve(`src/uix/eidos/components/${name}.css`) - try { - return readFileSync(subfolderPath, 'utf-8') - } catch { - return readFileSync(flatPath, 'utf-8') - } + return readFileSync(resolve(`src/uix/eidos/components/${name}/${name}.css`), 'utf-8') } function listEidosCssComponents(): string[] { const eidosDir = resolve('src/uix/eidos/components') return readdirSync(eidosDir, { withFileTypes: true }).flatMap((entry) => { - if (entry.isFile() && entry.name.endsWith('.css')) { - return [entry.name.replace(/\.css$/, '')] - } if (!entry.isDirectory()) return [] const cssPath = resolve(eidosDir, entry.name, `${entry.name}.css`) @@ -34,7 +22,19 @@ function listEidosCssComponents(): string[] { }) } +function listRootCssFiles(): string[] { + const eidosDir = resolve('src/uix/eidos/components') + return readdirSync(eidosDir, { withFileTypes: true }) + .filter((entry) => entry.isFile() && entry.name.endsWith('.css')) + .map((entry) => entry.name) + .sort() +} + describe('eidos component contract coverage', () => { + it('keeps component CSS inside component subdirectories', () => { + expect(listRootCssFiles()).toEqual([]) + }) + it('has a morfo file for every eidos CSS component', () => { const missing = listEidosCssComponents().filter( (name) => !existsSync(resolve(`src/uix/morfo/components/${name}.ts`))