Expand description
Muharrir — shared editor primitives for AGNOS creative applications.
Provides reusable building blocks for editor UIs: undo/redo history, expression evaluation, hardware detection, hierarchy trees, and property inspection. Used by salai (game editor), rasa (image editor), tazama (video editor), and shruti (audio DAW).
§Feature Flags
| Feature | Default | Dependencies | Description |
|---|---|---|---|
history | yes | libro, serde_json | Undo/redo with tamper-evident audit chain |
expr | yes | abaco | Math expression evaluation for property fields |
hw | yes | ai-hwaccel | Hardware detection and quality tiers |
hierarchy | yes | — | Generic parent-child tree building |
inspector | yes | — | Property sheet for editor panels |
command | yes | — | Generic command pattern with undo/redo stacks |
notification | yes | — | Toast notifications and persistent log |
selection | yes | — | Generic selection tracking and panel visibility |
dirty | yes | — | Modified/dirty state tracking with save-point |
recent | yes | — | Recent files list with cap and persistence |
prefs | yes | serde_json | Preferences storage with JSON I/O |
full | no | all above | Everything enabled |
Re-exports§
pub use error::Error;pub use error::Result;pub use hierarchy::FlatEntry;pub use hierarchy::HierarchyNode;pub use hierarchy::NodeId;pub use hierarchy::build_hierarchy;pub use hierarchy::flatten;pub use history::Action;pub use history::History;pub use hw::HardwareProfile;pub use hw::QualityTier;pub use inspector::Property;pub use inspector::PropertySheet;pub use expr::ExprError;pub use expr::eval_f64;pub use expr::eval_or;pub use expr::eval_or_parse;pub use command::Command;pub use command::CommandHistory;pub use command::CompoundCommand;pub use notification::Notification;pub use notification::NotificationLog;pub use notification::Severity;pub use notification::Toast;pub use notification::Toasts;pub use selection::PanelStates;pub use selection::Selection;pub use dirty::DirtyState;pub use recent::RecentFiles;pub use prefs::PrefsError;pub use prefs::PrefsStore;pub use prefs::config_dir;
Modules§
- command
- Generic command pattern for reversible editor operations.
- dirty
- Modified/dirty state tracking for editor documents.
- error
- Error types for muharrir.
- expr
- Expression evaluator for property fields.
- hierarchy
- Generic hierarchy tree — parent-child relationships with depth-first traversal.
- history
- Undo/redo history backed by
libro::AuditChain. - hw
- Hardware capability detection for adaptive editor configuration.
- inspector
- Generic property inspector — gather and display component/property info.
- notification
- Toast notifications and persistent notification log.
- prefs
- Preferences storage with JSON persistence and XDG path resolution.
- recent
- Recent files/projects list with cap and persistence.
- selection
- Generic selection tracking and panel visibility state.