Skip to main content

termgrid_core/
lib.rs

1//! termgrid-core
2//!
3//! A deterministic, terminal-like grid rendering core built around two ideas:
4//!
5//! 1. **Producers emit structured draw ops**, not raw ANSI.
6//! 2. **Glyph display width is a policy**, captured in a render profile (registry), not a guess.
7//!
8//! This crate purposely stays small and unopinionated about IPC and higher-level
9//! engine semantics.
10
11pub mod ansi;
12pub mod damage;
13pub mod grid;
14pub mod ops;
15pub mod registry;
16pub mod render;
17pub mod search;
18pub mod style;
19pub mod text;
20
21pub use damage::{Damage, Rect};
22pub use grid::{Cell, Grid};
23pub use ops::{BlitCell, BoxCharset, Frame, RenderOp, TruncateMode};
24pub use registry::{GlyphInfo, GlyphRegistry, RenderProfile};
25pub use render::{RenderError, Renderer};
26pub use search::{
27    fuzzy_match_positions_graphemes, fuzzy_match_positions_graphemes_latest,
28    fuzzy_match_positions_graphemes_v1, match_positions_graphemes,
29};
30pub use style::Style;
31pub use text::{
32    apply_highlight, clip_to_cells_spans, clip_to_cells_text, ellipsis_to_cells_spans,
33    ellipsis_to_cells_text, measure_cells_spans, measure_cells_text, normalize_spans,
34    spans_plain_text, wrap_spans_wordwise, Span, Spans, WrapOpts,
35};