docs(barcode): la trampa de `MorfoElement`, y el registro de diferidos al día

Dos huecos que dejó el trabajo del componente.

- **`morfo.md` no decía que el vocabulario `MorfoElement` vive DUPLICADO**: la
  unión de TypeScript en `types.ts` y la lista de literales del validador sium
  en `schema.ts`. Añadir solo la unión compila limpio y revienta en runtime, y
  `npm run check` no lo ve — lo caza `morfo:check`, o simplemente montar el
  componente. Entra como pitfall con el error literal que escupe y el incidente
  que lo destapó (`'text'`, para la interpretación legible del Barcode).
- **El §10 del registro de diferidos se escribió ANTES del perfil ISBN** y ya no
  decía la verdad: listaba como pendiente un trabajo que se envió el mismo día.
  Ahora separa lo enviado (el perfil de entrada sobre EAN-13, con su razón de
  no ser una simbología) de lo que sigue diferido, y deja escrita junto al
  add-on EAN-5 la restricción dura de la hyphenación: no se calcula desde el
  número, necesita las tablas de rangos de la International ISBN Agency — dato
  versionado con fecha de caducidad que una librería de cero dependencias no
  puede tragarse. El string con guiones lo trae el consumidor.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
alpha-0.1-sec-dom
dev 2 months ago
parent ae7e3462e5
commit 59aa41a132

@ -853,6 +853,15 @@ attrs.trigger; // typed as 'data-dialog-trigger'
Every morfo in the codebase use the `as const satisfies Morfo` form. This is mandatory, not stylistic.
**Adding a `defaultElement` to only ONE of its two lists.** The `MorfoElement` vocabulary is declared **twice**: the TypeScript union in [`types.ts`](../../src/uix/morfo/types.ts) and the `literal(...)` list of the sium validator in [`schema.ts`](../../src/uix/morfo/schema.ts). Extending only the union **compiles clean** and then throws at runtime:
```
morfo::invariant: [morfo] Part at path {kebab} failed shape validation:
[sium] validation failed with 1 issue(s)
```
`npm run check` does not catch it — the validation is runtime. `npm run morfo:check` (or simply mounting the component) does. Touch both lists in the same edit. Incident 2026-07-29: `'text'` was added for Barcode's human-readable interpretation and the demo threw on mount with a green typecheck.
**Duplicate kebab in the tree.** `item` in one part and `item` in another = error. Rename one.
**`stateRef` without declaring `states[]`.** If a part emits `aria-expanded` via `v.stateRef('open')`, the part **must** declare `states: ['open', ...]`. Otherwise the validator throws.

@ -222,16 +222,32 @@ dispositions in
[`eidos/components/barcode/README.md`](../src/uix/eidos/components/barcode/README.md)
§Gaps). v1 covers the Retail + Logistics set — Code 128 (A/B/C auto), EAN-13/8,
UPC-A/E, Code 39, ITF/ITF-14 — from their published ISO standards, in the
zero-dependency `$libs/barcode` encoder. Four dispositions were signed as
**diferir**, each a self-contained follow-up over the same encoder:
zero-dependency `$libs/barcode` encoder.
**Shipped the same day, out of this registry: the ISBN input profile.** An ISBN
barcode IS an EAN-13 (ISO 2108, Bookland 978/979), so it entered as a profile
over `ean13` — separators tolerated in the numeric symbologies, ISBN-10 read and
converted after validating its own base-11 check digit — and explicitly NOT as a
ninth `symbology` value, which would make `data-symbology` claim a standard that
does not exist. The doctrine is recorded in the component README §ISBN.
Four dispositions stay **diferir**, each a self-contained follow-up over the
same encoder:
- **Codabar · MSI · Pharmacode** — the niche tail JsBarcode still ships. Pure
table work: each is a symbology module + its vectors.
- **GS1-128 (FNC1 + Application Identifier parsing)** — a *profile* of Code 128,
not a new encoder: the FNC1 code value plus an AI grammar so the HRI can print
the bracketed form. The natural pair for a logistics-facing app.
- **EAN-2 / EAN-5 add-ons** — the periodical / book supplements; they extend the
EAN geometry rather than replacing it.
the bracketed form. The natural pair for a logistics-facing app, and the same
shape the ISBN profile already established.
- **EAN-2 / EAN-5 add-ons + the upper `ISBN 978-…` line** — the periodical /
book supplements and the book-cover convention; they extend the EAN geometry
(a second text band, a composed add-on symbol) rather than replacing it. Hard
constraint recorded with them: **we do not hyphenate**. The hyphen positions
are not computable from the number — they need the International ISBN
Agency's prefix-range tables, versioned data with an expiry date, which is a
maintenance clock a zero-dependency library must not swallow. The hyphenated
string comes from the consumer's catalogue.
- **2D — DataMatrix · PDF417 · Aztec** — explicitly NOT this component: each is a
whole different encoder (own Reed–Solomon, matrix layout). They belong beside
`QrCode` as their own components, sharing the display-primitive shape.

Loading…
Cancel
Save

Powered by TurnKey Linux.