The model holds the rules: a document is a tree under one root, with loose nodes beside it and cross-links between any two nodes. Every change runs as a transaction that rolls back on error and returns an undo step (the old and new values of whatever it touched), so undo and redo need no code of their own per command. Text from outside (titles, tags, names) is checked once, when it becomes a typed value. Folding (Open, Auto, Closed, plus focus) is one function that every view will share. storage::document_file reads and writes `.cum` files in RON, with multi-line bodies kept readable, `\n` line endings on every OS, and errors that name the node they're about. The tests cover the tree rules, 500 random edits undone and redone step by step, folding, and the file format (the example from DESIGN.md is written back character for character). Co-Authored-By: Claude Opus 5.5 <[email protected]>
133 lines
3.1 KiB
TOML
133 lines
3.1 KiB
TOML
# This file is automatically @generated by Cargo.
|
|
# It is not intended for manual editing.
|
|
version = 4
|
|
|
|
[[package]]
|
|
name = "bitflags"
|
|
version = "2.13.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
|
|
dependencies = [
|
|
"serde_core",
|
|
]
|
|
|
|
[[package]]
|
|
name = "cumulus"
|
|
version = "0.1.0"
|
|
dependencies = [
|
|
"ron",
|
|
"serde",
|
|
"thiserror",
|
|
]
|
|
|
|
[[package]]
|
|
name = "once_cell"
|
|
version = "1.21.4"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
|
|
[[package]]
|
|
name = "proc-macro2"
|
|
version = "1.0.107"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
dependencies = [
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "quote"
|
|
version = "1.0.47"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
]
|
|
|
|
[[package]]
|
|
name = "ron"
|
|
version = "0.12.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "81116b9531d61eabc41aeb228e4b6b2435bcca3233b98cf3b3077d4e6e9debb3"
|
|
dependencies = [
|
|
"bitflags",
|
|
"once_cell",
|
|
"serde",
|
|
"serde_derive",
|
|
"typeid",
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde"
|
|
version = "1.0.229"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
dependencies = [
|
|
"serde_core",
|
|
"serde_derive",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_core"
|
|
version = "1.0.229"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
dependencies = [
|
|
"serde_derive",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_derive"
|
|
version = "1.0.229"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "syn"
|
|
version = "3.0.6"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "thiserror"
|
|
version = "2.0.21"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
|
|
dependencies = [
|
|
"thiserror-impl",
|
|
]
|
|
|
|
[[package]]
|
|
name = "thiserror-impl"
|
|
version = "2.0.21"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "typeid"
|
|
version = "1.0.3"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
|
|
|
|
[[package]]
|
|
name = "unicode-ident"
|
|
version = "1.0.26"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
|