Skip to main content

sim_lib_view_doc/
lib.rs

1//! Scientific article workspace lens for the SIM Web-UI (WEBUI_4).
2//!
3//! The article lens is a real authoring surface, not a markdown textarea: a
4//! round-trippable document value with semantic blocks (section, prose,
5//! equation, figure, table, citation, embedded-runtime block), an outline plus
6//! block canvas, side-by-side source and formatted views as two lenses on the
7//! same document value, and embedded live blocks via `scene/embed`.
8//!
9//! [`doc`] is the document value model; [`lens`] is the formatted and source
10//! lenses plus export over a stable intermediate document value.
11
12#![forbid(unsafe_code)]
13#![deny(missing_docs)]
14
15mod citizen;
16pub mod doc;
17pub mod lens;
18
19pub use citizen::{DocArticleDescriptor, doc_article_class_symbol};
20pub use doc::{
21    ARTICLE_CLASS, article, blocks, citation, embed_block, equation, figure, prose, section, table,
22    title,
23};
24pub use lens::{
25    ARTICLE_FORMATTED_LENS, ARTICLE_SOURCE_LENS, article_formatted, article_outline,
26    article_source, export_intermediate, export_markdown, with_cache,
27};
28
29/// Stable symbol for the scientific article lens.
30pub const ARTICLE_LENS: &str = ARTICLE_FORMATTED_LENS;
31
32#[cfg(test)]
33mod tests;