1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! leaf-core — the frontend-neutral heart of leaf.
//!
//! A [`Doc`] is a `twig::Editor` plus a byte-offset caret and selection: every
//! mutation is one of twig's offset-addressed ops, and the document stays a
//! live, round-trippable AST the whole time you type into it. The [`wysiwyg`]
//! module resolves that AST into a [`wysiwyg::VisualMap`] — rendered glyphs that
//! each point back at the source byte they came from, so a caret can ride the
//! *visible* text and step over hidden markup delimiters.
//!
//! Nothing here depends on a UI toolkit. Glyphs carry a toolkit-agnostic
//! [`Style`], which a frontend crate (`leaf-tui`, and next `leaf-gui`) maps onto
//! its own styling. Both frontends share this exact caret math, edit surface,
//! and offset⇄position mapping — the split is what lets a GUI reuse the hard
//! parts instead of re-deriving them.
pub use ;
pub use ;
pub use ;
// Re-export the twig types a frontend needs to name when calling into a `Doc`
// (the toolbar's block/inline kinds), so frontends don't each depend on twig.
// `Alignment` comes with `TableCell`, which carries one.
// `Format` too: a filesystem-free host (wasm/FFI) picks the document's format
// itself when it calls `Doc::from_source`, since there's no file extension to
// sniff it from the way `Doc::open` does.
// `Gesture` names one authoring capability for `Doc::supports`, the finer-grained
// half of `Capabilities` — a frontend wanting a mark leaf's own toolbar doesn't
// offer asks with one of these.
pub use ;