1#![doc = include_str!("../README.md")]
2
3pub(crate) mod components;
4pub(crate) mod diffs;
5pub(crate) mod focus;
6pub(crate) mod rendering;
7pub(crate) use rendering::line;
8pub(crate) use rendering::span;
9pub(crate) use rendering::style;
10pub(crate) mod terminal_codes;
11pub(crate) mod theme;
12
13#[cfg(feature = "syntax")]
14mod syntax_highlighting;
15
16#[cfg(feature = "syntax")]
17pub(crate) mod markdown;
18
19#[cfg(all(feature = "picker", feature = "testing"))]
20pub mod test_picker;
21
22#[cfg(feature = "picker")]
23pub(crate) mod combobox;
24
25#[cfg(feature = "picker")]
26pub(crate) mod fuzzy_matcher;
27
28pub(crate) mod runtime;
29
30#[cfg(feature = "testing")]
31pub mod testing;
32
33pub use components::bordered_text_field::BorderedTextField;
34pub use components::checkbox::Checkbox;
35pub use components::form::{Form, FormField, FormFieldKind, FormMessage};
36pub use components::gallery::{Gallery, GalleryMessage};
37pub use components::multi_select::MultiSelect;
38pub use components::number_field::NumberField;
39pub use components::panel::{BORDER_H_PAD, Panel};
40pub use components::radio_select::RadioSelect;
41pub use components::select_list::{SelectItem, SelectList, SelectListMessage};
42pub use components::select_option::SelectOption;
43pub use components::spinner::{BRAILLE_FRAMES, Spinner};
44pub use components::split_panel::{Either, SplitLayout, SplitPanel, SplitWidths};
45pub use components::stepper::{StepVisualState, Stepper, StepperItem};
46pub use components::text_field::TextField;
47
48pub use components::{Component, Cursor, Event, PickerMessage, ViewContext, merge, wrap_selection};
49pub use diffs::diff_types::{DiffLine, DiffPreview, DiffTag, SplitDiffEntry, SplitDiffRow};
50pub use focus::{FocusOutcome, FocusRing};
51pub use rendering::frame::{FitOptions, Frame, FramePart, Overflow};
52pub use rendering::gutter::{digit_count, wrap_with_gutter};
53pub use rendering::line::Line;
54pub use rendering::render_context::{Insets, Size};
55pub use rendering::style::Style;
56pub use theme::{Theme, ThemeBuildError};
57
58pub use rendering::renderer::{Renderer, RendererCommand};
59
60pub use crossterm::event::Event as CrosstermEvent;
61pub use runtime::terminal::terminal_size;
62pub use runtime::{MouseCapture, TerminalConfig, TerminalRuntime, TerminalSession};
63
64pub use rendering::soft_wrap::{
65 display_width_text, pad_text_to_width, soft_wrap_line, soft_wrap_text_position, truncate_line, truncate_text,
66};
67
68pub use rendering::span::Span;
69
70#[cfg(feature = "syntax")]
71pub use markdown::{
72 MarkdownBlock, MarkdownHeading, MarkdownRenderResult, SourceMappedLine, SourceMarkdownLine,
73 SourceMarkdownRenderResult, parse_markdown_headings, render_markdown_result, render_markdown_source_lines,
74};
75
76#[cfg(feature = "syntax")]
77pub use diffs::diff::highlight_diff;
78
79#[cfg(feature = "syntax")]
80pub use diffs::split_diff::render_diff;
81#[cfg(feature = "syntax")]
82pub use diffs::split_diff::{
83 GutterTint, MIN_GUTTER_WIDTH, MIN_SPLIT_WIDTH, SEPARATOR, SEPARATOR_WIDTH, Side as SplitDiffSide,
84 SplitLayoutDimensions, WRAP_MARKER, header_left_padding, render_entry as split_render_entry,
85 usize_to_u16_saturating,
86};
87
88#[cfg(feature = "syntax")]
89pub use syntax_highlighting::SyntaxHighlighter;
90
91#[cfg(feature = "picker")]
92pub use combobox::{Combobox, PickerKey, classify_key};
93#[cfg(feature = "picker")]
94pub use fuzzy_matcher::Searchable;
95
96#[cfg(feature = "picker")]
97pub use fuzzy_matcher::FuzzyMatcher;
98
99pub use crossterm::event::{
100 KeyCode, KeyEvent, KeyEventKind, KeyEventState, KeyModifiers, MouseButton, MouseEvent, MouseEventKind,
101};
102pub use crossterm::style::Color;