module Jrsl

Defined in:

jrsl.cr

Constant Summary

VERSION = "0.3.0"

Class Method Summary

Class Method Detail

def self.calculate_image_max_height(md_rows : Int32, content_area_height : Int32, image_position : String, image_h_position : String) : Int32 #

Calculate available height for image based on markdown size and position


[View source]
def self.load_image(path : String) : CrImage::Image | Nil #

[View source]
def self.normalize_for_figlet(text : String) : String #

Normalize accented characters to ASCII for figlet


[View source]
def self.parse_slides(content : String) : Tuple(Array(Slide), PresentationMetadata) #

ameba:disable Metrics/CyclomaticComplexity


[View source]
def self.query_cell_size : Tuple(Int16, Int16) #

[View source]
def self.render_image_kitty(path : String, max_width : Int32, max_height : Int32) : Tuple(String, Int32, Int32) | Nil #

Render image using Kitty graphics protocol Returns the escape sequence string to display the image


[View source]
def self.render_image_to_string(path : String, max_width : Int32, max_height : Int32) : Tuple(String, Int32, Int32) | Nil #

Pre-render an image to a string before TUI initialization Uses half-block characters (▀) for 2x1 vertical resolution per cell Returns {rendered_string, line_count, width_in_chars} or nil if loading fails


[View source]
def self.render_markdown_to_element(markdown : String, max_width : Int32) : MarkdownElement #

Render markdown to a MarkdownElement with measured dimensions


[View source]