use super::PresentationDeclaration;
use crate::a11y::A11yCapability;
use crate::routing::*;
pub fn default_declarations() -> Vec<PresentationDeclaration> {
let reader = PresentationDeclaration::reader;
vec![
reader(ENGINE_GENET_WEB)
.a11y(A11yCapability::Partial)
.schemes(["http", "https"])
.content_types(["text/html", "application/xhtml+xml"]),
reader(ENGINE_NEMATIC_GEMTEXT)
.schemes(["gemini", "spartan"])
.content_types(["text/gemini"]),
reader(ENGINE_NEMATIC_GOPHER)
.schemes(["gopher"])
.content_types(["application/gopher-menu"]),
reader(ENGINE_NEMATIC_FINGER)
.schemes(["finger"])
.content_types(["text/x-finger"]),
reader(ENGINE_NEMATIC_SCROLL).schemes(["scroll"]),
reader(ENGINE_NEMATIC_MISFIN).content_types(["message/x-misfin"]),
reader(ENGINE_NEMATIC_NEX)
.schemes(["nex"])
.content_types(["application/x-nex"]),
reader(ENGINE_NEMATIC_GUPPY)
.schemes(["guppy"])
.content_types(["application/x-guppy"]),
reader(ENGINE_NEMATIC_TITAN)
.schemes(["titan"])
.content_types(["application/x-titan"]),
reader(ENGINE_NEMATIC_FILE).schemes(["file"]),
reader(ENGINE_NEMATIC_MARKDOWN).content_types(["text/markdown", "text/x-markdown"]),
reader(ENGINE_NEMATIC_TEXT).content_types(["text/plain"]),
reader(ENGINE_NEMATIC_FEED).content_types([
"application/rss+xml",
"application/atom+xml",
"application/feed+xml",
"application/feed+json",
]),
reader(ENGINE_NEMATIC_KNOT_DJOT).content_types(["text/x-knot", "application/x-knot"]),
]
}
pub fn external_protocol_declaration() -> PresentationDeclaration {
PresentationDeclaration::surface(ENGINE_EXTERNAL_PROTOCOL).mode(SurfaceContractMode::Headless)
}