mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-29 12:57:09 -06:00
refactor(engine): move session::snapshot_types to the crate root as snapshot
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user