function

NewBlockRegistry

NewBlockRegistry snapshots and binds a finite registry of centrally declared blocks. Forward references are supported; cycles and duplicate declarations are configuration errors. Inline declarations within these definitions are interned like any other.

Arguments

ArgumentTypeDescription
blocks[]BlockThe blocks value.

Returns

The declared result.

(*BlockRegistry, error)

Full signature

Related types

  • Block

    Block is one discriminated layout allowed by a blocks field.

  • BlockRegistry

    BlockRegistry owns the block definitions of one configuration, one per slug. Blocks registered centrally and blocks declared inline in a Blocks field or an embedded tree case are the same kind of definition: binding interns every inline declaration by slug, so each definition is bound once and shared by all of its placements. Bound containers select their definitions by slug and do not grant a placement mutation rights over a shared definition.