Expand description
Exposes the ui runtime module.
ยงExamples
โ
use pharos_native::runtime::ui;ยงRelated
crate::runtimefor sibling modules in the same crate.
Constantsยง
- UI_
BUFFER_ ๐LIMIT - UI_
IDENTIFIER_ ๐LIMIT
Functionsยง
- ADD_
UI_ PARAM - Performs ADD UI PARAM.
- find_
fragment_ ๐value - Finds fragment value.
- html_
escape ๐ - Performs HTML escape.
- resolved_
value ๐ - Performs resolved value.
- ui_
append_ attr_ escaped - Appends HTML-escaped attribute text to a canonical buffer.
- ui_
append_ boolean_ attribute - Appends a boolean HTML attribute when enabled.
- ui_
append_ ledger_ attribute - Adds a ledger-backed attribute after resolving its value.
- ui_
append_ structured_ attributes - Appends a structured attribute group from a declaration.
- ui_
buffer_ append - Appends one complete canonical UI fragment to a bounded buffer.
- ui_
buffer_ append_ n - Appends a bounded slice to a canonical UI buffer.
- ui_
buffer_ take - Takes ownership of a canonical UI buffer and leaves it empty.
- ui_
declaration_ attributes - Builds the validated attribute string for one UI declaration.
- ui_
event_ literal_ allowed - Rejects event literals that could inject markup or script.
- ui_
find_ element - Finds a canonical UI declaration by identifier.
- ui_
fragment_ path_ valid - Validates an app-relative fragment path and rejects traversal or control bytes.
- ui_
identifier_ valid - Validates an identifier used by the canonical UI ledger.
- ui_
input_ type_ allowed - Restricts input widgets to the HTML types supported by the declarative contract.
- ui_
interpolated_ string - Interpolates
{key}placeholders in a scalar string. - ui_
load_ ledger - Loads a UI ledger JSON document from an app root.
- ui_
optional_ attribute - Builds one optional escaped HTML attribute.
- ui_path
- Resolves a validated app-relative UI path while preserving containment.
- ui_
placeholder_ id - Computes a validated placeholder identifier.
- ui_
render_ button_ row - Renders a button row from a declaration.
- ui_
render_ choice_ options - Renders a choice group as safe option or radio markup.
- ui_
render_ declaration_ html - Renders one complete declaration using the canonical UI contract.
- ui_
render_ fragment - Loads and renders one validated app fragment.
- ui_
render_ help - Renders escaped help copy as a fragment.
- ui_
render_ mutable_ params - Expands bounded parameter placeholders without executing authored code.
- ui_
render_ options - Renders choice options from a declarative array.
- ui_
render_ page_ file - Renders a page template after ledger declarations are resolved.
- ui_
render_ page_ params_ fragment - Renders a declared fragment with page parameters.
- ui_
render_ param_ map - Performs UI render param map.
- ui_
resolved_ bool - Resolves a boolean value through page parameters.
- ui_
resolved_ string - Resolves a string value through page parameters.
- ui_
resolved_ trusted_ html - Resolves a trusted HTML value from a declaration or page parameters.
- ui_
scalar_ dup - Duplicates one scalar display value after parameter resolution.
- ui_
scalar_ text - Converts one scalar value to its canonical display text.
- ui_
shared_ asset_ fragment - Identifies shared framework fragments.
- ui_
shared_ asset_ path - Resolves a shared framework fragment under the app root.
- ui_
structured_ key_ allowed - Validates structured data and HTMX attribute keys.
- value_
text ๐ - Performs value text.