termosaic 0.3.0

Semantic, structured output for human, machine-text, and opaque-byte destinations
Documentation
//! Semantic console output for human, machine-text, and opaque-byte destinations.
//!
//! `termosaic` owns presentation policy and output safety. Applications provide
//! semantic tokens and explicit destination capabilities; the crate never installs
//! process-global color, theme, progress, stdout, or stderr state.
//! The complete Laidout layout kernel is available through [`laidout`].

pub mod attr;
pub mod background;
mod components;
mod console_api;
pub mod formatters;
mod layout;
mod render;
pub mod semantic;
mod styled;
mod table;
mod text;
mod theme;
mod token;

#[cfg(feature = "progress")]
mod progress;

/// The complete Laidout prepared-document layout engine.
///
/// This crate re-export preserves Laidout's namespace and exposes all of its
/// public modules, types, functions, and feature-gated APIs without flattening
/// names that Termosaic also defines.
pub use laidout;

pub use attr::{AttrSet, AttrValue, StyleAttr, StyleAttrError};
pub use background::Background;
pub use components::{
    ComponentError, Diagnostic, DiagnosticLevel, List, ListKind, Pair, PairKind, PairLayout,
};
pub use console_api::{
    ColorChoice, ColorDepth, Console, ConsoleError, ConsoleOptions, DestinationOptions,
    HumanExactCapacity, HumanFastCapacity, HumanLayoutError, HumanLayoutOptions,
    HumanRenderCapacity, HumanRenderError, HumanReserveError, HumanSolveCounter,
    HumanVisitCapacity, HumanWorkspaceResource, HumanWriter, LayoutStrategy, MachineOutputError,
    MachineTextWriter, OpaqueWriter, OutputClass, Span, StdioDestinationOptions, StdioOptions,
    Stream, TerminalCapabilities, TerminalColorPolicy,
};
pub use layout::{
    Doc, HumanCostComponent, HumanPrepareError, HumanPreparedResource, PreparedDoc, TextLayout,
};
pub use styled::{StyledLine, StyledRenderWorkspace, StyledRun};
pub use table::{
    Alignment, Cell, FixedColumn, FixedTable, FixedTableOptions, Overflow, TableError,
};
pub use text::{HumanText, MachineText, TextSafetyError};
pub use theme::{
    AnsiColor, Color, ResolvedColor, StyleValue, Theme, ThemeBuilder, ThemeCatalog,
    ThemeCatalogBuilder, ThemeCatalogError, ThemeError, ThemeName, ThemeRule, TokenStyle, themes,
};
pub use token::{TokenAncestors, TokenId, TokenIdError, tokens};

#[cfg(feature = "adaptive-tables")]
pub use table::{AdaptiveColumn, AdaptiveTable};

#[cfg(feature = "json")]
pub use console_api::{JsonOutputError, JsonSerializeError, JsonStyle};

#[cfg(feature = "json")]
pub use formatters::json::{JsonFormatError, Pretty as PrettyJson};

#[cfg(feature = "progress")]
pub use progress::{ProgressHandle, ProgressOptions};