Pure lifecycle owner for the navigation flash animation.
Summary
Functions
Returns whether a navigation flash is active.
Advances a matching generation, rejecting stale timer delivery.
Cancels the active flash value while retaining its generation.
Computes the current animation color.
Records a timer handle only for the current active generation.
Replaces the active flash and advances its monotonic generation.
Returns the animation interval used by the workflow.
Types
@type generation() :: non_neg_integer()
@type t() :: %MingaEditor.Shell.Traditional.NavFlash{ generation: generation(), line: non_neg_integer() | nil, max_steps: pos_integer(), step: non_neg_integer(), timer: reference() | nil }
Functions
Returns whether a navigation flash is active.
@spec advance(t(), generation()) :: {:continue, t()} | {:done, t()} | {:stale, t()}
Advances a matching generation, rejecting stale timer delivery.
Cancels the active flash value while retaining its generation.
@spec color_for_step(t(), non_neg_integer(), non_neg_integer()) :: non_neg_integer()
Computes the current animation color.
@spec record_timer(t(), generation(), reference()) :: t()
Records a timer handle only for the current active generation.
@spec replace(t(), non_neg_integer()) :: t()
Replaces the active flash and advances its monotonic generation.
@spec step_interval_ms() :: pos_integer()
Returns the animation interval used by the workflow.