Components for server-rendered pages: markup, CSS and behaviour as compile-time string literals. The HTML sibling of platform-leptos-components, sharing its vocabulary and none of its framework.
| Tier | platform |
| Role | capability |
| Path | crates/platform/html-components |
| Edition | 2021 |
| Targets | platform_html_components |
| Public items | 0 across 0 modules |
| Tests | 8 |
What it is for
Components for pages that are &'static str assembled at compile time.
# Why a second component library
platform-leptos-components is a Leptos library. The sightings pages are server-rendered HTML held in Rust string constants and cannot consume it — not because of a missing adapter but because there is no runtime there to consume it with.
So the components live twice and the vocabulary lives once, in foundation-view-mode. Each track renders those words its own way. That split is the whole design; see view_switcher for how the compile-time half of it is enforced.
# The idiom, which is not new
Every component is a macro_rules! expanding to a literal, because the pages it serves are built by concat! and concat! takes literals. A const does not compose with that, and building each page with format! per request would put a copy of every page in the hot path to avoid one macro. sightings_nav! and sightings_redact_script! in platform-privacy-scan-api established this; this crate is where the reusable ones move.
# What is deliberately absent
Everything except the view switcher. A component library seeded with a speculative set is how the first one grew things nobody used, and the sprint that created this crate says so in its own scope section. The next component arrives when a page asks for it, and only after the capability index has been searched.
Capabilities
No public items.
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
No public modules: the crate root is its whole surface.
Public surface
No public items.
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
{storage_key,ViewMode} | foundation_view_mode::{storage_key,ViewMode} |
Boundary
Reaches into foundation.
Shares tier platform with 9 other crates: platform-api, platform-corpus-console, platform-customer-ui, platform-disclosure-lab, platform-dto, platform-leptos-components, platform-privacy-scan-api, platform-staff-ui, … (9 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | platform |
| Architectural role (taxonomy) | capability |
| Location | crates/platform/html-components |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_platform["platform"] --> n_foundation["foundation"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-view-mode` | foundation | no | always |
Development. None.
Build. None.
Depended on by. 1 workspace crate.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_platform_privacy_scan_api["platform-privacy-scan-api"] -->|uses| SELF SELF["platform-html-components"] SELF -->|runtime| n_foundation_view_mode["foundation-view-mode"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| lib | platform_html_components | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
1 workspace crate depends on this one: platform-privacy-scan-api.
Verification
| Kind | Count |
|---|---|
| Unit tests | 8 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
What the tests establish, by name:
an_unrecognised_stored_value_falls_back_to_the_default—src/lib.rsnothing_here_styles_the_list_itself—src/lib.rsstorage_failure_does_not_take_the_control_with_it—src/lib.rsthe_control_says_which_mode_is_current—src/lib.rsthe_markup_offers_exactly_the_modes_the_vocabulary_defines—src/lib.rsthe_script_accepts_exactly_the_values_parse_accepts—src/lib.rsthe_storage_key_is_the_one_the_leptos_track_writes—src/lib.rstwo_switchers_on_one_page_do_not_share_a_key—src/lib.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 0 | 0 |
Public modules with a //! block | 0 | 0 |
Metrics
| Metric | Value |
|---|---|
| Rust source files | 1 |
| Source lines | 275 |
| Code lines | 154 |
| Public API items | 0 |
| Public modules | 0 |
| Tests | 8 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 1 |
| Workspace reverse dependencies | 1 |
pie showData
title Rust source composition
"Code" : 154
"Blank or comment" : 121
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.