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::checkbox::Checkbox;
36pub use components::form::{Form, FormField, FormFieldKind, FormMessage};
37pub use components::gallery::{Gallery, GalleryMessage};
38pub use components::layout::Layout;
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::text_field::TextField;
48
49pub use components::{Component, Cursor, Event, PickerMessage, ViewContext, merge, wrap_selection};
50pub use diffs::diff_types::{DiffLine, DiffPreview, DiffTag, SplitDiffCell, SplitDiffRow};
51pub use focus::{FocusOutcome, FocusRing};
52pub use rendering::frame::Frame;
53pub use rendering::line::Line;
54pub use rendering::style::Style;
55pub use theme::{Theme, ThemeBuildError};
56
57pub use rendering::renderer::{Renderer, RendererCommand};
59
60pub use crossterm::event::Event as CrosstermEvent;
62pub use runtime::terminal::terminal_size;
63pub use runtime::{MouseCapture, TerminalSession, spawn_terminal_event_task};
64
65pub use rendering::soft_wrap::{display_width_text, pad_text_to_width, soft_wrap_line, truncate_line, truncate_text};
67
68pub use rendering::span::Span;
70
71#[cfg(feature = "syntax")]
73pub use markdown::render_markdown;
74
75#[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 GUTTER_WIDTH, SEPARATOR, SEPARATOR_WIDTH, blank_panel as split_blank_panel, render_cell as split_render_cell,
84};
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;