/** * Inline chips (`:chip[text]{style="…"}`): resolve each chip span's style * into the px / hex box the rich-text measurer lays out (see * `measure/rich.ts`). The measurer knows neither the DPI nor the chip * styles, so every text path — body blocks, table cells, captions, notes — * runs its spans through {@link resolveChipSpans} with the font size of the * text the chips sit in. */ import type { ChipBox, InlineSpan } from '../parse/index.js'; import type { ResolvedChipStyleConfig } from '../types.js'; import type { ResolvedConfig } from '../vdt.js'; /** What chip resolution needs from the resolved config. */ export interface ChipContext { styles: readonly ResolvedChipStyleConfig[]; dpi: number; } export declare function chipContextOf(resolved: Pick): ChipContext; /** The box of a chip set in text of `baseFontSizePx`: an em `fontSize` is * read against that text, the box lengths against the chip's own size. */ export declare function resolveChipBox(style: ResolvedChipStyleConfig, dpi: number, baseFontSizePx: number): ChipBox; /** The px size of a CSS font shorthand (`16px` when it has none). */ export declare function fontSizePxOf(fontString: string): number; /** Attach the resolved box to every chip span (the style its `style` id * names, else the first chip style). Spans without a chip pass through; * with no chip style at all a chip keeps no box and sets as bare text. */ export declare function resolveChipSpans(spans: InlineSpan[], ctx: ChipContext, baseFontSizePx: number): InlineSpan[]; //# sourceMappingURL=chips.d.ts.map