# `MingaEditor.Dashboard`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/dashboard.ex#L1)

Dashboard home screen renderer.

Renders the editor's landing page when no file buffers are open. Shows
an ASCII mountain range header, quick-action shortcuts, recent files,
and a version string. All content is horizontally centered.

This is a pure rendering module: it takes dimensions, theme, and state,
and returns a list of `DisplayList.draw()` tuples. No side effects.

# `command`

```elixir
@type command() :: atom() | {:open_file, String.t()}
```

Command dispatched when a dashboard item is selected.

# `item`

```elixir
@type item() :: %{label: String.t(), shortcut: String.t(), command: command()}
```

Dashboard item: an action the user can select.

# `state`

```elixir
@type state() :: %{cursor: non_neg_integer(), items: [item()]}
```

Dashboard state: cursor position and computed items.

# `cursor_down`

```elixir
@spec cursor_down(state()) :: state()
```

Moves the dashboard cursor down, wrapping at the bottom.

# `cursor_up`

```elixir
@spec cursor_up(state()) :: state()
```

Moves the dashboard cursor up, wrapping at the top.

# `new_state`

```elixir
@spec new_state([String.t()]) :: state()
```

Returns a fresh dashboard state with quick actions and recent files.

# `render`

```elixir
@spec render(pos_integer(), pos_integer(), MingaEditor.UI.Theme.t(), state()) :: [
  MingaEditor.DisplayList.draw()
]
```

Renders the dashboard as a list of display list draws.

Lays out the mountain range header, quick actions, recent files
heading, recent file entries, and a bottom-pinned version string, all
horizontally centered in the given `width` x `height` area.

# `selected_command`

```elixir
@spec selected_command(state()) :: command() | nil
```

Returns the command for the currently selected item, or nil if no items.

---

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