# `MingaEditor.RenderModel.UI.ConfigStateBuilder`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/render_model/ui/config_state_builder.ex#L1)

Converts the wire-shaped native settings map into the semantic
`Minga.RenderModel.UI.ConfigState` snapshot emitted in-frame (#2119).

The snapshot is rarely-changing (it only moves when a settings option changes),
so the editor caches it on `MingaEditor.State` and rebuilds it on option change
via `MingaEditor.refresh_gui_config_state/1`. The render pipeline reads the
cached snapshot each frame; the adapter encoder fingerprints it so an unchanged
snapshot emits no bytes, and a keyframe re-emits it for free.

This builder stays free of `MingaEditor.Frontend.Protocol.GUI`: the caller
(which lives outside `lib/minga_editor/render_model/`) projects the config and
keymap servers into the wire map and passes it here for the struct conversion.

# `wire`

```elixir
@type wire() :: %{
  options: %{required(atom()) =&gt; term()},
  theme_previews: [Minga.RenderModel.UI.ConfigState.theme_preview()],
  keybindings: [Minga.RenderModel.UI.ConfigState.keybinding()]
}
```

Wire-shaped settings map (as produced by the config/keymap projection).

# `from_wire`

```elixir
@spec from_wire(wire()) :: Minga.RenderModel.UI.ConfigState.t()
```

Converts a wire-shaped settings map into the semantic struct.

Options become an ordered `{name_string, value}` list, preserving the source
map's enumeration order so the encoded bytes stay identical to the legacy push.

---

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