@quario/html
The HTML render target. Resolves an escaped fragment you drop into your own page shell.
html(options?)
function html(options?: HtmlOptions): Target<'html', Promise<string>>Returns the target. report.render(html(), data) resolves the fragment. It takes
two options: fonts and paths. Any other key, or one of the wrong type, throws
a TypeError naming the path.
HtmlOptions
| Field | Type | Meaning |
|---|---|---|
fonts |
Record<string, string> |
A declared family name mapped to a CSS font-family value. Names match case-insensitively, and a mapping may cover the generics sans / serif / mono like any other. |
paths |
boolean |
Emit data-q-path on each element whose event carries a schema path. Off by default. |
A fonts value containing ; or } throws from html(). So does an array in
place of the record: families named 0, 1 and 2 are a mapping nobody meant
to write. paths takes true or false and nothing else, so paths: 'no'
throws rather than turning stamping on.
The stylesheet
@import '@quario/html/style.css';The reference stylesheet is a separate export. Without it the fragment inherits whatever the host page sets.