MingaEditor.State.Prompt (Minga v0.1.0)

Copy Markdown View Source

Groups prompt-related fields from EditorState.

Tracks the current prompt handler, input text, cursor position, and label. Used by MingaEditor.PromptUI for text input prompts.

Summary

Functions

Returns true if a prompt is currently open.

Types

t()

@type t() :: %MingaEditor.State.Prompt{
  context: map() | nil,
  cursor: non_neg_integer(),
  handler: module() | nil,
  label: String.t(),
  text: String.t()
}

Functions

open?(prompt)

@spec open?(t()) :: boolean()

Returns true if a prompt is currently open.