One config field, its schema and its current value (ADR-0005 decision 9).
key is the field's identity - the DOM id, the form param name, and
what a {:config, id, key} finding anchors to. value_path is where
the bytes live, and the two are the same place unless the block type
said otherwise (ADR-0002 decision 7, amended 2026-08-27). nil means
it did not; read it through value_path/1 rather than the struct
field, and the two cases collapse into one path.
hidden? and readonly? are the block type's rendering claims about
the field (ADR-0002 decision 7, amended 2026-09-07), carried here so a
host draws its own surface from the same two booleans the package's own
form reads rather than re-deriving them from a block type module. Both
default to false.
Summary
Functions
Where this field's value lives, defaulting to [key].
Types
@type t() :: %StatifierBlocks.ViewModel.Field{ default: StatifierBlocks.Block.json(), findings: [StatifierBlocks.Finding.t()], hidden?: boolean(), key: String.t(), label: String.t(), readonly?: boolean(), required?: boolean(), type: StatifierBlocks.BlockType.field_type(), value: StatifierBlocks.Block.json(), value_path: StatifierBlocks.BlockType.value_path() | nil }
Functions
@spec value_path(t()) :: StatifierBlocks.BlockType.value_path()
Where this field's value lives, defaulting to [key].