1#![forbid(unsafe_code)]
26
27pub mod changeset;
28pub mod effects;
29pub mod error;
30pub mod lower;
31pub mod ops;
32pub mod opset;
33pub mod render;
34pub mod tree;
35
36pub use changeset::{Op, parse_placeholder, resolve_op, resolve_placeholder, resolve_to};
37pub use effects::{
38 Admission, ConflictTracker, Effect, EffectExpect, ExpectMap, Field, Focus, FocusInfo,
39 FocusTarget, IdentityOp, IdentityPreview, NewId, NewIdKind, PLAN_VERSION, PLANNER_V, Plan,
40 PlanCreate, PlanFrontmatter, PlanMove, PlanOpset, PlanPreview, PlanRevision, PlanTombstone,
41 Preconditions, Repair, RetargetHitPreview, RetargetPairPreview, RetargetPreview, ScalarWrite,
42 Target, canonical_json, classify_field, map_block_ids, parse_new_symbol, shift_placeholders,
43};
44pub use error::{ErrorCode, MutationError, Result};
45pub use lower::{LowerResult, body_of, lcs, lower_replace, lower_top_level, strip_frontmatter};
46pub use omgbase_reconcile::Minter;
47pub use ops::{
48 At, Expect, OpResult, Parent, To, UpdateArgs, check_content_hash, check_parent_children_hash,
49 cross_doc_move, default_trivia, op_insert, op_merge, op_move, op_remove, op_split, op_update,
50 parse_content, parse_document, resolve_target, separates_blocks,
51};
52pub use opset::{Opset, OpsetPrecondition, OpsetSummary, PlanDisposition, PlanOp, summarize};
53pub use render::{render, render_block};
54pub use tree::{BlockPath, MutBlock, MutDoc, child_ids, parent_children_hash, raw_hash_hex};
55
56pub const SPEC_VERSION: &str = "3.0";
58
59pub const VERSION: &str = env!("CARGO_PKG_VERSION");
61
62#[cfg(test)]
63mod tests {
64 use super::*;
65
66 #[test]
67 fn spec_version_matches_the_crate_line() {
68 let crate_version = env!("CARGO_PKG_VERSION");
69 assert!(
70 crate_version.starts_with(&format!("{SPEC_VERSION}.")),
71 "crate {crate_version} must track spec {SPEC_VERSION}.x"
72 );
73 }
74}