euv-ui 0.51.0

Cross-platform UI component library and 17-scheme design system for the euv framework with pixel-consistent rendering across Web, Android, iOS, iPadOS, macOS, Windows, and Linux.
Documentation
use super::*;

/// Default inline viewport height in logical pixels when no explicit `style` height override is provided.
pub const VIEWPORT3D_DEFAULT_HEIGHT: f32 = 380.0;

/// Default collapsible Blender Studio inspector rail width in logical pixels.
pub const VIEWPORT3D_INSPECTOR_WIDTH: f32 = 276.0;

/// Default Blender Live-Link SSE endpoint displayed in the Studio Live-Link inspector tab (port `9877`).
pub const VIEWPORT3D_DEFAULT_LIVE_LINK_URL: &str = "http://127.0.0.1:9877/blender/events";

/// Default vertical field of view in degrees for `EuvViewport3DCameraState`.
pub const VIEWPORT3D_DEFAULT_FOV_DEG: f32 = 50.0;

/// Default orbit distance in meters for `EuvViewport3DCameraState`.
pub const VIEWPORT3D_DEFAULT_DISTANCE: f32 = 6.5;

/// Default orbit horizontal yaw angle in radians.
pub const VIEWPORT3D_DEFAULT_YAW_RAD: f32 = FRAC_PI_4;

/// Default orbit vertical pitch angle in radians (slightly elevated studio angle).
pub const VIEWPORT3D_DEFAULT_PITCH_RAD: f32 = -0.42;

/// Minimum clamped pitch angle in radians preventing gimbal-flip past zenith/nadir.
pub(crate) const VIEWPORT3D_PITCH_MIN: f32 = -1.42;

/// Maximum clamped pitch angle in radians preventing gimbal-flip past zenith/nadir.
pub(crate) const VIEWPORT3D_PITCH_MAX: f32 = 1.42;

/// Minimum allowed camera orbit distance in meters.
pub(crate) const VIEWPORT3D_DIST_MIN: f32 = 0.6;

/// Maximum allowed camera orbit distance in meters.
pub(crate) const VIEWPORT3D_DIST_MAX: f32 = 240.0;

/// Default orbit angular sensitivity in radians per logical pixel dragged.
pub(crate) const VIEWPORT3D_DEFAULT_ORBIT_SENS: f32 = 0.0085;

/// Default pan translation sensitivity multiplier scaled by current orbit distance.
pub(crate) const VIEWPORT3D_DEFAULT_PAN_SENS: f32 = 0.0018;

/// Default scroll zoom sensitivity factor per wheel delta unit.
pub(crate) const VIEWPORT3D_DEFAULT_ZOOM_SENS: f32 = 0.0016;

/// Default keyboard WASD/Arrow movement step in meters per key press.
pub(crate) const VIEWPORT3D_DEFAULT_MOVE_SPEED: f32 = 0.45;

/// Default camera near clipping plane in meters.
pub(crate) const VIEWPORT3D_DEFAULT_NEAR: f32 = 0.1;

/// Default camera far clipping plane in meters.
pub(crate) const VIEWPORT3D_DEFAULT_FAR: f32 = 600.0;

/// Floating icon-only fullscreen toggle button size in logical pixels (`32x32`).
pub(crate) const VIEWPORT3D_FS_BTN_SIZE: f32 = 32.0;

/// Vector icon glyph size inside viewport chrome buttons.
pub(crate) const VIEWPORT3D_ICON_SIZE: f32 = 14.0;

/// Half-extent in meters of the fallback studio reference ground grid.
pub(crate) const VIEWPORT3D_GRID_HALF_LINES: i32 = 6;

/// World-space spacing in meters between fallback studio reference ground grid lines.
pub(crate) const VIEWPORT3D_GRID_STEP: f32 = 1.0;

/// Overlay stack identifier for `EuvViewport3D` fullscreen portals.
pub(crate) const VIEWPORT3D_OVERLAY_NAME: &str = "euv_viewport3d_fullscreen";

/// Accessible label for entering 3D viewport fullscreen mode.
pub(crate) const VIEWPORT3D_A11Y_ENTER_FS: &str = "Enter fullscreen 3D viewport";

/// Accessible label for exiting 3D viewport fullscreen mode.
pub(crate) const VIEWPORT3D_A11Y_EXIT_FS: &str = "Exit fullscreen 3D viewport";

/// Accessible label for toggling the collapsible Studio inspector rail.
pub(crate) const VIEWPORT3D_A11Y_TOGGLE_INSPECTOR: &str = "Toggle 3D studio inspector";

/// Default accessible title for an `EuvViewport3D` canvas.
pub(crate) const VIEWPORT3D_DEFAULT_TITLE: &str = "3D Viewport";

/// Test ID attached to the interactive 3D viewport canvas surface.
pub(crate) const VIEWPORT3D_TEST_ID_CANVAS: &str = "euv-viewport3d-canvas";

/// Test ID attached to the single floating fullscreen toggle button.
pub(crate) const VIEWPORT3D_TEST_ID_FS_BTN: &str = "euv-viewport3d-fullscreen-btn";

/// Test ID attached to the collapsible Studio inspector rail.
pub(crate) const VIEWPORT3D_TEST_ID_INSPECTOR: &str = "euv-viewport3d-inspector";

/// Tab label for the Scene hierarchy inspector pane.
pub(crate) const VIEWPORT3D_TAB_SCENE: &str = "Scene";

/// Tab label for the Principled BSDF Materials inspector pane.
pub(crate) const VIEWPORT3D_TAB_MATERIALS: &str = "Materials";

/// Tab label for the Camera controls inspector pane.
pub(crate) const VIEWPORT3D_TAB_CAMERA: &str = "Camera";

/// Tab label for the Blender Live-Link inspector pane.
pub(crate) const VIEWPORT3D_TAB_LIVE_LINK: &str = "Live-Link";

/// Studio inspector rail heading text.
pub(crate) const VIEWPORT3D_INSPECTOR_HEADING: &str = "Studio Inspector";

/// Studio inspector collapse button label.
pub(crate) const VIEWPORT3D_BTN_HIDE: &str = "Hide";

/// Studio inspector expand button label.
pub(crate) const VIEWPORT3D_BTN_INSPECT: &str = "Inspector";

/// Camera preset button label resetting to default three-quarter studio view.
pub(crate) const VIEWPORT3D_CAM_RESET: &str = "Reset";

/// Camera preset button label aligning to top-down view.
pub(crate) const VIEWPORT3D_CAM_TOP: &str = "Top";

/// Camera preset button label aligning to front elevation view.
pub(crate) const VIEWPORT3D_CAM_FRONT: &str = "Front";

/// Camera preset button label aligning to side elevation view.
pub(crate) const VIEWPORT3D_CAM_SIDE: &str = "Side";

/// Live-Link action label when currently disconnected.
pub(crate) const VIEWPORT3D_LINK_CONNECT: &str = "Connect Live-Link";

/// Live-Link action label when currently connected or syncing.
pub(crate) const VIEWPORT3D_LINK_DISCONNECT: &str = "Disconnect Live-Link";

/// Material adjustment button label decreasing roughness.
pub(crate) const VIEWPORT3D_MAT_ROUGH_DEC: &str = "Rough -";

/// Material adjustment button label increasing roughness.
pub(crate) const VIEWPORT3D_MAT_ROUGH_INC: &str = "Rough +";

/// Material adjustment button label decreasing metallic factor.
pub(crate) const VIEWPORT3D_MAT_METAL_DEC: &str = "Metal -";

/// Material adjustment button label increasing metallic factor.
pub(crate) const VIEWPORT3D_MAT_METAL_INC: &str = "Metal +";

/// Empty-state message shown in the Scene tab when no scene summary is attached.
pub(crate) const VIEWPORT3D_EMPTY_SCENE: &str = "No Blender or glTF scene attached yet.";

/// Empty-state message shown in the Materials tab when no Principled BSDF materials exist.
pub(crate) const VIEWPORT3D_EMPTY_MATERIALS: &str = "No Principled BSDF materials loaded.";

/// Live-Link status label for `Disconnected`.
pub(crate) const VIEWPORT3D_STATUS_DISCONNECTED: &str = "Disconnected";

/// Live-Link status label for `Connecting`.
pub(crate) const VIEWPORT3D_STATUS_CONNECTING: &str = "Connecting";

/// Live-Link status label for `Connected`.
pub(crate) const VIEWPORT3D_STATUS_CONNECTED: &str = "Connected";

/// Live-Link status label for `Syncing`.
pub(crate) const VIEWPORT3D_STATUS_SYNCING: &str = "Syncing";

/// Live-Link status label for `Error`.
pub(crate) const VIEWPORT3D_STATUS_ERROR: &str = "Error";