# `Athanor.Registry`
[🔗](https://github.com/Arsenalist/athanor/blob/v0.1.0-beta.7/lib/athanor/registry.ex#L1)

Open registry mapping a node's `type` string to its component module.

## Configuration

    config :athanor,
      components: [MyApp.Components.Foo, MyApp.Components.Bar],
      fallback_resolver: {MyApp.LegacyResolver, :resolve_type}

`:components` is a list of modules that implement `Athanor.Component`.
Lookup matches `node["type"]` against each module's `metadata().type`.

`:fallback_resolver` is an optional `{module, function}` tuple. When a
type is not found in `:components`, the resolver is called as
`module.function(type_string)` and may return a module or `nil`. This
lets a consumer app keep its existing component dispatch wired in
during a gradual migration.

Both keys are read at call time via `Application.get_env/2`, so test
setup can swap them per scenario.

# `all`

Return the configured list of component modules.

# `components_metadata`

Return a flat list of `metadata/0` maps for every registered Athanor
component. Convenient for editor palettes and similar UI surfaces that
want to iterate components by display info.

# `lookup`

Return the module registered for `type`, or `nil`.

# `metadata_for`

Return the metadata for the module registered for `type`, or `nil`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
