Immutable lifecycle value for hover content.
The value owns replacement, dismissal, focus, scrolling, expansion, and the optional open action. MingaEditor.HoverPopup.Presenter owns geometry.
Summary
Functions
Dismisses hover content.
Returns true when the popup can toggle to an expanded view.
Focuses the hover popup for scrolling.
Creates a lifecycle value from already parsed presentation content.
Creates hover content anchored at the cursor using pure markdown parsing.
Returns true when the popup exposes an Open action.
Returns a stable action name for native frontend metadata.
Replaces any prior popup value with newly produced hover content.
Scrolls content down by three lines.
Scrolls content up by three lines.
Toggles between collapsed and expanded content, resetting scroll.
Sets the action to execute when the popup's Open action is accepted.
Types
@type open_action() :: atom() | {:goto_location, String.t(), non_neg_integer(), non_neg_integer()} | {:open_session, String.t(), String.t() | nil}
Action available from a focused hover popup.
@type t() :: %MingaEditor.HoverPopup{ alt_content_lines: [MingaAgent.Markdown.parsed_line()] | nil, anchor_col: non_neg_integer(), anchor_row: non_neg_integer(), content_lines: [MingaAgent.Markdown.parsed_line()], expanded?: boolean(), focused: boolean(), open_action: open_action() | nil, scroll_offset: non_neg_integer() }
A hover popup lifecycle value.
Functions
@spec dismiss(t() | nil) :: nil
Dismisses hover content.
Returns true when the popup can toggle to an expanded view.
Focuses the hover popup for scrolling.
@spec from_parsed_lines( [MingaAgent.Markdown.parsed_line()], non_neg_integer(), non_neg_integer(), [MingaAgent.Markdown.parsed_line()] | nil ) :: t()
Creates a lifecycle value from already parsed presentation content.
@spec new(String.t(), non_neg_integer(), non_neg_integer(), keyword()) :: t()
Creates hover content anchored at the cursor using pure markdown parsing.
Returns true when the popup exposes an Open action.
@spec open_action_name(open_action() | nil) :: String.t()
Returns a stable action name for native frontend metadata.
Replaces any prior popup value with newly produced hover content.
Scrolls content down by three lines.
Scrolls content up by three lines.
Toggles between collapsed and expanded content, resetting scroll.
@spec with_open_action(t(), open_action()) :: t()
Sets the action to execute when the popup's Open action is accepted.