import { CodeBlockOverlay } from './index.js'; export type HoverOptions = { /** Whether the prefered position of the tooltip is above the token. @default false */ above?: boolean; /** A CSS length value for the tooltip's max width. */ maxWidth?: string; /** A CSS length value for the tooltip's max height. */ maxHeight?: string; }; /** * Utility that makes it easier to add hover descriptions to tokens. * @param codeBlock Code block to add the functionality to. * @param callback Function called when a token with only textual children is hovered. * * The function gets called with the following arguments: * - `types`: Array with the token's type as the first element, followed by any alises. * - `language`: The language at the token's position. * - `text`: The `textContent` of the token. * - `element`: The `` element of the hovered token. * * Lastly, the function should return an array of children that get added to the tooltip. * If `null` or `undefined` is returned, no tooltip is shown for the token. * @param options Options for configuring the size and position of the tooltip. */ declare const addHoverDescriptions: (callback: (types: string[], language: string, text: string, element: HTMLSpanElement) => (string | Node)[] | null | undefined, options?: HoverOptions) => CodeBlockOverlay; /** * Highlights bracket pairs when hovered. Clicking on a pair keeps it highlighted. * Clicking anywhere inside the code block removes the highlight. * * The order inside `openingBrackets` and `closingBrackets` determines which tokens are * matched together. * * @param codeBlock Code block to add bracket pair highlighting to. * @param pairs Which characters to match together. The opening character must be followed * by the corresponding closing character. Defaults to `"()[]{}"`. */ declare const highlightBracketPairsOnHover: (pairs?: string) => CodeBlockOverlay; /** * Highlights tag pairs when a tag name is hovered. Clicking on a pair keeps it * highlighted. Clicking anywhere inside the code block removes the highlight. * @param codeBlock Code block to add tag pair highlighting to. */ declare const highlightTagPairsOnHover: () => CodeBlockOverlay; export { addHoverDescriptions, highlightBracketPairsOnHover, highlightTagPairsOnHover };