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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
//! # Tessera UI Framework
//!
//! Tessera is a declarative, immediate-mode UI framework for Rust that emphasizes performance,
//! flexibility, and extensibility through a functional approach and pluggable shader system.
//!
//! ## Architecture Overview
//!
//! Tessera's architecture is built around several core concepts:
//!
//! - **Declarative Components**: UI components are defined as functions with the `#[tessera]` macro
//! - **Immediate Mode**: The UI is rebuilt every frame, ensuring consistency and simplicity
//! - **Pluggable Shaders**: Custom WGPU shaders are first-class citizens for advanced visual effects
//! - **Parallel Processing**: Core operations like measurement utilize parallel computation
//! - **Explicit State Management**: Components are stateless with explicit state passing
//!
//! ## Getting Started by Developer Level
//!
//! ### 🟢 **Beginner Users** - Building Basic Applications
//!
//! If you're new to Tessera and want to build applications using existing components:
//!
//! **Start with these modules:**
//! - [`renderer`] - Core renderer and application lifecycle management
//! - [`Dp`], [`Px`] - Basic measurement units for layouts
//! - [`Color`] - Color system for styling components
//!
//! **Key concepts to understand:**
//! - How to set up a [`Renderer`] and run your application
//! - Using [`tessera-ui-basic-components`](https://docs.rs/tessera-ui-basic-components/latest/tessera_ui_basic_components/) for common UI elements
//! - Basic layout with `row`, `column`, and `surface` components
//!
//! ### 🟡 **Intermediate Users** - Custom Layout and Interaction
//!
//! For developers who want to create custom components and handle complex layouts:
//!
//! **Essential functions and types:**
//! - [`measure_node`] - Measure child component sizes with constraints
//! - [`place_node`] - Position child components in the layout
//! - [`InputHandlerFn`] - Handle user interactions and state changes
//! - [`Constraint`], [`DimensionValue`] - Layout constraint system
//! - [`ComputedData`] - Return computed size and layout information
//!
//! **Key concepts:**
//! - Understanding the measurement and placement phase
//! - Creating custom layout algorithms
//! - Managing component state through explicit input handlers
//! - Working with the constraint-based layout system
//!
//! ```
//! use tessera_ui::{measure_node, place_node, ComputedData, Constraint, PxPosition, tessera};
//!
//! #[tessera]
//! fn custom_layout(child: impl FnOnce()) {
//! child();
//!
//! measure(Box::new(|input| {
//! // Custom measurement logic here
//! # Ok(ComputedData::ZERO) // Make doc tests happy
//! }));
//!
//! input_handler(Box::new(|input| {
//! // Handle user interactions here
//! }));
//! }
//! ```
//!
//! ### 🔴 **Advanced Users** - Custom Rendering Pipelines
//!
//! For developers building custom visual effects and rendering pipelines:
//!
//! **Advanced rendering modules:**
//!
//! - [`renderer::drawer`] - Custom drawable pipelines and draw commands
//! - [`renderer::compute`] - GPU compute pipelines for advanced effects
//! - [`DrawCommand`], [`ComputeCommand`] - Low-level rendering commands
//! - [`DrawablePipeline`], [`ComputablePipeline`] - Pipeline trait implementations
//! - [`PipelineRegistry`], [`ComputePipelineRegistry`] - Pipeline management
//!
//! **Key concepts:**
//!
//! - Creating custom WGPU shaders and pipelines
//! - Managing GPU resources and compute operations
//! - Understanding the rendering command system
//! - Implementing advanced visual effects like lighting, shadows, and particles
//!
//! ## Core Modules
//!
//! ### Essential Types and Functions
//!
//! - [`Renderer`] - Main application renderer and lifecycle manager
//! - [`measure_node`], [`place_node`] - Core layout functions
//! - [`Constraint`], [`DimensionValue`] - Layout constraint system
//! - [`Dp`], [`Px`] - Measurement units (device-independent and pixel units)
//! - [`Color`] - Color representation and utilities
//!
//! ### Component System
//!
//! - [`ComponentTree`] - Component tree management
//! - [`ComponentNode`] - Individual component node representation
//! - [`ComputedData`] - Layout computation results
//! - [`InputHandlerFn`] - State management and event handling
//!
//! ### Event Handling
//!
//! - [`CursorEvent`] - Mouse and touch input events
//! - [`Focus`] - Focus management system
//! - [`PressKeyEventType`] - Keyboard input handling
//!
//! ### Rendering System
//!
//! - [`renderer::drawer`] - Drawing pipeline system
//! - [`renderer::compute`] - Compute pipeline system
//! - [`DrawCommand`], [`ComputeCommand`] - Rendering commands
//!
//! ## Examples
//!
//! Check out the `example` crate in the workspace for comprehensive examples demonstrating:
//! - Basic component usage
//! - Custom layouts and interactions
//! - Advanced shader effects
//! - Cross-platform deployment (Windows, Linux, macOS, Android)
//!
//! ## Performance Considerations
//!
//! Tessera is designed for high performance through:
//! - Parallel measurement computation using Rayon
//! - Efficient GPU utilization through custom shaders
//! - Minimal allocations in hot paths
//! - Optimized component tree traversal
pub
pub use accesskit;
pub use ;
pub use tessera;
pub use wgpu;
pub use winit;
pub use crate::;
use ImeState;
pub use shard;
pub use tessera_ui_shard;