Skip to main content

jellyflow_runtime/runtime/xyflow/changes/
mod.rs

1//! XyFlow-style change model for editor runtimes.
2//!
3//! In XyFlow/ReactFlow, internal interactions produce "changes" that user code can apply to its
4//! node/edge arrays via helpers like `applyNodeChanges`. In Jellyflow, the authoritative model
5//! is a reversible `GraphTransaction` (undo/redo friendly). This module bridges the two worlds:
6//! - Map `GraphTransaction` -> `(NodeChange, EdgeChange)` events (for callbacks).
7//! - Map `(NodeChange, EdgeChange)` -> reversible `GraphTransaction` (for store dispatch).
8//!
9//! These change names are compatibility vocabulary. Use [`crate::runtime::policy`] when an adapter
10//! needs effective interaction policy such as whether a node can be selected or an edge endpoint can
11//! be reconnected.
12
13pub use crate::runtime::commit::NodeGraphPatch;
14
15mod edge;
16mod model;
17mod node;
18
19pub use edge::EdgeChange;
20pub use model::{ChangesToTransactionError, NodeGraphChanges};
21pub use node::NodeChange;