yera.ui.rendering.renderer

Assemble the complete browser shell from templates and trusted fragments.

Structural templates and TrustedHTML fields are inserted verbatim. Plain context values are escaped for their HTML text or attribute position. Rendering fails if the packaged template is missing a required placeholder or leaves a Yera placeholder unresolved.

Symbols

def render_shell — Render a complete browser document from one shell context.

render_shell

render_shell(
    context: ShellContext,
) → TrustedHTML

Render a complete browser document from one shell context.

The renderer first installs server-owned structural templates, then substitutes dynamic values. Trusted composer, listener, workspace, and main content fragments are inserted verbatim. Session IDs, titles, app IDs, URLs, screen keys, and other plain strings are escaped at this boundary.

Navigation controls come from the default screen registry, so desktop and mobile destinations share stable keys and active-state behavior.

Parameters

context
type: ShellContext

Typed fragments and plain values for one shell instance.

Returns

type: TrustedHTML

Trusted HTML containing the complete browser document.

Raises

ValueError

If a required template placeholder is absent or a Yera placeholder remains unresolved.