httk.serve.web.renderers.base¶
Define renderer inputs and outputs shared by content renderers.
Classes¶
Describe a widget invocation replaced by a stable placeholder. |
|
Carry rendered HTML, metadata, and widget placements. |
|
Define the source-renderer protocol. |
Module Contents¶
- class httk.serve.web.renderers.base.WidgetPlacement[source]¶
Describe a widget invocation replaced by a stable placeholder.
- Parameters:
placeholder – Placeholder text inserted into rendered content.
name – Requested widget name.
props – Literal widget properties.
source_path – Source file containing the invocation.
line – One-based source line.
column – One-based source column.
snippet – Original invocation text.
- props: collections.abc.Mapping[str, object][source]¶
- source_path: pathlib.Path[source]¶
- class httk.serve.web.renderers.base.RenderResult[source]¶
Carry rendered HTML, metadata, and widget placements.
- Parameters:
html – Rendered HTML before templates are applied.
metadata – Source metadata.
widgets – Widget placements found in the source.
- widgets: tuple[WidgetPlacement, Ellipsis] = ()[source]¶