Skip to main content

dotloom_engine/
lib.rs

1//! # dotloom-engine
2//!
3//! The headless Dotloom engine. It owns the only editable copy of a document and
4//! runs every change through one pipeline:
5//!
6//! ```text
7//! commands → working overlay → structural validation → solve (affected component)
8//!          → independent hard-rule check → atomic commit → revision + events
9//! ```
10//!
11//! A failed transaction leaves the document untouched. Undo/redo apply stored
12//! before/after states without re-solving. Drags produce transient previews and a
13//! single history entry. Plugin entity types are data ([`EntityTypeDef`]) compiled
14//! from a typed expression language; no host code runs inside the solver.
15//!
16//! The engine has no DOM, window or GPU dependency.
17
18mod apply;
19mod build;
20mod check;
21mod command;
22mod drag;
23mod engine;
24mod error;
25pub mod eval;
26mod history;
27mod index;
28pub mod lang;
29mod migrate;
30mod query;
31pub mod registry;
32mod scene_build;
33mod solve;
34mod validate;
35mod view;
36
37pub use command::{
38    Command, CommandError, ConstraintPatch, ConstraintSpec, DeletePolicy, EditMode, EntityPatch, LayerPatch, NewEntity,
39    ParamValue, SettingsPatch,
40};
41pub use dotloom_constraints as constraints;
42pub use dotloom_document as document;
43pub use dotloom_geometry as geometry;
44pub use dotloom_scene as scene;
45pub use drag::{DragPreview, DragSpec};
46pub use engine::{ApplyOptions, CommitReport, Engine, EngineOptions, Event, PendingState, SolverStats, Transaction};
47pub use error::{DiagnosticReport, EngineError, NearestValue, SolveFailure};
48pub use migrate::migrate_entities;
49pub use query::{Hit, SelectMode, Snap, SnapKind, SnapOptions, SnapQuery};
50pub use registry::{EntityTypeDef, Registry, RegistryError};
51pub use scene_build::THEME_DEFAULT;
52pub use view::{DocView, Overlay};