# `MingaEditor.Frontend.Capabilities`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/frontend/capabilities.ex#L1)

Frontend capabilities reported during the ready handshake.

When a frontend starts, it sends a `ready` event with optional capability
fields. The BEAM uses these to adapt rendering strategy: skipping image
commands on terminals without image support, using native floating windows
on GUIs, using native floating windows, etc.

Frontends that send the short 5-byte `ready` format get `default/0` caps
(TUI, RGB, wcwidth, no images, emulated floats, monospace).

# `color_depth`

```elixir
@type color_depth() :: :mono | :color_256 | :rgb
```

# `float_support`

```elixir
@type float_support() :: :emulated | :native
```

# `frontend_type`

```elixir
@type frontend_type() :: :tui | :native_gui | :web
```

# `image_support`

```elixir
@type image_support() :: :none | :kitty | :sixel | :native
```

# `t`

```elixir
@type t() :: %MingaEditor.Frontend.Capabilities{
  color_depth: color_depth(),
  float_support: float_support(),
  frontend_type: frontend_type(),
  image_support: image_support(),
  unicode_width: unicode_width()
}
```

# `unicode_width`

```elixir
@type unicode_width() :: :wcwidth | :unicode_15
```

# `default`

```elixir
@spec default() :: t()
```

Returns the default capabilities (TUI with full RGB, monospace).

# `from_binary`

```elixir
@spec from_binary(binary()) :: t()
```

Decodes capability fields from the binary payload (6 bytes).

# `gui?`

```elixir
@spec gui?(t()) :: boolean()
```

Returns true if the frontend is a native GUI (not a terminal).

# `images?`

```elixir
@spec images?(t()) :: boolean()
```

Returns true if the frontend supports inline images (kitty, sixel, or native).

# `native_floats?`

```elixir
@spec native_floats?(t()) :: boolean()
```

Returns true if the frontend supports native floating windows (not emulated overlays).

# `rgb?`

```elixir
@spec rgb?(t()) :: boolean()
```

Returns true if the frontend supports full 24-bit RGB color.

---

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