package miaou-core

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Miaou_internals.Modal_utilsSource

Sourceval wrap_content_to_width : string -> int -> string
Sourcetype modal_geometry = {
  1. left : int;
  2. max_width : int;
  3. content_width : int;
  4. max_height : int;
  5. max_content_h : int;
}

Modal geometry computed from terminal dimensions and UI hints.

Sourceval compute_modal_geometry : cols:int -> rows:int -> left_opt:int option -> max_width_opt:int option -> modal_geometry

Compute the geometry used by the modal renderer for a given terminal size.

Sourceval markdown_to_ansi : string -> string

Render a minimal subset of Markdown to ANSI-styled text suitable for the TUI. Supported features:

  • Headers: #, ##, ###
  • Unordered lists: lines starting with "- "
  • Ordered lists: "1. item"
  • Blockquotes: lines starting with ">"
  • Fenced code blocks: lines starting with "```"
  • Inline code: backticks, e.g., `code`
  • Bold/italic emphasis
  • Horizontal rules: "---"
  • Links: text(url)

Unknown constructs are left as plain text.

Sourceval center_content_to_width : string -> int -> string

Center each line of ANSI-styled content to the given visible width. ANSI escape sequences are preserved and not counted toward the width.

Sourceval wrap_content_to_width_words : string -> int -> string

Wrap content to a width preferring word boundaries (ANSI-safe). Falls back to character wrapping for words longer than the width.