diff --git a/src/uix/audit-codex-full-1.md b/src/uix/audit-codex-full-1.md index ef6f7e0de..c3687ba4b 100644 --- a/src/uix/audit-codex-full-1.md +++ b/src/uix/audit-codex-full-1.md @@ -357,7 +357,19 @@ Además durante Capa 2 + Capa 3 se aplicaron otros 56 events más en `semantic.verb`), soft-warns en name shape drift. Lint en 7 warns total — todos en `words.*` (track separado). -### 5. Picker-shell existe pero no esta cerrado como pieza de sistema +### 5. Picker-shell existe pero no esta cerrado como pieza de sistema — **RESUELTO 2026-05-26** + +**Cierre**: cerrado como **primitiva interna** per la propia recomendación del audit ("Si es interna, no deberia salir como demo publica ni Morfo publico incompleto"). Acciones: + +- Morfo movido de `src/uix/morfo/components/picker-shell.ts` → `src/uix/morfo/internal/picker-shell.ts`. El audit walk de `morfo/components/` ya no lo encuentra, evitando los reproches de "falta demo / texts.label / README público" que no aplican a una primitiva interna. +- README añadido en `src/uix/eidos/components/picker-shell/README.md` declarando explícitamente el status INTERNAL + diagrama de la composición (5 pickers re-exportan parts bajo su namespace). +- Verificado que clear/cancel/close usan `ActiveEidos.require()` (no `getActiveUix()` directo — el reproche del audit estaba desactualizado). +- El main barrel `src/uix/eidos/index.ts` NUNCA re-exportó `PickerShell`. Verificado. +- Zero imports rotos: `pickerShellMorfo` nunca fue importado en ningún sitio (era declaración placeholder). + +--- + + `picker-shell` aparece como componente Morfo/Eidos, pero el audit oficial indica: diff --git a/src/uix/eidos/components/picker-shell/README.md b/src/uix/eidos/components/picker-shell/README.md new file mode 100644 index 000000000..5752f614f --- /dev/null +++ b/src/uix/eidos/components/picker-shell/README.md @@ -0,0 +1,51 @@ +# PickerShell (INTERNAL primitive) + +**Status:** Internal layout primitive. **Not a public component.** + +PickerShell is the shared layout chrome used by the five composite pickers: + +- `DatePicker` +- `DateRangePicker` +- `TimePicker` +- `TimeRangePicker` +- `ColorPicker` + +Each of those re-exports the picker-shell parts under its own namespace, so apps write `` / `` / etc., never `` directly. The main `$uix/eidos` barrel intentionally does **not** export `PickerShell`. + +## Why internal + +- Zero standalone semantics — no events, no state, no morfo contract beyond a single Provider stub. +- All meaningful behaviour (Clear / Cancel / Close actions) flows through `pickerShellContext` registered by the host picker's provider in soma. +- The contract surface that matters for apps is each individual picker's namespace, not the shell. + +## What lives where + +- **Morfo declaration:** `src/uix/morfo/internal/picker-shell.ts` — outside `morfo/components/` so the component audit (which walks public components) does not flag it for the public-artefact ruleset (demo, `texts.label`, public README requirements). +- **Soma:** `src/uix/soma/components/picker-shell/` — the `PickerShellHandle` + context machinery the five pickers register against. +- **Eidos parts (this directory):** + - `picker-shell.svelte` — Root + - `picker-shell-header.svelte` — Header zone + - `picker-shell-body.svelte` — Body zone (where the picker's payload lives) + - `picker-shell-footer.svelte` — Footer (action row) + - `picker-shell-clear.svelte` — Clear action + - `picker-shell-cancel.svelte` — Cancel action + - `picker-shell-close.svelte` — Close action + +## Adding a new composite picker + +1. Soma provider registers a `PickerShellHandle` via `pickerShellContext`. +2. Eidos picker barrel re-exports the shell parts under its namespace: + +```ts +import Footer from '../picker-shell/picker-shell-footer.svelte'; +import Clear from '../picker-shell/picker-shell-clear.svelte'; +// … +MyPicker.Footer = Footer; +MyPicker.Clear = Clear; +``` + +3. Apps use `` / `` like any other picker. + +## Closes + +audit-codex-full-1.md P1 #5 — "picker-shell existe pero no esta cerrado como pieza de sistema". Closed as INTERNAL primitive per the audit's own recommendation: *"Si es interna, no deberia salir como demo publica ni Morfo publico incompleto."* diff --git a/src/uix/morfo/components/picker-shell.ts b/src/uix/morfo/components/picker-shell.ts deleted file mode 100644 index 4d68839e8..000000000 --- a/src/uix/morfo/components/picker-shell.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { Morfo } from '../types'; -import { v } from '../types'; - -/** - * PickerShell — composition shell that wraps composite-picker popover - * content (DatePicker, ColorPicker, TimeRangePicker, …). It is a pure - * layout primitive: header / body / footer zones + a Clear/Cancel/Close - * action row. No interactive state of its own — the host picker's - * provider registers a `PickerShellHandle` via `pickerShellContext` and - * the descendants (Clear/Cancel/Close) pull from there. - * - * Scope is `soma` only — no semantic events; the host picker emits - * `commit-*` / `shift-*` on its own provider. - */ -export const pickerShellMorfo = { - name: 'PickerShell', - kebab: 'picker-shell', - scope: ['soma'], - texts: {}, - events: [], - parts: [ - { - name: 'Provider', - kebab: 'provider', - archetype: 'provider', - kind: 'public', - defaultElement: 'div', - optional: false, - data: [], - aria: [] - } - ] -} as const satisfies Morfo; diff --git a/src/uix/morfo/internal/picker-shell.ts b/src/uix/morfo/internal/picker-shell.ts new file mode 100644 index 000000000..8165fa386 --- /dev/null +++ b/src/uix/morfo/internal/picker-shell.ts @@ -0,0 +1,47 @@ +import type { Morfo } from '../types'; + +/** + * PickerShell — INTERNAL layout primitive (not a public component). + * + * Composition shell that wraps composite-picker popover content + * (DatePicker, ColorPicker, TimeRangePicker, TimePicker, DateRangePicker). + * Pure layout: header / body / footer zones + a Clear/Cancel/Close action + * row. No interactive state of its own — the host picker's provider + * registers a `PickerShellHandle` via `pickerShellContext` and the + * descendants (Clear/Cancel/Close) pull from there. + * + * STATUS: INTERNAL primitive. Apps never write ``; they + * compose `` / `` etc., which are + * re-exports of the picker-shell parts under each composite picker's + * namespace (`src/uix/eidos/components/date-picker/index.ts` and the + * other four picker barrels). + * + * Lives under `src/uix/morfo/internal/` so the component audit (which + * walks `morfo/components/`) does not flag it for the usual public- + * component artefacts (demo, texts.label, README expectations). + * + * Scope is `soma` only — no semantic events; the host picker emits + * `commit-*` / `shift-*` on its own provider. No `expression` field + * because there is no morfo-emitted event to express. + * + * Closes audit-codex P1 #5 (picker-shell internal vs public). + */ +export const pickerShellMorfo = { + name: 'PickerShell', + kebab: 'picker-shell', + scope: ['soma'], + texts: {}, + events: [], + parts: [ + { + name: 'Provider', + kebab: 'provider', + archetype: 'provider', + kind: 'public', + defaultElement: 'div', + optional: false, + data: [], + aria: [] + } + ] +} as const satisfies Morfo;