Specification and validation of a single node or mark attribute.
An attribute spec declares a default value, whether the attribute is required, and an optional validator. Validators are declarative terms rather than closures so that a schema stays inspectable and comparable.
Supported validators:
:string,:integer,:boolean— type checks{:one_of, list}— value must be a member oflist:safe_url— relative URL, or absolute URL with an allowed scheme{:nullable, validator}— acceptsnil, otherwise delegates- a
fun/1returning:okor{:error, message}— escape hatch