Expand description
Feature-gated widget modules (includes primitives for backward compatibility).
Modules§
- file_
system_ tree file-system-tree - File system tree widget for ratatui.
- hotkey_
footer hotkey-footer - Hotkey footer widget for ratatui.
- markdown_
preview markdown-preview - Markdown rendering widget for ratatui applications.
- theme_
picker theme-picker - Theme picker widget for ratatui.
Structs§
- Attrs
- Cache
State - Cache state for markdown rendering.
- Cell
- Represents a single terminal cell.
- Code
Block Colors - Colors for a code block theme
- Collapse
State - Collapse state for markdown sections.
- Color
Mapping - Color mapping for light/dark modes.
- Color
Palette - Color palette for mapping named colors to RGB values.
- Custom
Scrollbar - Custom scrollbar widget for markdown navigation.
- Dialog
- Dialog
State - Dialog
Widget - Display
Settings - Display settings for markdown rendering.
- Double
Click State - State for tracking double-click detection with deferred single-click handling.
- Expandable
Entry - State for a single expandable content entry. State for a single expandable content entry.
- Expandable
State - Expandable state for markdown content.
- File
System Entry - File
System Tree - File
System Tree Config - File
System Tree Node - File
System Tree State - GitStats
- Git statistics for display in statusline.
- GitStats
State - Git stats state for markdown source files.
- Grid
- Hotkey
Footer - Hotkey
Item - Margin
- Markdown
Double Click Event - Event returned when a line is double-clicked in the markdown widget.
- Markdown
Element - A single markdown element that can be rendered to ratatui.
- Markdown
State - Unified state for the markdown widget.
- Markdown
Style - Configuration for markdown rendering styles.
- Markdown
Theme markdown-preview - Constructor functions for
MarkdownTheme. Methods forMarkdownTheme. Markdown theme configuration struct. - Markdown
Widget - A scrollable, interactive markdown widget.
- MenuBar
- Menu
Item - Node
State - State information for rendering a node.
- Pane
- A styled panel component with title, icon, padding, and optional footer
- Pane
Info - Information about a pane for external access.
- Pane
Layout - A computed rectangle for a pane.
- Parsed
Cache - Cache for parsed markdown (doesn’t depend on width).
- Parser
- A parser for terminal output which produces an in-memory representation of the terminal contents.
- Pos
- Rect
- Render
Cache - Cache for rendered markdown lines (depends on width).
- Render
Options - Render options for markdown elements
- Resizable
Grid - A grid-based layout for arranging multiple resizable panes.
- Resizable
Grid Widget - A widget that wraps ResizableGrid with mouse interaction support.
- Resizable
Grid Widget State - State for ResizableGridWidget interactions.
- Screen
- Represents the overall terminal state.
- Screen
Differ - Scroll
State - Scroll state for markdown rendering.
- Scrollbar
Config - Configuration for scrollbar appearance.
- Selection
Pos - Position in the rendered text (visual coordinates). Position in the rendered text (visual coordinates).
- Selection
State - Selection state for markdown widget.
- Size
- Source
State - Source state for markdown content management.
- Split
Areas - Panel areas returned from split calculation.
- Split
Divider Layout - Metadata describing a split divider within a layout.
- Status
Line Stacked - Statusline with stacked indicators on the left and right side.
- Styled
Status Line - Builder for creating a styled statusline that looks like rat-salsa’s menu_status2.
- Syntax
Highlighter - Syntax highlighting for code blocks using syntect.
- Theme
Colors - Theme
Picker - Theme
Picker State - Theme
Picker State Snapshot - Toast
- A single toast notification
- Toast
Manager - Manages multiple toast notifications
- Toc
- Table of Contents widget for markdown navigation.
- TocConfig
- Configuration for TOC appearance.
- TocEntry
- Table of Contents entry. A single entry in the Table of Contents.
- TocState
- State for the Table of Contents sidebar.
- Tree
KeyBindings - Configurable keybindings for tree navigation
- Tree
Navigator - Tree navigator with configurable keybindings.
- Tree
Node - A node in the tree.
- Tree
View - Tree view widget.
- Tree
View Ref - Tree view widget that borrows nodes instead of owning them.
- Tree
View State - Tree view state for StatefulWidget pattern.
- VimState
- Vim keybinding state.
Enums§
- Border
Type - Checkbox
State - Element enums and segment types. Checkbox state for task lists. Checkbox state for task lists.
- Code
Block Border Kind - Kind of code block border.
- Code
Block Theme - Code block color theme
- Color
- Represents a foreground or background color for cells.
- Column
Alignment - Column alignment for table cells. Represents the alignment of a table column.
- Cursor
Style - Dialog
Type - Element
Kind - Represents the kind of markdown element.
- Markdown
Event - Events emitted by the markdown widget. Events that can be emitted by the markdown widget.
- Markdown
Source - Represents the source of markdown content.
- Markdown
Widget Mode - Mode enum for the markdown widget statusline. Mode for the markdown widget statusline.
- Mouse
Protocol Mode - The xterm mouse handling mode currently in use.
- Operational
Mode - Operational mode for styled statusline
- Split
Axis - Axis for splitting panes.
- Syntax
Theme Variant - Theme variant for syntax highlighting. Theme variant for syntax highlighting.
- Table
Border Kind - Kind of table border.
- Text
Segment - Text segment types for markdown styling.
- Theme
Picker Event - Theme
Variant - Theme variant selection enum.
- Toast
Level - Toast notification level
- VtEvent
- Widget
Event - Common events emitted by interactive widgets.
Constants§
- BLOCKQUOTE_
MARKER - Blockquote marker (matching render-markdown.nvim).
- BUILTIN_
THEMES - BULLET_
MARKERS - Bullet markers that cycle by nesting level (matching render-markdown.nvim).
- CHECKBOX_
CHECKED - CHECKBOX_
TODO - CHECKBOX_
UNCHECKED - Checkbox icons (matching render-markdown.nvim).
- DEFAULT_
TOAST_ DURATION - Default toast display duration (3 seconds).
- HEADING_
ICONS - Heading icons by level (matching render-markdown.nvim).
- HORIZONTAL_
RULE_ CHAR - Horizontal rule character.
- SLANT_
BL_ TR - PowerLine block cut at the diagonal (bottom-left to top-right). Requires a Nerd Font or PowerLine font.
- SLANT_
TL_ BR - PowerLine block cut at the diagonal (top-left to bottom-right). Requires a Nerd Font or PowerLine font.
Traits§
Functions§
- display_
width - get_
effective_ theme_ variant - Function to resolve the effective theme variant. Get the effective color scheme based on variant and terminal detection.
- get_
visible_ paths - Gets all visible paths (flattened tree with expansion state).
- get_
visible_ paths_ filtered - Returns visible paths filtered by a matcher function.
- handle_
click - Handle click event at the given position.
- handle_
mouse_ event - Handle mouse event for the markdown widget.
- handle_
mouse_ event_ with_ double_ click - Handle mouse event with double-click detection.
- load_
theme_ from_ json - Function to load a markdown theme from JSON. Load a markdown theme from JSON string.
- matches_
filter - Checks if a node name matches the filter (case-insensitive contains).
- render_
element - Render a markdown element to ratatui Line with given width.
- render_
element_ with_ options - Render a markdown element with options.
- render_
markdown - Render markdown string to ratatui Text with default styling
- render_
markdown_ to_ elements - Render markdown content to markdown elements.
- render_
markdown_ with_ style - Render markdown string to ratatui Text with custom style configuration
- render_
screen - render_
toasts - should_
render_ line - Check if a line should be rendered based on collapse state. Check if a markdown element should be rendered based on collapse state.
- write_
screen_ diff
Type Aliases§
- Node
Filter Fn - Type alias for node filter function.
- Node
Render Fn - Type alias for node render function to reduce complexity.
- Node
Render RefFn - Type alias for node render function that borrows data (for TreeViewRef).
- PaneId
- Identifier for panes managed by a
SplitLayoutorResizableGrid.