#[cfg(not(target_arch = "wasm32"))]
mod bundle;
mod generator;
mod model;
mod parser;
mod viewer;
#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;
#[cfg(not(target_arch = "wasm32"))]
pub use bundle::*;
pub use {generator::*, model::*, parser::*, viewer::*};
pub(crate) use parser::{
deduplicate_slug, heading_level_num, load_doc_site_excluding, section_sort_rank,
should_skip_dir, slugify,
};
#[cfg(target_arch = "wasm32")]
use std::cell::{RefCell, RefMut};
use std::{
borrow::Cow,
cell::Cell,
cmp::Ordering,
collections::{BTreeMap, BTreeSet, HashMap},
f32::consts::{FRAC_PI_2, PI, TAU},
ffi::{OsStr, OsString},
fmt::{self, Write},
fs::{self, DirEntry},
io::{self, Error, ErrorKind},
iter::Peekable,
mem::take,
path::{Components, Path, PathBuf},
rc::Rc,
str::Chars,
};
#[cfg(not(target_arch = "wasm32"))]
use std::{
env,
process::{Command, ExitStatus},
};
use {
chrono::{DateTime, Utc},
euv::*,
euv_ui::*,
lombok_macros::{Data, Getter, New},
pulldown_cmark::{
Alignment, BlockQuoteKind, CodeBlockKind, CowStr, Event, HeadingLevel, Options, Parser,
Tag, TagEnd,
},
serde::{Deserialize, Serialize},
serde_json::{Value, to_string, to_string_pretty},
serde_yaml::from_str,
};
#[cfg(target_arch = "wasm32")]
use {
js_sys::{Function, Promise, Reflect},
wasm_bindgen::{JsCast, JsValue},
wasm_bindgen_futures::{JsFuture, spawn_local},
web_sys::{HtmlCanvasElement, Window, window},
};