platform tier

platform-html-components

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.

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.

Tierplatform
Rolecapability
Pathcrates/platform/html-components
Edition2021
Targetsplatform_html_components
Public items0 across 0 modules
Tests8

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.

ExportDefined 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
Locationcrates/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.

CrateTierOptionalOnly on
`foundation-view-mode`foundationnoalways

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

KindNameSource
libplatform_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

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone 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.

1 workspace crate depends on this one: platform-privacy-scan-api.

Verification

KindCount
Unit tests8
Integration tests0
Examples0
Doctests0

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files1
Source lines275
Code lines154
Public API items0
Public modules0
Tests8
Examples0
Cargo features0
Direct runtime dependencies1
Workspace reverse dependencies1
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.

All platform · Manual