package miaou-core

  1. Overview
  2. Docs
Miaou core/widgets (no drivers, no SDL)

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.5.2.tar.gz
md5=60a3b9f181f24572a06a9492532bfdda
sha512=fcc35a275066be2900e6201782faf47503076fa4640f08cf78067835a6f447b74613009e55b2ac799adb7ca46f1bffa261fc5971753f2cc3c6bef327511c7ef6

doc/miaou-core.internals/Miaou_internals/Modal_utils/index.html

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.