pub mod cell;
pub mod notebook;
pub mod execution;
pub mod scope;
pub mod format;
pub mod ui;
pub mod gui;
pub mod autocomplete;
pub mod export;
#[cfg(test)]
mod tests;
#[cfg(test)]
mod gui_tests;
pub use cell::{NotebookCell, CellType, CellContent, CellMetadata, CellId};
pub use notebook::{Notebook, NotebookManager, NotebookMetadata};
pub use execution::{ExecutionEngine, ExecutionResult, ExecutionContext, ExecutionQueue};
pub use scope::{VariableScope, ScopeManager, VariableBinding};
pub use format::{NotebookFormat, NotebookSerializer, NotebookDeserializer};
pub use ui::{NotebookUI, UIEvent, UICommand, KeyBinding};
pub use gui::{NotebookGUI, CellEditor};
pub use autocomplete::{AutoCompleteEngine, CompletionSuggestion, SuggestionType};
pub use export::{NotebookExporter, ExportFormat, ExportOptions};
use crate::engine::ComputeError;
use std::collections::HashMap;
use std::time::{SystemTime, Duration};
use uuid::Uuid;
#[derive(Debug, thiserror::Error)]
pub enum NotebookError {
#[error("单元格错误: {0}")]
Cell(String),
#[error("执行错误: {0}")]
Execution(#[from] ComputeError),
#[error("序列化错误: {0}")]
Serialization(String),
#[error("IO 错误: {0}")]
Io(#[from] std::io::Error),
#[error("格式错误: {0}")]
Format(String),
#[error("变量作用域错误: {0}")]
Scope(String),
}
pub type NotebookResult<T> = Result<T, NotebookError>;