documents/lib.rs
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4// Copyright (c) 2026 2youg1 and the sprawling contributors
5
6//! The rules of a document a person reads and edits through a page:
7//! which version it is, which characters its bytes spell, where its
8//! blocks lie, how much of it one answer carries, what one save
9//! changes, how a suggestion about it is read and decided, and how a
10//! Markdown window reads (`crates/documents/Spec.lean`).
11//!
12//! No I/O: the bytes arrive as slices and leave as values. Reading the
13//! disk and the content store, and recording a save, belong to the
14//! crates that own those (D1).
15
16mod edit;
17mod encoding;
18mod format;
19mod layout;
20mod markdown;
21mod proposal;
22mod selection;
23mod span;
24mod window;
25
26pub use edit::{Applied, Edit, TextEdit, Transaction, save};
27pub use encoding::{Encoding, Reading};
28pub use format::Format;
29pub use markdown::{Align, Block, Check, Construct, EXPORT_BYTES_MAX, Inline, ListItem, export};
30pub use markdown::{Laid, Order, Preview, ReplyState, Row, Spacing, preview, reply};
31pub use proposal::{ALIGN_CELLS_MAX, Offer, PROPOSAL_ID_TAG, Review, Slice, SliceKind, decide};
32pub use selection::Selection;
33pub use span::Span;
34pub use window::{Lifted, WINDOW_BYTES_MAX, Window, cut, head, lift};