# `MingaEditor.Shell.Traditional.NavFlash`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/shell/traditional/nav_flash.ex#L1)

Pure lifecycle owner for the navigation flash animation.

# `generation`

```elixir
@type generation() :: non_neg_integer()
```

# `t`

```elixir
@type t() :: %MingaEditor.Shell.Traditional.NavFlash{
  generation: generation(),
  line: non_neg_integer() | nil,
  max_steps: pos_integer(),
  step: non_neg_integer(),
  timer: reference() | nil
}
```

# `active?`

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

Returns whether a navigation flash is active.

# `advance`

```elixir
@spec advance(t(), generation()) :: {:continue, t()} | {:done, t()} | {:stale, t()}
```

Advances a matching generation, rejecting stale timer delivery.

# `cancel`

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

Cancels the active flash value while retaining its generation.

# `color_for_step`

```elixir
@spec color_for_step(t(), non_neg_integer(), non_neg_integer()) :: non_neg_integer()
```

Computes the current animation color.

# `record_timer`

```elixir
@spec record_timer(t(), generation(), reference()) :: t()
```

Records a timer handle only for the current active generation.

# `replace`

```elixir
@spec replace(t(), non_neg_integer()) :: t()
```

Replaces the active flash and advances its monotonic generation.

# `step_interval_ms`

```elixir
@spec step_interval_ms() :: pos_integer()
```

Returns the animation interval used by the workflow.

---

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