//! Self-contained HTML graph viewer assembly (C9: read-only render path).
//!
//! `render_html` walks the blueprint into the deterministic JSON model
//! (`aura_engine::model_to_json`) and inlines it, the vendored Graphviz-WASM, the
//! pan-zoom helper, and the ported viewer JS into one standalone `.html`. The
//! emitted page fetches nothing at view time. No `eval`/build is on this path
//! (C9); the model is hand-rolled JSON (C14, owned by `model_to_json`).
use aura_engine::Composite;
/// The shared `
` (charset, viewport, `
"#
);
/// The graph page's `` text and `` line (hover/expand/drill hint),
/// graph-specific — split out of the shared shell.
const GRAPH_HEAD: &str = r#"aura graphhover · [+] expand · body drill
"#;
/// The chart page's `` text and `` line — describes what the chart
/// view actually renders (timestamp-aligned trace series), not the graph viewer. The
/// `#xmode-toggle` button is wired by `chart-viewer.js` (`mount`) to flip the x-axis
/// between the ordinal (gap-collapsed) default and continuous (real-time) spacing.
const CHART_HEAD: &str = r#"aura charttimestamp-aligned trace series
"#;
const VIZ_JS: &str = include_str!("../assets/viz-standalone.js");
const PANZOOM_JS: &str = include_str!("../assets/svg-pan-zoom.min.js");
const VIEWER_JS: &str = include_str!("../assets/graph-viewer.js");
const UPLOT_JS: &str = include_str!("../assets/uPlot.iife.min.js");
const UPLOT_CSS: &str = include_str!("../assets/uPlot.min.css");
const CHART_VIEWER_JS: &str = include_str!("../assets/chart-viewer.js");
/// Chart-page-only styling (the `#xmode-toggle` button) — injected by
/// `render_chart_html` after the vendored uPlot CSS, NOT into the shared `SHELL_HEAD`
/// (the graph page has no toggle and must not inherit its rule). Colors are
/// `var(--x)` tokens from `assets/aura.css`; they resolve because this block lands
/// in the same document, after the shell `\n\n\n\n\n