From 77c37cd9408a127c78e0285cda9d4b4de436d424 Mon Sep 17 00:00:00 2001 From: dev Date: Thu, 14 May 2026 01:54:35 +0200 Subject: [PATCH] Clarify prefs ownership docs --- src/arts/prefs/README.md | 24 ++++++++++++------------ src/arts/prefs/dimensions/index.ts | 5 ++++- src/uix/active-uix/README.md | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/arts/prefs/README.md b/src/arts/prefs/README.md index 8d1f1bdec..d5364185d 100644 --- a/src/arts/prefs/README.md +++ b/src/arts/prefs/README.md @@ -10,7 +10,7 @@ Record>`. `ActiveApp` y las capas consumidoras, no una bolsa generica duplicada por cada capa. Queda decidido: -- `prefs.language` alimenta `lang`; +- `prefs.language` alimenta `langs`; - `prefs.locale` alimenta `format`; - `prefs.direction` resuelve la direccion efectiva; - `prefs.motion`, `prefs.sound` y `prefs.haptic` son preferencias @@ -91,7 +91,7 @@ Boundary: ```txt Prefs = preference resolution -Lang = translation/catalog lookup +Langs = translation/catalog lookup Format = number/date/currency/unit formatting Prefs DOM projector = optional cross-modal DOM attrs Eidos = visual theme/mode/density projection @@ -205,8 +205,8 @@ Example future composition: ```ts const capabilities: PrefsCapabilities = { - languages: intersect(appConfig.languages, Lang.availableLocales), - locales: intersect(appConfig.locales, Lang.availableLocales), + languages: intersect(appConfig.languages, Langs.availableLocales), + locales: intersect(appConfig.locales, Langs.availableLocales), currencies: appConfig.currencies, unitSystems: appConfig.unitSystems, themes: ['light', 'dark', 'system'], @@ -228,8 +228,8 @@ const capabilities: PrefsCapabilities = { }; ``` -If `Lang` does not provide `es-MX` and the application requires user-selectable -locales to exist in `Lang`, then `es-MX` must not be in `capabilities.locales`. +If `Langs` does not provide `es-MX` and the application requires user-selectable +locales to exist in `Langs`, then `es-MX` must not be in `capabilities.locales`. ## Environment @@ -319,7 +319,7 @@ export interface PrefsEffective { `effective` is total, readonly and always valid. ```txt -Lang reads effective.language +Langs reads effective.language Format reads effective.locale, currency, timezone, unitSystem PrefsDomProjection reads effective.direction, motion, sound, haptic Eidos owns visual theme/mode/density @@ -540,8 +540,8 @@ ports, but it should not know them. Example future ports: ```ts -// lang -export interface LangPrefsPort { +// langs +export interface LangsPrefsPort { readonly locale: PrefsLocale; subscribe(handler: (locale: PrefsLocale) => void): PrefsUnsubscribe; } @@ -567,7 +567,7 @@ export interface UixPrefsPort { ``` Consumers build filtered views/proxies from `App.prefs` or `uix.prefs`. -`prefs` itself remains unaware of `lang`, `format`, `uix`, `eidos` or DOM. +`prefs` itself remains unaware of `langs`, `format`, `uix`, `eidos` or DOM. ## Events @@ -764,11 +764,11 @@ When working on `prefs`: - Do not wire it into `active-app` unless explicitly requested. - Do not import `svelte/store` in the core. -- Do not import `lang`, `format`, `frontend`, `storage`, `buss`, `orca` or +- Do not import `langs`, `format`, `frontend`, `storage`, `buss`, `orca` or `active-app` from `libs/prefs`. - Do not persist `environment` or `effective`. - Do not create `formatLocale`. -- Do not let `Lang` own preferences. +- Do not let `Langs` own preferences. - Do not let `Format` keep parallel preference state. - Do not add arbitrary settings. - Keep IO behind ports/adapters. diff --git a/src/arts/prefs/dimensions/index.ts b/src/arts/prefs/dimensions/index.ts index dca903dea..5f2c58216 100644 --- a/src/arts/prefs/dimensions/index.ts +++ b/src/arts/prefs/dimensions/index.ts @@ -1,7 +1,10 @@ /** * Built-in `PrefsDimension` catalog. Each dimension is its own factory - * — `localeDimension({...})`, `themeDimension({...})` — and the + * — `localeDimension({...})`, `motionDimension({...})` — and the * `standardPrefsDimensions(catalog)` preset composes the canonical set. + * Visual factories such as `themeDimension` and `densityDimension` remain + * importable for app-specific schemas, but they are not part of the standard + * core preset; Eidos owns visual theme/mode/density by default. * * Application-specific dimensions go alongside these, either by reusing * the primitive factories (`booleanDimension`, `enumDimension`, …) or diff --git a/src/uix/active-uix/README.md b/src/uix/active-uix/README.md index 573bd8459..722153dd6 100644 --- a/src/uix/active-uix/README.md +++ b/src/uix/active-uix/README.md @@ -50,7 +50,7 @@ no deben mutar. | Modulo | Minimo requerido | Opcional | Fallback si falta | Error si falta | | ------------------------ | ----------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------- | | `ActiveUix` standalone | `langs` config | `format`, `events`, `portal`, `dom:false` | crea `prefs`, core services y, si `dom:false`, `disabledDom` local | falta config `langs` | -| `ActiveUix` attach | `app.prefs`, `app.langs`, `app.dom` | `app.format`, app event engine, `portal` | ninguno para servicios requeridos | falta `langs` o `dom` en app | +| `ActiveUix` attach | `ActiveApp` core + services `langs`, `dom` | `app.format`, app event engine, `portal` | ninguno para servicios requeridos | falta `langs` o `dom` en app | | `SomaRuntime` | `dom` desde `ActiveUix` | event engine, `langs`, `format` | ninguno propio | morfo/event/part inexistente | | `Sema` desde `ActiveUix` | `dom/projector` inyectado por `ActiveUix` | `sound`, `haptic` | ninguno propio de servicios UIX | por definir para uso directo fuera de `ActiveUix` | | `Eidos` | `dom` si `applyDom` | `langs`, `format`, `prefs`, mode/density sources | `applyDom:false` permite render/serializar sin DOM | falta `dom` con `applyDom` activo |