1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! 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.
/// Element configuration structs consumed by layout integrations.
/// Path-based generic image wrappers used by image configs.
/// Render command structs consumed by renderer integrations.