Skip to main content

gitkraft_core/
lib.rs

1//! GitKraft Core
2//!
3//! Shared, framework-free logic reused by both the Iced GUI and Ratatui TUI.
4//!
5//! | Module | What lives here |
6//! |--------|-----------------|
7//! | [`features`] | Git operations and types grouped by feature — repo, branches, commits, diff, staging, remotes, stash, log |
8//! | [`utils`] | Helpers — relative time formatting, OID formatting, text truncation |
9//!
10//! This crate has NO GUI or TUI dependencies.
11
12pub mod features;
13pub mod utils;
14
15// Convenience re-exports
16pub use features::branches::{BranchInfo, BranchType};
17pub use features::commits::CommitInfo;
18pub use features::commits::{CommitAction, CommitActionKind, COMMIT_MENU_GROUPS};
19pub use features::diff::{
20    blame_file, BlameLine, DiffFileEntry, DiffHunk, DiffInfo, DiffLine, FileStatus,
21    StatusColorCategory,
22};
23pub use features::editor::{open_file_default, show_in_folder, Editor, EDITOR_NAMES};
24pub use features::graph::{GraphEdge, GraphRow};
25pub use features::log::file_history;
26pub use features::persistence::{AppSettings, LayoutSettings, RepoHistoryEntry};
27pub use features::remotes::RemoteInfo;
28pub use features::repo::{delete_file, load_repo_snapshot, RepoInfo, RepoSnapshot, RepoState};
29pub use features::stash::StashEntry;
30pub use features::theme::{
31    theme_by_index, theme_index_by_name, AppTheme, Rgb, THEME_COUNT, THEME_NAMES,
32};
33pub use utils::ascending_range;
34pub use utils::short_oid_str;
35pub use utils::text::truncate_str;