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 theme;
12
13#[cfg(feature = "syntax")]
15mod syntax_highlighting;
16
17#[cfg(feature = "syntax")]
18pub(crate) mod markdown;
19
20#[cfg(all(feature = "picker", feature = "testing"))]
21pub mod test_picker;
22
23#[cfg(feature = "picker")]
24pub(crate) mod combobox;
25
26#[cfg(feature = "picker")]
27pub(crate) mod fuzzy_matcher;
28
29pub(crate) mod runtime;
30
31#[cfg(feature = "testing")]
32pub mod testing;
33
34pub use components::bordered_text_field::BorderedTextField;
36pub use components::checkbox::Checkbox;
37pub use components::form::{Form, FormField, FormFieldKind, FormMessage};
38pub use components::gallery::{Gallery, GalleryMessage};
39pub use components::multi_select::MultiSelect;
40pub use components::number_field::NumberField;
41pub use components::panel::{BORDER_H_PAD, Panel};
42pub use components::radio_select::RadioSelect;
43pub use components::select_list::{SelectItem, SelectList, SelectListMessage};
44pub use components::select_option::SelectOption;
45pub use components::spinner::{BRAILLE_FRAMES, Spinner};
46pub use components::split_panel::{Either, SplitLayout, SplitPanel, SplitWidths};
47pub use components::stepper::{StepVisualState, Stepper, StepperItem};
48pub use components::text_field::TextField;
49
50pub use components::{Component, Cursor, Event, PickerMessage, ViewContext, merge, wrap_selection};
51pub use diffs::diff_types::{DiffLine, DiffPreview, DiffTag, SplitDiffCell, SplitDiffRow};
52pub use focus::{FocusOutcome, FocusRing};
53pub use rendering::frame::{FitOptions, Frame, FramePart, Overflow};
54pub use rendering::line::Line;
55pub use rendering::render_context::{Insets, Size};
56pub use rendering::style::Style;
57pub use theme::{Theme, ThemeBuildError};
58
59pub use rendering::renderer::{Renderer, RendererCommand};
61
62pub use crossterm::event::Event as CrosstermEvent;
64pub use runtime::terminal::terminal_size;
65pub use runtime::{MouseCapture, TerminalConfig, TerminalRuntime, TerminalSession};
66
67pub use rendering::soft_wrap::{display_width_text, pad_text_to_width, soft_wrap_line, truncate_line, truncate_text};
69
70pub use rendering::span::Span;
72
73#[cfg(feature = "syntax")]
75pub use markdown::render_markdown;
76
77#[cfg(feature = "syntax")]
79pub use diffs::diff::highlight_diff;
80
81#[cfg(feature = "syntax")]
82pub use diffs::split_diff::render_diff;
83#[cfg(feature = "syntax")]
84pub use diffs::split_diff::{GUTTER_WIDTH, SEPARATOR, SEPARATOR_WIDTH, render_cell as split_render_cell};
85
86#[cfg(feature = "syntax")]
87pub use syntax_highlighting::SyntaxHighlighter;
88
89#[cfg(feature = "picker")]
90pub use combobox::{Combobox, PickerKey, classify_key};
91#[cfg(feature = "picker")]
92pub use fuzzy_matcher::Searchable;
93
94#[cfg(feature = "picker")]
95pub use fuzzy_matcher::FuzzyMatcher;
96
97pub use crossterm::event::{KeyCode, KeyEvent, KeyEventKind, KeyEventState, KeyModifiers, MouseEvent, MouseEventKind};
99pub use crossterm::style::Color;