The active catalogs of an Express format, compiler or decompiler, with a schema helper for each, and the lookups they share.
The catalogs must be non-empty, have distinct ids and target one
protocol version; several catalogs need v1.0 or later, where each
component and function call carries its own catalogId. With one
catalog, a surface is bound to it and nothing in Express names it.
With several, a surface has no catalog: a name is looked up across the
catalogs, and one that several catalogs define needs a catalogId.
Summary
Functions
Whether helper's catalog defines a component or function.
The ids of the catalogs that define a component or function, in catalog order.
The first catalog's helper.
The helper of the catalog with id catalog_id, or nil.
Checks catalogs and builds their helpers for version (default: the
catalogs' protocol version). A version must be on the catalogs'
release line (v0.9 and v0.9.1 are one line).
The id of the only catalog, or nil when there are several.
Whether the protocol version is at least v1.0, where components and
calls carry their own catalogId.
Types
@type kind() :: :component | :function
Whether a name is a component or a function.
@type t() :: %A2UIAgent.Express.Catalogs{ catalogs: [A2UICore.Catalog.t()], helpers: [A2UIAgent.Express.SchemaHelper.t()], version: String.t() }
Functions
@spec defines?(A2UIAgent.Express.SchemaHelper.t(), kind(), String.t()) :: boolean()
Whether helper's catalog defines a component or function.
The ids of the catalogs that define a component or function, in catalog order.
@spec first_helper(t()) :: A2UIAgent.Express.SchemaHelper.t()
The first catalog's helper.
@spec helper(t(), term()) :: A2UIAgent.Express.SchemaHelper.t() | nil
The helper of the catalog with id catalog_id, or nil.
@spec new([A2UICore.Catalog.t()], String.t() | nil) :: {:ok, t()} | {:error, A2UICore.Error.t()}
Checks catalogs and builds their helpers for version (default: the
catalogs' protocol version). A version must be on the catalogs'
release line (v0.9 and v0.9.1 are one line).
The id of the only catalog, or nil when there are several.
Whether the protocol version is at least v1.0, where components and
calls carry their own catalogId.