//! Define, validate, and render typed Markdown extensions.
//!
//! `mdforge` is built for applications that ask an LLM to produce Markdown-like
//! text but still need strong control over the structure. You define the
//! allowed block and inline extensions first, then run generated content through
//! `parse`, `validate`, `eval`, and a renderer.
//!
//! # Example
//!
//! ```rust
//! use mdforge::{ArgType, EvalContext, Forge};
//!
//! let forge = Forge::builder()
//!     .block("card")
//!     .arg("title", ArgType::String.required())
//!     .body_markdown()
//!     .register()
//!     .inline("badge")
//!     .arg("level", ArgType::Int.required())
//!     .register()
//!     .build();
//!
//! let input = ":::card title=hello\nBody {badge level=2}\n:::\n";
//! let doc = forge.parse(input).expect("parse");
//! forge.validate(&doc).expect("validate");
//! forge.eval(&doc, &EvalContext::default()).expect("eval");
//! assert!(forge.signature().contains("Block: card"));
//! ```
//!
//! See `docs/user_guide.md` in the repository for a longer walkthrough.
#![warn(missing_docs)]

/// Abstract syntax tree types.
pub mod ast;
/// Structured diagnostics produced by parsing, validation, and evaluation.
pub mod diagnostic;
/// Lightweight DOM-like output nodes.
pub mod dom;
/// Forge builders, pipeline methods, and renderer traits.
pub mod forge;

pub use ast::{ArgType, ArgValue, BlockNode, Document, InlineExt, MdEvent, Node, Span};
pub use diagnostic::{Diagnostic, ErrorCode, Level};
pub use dom::{VElement, VNode};
pub use forge::{EvalContext, Forge, ForgeBuilder, HtmlRenderer};
