/** * Anchors (#261): the points of a document a cross-reference may name — * a heading with an identifier (`## Title {#id}`), an anchor set in the * text (`:anchor{#id}`, `[text]{#id}`) and a container opened with one * (`:::callout{#id}`). After layout each is located: the page it landed on * and the top-left of its heading or line, which the renderers turn into * link destinations and the sandbox scrolls to. */ import type { ContentBlock } from '../parse/index.js'; import type { VDTAnchor, VDTDocument } from '../vdt.js'; /** Whether the parsed content sets any anchor. */ export declare function hasAnchors(blocks: readonly ContentBlock[]): boolean; /** * Where each anchor of `blocks` (the parsed markdown body) landed in the * laid-out `doc`. A heading's anchor is its first fragment; an inline * anchor is the line holding the character it is attached to (as for an * index mark, see `locateIndexMarks`), else the nearest line on the side * it attaches to. Undefined when the document sets no anchor. */ export declare function locateAnchors(doc: VDTDocument, blocks: readonly ContentBlock[], bodyOffset: number): VDTAnchor[] | undefined; /** The identifiers set more than once in `blocks`, each with the source * ranges of its second and later settings (`duplicateAnchor`). */ export declare function duplicateAnchors(blocks: readonly ContentBlock[]): { id: string; start: number; end: number; }[]; //# sourceMappingURL=anchors.d.ts.map