strings to enum, eased state.rs

This commit is contained in:
Priec
2025-07-29 10:12:16 +02:00
parent 15922ed953
commit 2a7f94cf17
8 changed files with 572 additions and 93 deletions

View File

@@ -1,7 +1,6 @@
// canvas/src/lib.rs
//! Canvas - A reusable text editing and form canvas system
//!
//!
//! This crate provides a generic canvas abstraction for building text-based interfaces
//! with multiple input fields, cursor management, and mode-based editing.
@@ -9,19 +8,25 @@ pub mod state;
pub mod actions;
pub mod modes;
pub mod suggestions;
pub mod dispatcher;
// Re-export the main types for easy use
pub use state::{CanvasState, ActionContext};
pub use actions::edit::execute_edit_action;
pub use actions::{CanvasAction, ActionResult, execute_edit_action, execute_canvas_action};
pub use modes::{AppMode, ModeManager, HighlightState};
pub use suggestions::SuggestionState;
pub use dispatcher::ActionDispatcher;
// High-level convenience API
pub mod prelude {
pub use crate::{
CanvasState,
ActionContext,
CanvasAction,
ActionResult,
execute_edit_action,
execute_canvas_action,
ActionDispatcher,
AppMode,
ModeManager,
HighlightState,