//! Reusable ratatui pane framework.
//!
//! `tui_pane` provides the keymap, status bar, and built-in panes
//! (Keymap, Settings, Toasts) that an application embeds via the
//! `AppContext` trait.

mod activity;
mod app_context;
mod bar;
mod constants;
mod copy;
mod diagnostics;
mod framework;
mod input;
mod keymap;
mod layout;
mod overlays;
mod pane;
mod settings_store;
mod theme;
mod toasts;
mod util;
mod watched_file;

// Crate-root re-exports. The `action_enum!` and `bindings!` macros
// reference these types via `$crate::*` paths, which requires them at
// the crate root. `tests/macro_use.rs` locks the path stability.
pub use activity::ACTIVITY_SPINNER;
pub use activity::Icon;
pub use app_context::AppContext;
pub use app_context::NoToastAction;
pub use bar::BarPalette;
pub use bar::BarRegion;
pub use bar::BarSlot;
pub use bar::ShortcutState;
pub use bar::StatusBar;
pub use bar::StatusLine;
pub use bar::StatusLineGlobal;
pub use bar::Visibility;
pub use bar::render as render_status_bar;
pub use bar::render_status_line;
pub use bar::status_line_global_spans;
pub use constants::BLOCK_BORDER_WIDTH;
pub use constants::BYTES_PER_GIB;
pub use constants::BYTES_PER_KIB;
pub use constants::BYTES_PER_MIB;
pub use constants::FRAME_POLL_MILLIS;
pub use constants::SECTION_HEADER_INDENT;
pub use constants::SECTION_ITEM_INDENT;
pub use copy::ClipboardBackend;
pub use copy::ClipboardError;
pub use copy::CopyLabel;
pub use copy::CopyOutcome;
pub use copy::CopyPayload;
pub use copy::CopySelection;
pub use copy::CopySelectionResult;
pub use copy::SystemClipboard;
pub use diagnostics::CPU_SMOOTHING_WINDOW_POLLS;
pub use diagnostics::CpuBreakdown;
pub use diagnostics::CpuCoreUsage;
pub use diagnostics::CpuMonitor;
pub use diagnostics::CpuPoller;
pub use diagnostics::CpuSeverity;
pub use diagnostics::CpuUsage;
pub use diagnostics::PERF_LOG_TARGET;
pub use diagnostics::RollingMean;
pub use diagnostics::SLOW_BG_BATCH_MS;
pub use diagnostics::SLOW_FRAME_MS;
pub use diagnostics::SLOW_INPUT_EVENT_MS;
pub use diagnostics::blank_bar_color as cpu_blank_bar_color;
pub use diagnostics::filled_cells as cpu_filled_cells;
pub use diagnostics::init as init_perf_log;
pub use diagnostics::ms as perf_log_ms;
pub use diagnostics::severity as cpu_severity;
pub(crate) use framework::CycleDirection;
pub use framework::Framework;
pub use framework::FrameworkHit;
pub use framework::HitTestRegistry;
pub use framework::Hittable;
pub use framework::InputContext;
pub use framework::ListNavigation;
pub use framework::ModalHit;
pub use framework::PaneRegistry;
pub use framework::Renderable;
pub use framework::TabStop;
pub use framework::clear_all_hover;
pub use framework::dispatch_hit_test;
pub use framework::focus_next;
pub use framework::focus_prev;
pub use framework::render_panes;
pub use input::dispatch_focused_toasts;
pub use input::event_label;
pub use input::last_mouse_pos;
pub use input::matches_open_overlay_toggle;
pub use input::overlay_is_in_text_mode;
pub use input::record_mouse_pos;
pub use input::set_last_mouse_pos_for_test;
pub use keymap::Action;
pub use keymap::Bindings;
pub use keymap::Configuring;
pub use keymap::GlobalAction;
pub use keymap::GlobalShortcutRow;
pub use keymap::Globals;
pub use keymap::KeyBind;
pub use keymap::KeyOutcome;
pub(crate) use keymap::KeyParseError;
pub use keymap::KeySequence;
pub use keymap::Keymap;
pub use keymap::KeymapBuilder;
pub use keymap::KeymapError;
pub use keymap::KeymapHelpRow;
pub use keymap::NavAction;
pub use keymap::Navigation;
pub use keymap::ScopeMap;
pub use keymap::Shortcuts;
pub use keymap::VimMode;
pub use layout::ColumnSpec;
pub use layout::ColumnWidths;
pub use layout::PaneAxisSize;
pub use layout::PaneGridLayout;
pub use layout::PanePlacement;
pub use layout::PaneSizeSpec;
pub use layout::Placed;
pub use layout::Region;
pub use layout::ResolvedPane;
pub use layout::ResolvedPaneLayout;
pub use layout::Size;
pub use layout::Viewport;
pub use layout::ViewportOverflow;
pub use layout::constraints_for_sizes;
pub use layout::keep_visible_scroll_offset;
pub use layout::render_overflow_affordance;
pub use overlays::GlobalShortcutsPane;
pub use overlays::KEYMAP_POPUP_MAX_HEIGHT;
pub use overlays::KeymapCaptureCommand;
pub use overlays::KeymapOverlayInputs;
pub use overlays::KeymapPane;
pub use overlays::KeymapUiContext;
pub use overlays::OverlayAction;
pub use overlays::SettingsCommand;
pub use overlays::SettingsPane;
pub use overlays::SettingsRenderOptions;
pub use pane::FocusedPane;
pub use pane::FrameworkFocusId;
pub use pane::FrameworkOverlayId;
pub use pane::Mode;
pub use pane::Pane;
pub use pane::PaneChrome;
pub use pane::PaneFocusState;
pub use pane::PaneRule;
pub use pane::PaneSelectionState;
pub use pane::PaneTitleCount;
pub use pane::PaneTitleGroup;
pub use pane::PopupFrame;
pub use pane::RenderFocus;
pub use pane::RuleTitle;
pub use pane::default_pane_chrome;
pub use pane::empty_pane_block;
pub use pane::pane_title;
pub use pane::prefixed_pane_title;
pub use pane::render_horizontal_rule;
pub use pane::render_rules;
pub use pane::selection_state;
pub use pane::selection_state_for;
pub use pane::selection_style;
pub use settings_store::LoadedSettings;
pub use settings_store::SettingCodecs;
pub use settings_store::SettingsError;
pub use settings_store::SettingsFileSpec;
pub use settings_store::SettingsRegistry;
pub use settings_store::SettingsRow;
pub(crate) use settings_store::SettingsRowKind;
pub(crate) use settings_store::SettingsRowPayload;
pub use settings_store::SettingsSection;
pub use settings_store::SettingsStore;
pub use settings_store::read_array;
pub use settings_store::read_bool;
pub use settings_store::read_float;
pub use settings_store::read_int;
pub use settings_store::read_string;
pub use settings_store::write_value;
pub use theme::Appearance;
pub use theme::AppearanceMode;
pub use theme::BUILTIN_DARK_NAME;
pub use theme::BUILTIN_HC_DARK_NAME;
pub use theme::BUILTIN_HC_LIGHT_NAME;
pub use theme::BUILTIN_LIGHT_NAME;
pub use theme::DiskUsageTheme;
pub use theme::FinderTheme;
pub use theme::FocusTheme;
pub use theme::Modifiers;
pub use theme::PaneChromeTheme;
pub use theme::RegisterOutcome;
pub use theme::RegistryStatus;
pub use theme::ResolvedTheme;
pub use theme::SemanticTheme;
pub use theme::StatusTheme;
pub use theme::StyleSpec;
pub use theme::TextTheme;
pub use theme::Theme;
pub use theme::ThemeFamily;
pub use theme::ThemeId;
pub use theme::ThemeLoadError;
pub use theme::ThemeRegistry;
pub use theme::ThemeRuntime;
pub use theme::ThemeState;
pub use theme::ThemeVariant;
pub use theme::ThemeVariantFile;
pub use theme::ThemesWatch;
pub use theme::accent_color;
pub use theme::active_border_color;
pub use theme::active_focus_color;
pub use theme::default_dark;
pub use theme::default_light;
pub use theme::ensure_theme_state_installed;
pub use theme::error_color;
pub use theme::finder_match_bg;
pub use theme::focused_pane_tint_enabled;
pub use theme::high_contrast_dark;
pub use theme::high_contrast_light;
pub use theme::hover_focus_color;
pub use theme::inactive_border_color;
pub use theme::inactive_title_color;
pub use theme::inline_error_color;
pub use theme::install_theme_state;
pub use theme::label_color;
pub use theme::registry;
pub use theme::remembered_focus_color;
pub use theme::replace_registry;
pub use theme::role_color;
pub use theme::role_spec;
pub use theme::role_style;
pub use theme::secondary_text_color;
pub use theme::set_active_theme;
pub use theme::set_focused_pane_tint;
pub use theme::spawn_appearance_poller;
pub use theme::status_bar_color;
pub use theme::success_color;
pub use theme::text_default;
pub use theme::theme;
pub use theme::title_color;
pub use theme::warning_color;
pub use toasts::ColoredToastId;
pub use toasts::ReactivateOutcome;
pub use toasts::RunningTracker;
pub use toasts::ToastCommand;
pub use toasts::ToastDuration;
pub use toasts::ToastHit;
pub use toasts::ToastId;
pub(crate) use toasts::ToastPlacement;
pub use toasts::ToastSettings;
pub use toasts::ToastStyle;
pub use toasts::ToastTaskId;
pub use toasts::Toasts;
pub use toasts::ToastsRenderCtx;
pub use toasts::TrackedItem;
pub use toasts::TrackedItemKey;
pub use toasts::format_toast_items;
pub use toasts::toast_body_width;
pub use util::format_progressive;
pub use watched_file::WatchedFile;
