#![doc = include_str!("../README.md")]
mod types;
use rand::{Rng, distr::Alphanumeric};
pub use types::*;
mod router;
pub use router::*;
mod servable;
pub use servable::*;
#[cfg(test)] use tower_http as _;
#[cfg(feature = "image")]
pub mod transform;
pub static CACHE_BUST_STR: std::sync::LazyLock<String> = std::sync::LazyLock::new(|| {
rand::rng()
.sample_iter(&Alphanumeric)
.take(10)
.map(char::from)
.collect()
});
#[cfg(feature = "htmx-2.0.8")]
pub const HTMX_2_0_8: servable::StaticAsset = servable::StaticAsset {
bytes: include_str!("../htmx/htmx-2.0.8.min.js").as_bytes(),
mime: mime::TEXT_JAVASCRIPT,
ttl: StaticAsset::DEFAULT_TTL,
};
#[cfg(feature = "htmx-2.0.8")]
pub const EXT_JSON_1_19_12: servable::StaticAsset = servable::StaticAsset {
bytes: include_str!("../htmx/json-enc-1.9.12.js").as_bytes(),
mime: mime::TEXT_JAVASCRIPT,
ttl: StaticAsset::DEFAULT_TTL,
};