refactor(engine): move session::snapshot_types to the crate root as snapshot

This commit is contained in:
aiongg
2026-10-26 21:16:49 +00:00
parent 5a311f4615
commit 39336fe844
3 changed files with 8 additions and 4 deletions
+1
View File
@@ -21,6 +21,7 @@ pub mod recovery;
pub mod ribbon;
pub mod sample;
mod session;
pub(crate) mod snapshot;
pub mod speech;
pub(crate) mod view;
+2 -2
View File
@@ -6,7 +6,7 @@ use serde_json::Value;
use wordcraft_doc::edit::Fragment;
use wordcraft_doc::props::CharProps;
use wordcraft_doc::{Document, PartKind, Path, Pos, StoryRef};
use wordcraft_layout::{DocLayout, LayoutCache, LayoutOptions, NumeralMode, ViewMode};
use wordcraft_layout::{DocLayout, LayoutCache, LayoutOptions, ViewMode};
use crate::{CmdError, ImeEditOutcome, Registry};
@@ -23,11 +23,11 @@ mod lifecycle;
mod query;
mod run;
mod snapshot;
mod snapshot_types;
use crate::doc_state;
use crate::locale;
use crate::prefs;
use crate::snapshot as snapshot_types;
use crate::view;
pub(crate) use doc_state::Widened;
pub use doc_state::{CellRange, ColumnBlock, FindState, MathEdit, Selection, UNDO_LIST_MAX, next_math_session};
@@ -1,5 +1,8 @@
use super::doc_state::{ColumnBlock, Selection, Undo};
use super::*;
use crate::doc_state::{ColumnBlock, Selection, Undo};
use std::sync::Arc;
use wordcraft_doc::Document;
use wordcraft_layout::{DocLayout, NumeralMode, ViewMode};
/// What [`Session::restore`] needs to take commands back exactly: the document, the selection,
/// the undo and redo stacks (also the oldest undo steps the undo limit pushes out meanwhile), the