nightshade-api 0.53.0

Procedural high level API for the nightshade game engine
Documentation
//! Leptos (CSR) components for building the page around an engine viewport,
//! plus a general set of themed UI patterns: panels, forms, menus, tables,
//! trees, a command palette, keybindings, a code editor, toasts, a status bar,
//! drag and drop, and a resizable app shell, all driven from one set of CSS
//! custom properties.
//!
//! Enabled by the `leptos` cargo feature. The module is engine-free: it talks
//! to a render worker over the [`crate::wire`] messages, so a page crate can
//! depend on `nightshade-api` with `default-features = false` and
//! `features = ["leptos"]` without compiling the engine.
//!
//! Drop [`UiStyles`] and a [`ThemeProvider`] at the root, then compose
//! components. For a worker-backed render surface, create an [`Engine`] with
//! [`use_engine`] and render an [`EngineViewport`]; the worker side pairs with
//! [`crate::offscreen::run_offscreen`] behind the `offscreen` feature.
//!
//! ```ignore
//! use nightshade_api::web::prelude::*;
//!
//! #[component]
//! fn App() -> impl IntoView {
//!     let engine = use_engine("runtime/worker.js");
//!     view! {
//!         <UiStyles />
//!         <ThemeProvider>
//!             <WebGpuGate>
//!                 <EngineViewport engine=engine />
//!                 <Loader ready=engine.state.ready />
//!             </WebGpuGate>
//!         </ThemeProvider>
//!     }
//! }
//! ```

mod ansi_terminal;
mod asset_grid;
mod base;
mod browser;
mod chat;
mod code_editor;
mod code_surface;
mod command;
mod diff;
mod disclosure;
mod dock;
mod dynamic_form;
mod editor_shell;
mod engine;
mod files;
mod floating;
mod forms;
mod hud;
mod inspector;
mod jump;
mod keymap;
mod list_editor;
mod log_view;
mod markdown;
mod menus;
mod multi_editor;
mod palette;
mod pointer_drag;
mod search_list;
mod status_bar;
mod styles;
mod table;
mod terminal;
mod theme;
mod toolbar;
mod tree;
mod undo_tree;
mod util;
mod viewport;
mod virtual_list;
mod workspace;

pub use ansi_terminal::*;
pub use asset_grid::*;
pub use base::*;
pub use browser::*;
pub use chat::*;
pub use code_editor::*;
pub use code_surface::*;
pub use command::*;
pub use diff::*;
pub use disclosure::*;
pub use dock::*;
pub use dynamic_form::*;
pub use editor_shell::*;
pub use engine::*;
pub use files::*;
pub use floating::*;
pub use forms::*;
pub use hud::*;
pub use inspector::*;
pub use jump::*;
pub use keymap::*;
pub use list_editor::*;
pub use log_view::*;
pub use markdown::*;
pub use menus::*;
pub use multi_editor::*;
pub use palette::*;
pub use pointer_drag::*;
pub use search_list::*;
pub use status_bar::*;
pub use styles::{UiStyles, stylesheet};
pub use table::*;
pub use terminal::*;
pub use theme::*;
pub use toolbar::*;
pub use tree::*;
pub use undo_tree::*;
pub use util::*;
pub use viewport::*;
pub use virtual_list::*;
pub use workspace::*;

pub use crate::wire::*;

/// Everything in one import for a page crate.
///
/// ```ignore
/// use nightshade_api::web::prelude::*;
/// ```
pub mod prelude {
    pub use super::*;
    pub use leptos::prelude::*;
}