dbgflow-ui 0.4.0

Dependency-free embedded browser assets for the dbgflow debugger UI.
Documentation
//! Dependency-free embedded assets for the dbgflow browser UI.
//!
//! The frontend build writes its immutable distribution files into this
//! crate's `assets` directory. HTTP delivery remains the responsibility of a
//! server crate, so depending on `dbgflow-ui` does not pull in a web stack.

/// Returns the HTML document for the debugger UI.
#[must_use]
pub const fn index_html() -> &'static str {
    include_str!("../assets/index.html")
}

/// Returns the bundled JavaScript application.
#[must_use]
pub const fn app_js() -> &'static str {
    include_str!("../assets/app.js")
}

/// Returns the legacy application stylesheet.
#[must_use]
pub const fn app_css() -> &'static str {
    include_str!("../assets/app.css")
}

/// Returns the generated global Tailwind stylesheet.
#[must_use]
pub const fn globals_css() -> &'static str {
    include_str!("../assets/globals.css")
}

#[cfg(test)]
mod tests {
    use super::{app_css, app_js, globals_css, index_html};

    #[test]
    fn embeds_a_self_contained_distribution() {
        assert!(index_html().contains("/app.js"));
        assert!(index_html().contains("/globals.css"));
        assert!(!app_js().is_empty());
        assert!(!app_css().is_empty());
        assert!(!globals_css().is_empty());
    }
}