export type EmbeddedSourceRenderer = import("./syntax-parser").EmbeddedSourceRenderer; export type DeferredEmbeddedSource = import("./syntax-parser").DeferredEmbeddedSource; export type HtmlNodeRef = import("./syntax-parser").HtmlNodeRef; export type HtmlElement = import("./syntax-parser").HtmlElement; export type HtmlDocument = import("./syntax-parser").HtmlDocument; export type HtmlDocumentFragment = import("./syntax-parser").HtmlDocumentFragment; export type HtmlNode = import("./syntax-parser").HtmlNode; export type HtmlAstSkip = import("./syntax-parser").HtmlAstSkip; export type HtmlPath = import("./syntax-parser").HtmlPath; export type HtmlVisitableNode = HtmlNode | HtmlDocument | HtmlDocumentFragment; export type VisitorFn = import("../util/SourceProcessor").VisitorFn; export type VisitorBucket = import("../util/SourceProcessor").VisitorBucket; export type VisitorMap = import("../util/SourceProcessor").VisitorMap; export type CompiledVisitorMap = import("../util/SourceProcessor").CompiledVisitorMap; /** * What the minifying printer may rewrite. Every entry is on unless it is * `false`, so a document one transform breaks can still be minified by the rest. */ export type HtmlTransformOptions = { /** * write a boolean attribute as the bare name its presence already means; `true` only the spellings the spec canonicalizes, `"all"` any value */ collapseBooleanAttributes?: (boolean | "all") | undefined; /** * which comments survive: `"some"` (the default) the ones that carry something, `true` / `"all"` every one, `false` none, or the ones a pattern matches / a predicate accepts, over the comment's own text. A comment a parser or a server reads is kept whatever this says */ comments?: (boolean | "all" | "some" | string | RegExp | ((comment: string) => boolean)) | undefined; /** * drop or re-pick an attribute value's quotes */ normalizeAttributeQuotes?: boolean | undefined; /** * fold an enumerated value to the keyword it names */ normalizeEnumeratedAttributes?: boolean | undefined; /** * normalize a space-, comma- or descriptor-separated list value (`class`, `rel`, `srcset`, `sizes`, the viewport `content`) */ normalizeListAttributes?: boolean | undefined; /** * write an integer attribute the one way its rules read it */ normalizeNumericAttributes?: boolean | undefined; /** * drop the whitespace around a URL value (`href`, `src`, `action`, …), which resolving the URL skips over */ normalizeUrlAttributes?: boolean | undefined; /** * leave out an optional tag other than the `` / `` / `` shell, which is `removeImpliedTags` */ removeOptionalTags?: boolean | undefined; }; export type HtmlProcessOptions = { /** * context element tag name for fragment parsing (see `parseHtml`); the HTML analog of the CSS parser's `as` parse-mode option */ fragmentContext?: string | undefined; /** * parse as XML instead of applying the HTML tree-construction rules */ xml?: boolean | undefined; /** * the quote an XML minifying print gives an attribute whose value costs the same in either (default `"`); `'` for a document bound for a `"`-quoted string, such as a CSS `url("data:…")` */ xmlQuote?: ("\"" | "'") | undefined; /** * node kinds to omit from the AST for speed/memory (see `HtmlAstSkip`) */ skip?: HtmlAstSkip | undefined; /** * print the safely-minified serialization (nodes rebuilt from source, inert comments dropped, opening-tag whitespace collapsed) as `process` walks, and return it (default false = walk only, return `""`) */ minimize?: boolean | undefined; /** * which of the meaning-preserving rewrites the minifying print makes; each is on unless it is `false` */ transforms?: HtmlTransformOptions | undefined; /** * collapse each run of whitespace in text to a single space, except where an ancestor renders it verbatim; `"smart"` also drops what sits against a block edge and `"all"` drops every edge (default false) */ collapseWhitespace?: (boolean | "conservative" | "smart" | "all") | undefined; /** * drop an attribute whose empty value leaves it in the state its absence gives (default false) */ removeEmptyAttributes?: boolean | undefined; /** * drop an element with no children and no attributes where its bare form renders nothing and nothing reads it (default false) */ removeEmptyElements?: boolean | undefined; /** * print a run of adjacent `