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 summary;
35pub mod tree;
36
37pub use changeset::{Op, parse_placeholder, resolve_op, resolve_placeholder, resolve_to};
38pub use effects::{
39 Admission, ConflictTracker, Effect, EffectExpect, ExpectMap, Field, Focus, FocusInfo,
40 FocusTarget, IdentityOp, IdentityPreview, NewId, NewIdKind, PLAN_VERSION, PLANNER_V, ParentRow,
41 Plan, PlanCreate, PlanFrontmatter, PlanMove, PlanOpset, PlanPreview, PlanRevision,
42 PlanTombstone, Preconditions, Repair, RetargetHitPreview, RetargetPairPreview, RetargetPreview,
43 SELECTION_CEILING, ScalarWrite, Selection, SelectionExpect, ShapeError, ShapeFixContext,
44 Target, canonical_json, classify_field, map_block_ids, parse_new_symbol, shift_placeholders,
45};
46pub use error::{ErrorCode, MutationError, Result};
47pub use lower::{LowerResult, body_of, lcs, lower_replace, lower_top_level, strip_frontmatter};
48pub use omgbase_reconcile::Minter;
49pub use ops::{
50 At, Expect, OpResult, Parent, To, UpdateArgs, check_content_hash, check_parent_children_hash,
51 cross_doc_move, default_trivia, op_insert, op_merge, op_move, op_remove, op_split, op_update,
52 parse_content, parse_document, resolve_target, separates_blocks,
53};
54pub use opset::{Opset, OpsetPrecondition, OpsetSummary, PlanDisposition, PlanOp, summarize};
55pub use render::{render, render_block};
56pub use summary::{
57 NoLookup, SummaryLookup, block_count, plural, summarize_effect, visible_text_of,
58};
59pub use tree::{BlockPath, MutBlock, MutDoc, child_ids, parent_children_hash, raw_hash_hex};
60
61pub const SPEC_VERSION: &str = "3.5";
63
64pub const VERSION: &str = env!("CARGO_PKG_VERSION");
66
67#[cfg(test)]
68mod tests {
69 use super::*;
70
71 #[test]
72 fn spec_version_matches_the_crate_line() {
73 let crate_version = env!("CARGO_PKG_VERSION");
74 assert!(
75 crate_version.starts_with(&format!("{SPEC_VERSION}.")),
76 "crate {crate_version} must track spec {SPEC_VERSION}.x"
77 );
78 }
79}