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