cotis-defaults 0.1.0-alpha.1

Modular Rust UI framework core
Documentation
//! Default data types shared across Cotis integrations.
//!
//! This crate provides concrete element config structs and render command structs
//! used by layout managers and renderers in the Cotis ecosystem.
//!
//! Typical data flow:
//! 1. Build an [`element_configs::ElementConfig`].
//! 2. The layout crate consumes that config and produces layout output.
//! 3. A pipe maps layout output to [`render_commands`] values.
//! 4. A renderer draws those commands.
//!
//! `cotis-defaults` depends on `cotis-utils` for shared primitives such as
//! `BoundingBox`, `Vector2`, and renderer context traits.
//!
//! # Features
//!
//! - `serialization`: enables serde support for configs/commands and also enables
//!   `cotis/serialization` and `cotis-utils/serialization`.
//! - `complex_color`: enables layered/gradient color support through
//!   [`colors::ColorLayer`] for backgrounds in style and commands.
//! - `complex_colored_text`: extends `complex_color` to text color fields.
//! - `child_wrapping`: adds `LayoutStyle::child_wrapping` (currently experimental;
//!   not fully wired in all layout integrations).
//!
//! # Text and fonts (evolving API)
//!
//! Text config, font IDs, and measuring wiring are functional today but planned
//! for refactoring. Treat text/font/measuring integration points as subject to
//! change across minor versions until that refactor lands.
//!
//! # Quick start
//!
//! ```rust,ignore
//! use cotis_defaults::element_configs::ElementConfig;
//! use cotis_defaults::element_configs::style::sizing::DoubleAxisSizing;
//!
//! // Usually consumed by cotis-layout and transformed into render commands by a pipe.
//! let config: ElementConfig<'_, DoubleAxisSizing, (), (), ()> = ElementConfig::default();
//! ```
/// Base color types, gradients and layered paints.
pub mod colors;
/// Element configuration structs consumed by layout integrations.
pub mod element_configs;
/// Path-based generic image wrappers used by image configs.
pub mod generic_image;
/// Render command structs consumed by renderer integrations.
pub mod render_commands;