# `PhiaUiDesign.Catalog.Introspector`
[🔗](https://github.com/charlenopires/PhiaUI/blob/v0.1.17/lib/phiaui_design/catalog/introspector.ex#L1)

Introspects Phoenix component modules to extract attrs, slots, and metadata.

Uses Phoenix.Component's `__components__/0` callback which returns component
function metadata at runtime — always up-to-date, no stale JSON risk.

# `attr_info`

```elixir
@type attr_info() :: %{
  name: atom(),
  type: atom(),
  required: boolean(),
  default: term(),
  values: [term()] | nil,
  doc: String.t() | nil
}
```

# `component_info`

```elixir
@type component_info() :: %{
  name: atom(),
  module: module(),
  attrs: [attr_info()],
  slots: [slot_info()],
  doc: String.t() | nil
}
```

# `slot_info`

```elixir
@type slot_info() :: %{name: atom(), required: boolean(), doc: String.t() | nil}
```

# `get_component_info`

```elixir
@spec get_component_info(atom()) :: map() | nil
```

Get component info by registry key (atom).

# `introspect_all`

```elixir
@spec introspect_all() :: [map()]
```

Introspect ALL registered PhiaUI components by combining the registry
with runtime module introspection.

# `introspect_component`

```elixir
@spec introspect_component(module(), atom()) :: component_info() | nil
```

Introspect a specific component function from a module.

# `introspect_module`

```elixir
@spec introspect_module(module()) :: [component_info()]
```

Introspect a single Phoenix component module.

Returns a list of component definitions with their attrs and slots.
Uses `__components__/0` which Phoenix.Component exposes on compiled modules.

---

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