//! Retained UI framework built on the engine's ECS.
//!
//! The UI lives in its own archetype (`world.ui`) parallel to the gameplay
//! archetype (`world.core`). Widgets are entities composed from `UI_LAYOUT_NODE`,
//! `UI_NODE_COLOR`, interaction components, and a per-widget data component
//! (`UI_BUTTON`, `UI_SLIDER`, etc.). The retained-UI sub-schedule
//! (`world.resources.schedules.retained_ui`) drives input sync, layout, theming,
//! and render sync each frame.
//!
//! Build UI trees with [`builder::UiTreeBuilder`], drive interaction by reading
//! the click and value helpers on `world`, and call [`testing::UiTestDriver`]
//! from integration tests to script input.
//!
//! See `docs/UI_TESTING.md` and the `retained_ui` and `widget_gallery` examples
//! for usage.

#[cfg(all(
    not(target_arch = "wasm32"),
    not(target_os = "android"),
    feature = "core"
))]
pub mod accessibility;
pub mod builder;
mod canvas_render;
pub mod color;
pub mod components;
pub mod gamepad_navigation;
pub mod icons;
pub mod layout_types;
pub mod picking;
pub mod render_sync;
pub mod resources;
pub mod scene;
pub mod scope;
pub mod state;
pub mod systems;
pub mod taffy_layout;
pub mod testing;
mod text_wrapping;
pub mod theme;
mod tile_render;
pub mod types;
pub mod units;
pub mod user_interface;
pub mod widget_systems;
pub mod widgets;

/// Maximum height for a dropdown/menu/context-menu popup before it stops
/// growing with its item count. Shared by every popup builder so long lists
/// clamp consistently instead of overflowing the viewport.
pub const MAX_POPUP_HEIGHT: f32 = 360.0;

pub use builder::*;
pub use components::*;
pub use layout_types::*;
pub use resources::*;
pub use scope::*;
pub use state::*;
pub use theme::*;
pub use types::*;
pub use units::*;
pub use user_interface::*;
pub use widgets::ContextMenuBuilder;
pub use widgets::TileBuilder;
