Skip to main content

Crate euv_docs

Crate euv_docs 

Source
Expand description

euv-docs

Cross-platform documentation viewer, static HTML/SVG generator, and multi-locale zero-JS/zero-CSS WebAssembly site builder powered by euv and euv-ui.

Structs§

DocFooterItem
Single externally supplied footer item (for example a filing notice with optional local badge icon).
DocFrontmatter
Parsed YAML frontmatter metadata attached to a Markdown documentation file.
DocHomeAction
Call-to-action button declared under actions: on a home: true landing page.
DocHomeFeature
Feature or product card declared under features: on a home: true landing page.
DocHomeStat
Key metric tile declared under stats: on a home: true landing page.
DocLocaleConfig
Per-locale site configuration declared under locales: in root README.md frontmatter.
DocNavbarItem
Single top-bar navigation link declared under a locale’s navbar: list.
DocPage
Fully parsed documentation page ready for native rendering or static generation.
DocSite
Collection of parsed documentation pages forming a complete site or locale bundle.
DocSiteConfig
Combined multi-locale site configuration parsed from root README.md frontmatter.
DocSiteFrontmatter
Optional site-level metadata declared under site: in root Markdown frontmatter.
DocTocItem
Table-of-contents heading entry derived from a parsed document.
DocsBuildOptions
Configuration controlling static documentation site generation and optional dev live-reload.
DocsCatalogArtifact
Single published project artifact returned by /api/page-artifacts and rendered in Rust.
DocsViewerState
Shared reactive state driving the showcase-parity euv-docs viewer across native desktop, headless, and WebAssembly targets.
GeneratedSiteReport
Result summary emitted after generating a static documentation bundle.
PackedPageBody
Per-page heavy content record stored inside the compressed site_bodies.euvz payload.
PackedSiteBundle
Split site bundle pairing a lightweight plaintext metadata shell with compressed page bodies.
SearchIndexEntry
Compact search index record serialized into search-index.json and embedded client search.

Enums§

DocBlock
Structured content block extracted from a Markdown documentation file.
DocsCodecError
Typed failure taxonomy for euv-docs payload compression and site bundle unpacking.

Constants§

CODEC_MAGIC
Four-byte magic prefix identifying an euv-docs compressed payload stream.
CODEC_VERSION
Current compressed payload stream format version.
CODEC_WINDOW_SIZE
Largest back-reference distance supported by the sliding window (1 MiB).
DEFAULT_DOC_TITLE
Default title assigned when a document omits frontmatter title.
DOCS_BNAV_CATALOG_EN
Localized bottom navigation Catalog tab label (English).
DOCS_BNAV_CATALOG_JA
Localized bottom navigation Catalog tab label (Japanese).
DOCS_BNAV_CATALOG_KO
Localized bottom navigation Catalog tab label (Korean).
DOCS_BNAV_CATALOG_ROUTE
Virtual route sentinel dispatched by the mobile bottom-nav Catalog button to toggle the catalog drawer.
DOCS_BNAV_CATALOG_ZH
Localized bottom navigation Catalog tab label (Chinese).
DOCS_BNAV_HOME_EN
Localized bottom navigation Home tab label (English).
DOCS_BNAV_HOME_JA
Localized bottom navigation Home tab label (Japanese).
DOCS_BNAV_HOME_KO
Localized bottom navigation Home tab label (Korean).
DOCS_BNAV_HOME_ZH
Localized bottom navigation Home tab label (Chinese).
DOCS_CATALOG_API_PATH
Public JSON endpoint path supplying stored page artifacts to the home catalog.
DOCS_CATALOG_CARD_CLASS
Stable class identifier marker for the compiled Rust public catalog component.
DOCS_FLAG_DEBUG
CLI flag enabling debug profile compilation for multi-locale WASM bundles.
DOCS_FLAG_GENERATE
CLI flag triggering static HTML/JSON site generation.
DOCS_FLAG_HEADLESS
CLI flag enabling headless verification mode.
DOCS_FLAG_INTERACTIVE
CLI flag keeping the native documentation viewer open in an interactive event loop.
DOCS_FLAG_LOCALE
CLI flag selecting a single locale to build (--locale <dir|prefix|label>).
DOCS_FLAG_RELEASE
CLI flag enabling release profile compilation for multi-locale WASM bundles.
DOCS_FLAG_STATIC_HTML
CLI flag forcing legacy single-locale static HTML output even when locales: is declared.
DOCS_OFFICIAL_LOGO_URL
Official Euv brand logo image URL used in documentation headers and favicons.
DOCS_SITE_TAGLINE
Default site tagline displayed on the documentation home page.
DOCS_SITE_TITLE
Default site title for generated documentation bundles.
DOCS_WINDOW_HEIGHT
Default logical window height for the docs viewer.
DOCS_WINDOW_TITLE
Default window title for the interactive documentation viewer.
DOCS_WINDOW_WIDTH
Default logical window width for the docs viewer.
EUV_DOCS_RELEASE_MARKER
Stable release version marker embedded in compiled documentation WASM bundles.

Functions§

apply_docs_history_navigation
Applies an incoming browser history location (popstate / hashchange) to app and state, dismissing overlays and exiting fullscreen first.
asset_base_for_locale_prefix
Computes the relative site-root asset base prefix ("./" for root locale "/", "../" for "/en/", etc.) working under both root and subpath deployments.
build_docs_bundle
Loads all Markdown files beneath src_dir (excluding out_dir) and builds a complete static docs site.
build_multilocale_wasm_site
Builds a complete multi-locale zero-JS/zero-CSS euv + euv-ui WebAssembly documentation site into out_dir.
compress_docs_bytes
Compresses raw documentation bytes into the zero-dependency EUVZ LZ77 + Canonical Huffman format.
decompress_docs_bytes
Decompresses an EUVZ byte stream produced by compress_docs_bytes back to the exact original bytes.
format_catalog_bytes
Formats a byte count into a human-readable size string paired with raw bytes for tooltip inspection.
format_catalog_utc
Formats a Unix epoch second timestamp into an ISO-8601 UTC string (YYYY-MM-DD HH:MM:SS UTC).
generate_static_docs
Generates static HTML pages, search index, and sitemap for site into out_dir using default options.
generate_static_docs_with_options
Generates a complete static documentation site with clean URLs, instant search, TOC, asset copying, and optional dev HMR.
load_doc_site
Recursively loads all .md files under root_dir into a sorted DocSite.
load_doc_site_with_options
Recursively loads all .md files under root_dir with optional site title override and smart directory filtering.
load_locale_site
Loads a single locale content directory using shared DocSiteConfig and active DocLocaleConfig metadata.
load_site_config
Inspects <src_dir>/README.md and <src_dir>/../README.md for a multi-locale DocSiteConfig frontmatter block.
mount_doc_page
Renders a single standalone DocPage (meta bar, header, interactive TOC, and full EuvMarkdown) as native euv-ui nodes.
mount_doc_page_with_context
Renders a standard documentation article page purely from euv-ui components (EuvBreadcrumb, EuvDocMetaBar, EuvHeader, EuvDocToc, EuvMarkdown, EuvDivider, EuvDocPager, EuvFooter).
mount_docs_catalog
Renders the compiled Rust /api/page-artifacts public catalog section with loading, localized error/retry, and expandable SHA-256 cards.
mount_docs_footer
Renders the site footer row with localized MIT license attribution followed inline directly by footer_items (such as ICP filing numbers) in a single unified row.
mount_docs_viewer
Mounts the cross-platform reactive showcase-parity documentation viewer for site using euv-ui.
mount_docs_viewer_with_state
Mounts the full showcase-parity reactive documentation shell (EuvAppShell, EuvRouter PageRetention::Freeze, live search, EuvCommand modal, 17-scheme theme controls, EuvDocSectionNav, and mobile EuvBottomNav).
normalize_docs_history_target
Normalizes browser location.hash and location.pathname into a valid DocSite route and optional heading anchor slug.
pack_site_bundle
Splits a DocSite into a lightweight plaintext metadata shell and an EUVZ-compressed page body blob.
parse_catalog_artifacts_json
Parses and validates a /api/page-artifacts JSON response into DocsCatalogArtifact entries.
parse_markdown_page
Parses a single Markdown document with optional YAML frontmatter into a DocPage.
render_docs_app
Launches the documentation viewer app in either single-frame or interactive event-loop mode.
render_docs_smoke
Launches the documentation viewer app and steps one headless or native frame.
render_page_html
Renders a single DocPage into a self-contained static HTML document using default build options.
render_wasm_locale_shell_html
Renders the self-contained zero-JS-file, zero-CSS-file index.html / 404.html shell for a single locale WASM bundle.
resolve_locale_switch_href
Resolves a portable relative locale-switch URL from active_locale_prefix to target_locale_prefix working under both / and /pages/docs/.
transform_wasm_glue_inline
Strips ES module export statements from wasm-bindgen’s generated glue script and rewrites the .wasm URL to ./pkg/<wasm_file>.
unique_locales
Deduplicates locale entries by content directory while preserving declaration order.
unpack_site_bundle
Reconstructs a DocSite from its plaintext metadata shell JSON and EUVZ-compressed page bodies.