@bimetal/forms-data
Forms-domain event sourcing — Form-as-Schema-Aggregate: a form definition
(ordered fields, kinds, labels, per-kind validation rules) is ONE aggregate.
Filling a form is deliberately not a domain fact. Values are transient and
live in @bimetal/forms-headless; only the schema is event-sourced. The
schema's validateField/validateForm are the single validation source, shared
by the renderer so a binding can never invent its own rules.
Installation
npm install @bimetal/forms-data
What's Inside
- Commands —
AddField, UpdateField, RemoveField, MoveField, …
formAggregate — invariants: field-key uniqueness, no dangling
visibleWhen/requiredWhen references after a removal.
formProjection / createFormStore — the read model and its facade.
Built on @bimetal/event-sourcing.