One node of a block document (ADR-0001).
A block is {type, id, config, slots}, plus the type_version axis
decision 4 adds - and nothing else (decision 2). No field is added for
layout, selection, collapse state, validation results, generated SCXML,
or a provenance map: every one of those is a function of the document
plus a block-type registry, and this layer stores none of them.
Summary
Types
Owned and interpreted by the block type; opaque to this layer.
Document-unique, stable, never reused. "blk_" <> uxid.
Any value expressible in canonical JSON. Note: no floats.
Namespaced block-type name, e.g. "core.branch", "myapp.authorize".
Functions
Builds a block of the given type.
Types
Owned and interpreted by the block type; opaque to this layer.
@type id() :: String.t()
Document-unique, stable, never reused. "blk_" <> uxid.
@type json() :: nil | boolean() | integer() | String.t() | [json()] | %{optional(String.t()) => json()}
Any value expressible in canonical JSON. Note: no floats.
@type slot_name() :: String.t()
@type type_name() :: String.t()
Namespaced block-type name, e.g. "core.branch", "myapp.authorize".
Functions
Builds a block of the given type.
Options: :id (default a freshly minted StatifierBlocks.Id.block/0),
:type_version (default 1), :config (default %{}), :slots
(default %{}).