Skip to main content

aprender_present_lib/browser/
mod.rs

1//! Browser runtime for Presentar WASM applications.
2//!
3//! This module provides the bridge between Presentar's widget system
4//! and the browser's rendering APIs (Canvas2D, WebGPU).
5
6// WASM-only modules
7#[cfg(target_arch = "wasm32")]
8pub mod app;
9#[cfg(target_arch = "wasm32")]
10pub mod canvas2d;
11#[cfg(target_arch = "wasm32")]
12pub mod entry;
13#[cfg(target_arch = "wasm32")]
14pub mod events;
15#[cfg(target_arch = "wasm32")]
16pub mod showcase;
17#[cfg(target_arch = "wasm32")]
18pub mod websocket;
19
20// Cross-platform modules (work on native for testing)
21pub mod mount;
22pub mod notebook;
23pub mod router;
24pub mod shell_autocomplete;
25pub mod storage;
26
27#[cfg(target_arch = "wasm32")]
28pub use app::App;
29#[cfg(target_arch = "wasm32")]
30pub use canvas2d::Canvas2DRenderer;
31#[cfg(target_arch = "wasm32")]
32pub use entry::{mount, MessageHandler, MountHandle};
33pub use mount::{schedule, Frame, FrameAction, Mounted};
34pub use router::{BrowserRouter, RouteMatch, RouteMatcher};
35pub use shell_autocomplete::ShellAutocomplete;
36#[cfg(target_arch = "wasm32")]
37pub use shell_autocomplete::ShellAutocompleteDemo;
38#[cfg(target_arch = "wasm32")]
39pub use showcase::ShowcaseDemo;
40pub use storage::{ScopedStorage, Storage, StorageError, StorageType};
41#[cfg(target_arch = "wasm32")]
42pub use websocket::{WebSocketClient, WebSocketError};
43
44// Notebook runtime
45pub use notebook::{Cell, CellGraph, CellId, CellOutput, NotebookRuntime};