euv-docs 0.36.2

A documentation site generator powered by euv + euv-ui (Rust/WASM).
//! String constants for the euv-docs crate root (rust-standards §1.3c).
//!
//! `lib.rs` is the crate root, so this module is declared from it as
//! `mod r#const;` — the `r#` prefix is required because `const` is a
//! Rust keyword. Every string literal the §1.3c verifier flags inside a
//! function body of the library crate lives here, verbatim and
//! byte-identical to the inline form it replaced.
//!
//! Values are re-exported by `lib.rs` through the existing
//! `pub(crate) use {.., r#const::*, ..}` glob, so every `use super::*`
//! module below the crate root sees them without any per-module wiring.
//! Constants that belong to a single view (e.g. the layout shell's CSS
//! selectors) live in that view's own `const.rs` instead, because those
//! are not on this crate root's whitelist.

/// The DOM element id the documentation app mounts into.
pub(crate) const APP_MOUNT_SELECTOR: &str = "#app";

/// Consumer-owned shell geometry for the headless custom build.
#[cfg(feature = "theme-custom")]
pub(crate) const APP_CUSTOM_LAYOUT_CSS: &str = r#"

#app .c_euv_display_contents { display: contents; }
#app .c_app_root { display: flex; height: 100%; min-height: 0; overflow: hidden; padding-bottom: var(--safe-area-inset-bottom, 0px); }
#app .c_mobile_app_root { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; padding-bottom: var(--safe-area-inset-bottom, 0px); }
#app .c_app_nav { display: flex; flex-direction: column; flex: 0 0 var(--nav-width, 248px); width: var(--nav-width, 248px); height: 100%; min-height: 0; overflow: hidden; }
#app .c_nav_items_scroll { flex: 1 1 0%; min-height: 0; overflow-y: auto; overflow-x: hidden; }
#app .c_nav_header, #app .c_nav_locale_row, #app .c_nav_section_label, #app .c_nav_theme_toggle, #app .c_nav_footer { flex-shrink: 0; }
#app .c_nav_header { display: flex; align-items: center; gap: var(--space-md, 12px); padding: var(--space-xl, 20px) var(--edge-gutter-nav, 16px); }
#app .c_nav_item_active, #app .c_nav_item_inactive { display: flex; align-items: center; gap: var(--space-sm, 8px); padding: var(--space-sm, 8px) var(--edge-gutter-nav, 16px); }
#app .c_app_main, #app .c_mobile_main { flex: 1 1 0%; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: var(--padding-main-top, 24px) var(--padding-main-horizontal, 28px) var(--edge-gutter-bottom, 20px) var(--edge-gutter, 28px); }
#app .c_home { display: flex; flex-direction: column; min-height: 100%; min-width: 0; }
#app .c_home_content { display: flex; flex-direction: column; flex: 1 0 auto; width: 100%; max-width: var(--content-max-width, 820px); margin-inline: auto; min-width: 0; }
#app .c_home_body { flex: 1 0 auto; min-width: 0; }
#app .c_home_tail { flex: 0 0 auto; margin-top: auto; }
#app .c_home_actions { display: flex; flex-wrap: wrap; gap: var(--gap-element, 8px); }
#app .c_home_stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-md, 12px); }
#app .c_home_feature_grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-component, 16px); }
@media (max-width: 767px) {
#app .c_home_stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#app .c_home_feature_grid { grid-template-columns: minmax(0, 1fr); }
}
#app .c_page_router { display: flex; flex-direction: column; min-width: 0; }
#app .c_page_container { width: 100%; max-width: var(--content-max-width, 820px); margin: 0 auto; min-width: 0; }
#app .c_euv_card { display: flex; flex-direction: column; gap: var(--gap-component, 16px); margin-top: var(--page-block-gap, 24px); }
#app .c_euv_card_header, #app .c_euv_card_content, #app .c_euv_card_footer { min-width: 0; }
#app .c_button_controls { display: flex; flex-wrap: wrap; gap: var(--gap-element, 8px); margin-block: var(--gap-component, 16px); }
#app .c_mobile_header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; height: calc(var(--mobile-header-height, 56px) + var(--euv-mobile-safe-top, 0px)); padding: var(--euv-mobile-safe-top, 0px) var(--edge-gutter-mobile, 16px) 0; position: sticky; top: 0; z-index: 100; }
#app .c_mobile_header_left, #app .c_mobile_header_logo { display: flex; align-items: center; min-width: 0; gap: var(--space-sm, 8px); }
#app .c_mobile_menu_button, #app .c_mobile_menu_button_active, #app .c_mobile_theme_button, #app .c_mobile_drawer_close_button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: var(--mobile-header-height, 40px); height: var(--mobile-header-height, 40px); }
#app .c_theme_icon_sun, #app .c_theme_icon_moon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: var(--space-xl, 20px); height: var(--space-xl, 20px); font-size: var(--space-xl, 20px); line-height: 1; }
#app .c_theme_icon_sun::before { content: "\2600\FE0E" / ""; }
#app .c_theme_icon_moon::before { content: "\263E\FE0E" / ""; }
#app .c_mobile_overlay { position: fixed; inset: 0; z-index: 200; pointer-events: auto; }
#app .c_mobile_overlay_hidden { visibility: hidden; pointer-events: none; }
#app .c_mobile_nav_drawer { position: fixed; inset: 0 auto 0 0; width: var(--nav-width, 248px); max-width: 100%; display: flex; flex-direction: column; min-height: 0; overflow: hidden; z-index: 201; padding-top: var(--euv-mobile-safe-top, 0px); padding-bottom: var(--padding-shell-bottom, 0px); transform: translateX(0); visibility: visible; pointer-events: auto; }
#app .c_mobile_nav_drawer_closed { transform: translateX(-100%); visibility: hidden; pointer-events: none; }
#app .c_mobile_nav_drawer_header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; height: var(--mobile-header-height, 56px); padding-inline: var(--edge-gutter-mobile, 16px); }
@media (max-width: 767px) {
#app .c_app_nav { display: none; }
#app .c_mobile_main, #app .c_app_main { padding: var(--padding-main-top-mobile, 16px) var(--padding-main-horizontal-mobile, 16px) var(--edge-gutter-bottom, 20px) var(--edge-gutter-mobile, 16px); }
}

#app .c_docs_body { display: flex; flex: 1 1 0%; min-height: 0; min-width: 0; overflow: hidden; }
#app .c_app_main, #app .c_mobile_main { display: flex; flex-direction: column; }
#app .c_euv_doc_layout { display: flex; flex-direction: row; width: 100%; max-width: 1160px; min-height: 100%; min-width: 0; flex: 0 0 auto; margin-inline: auto; gap: var(--gap-component, 16px); }
#app .c_euv_doc_content { display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0; justify-content: space-between; }
#app .c_euv_doc_tail { display: block; flex: 0 0 auto; }
#app .c_euv_doc_toc { width: var(--nav-width, 248px); min-width: 0; flex-shrink: 0; position: sticky; top: var(--padding-main-top, 24px); align-self: flex-start; max-height: calc(100dvh - var(--mobile-header-height, 56px) - var(--padding-main-top, 24px)); overflow-y: auto; }
#app .c_euv_footer { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: var(--space-sm, 8px); flex: 0 0 auto; }
#app .c_euv_pagination { display: flex; justify-content: space-between; }
#app .c_euv_pagination_auto_content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; width: 100%; min-width: 0; box-sizing: border-box; list-style: none; margin: var(--space-2xl, 24px) 0 0; padding: 0; gap: var(--gap-component, 16px); }
#app .c_euv_pagination_auto_content .c_euv_pagination_item { display: flex; min-width: 0; align-items: stretch; }
#app .c_euv_pagination_auto_content .c_euv_pagination_link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; align-items: center; flex: 1; width: 100%; height: auto; min-width: 0; min-height: calc(var(--control-height, 32px) + var(--space-lg, 16px)); box-sizing: border-box; padding: var(--space-lg, 16px); column-gap: var(--space-sm, 8px); row-gap: var(--space-2xs, 2px); white-space: normal; text-align: left; }
#app .c_euv_pagination_auto_content .c_euv_pagination_next { text-align: right; }
#app .c_euv_pagination_auto_content .c_euv_pagination_label, #app .c_euv_pagination_auto_content .c_euv_pagination_text { display: block; grid-column: 2; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#app .c_euv_pagination_auto_content .c_euv_pagination_label { grid-row: 1; }
#app .c_euv_pagination_auto_content .c_euv_pagination_text { grid-row: 2; }
#app .c_euv_pagination_auto_content .c_euv_pagination_icon { display: flex; grid-row: 1 / 3; width: var(--space-lg, 16px); align-items: center; justify-content: center; }
#app .c_euv_pagination_auto_content .c_euv_pagination_previous .c_euv_pagination_icon { grid-column: 1; }
#app .c_euv_pagination_auto_content .c_euv_pagination_next .c_euv_pagination_icon { grid-column: 3; }
@media (max-width: 767px) {
#app .c_euv_doc_layout { flex-direction: column; }
#app .c_euv_doc_toc { display: none; }
}
"#;

/// The error description shown by the `euv_result` 404 component.
pub(crate) const NOT_FOUND_DESCRIPTION: &str = "页面不存在";

/// The label of the "back to the site home" link on the 404 page.
pub(crate) const NOT_FOUND_HOME_LABEL: &str = "首页";

/// Leaves shadcn row appearance entirely to the selected shared UI classes.
#[cfg(all(feature = "theme-shadcn", not(feature = "theme-custom")))]
pub(crate) const APP_SIDEBAR_CSS: &str = "";

/// Preserves the existing monochrome navigation treatment outside shadcn builds.
#[cfg(any(not(feature = "theme-shadcn"), feature = "theme-custom"))]
pub(crate) const APP_SIDEBAR_CSS: &str = r#"
#app .c_euv_sidebar_children { margin-left: var(--space-md, 12px); padding-left: var(--space-sm, 8px); }
#app .c_euv_sidebar_children .c_euv_sidebar_link::before, #app .c_euv_sidebar_children .c_euv_sidebar_group_title::before { left: -9px; }
#app .c_euv_sidebar_children .c_euv_sidebar_link_active::before { left: -8px; }
#app .c_euv_sidebar_children .c_euv_sidebar_link_active_flush::before, #app .c_euv_sidebar_children .c_euv_sidebar_group_title_active::before { left: 0; }
#app .c_euv_sidebar_link, #app .c_euv_sidebar_group_title, #app .c_euv_sidebar_link_active { position: relative; }
#app .c_euv_sidebar_link::before, #app .c_euv_sidebar_group_title::before { content: ''; position: absolute; top: 0; bottom: 0; width: 5px; background: transparent; pointer-events: none; }
#app .c_euv_sidebar_group_title::before { left: 0; }
#app .c_euv_sidebar_link::before { left: 0; }
#app .c_euv_sidebar_link:hover::before, #app .c_euv_sidebar_group_title:hover::before { background: currentColor; }
#app .c_euv_sidebar_link:hover, #app .c_euv_sidebar_group_title:hover { background: transparent; color: var(--foreground); box-shadow: none; }
#app .c_euv_sidebar_link:not(.c_euv_sidebar_link_active):not(.c_euv_sidebar_link_active_flush):hover::before, #app .c_euv_sidebar_group_title:not(.c_euv_sidebar_group_title_active):not(.c_euv_sidebar_group_title_root):not(.c_euv_sidebar_group_title_root_active):hover::before { background: currentColor; }
#app .c_euv_sidebar_link_active, #app .c_euv_sidebar_group_title_active { background: var(--primary); color: var(--primary-foreground); box-shadow: none; }
#app .c_euv_sidebar_link_active::before, #app .c_euv_sidebar_group_title_active::before { background: var(--primary); content: ''; position: absolute; width: 5px; top: 0; bottom: 0; pointer-events: none; left: 0; }
#app .c_euv_sidebar_group_title_active::before { left: 0; }
#app .c_euv_sidebar_link_active:hover, #app .c_euv_sidebar_group_title_active:hover { background: var(--primary); color: var(--primary-foreground); box-shadow: none; }
#app .c_euv_sidebar_group_title_root, #app .c_euv_sidebar_group_title_root_active { position: relative; }
#app .c_euv_sidebar_group_title_root::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 5px; background: transparent; pointer-events: none; }
#app .c_euv_sidebar_group_title_root:hover::before { background: var(--foreground); }
#app .c_euv_sidebar_group_title_root_active::before { background: var(--primary-foreground); }
#app .c_euv_sidebar_group_title_root:hover { background: transparent; color: var(--foreground); }
#app .c_euv_sidebar_group_title_root_active, #app .c_euv_sidebar_group_title_root_active:hover { background: var(--primary); color: var(--primary-foreground); }
#app .c_euv_sidebar_link_active_flush, #app .c_euv_sidebar_group_title_active { position: relative; margin-left: -9px; width: calc(100% + 9px); padding-left: calc(12px + 9px); }
#app .c_euv_sidebar_link_active_flush::before, #app .c_euv_sidebar_group_title_active::before { left: 0; }
#app .c_euv_sidebar_link_active_flush:hover { background: var(--primary); }
"#;

/// The injected stylesheet making the viewport-locked docs shell scroll
/// inside its main column instead of the window.
///
/// Lives in `lib.rs` because the rules target `c_app_main` /
/// `c_mobile_main` in *both* shells and several `c_euv_*` primitives
/// owned by the `euv-ui` crate, so there is no single view module that
/// owns it.
pub(crate) const APP_GLOBAL_CSS: &str = "html, body { height: 100%; overflow: hidden; } \
         #app { height: 100%; } \
         #app .c_app_main { padding-top: var(--padding-main-top, 24px); padding-bottom: var(--edge-gutter-bottom, 20px); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overflow-x: hidden; } \
         #app .c_mobile_main { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overflow-x: hidden; } \
         #app .c_euv_footer { flex-wrap: wrap; flex-shrink: 0; overflow: visible; } \
         #app .c_euv_footer_item_link { white-space: normal; overflow-wrap: anywhere; max-width: 100%; min-width: 0; } \
         #app .c_euv_footer_item_icon { max-width: 100%; object-fit: contain; } \
         #app .md-body h1, #app .md-body h2, #app .md-body h3, #app .md-body h4, #app .md-body h5, #app .md-body h6 { padding-left: 0; } \
         #app .md-body .header-anchor { display: none; } \
             #app .md-body img { display: inline-block; width: auto; max-width: 100%; height: auto; vertical-align: baseline; } \
             #app .md-body a > img { display: inline-block; } \
             #app .md-body img[src$='.svg'], #app .md-body img[src*='shields.io'], #app .md-body img[src*='github.com'] { max-height: 20px; max-width: 100%; } \
             #app .md-body table img { max-height: 1.4em; } \
             \
             #app .c_nav_footer_divider { left: 0.75rem; right: 0.75rem; } \
             /* The header is the reference documentation site's one full-width \
                sticky row: brand, top-level links, search field, theme toggle. \
                Its metrics follow the reference — a 56px row, 24px inline \
                padding and 32px controls; corner radii follow the active scheme. \
                It spans the viewport, so the shell stacks the header above the \
                sidebar-and-content row instead of letting the two columns sit \
                beside it. */ \
             #app .c_docs_header { position: sticky; top: 0; z-index: 100; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: var(--background); border-bottom: 1px solid var(--border); flex-shrink: 0; } \
             #app .c_docs_header_brand { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; color: var(--foreground); text-decoration: none; } \
             #app .c_docs_header_brand_title { white-space: nowrap; } \
             #app .c_docs_header_links { display: flex; align-items: center; gap: 2px; } \
             #app .c_docs_header_link, #app .c_docs_header_link_active { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: var(--radius-md, 0px); font-size: 14px; font-weight: 500; text-decoration: none; transition: background 150ms ease, color 150ms ease; } \
             #app .c_docs_header_link:hover { background: var(--accent); color: var(--accent-foreground); } \
             #app .c_docs_header_actions { margin-left: auto; display: flex; align-items: center; gap: 8px; } \
             #app .c_docs_header_search { position: relative; display: flex; align-items: center; height: 32px; width: 256px; padding: 0 12px; border-radius: var(--radius-md, 0px); background: var(--muted); border: 1px solid transparent; } \
             #app .c_docs_header_search:focus-within { border-color: var(--ring); } \
             #app .c_docs_header_search_input { width: 100%; border: none; background: transparent; color: var(--foreground); font-size: 14px; font-family: inherit; outline: none; } \
             #app .c_docs_header_search_input::placeholder { color: var(--muted-foreground); } \
             #app .c_docs_header_separator { width: 1px; height: 16px; background: var(--border); } \
             #app .c_docs_header_icon_button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-md, 0px); color: var(--foreground); cursor: pointer; } \
             #app .c_docs_header_icon_button:hover { background: var(--accent); color: var(--accent-foreground); } \
             #app .c_docs_shell { flex-direction: column; } \
             #app .c_docs_body { display: flex; flex: 1; min-height: 0; width: 100%; } \
             #app .c_nav_section_label { padding-left: 0.75rem; } \
             #app .c_nav_footer { padding-left: 0.75rem; } \
             #app .c_euv_doc_layout { max-width: 1160px; display: flex; flex-direction: row; width: 100%; flex-shrink: 0; } \
             /* `min-height: 100%` fills the visible area of `c_app_main` so the tail can be pushed to the bottom; a viewport unit overshoots by the header. `space-between` puts the tail at the bottom when the article is short and lets it follow the article when the article is long. Not sticky, not fixed: the tail scrolls with the page. */ \
             #app .c_euv_doc_content { display: flex; flex-direction: column; flex: 1; justify-content: space-between; } \
             #app .c_euv_doc_content article.md-body { display: block; flex: 0 0 auto; min-height: 0; overflow: visible; } \
             #app .c_euv_doc_content article.md-body > div { display: block; min-height: 0; } \
             #app .c_euv_doc_tail { display: block; flex: 0 0 auto; } \
                         #app .c_euv_doc_toc { width: 280px; min-width: 0; box-sizing: border-box; flex-shrink: 0; position: sticky; top: var(--padding-main-top, 24px); align-self: flex-start; max-height: 100%; overflow-y: auto; overflow-x: hidden; } \
                         #app .c_euv_doc_toc .c_euv_toc { width: 100%; min-width: 0; box-sizing: border-box; } \
                         #app .c_euv_toc_link_nested { padding-left: 0.75rem; font-size: var(--font-sm, 0.875rem); color: var(--muted-foreground); line-height: 1.5; } \
                         #app .c_euv_doc_toc .c_euv_toc_link, #app .c_euv_doc_toc .c_euv_toc_link_active, #app .c_euv_doc_toc .c_euv_toc_link_nested, #app .c_euv_doc_toc .c_euv_toc_link_nested_active { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } \
                         #app .c_euv_toc_link:hover, #app .c_euv_toc_link_nested:hover { color: var(--primary); } \
                         #app .c_euv_toc_link_active, #app .c_euv_toc_link_nested_active { color: var(--primary); font-weight: 700; } \
                         #app .c_euv_toc_link_active:hover, #app .c_euv_toc_link_nested_active:hover { color: var(--primary); } \
             \
             #app .c_euv_pagination { padding-bottom: var(--space-xl, 1.25rem); gap: var(--gap-component, 1rem); flex-wrap: nowrap; align-items: stretch; width: 100%; } \
             #app .c_euv_pagination_content .c_euv_pagination_link { padding: var(--space-md, 0.75rem); gap: var(--space-2xs, 0.25rem); min-width: 0; max-width: none; } \
             \
             /* The page head carries the title and the muted description \
                line under it. The head owns the gap to the body, so a page \
                without a description keeps the same rhythm as before. */ \
             #app .c_docs_page_head { margin: 0 0 var(--space-lg, 1rem) 0; } \
             #app .c_docs_page_title { font-size: 1.875rem; font-weight: 600; letter-spacing: -0.025em; margin: 0; padding-top: 0; color: var(--foreground); } \
             #app .c_docs_page_description { margin: var(--space-xs, 0.25rem) 0 0 0; font-size: var(--font-base, 1rem); line-height: 1.6; color: var(--muted-foreground); } \
             #app .md-body > :first-child { margin-top: 0; } \
             #app .md-body h1:first-of-type, #app .md-body h2:first-of-type, #app .md-body h3:first-of-type, #app .md-body h4:first-of-type, #app .md-body h5:first-of-type, #app .md-body h6:first-of-type { margin-top: 0; } \
             #app .md-body > div:first-child > :first-child { margin-top: 0; } \
             #app .md-body > div:first-child > :first-child > * { margin-top: 0; } \
             \
             #app .c_feature_card { border: 1px dashed var(--foreground); border-radius: 0; padding: 1rem; background: transparent; } \
             #app .c_home_btn_secondary { background: transparent; color: var(--foreground); border: 1px solid var(--border); } \
             #app .c_home_btn_secondary:hover { background: var(--accent); color: var(--accent-foreground); } \
             \
             #app .c_docs_feature_grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; } \
             @media (max-width: 767px) { #app .c_docs_feature_grid { grid-template-columns: minmax(0, 1fr); } } \
             #app .c_docs_feature_card { display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem; border: 1px dashed var(--foreground); border-radius: 0; background: transparent; text-decoration: none; color: inherit; transition: background 0.15s ease-out, border-color 0.15s ease-out; min-width: 0; } \
             #app .c_docs_feature_card:hover { background: var(--muted); border-color: var(--foreground); } \
             #app .c_docs_feature_card_inner { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; } \
             #app .c_docs_feature_card_icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; } \
             #app .c_docs_feature_card_title { font-size: 1.125rem; font-weight: 600; overflow-wrap: anywhere; } \
             #app .c_docs_feature_card_details { font-size: 0.875rem; color: var(--muted-foreground); overflow-wrap: anywhere; } \
             \
             #app .docs-container-tip, #app .docs-container-note, #app .docs-container-important, #app .docs-container-info { border: 1px dashed var(--foreground); border-left-width: 4px; padding: 0.75rem 1rem; margin: 1rem 0; background: var(--muted); } \
             #app .docs-container-warning, #app .docs-container-caution { border: 1px solid var(--foreground); border-left-width: 4px; padding: 0.75rem 1rem; margin: 1rem 0; background: var(--muted); } \
             #app .docs-container-danger { border: 1px solid var(--foreground); border-left-width: 4px; padding: 0.75rem 1rem; margin: 1rem 0; background: var(--muted); } \
             #app .docs-container-title { font-weight: 600; margin: 0 0 0.25rem 0; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; } \
             #app .docs-container-title:empty { display: none; } \
             \
             #app .md-body img:not([data-loaded]) { height: 0px; margin: 0px; visibility: hidden; } \
             #app .md-body img[data-loaded] { transition: opacity 0.2s ease-out; }";

/// The `class` of a documentation page's `<h1>` title.
pub(crate) const CLASS_DOCS_PAGE_TITLE: &str = "c_docs_page_title";

/// The `class` of the block holding a documentation page's title and
/// its description line.
pub(crate) const CLASS_DOCS_PAGE_HEAD: &str = "c_docs_page_head";

/// The `class` of a documentation page's muted description line.
pub(crate) const CLASS_DOCS_PAGE_DESCRIPTION: &str = "c_docs_page_description";

/// The `class` of the site header row.
pub(crate) const CLASS_DOCS_HEADER: &str = "c_docs_header";

/// The `class` of the header's brand block (logo plus site title).
pub(crate) const CLASS_DOCS_HEADER_BRAND: &str = "c_docs_header_brand";

/// The `class` of the brand block's title line.
pub(crate) const CLASS_DOCS_HEADER_BRAND_TITLE: &str = "c_docs_header_brand_title";

/// The `class` of the header's top-level navigation list.
pub(crate) const CLASS_DOCS_HEADER_LINKS: &str = "c_docs_header_links";

/// The `class` of the header's trailing action row.
pub(crate) const CLASS_DOCS_HEADER_ACTIONS: &str = "c_docs_header_actions";

/// The `class` of the header's search field.
pub(crate) const CLASS_DOCS_HEADER_SEARCH: &str = "c_docs_header_search";

/// The `class` of the search field's input element.
pub(crate) const CLASS_DOCS_HEADER_SEARCH_INPUT: &str = "c_docs_header_search_input";

/// The `class` of the vertical rule between the header's action groups.
pub(crate) const CLASS_DOCS_HEADER_SEPARATOR: &str = "c_docs_header_separator";

/// The `class` of the header's icon button (the theme toggle).
pub(crate) const CLASS_DOCS_HEADER_ICON_BUTTON: &str = "c_docs_header_icon_button";

/// The `class` of the shell that stacks the header above the content row.
pub(crate) const CLASS_DOCS_SHELL: &str = "c_docs_shell";

/// The `class` of the row holding the sidebar and the content column.
pub(crate) const CLASS_DOCS_BODY: &str = "c_docs_body";

/// The `class` of the home-page feature-card grid.
pub(crate) const CLASS_FEATURE_GRID: &str = "c_docs_feature_grid";

/// The `class` of a home-page feature card (the tile and its anchor form).
pub(crate) const CLASS_FEATURE_CARD: &str = "c_docs_feature_card";

/// The `class` of the column holding a feature card's icon / title / details.
pub(crate) const CLASS_FEATURE_CARD_INNER: &str = "c_docs_feature_card_inner";

/// The `class` of a feature card's leading icon glyph.
pub(crate) const CLASS_FEATURE_CARD_ICON: &str = "c_docs_feature_card_icon";

/// The `class` of a feature card's bold title line.
pub(crate) const CLASS_FEATURE_CARD_TITLE: &str = "c_docs_feature_card_title";

/// The `class` of a feature card's muted detail line.
pub(crate) const CLASS_FEATURE_CARD_DETAILS: &str = "c_docs_feature_card_details";

/// The placeholder icon value that means "this feature has no icon", as
/// opposed to a real emoji. Such cards hide the icon slot entirely so the
/// placeholder does not leak as visible text.
pub(crate) const FEATURE_ICON_PLACEHOLDER: &str = "blog";

/// The `target` that opens a link in a new browsing context.
pub(crate) const LINK_TARGET_BLANK: &str = "_blank";

/// The `rel` applied to every `target="_blank"` link, so the opened page
/// cannot reach back through `window.opener`.
pub(crate) const LINK_REL_NOOPENER: &str = "noopener noreferrer";

/// The `title` (tooltip) of the desktop and mobile theme-toggle buttons.
pub(crate) const THEME_TOGGLE_TITLE: &str = "切换主题";

/// Selector matching the scrollable main column of the desktop shell.
pub(crate) const MAIN_CONTAINER_SELECTOR_DESKTOP: &str = "[class*=c_app_main]";

/// Selector matching the scrollable main column of the mobile shell.
pub(crate) const MAIN_CONTAINER_SELECTOR_MOBILE: &str = "[class*=c_mobile_main]";

/// The `type` attribute of the password gate's input element.
pub(crate) const INPUT_TYPE_PASSWORD: &str = "password";

/// The `KeyboardEvent.key` value that submits the password form.
pub(crate) const KEY_ENTER: &str = "Enter";

/// The URL scheme prefix that marks a link as external (leaving the SPA),
/// tested with `starts_with` so both `http` and `https` match.
pub(crate) const URL_SCHEME_HTTP_PREFIX: &str = "http";

/// The root URL path, used as the site-root fallback when the location is
/// unavailable (non-browser unit tests).
pub(crate) const URL_PATH_ROOT: &str = "/";