Raxol.UI.Components.Input.MultiLineInput.RenderHelper (Raxol v2.6.1)

View Source

Rendering helper functions for MultiLineInput component.

Emits modern element maps (%{type: :text, content: ..., style: ...}) so the prepare/layout pipeline accepts them. Each line is a single :view node whose children are the styled text segments for that line (cursor / selection splits).

Summary

Functions

Renders a single line with proper styling for cursor and selection.

Functions

render_line(line_index, line_content, state, theme)

@spec render_line(
  integer(),
  String.t(),
  Raxol.UI.Components.Input.MultiLineInput.t(),
  map()
) :: map()

Renders a single line with proper styling for cursor and selection.

Returns a %{type: :row, children: [...]} element (one row of text segments). :view stacks children at the same origin (overlay); :row lays them out left-to-right so cursor/selection splits stay on one line.