Raxol. UI. Registry
(Raxol v2.7.0)
View Source
The authoritative list of Raxol's first-class UI components.
What this IS
One entry per component that is reachable as a declaration type -- an atom
the layout engine dispatches on, that Raxol.MCP.TreeWalker can derive agent
tools from, and that Raxol.Core.Accessibility.Projection can project into an
accessibility node. Each entry records the type atom, the implementing module,
a group (drawn from the Raxol.Playground.Catalog category vocabulary), which
of the two cross-cutting behaviours the module actually implements, and the
name of the Catalog demo that shows it off (nil where none exists yet).
What this IS NOT
It is not an index of every module under Raxol.UI.* -- there are ~94, and
most are internal sub-modules of a component (SelectList.Renderer,
Table.State) or non-declarative helpers with no type atom of their own. A
registry that listed them would be noise: nothing dispatches on them, so
nothing can drift from them.
It is also not the playground catalog. Raxol.Playground.Catalog is a list of
runnable examples (42 of them, keyed by demo module); several demos hand-roll
their subject with the View DSL, and several components here have no demo at
all. The :demo field is the join between the two, not a duplication.
Why the package-side maps still exist
Raxol.MCP.TreeWalker and Raxol.Core.Accessibility.Projection each carry
their own type -> module map. They live in raxol_mcp and raxol_core,
neither of which depends on main raxol, so they cannot read this module at
compile time -- they cannot even name a component module without a
@compile {:no_warn_undefined, ...} escape, and resolve modules at runtime
behind a function_exported?/3 guard. Deriving those maps from this registry
would invert the dependency direction of the umbrella.
The maps are therefore duplicated on purpose and kept honest by test:
Raxol.UI.RegistryConformanceTest runs in the main app (where every component
module is loaded) and fails when a map and this registry disagree, or when an
entry claims a behaviour its module does not implement.
Summary
Functions
Types whose Component implements Raxol.Core.Accessibility.Provider.
The entry for a declaration type, or nil.
Every registered component, in registration order (grouped by :group).
Types whose Component implements Raxol.MCP.ToolProvider.
The %{type => module} shape Raxol.MCP.TreeWalker and
Raxol.Core.Accessibility.Projection take as a :type_map override.
Every registered declaration type.
Types
Functions
@spec a11y_types() :: [atom()]
Types whose Component implements Raxol.Core.Accessibility.Provider.
The entry for a declaration type, or nil.
@spec list() :: [entry()]
Every registered component, in registration order (grouped by :group).
@spec mcp_types() :: [atom()]
Types whose Component implements Raxol.MCP.ToolProvider.
The %{type => module} shape Raxol.MCP.TreeWalker and
Raxol.Core.Accessibility.Projection take as a :type_map override.
@spec types() :: [atom()]
Every registered declaration type.