use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::str::FromStr;
pub mod error_types;
pub mod future_views;
pub mod security;
pub use future_views::{HologramView, ParticleEmitter, StreamingText};
pub use error_types::CvkgError;
pub mod asset;
pub mod dependency;
pub mod error_boundary;
pub mod knowledge;
pub mod renderer;
pub mod undo;
pub mod virtual_list;
pub mod window;
pub use asset::{AssetKey, AssetState, DesignTokens, TokenValue};
pub use dependency::{DependencyGraph, FrameBudgetTracker, InputLatencyTracker, SubsystemBudget};
pub use error_boundary::{ComponentErrorState, ErrorBoundary};
pub use knowledge::{
AnnouncementPriority, AppState, KnowledgeFragment, KnowledgeId, LAYOUT_DIRTY, MemoryLayer,
SYSTEM_STATE, TemporalEdge, TemporalNode, UiFidelityLevel, begin_render_phase,
end_render_phase, fallback_runtime, get_system_state, is_rendering, load_system_state,
set_rendering, snapshot_system_state, update_system_state,
};
pub use undo::{UndoGroup, UndoManager};
pub use window::{Window, WindowCloseAction, WindowConfig, WindowHandle, WindowId, WindowLevel};
pub mod view;
pub use view::*;
pub mod aria;
pub use aria::*;
pub mod keyboard;
pub use keyboard::*;
pub mod focus;
pub use focus::*;
pub mod reduced_motion;
pub use reduced_motion::*;
pub mod erased_view;
pub use erased_view::*;
pub mod modifiers;
pub use modifiers::*;
pub mod render_base;
pub use render_base::*;
pub mod renderer_trait;
pub use renderer::*;
pub use renderer_trait::*;
pub mod accessibility;
pub use accessibility::*;
pub mod render_tier;
pub use render_tier::*;
pub mod mesh;
pub use mesh::*;
impl Default for Camera3D {
fn default() -> Self {
Self {
position: glam::Vec3::new(0.0, 0.0, 10.0),
target: glam::Vec3::ZERO,
up: glam::Vec3::Y,
fov_y: 45.0f32.to_radians(),
near: 0.1,
far: 1000.0,
perspective: true,
aspect: 16.0 / 9.0,
}
}
}
impl Camera3D {
pub fn view_matrix(&self) -> glam::Mat4 {
glam::Mat4::look_at_lh(self.position, self.target, self.up)
}
pub fn projection_matrix(&self) -> glam::Mat4 {
if self.perspective {
glam::Mat4::perspective_lh(self.fov_y, self.aspect, self.near, self.far)
} else {
let top = self.fov_y;
let right = top * self.aspect;
glam::Mat4::orthographic_lh(-right, right, -top, top, self.near, self.far)
}
}
pub fn view_projection(&self) -> glam::Mat4 {
self.projection_matrix() * self.view_matrix()
}
}
pub mod spring;
pub use spring::*;
pub mod frame_renderer;
pub use frame_renderer::*;
pub mod state;
pub use state::*;
pub mod env_core;
pub use env_core::*;
pub mod env;
pub use env::*;
pub mod geometry_modifiers;
#[allow(ambiguous_glob_reexports)]
pub use geometry_modifiers::*;
pub mod layout;
pub use layout::*;
pub mod agents;
pub mod animation;
pub mod gpu;
pub mod material;
pub mod runtime;
pub mod scene_graph;
pub mod sdf_shadow;
pub mod shadow;
pub use layout::{LayoutCache, LayoutKey, LayoutView, Rect, SizeProposal};
pub use material::DrawMaterial;
pub use scene_graph::{NodeId, bifrost_registry};
pub mod color;
pub mod data_table;
pub mod elevation;
pub mod form_validation;
pub mod responsive;
pub use color::SemanticColors;
pub mod event;
pub use event::*;
pub mod suspense;
pub use suspense::*;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RenderIntensityMode {
Normal,
Rage, Frenzy, GodMode, }
pub trait Seer: Send + Sync {
fn predict(&self, context: &str) -> String;
fn whispers(&self) -> Vec<String>;
}
pub mod theme;
pub use theme::{
ThemeContext, glassmorphism_enabled, set_current_theme, use_theme, use_theme_context,
};
pub mod hooks;
pub use hooks::*;
pub mod a11y_prefs;
pub use a11y_prefs::*;
pub mod clipboard;
pub use clipboard::*;
pub mod text_input;
pub use text_input::*;
pub mod notifications;
pub use notifications::*;
pub mod file_dialog;
pub use file_dialog::*;
pub mod document;
pub use document::*;
pub mod menu;
pub use menu::*;
pub mod localization;
pub use localization::*;
pub mod system_theme;
pub use system_theme::*;
pub mod audio_haptic;
pub use audio_haptic::{
AudioEngine, HapticEngine, HapticIntensity, NullAudioEngine, NullHapticEngine, haptic_error,
haptic_impact, haptic_selection, haptic_success, play_sound, set_audio_engine,
set_haptic_engine, sounds,
};
pub mod parallax;
pub use parallax::{DisplayEnvironment, ParallaxModifier, PerformanceContract, Tier3Fallback};
pub mod identity;
pub use identity::*;
pub mod simple_geom;
pub use simple_geom::*;
pub mod dirty_flags;
pub use dirty_flags::*;
pub mod dirty_region;
pub use dirty_region::*;
pub mod virtual_window;
pub use virtual_window::*;
pub mod testing;