import * as React from "react"; declare enum Severity { Error = 1, Warning = 2, Recommendation = 3, OfflineReportingOnly = 4 } type Props = { /** The children are the linty content we're highlighting */ children: React.ReactNode; /** Inline lint is highlighted differently than block lint. */ inline?: boolean; /** This is the text that appears in the tooltip */ message: string; /** This is used as the fragment id (hash) in the URL of the link */ ruleName: string; /** Lint warnings inside tables are handled specially */ insideTable: boolean; /** * Should lint highlighting be rendered as a block to the left of * the lint instead of on the right gutter? */ blockHighlight?: boolean; /** * How important this lint message is for the editor. Severity goes * from 1 (indicating an error) to 4 (offline reporting only) */ severity?: Severity; }; type State = { tooltipAbove: boolean; }; /** * This component renders "lint" nodes in a markdown parse tree. Lint nodes * are inserted into the tree by the Perseus linter (see * perseus-linter/src/index). * * This component serves multiple purposes * * 1) It renders a small circle in the right margin to indicate that there * is lint on (or near) that line. * * 2) The area around the circle is hoverable: when the mouse moves over it * the linty content is highlighted and a tooltip is displayed that explains * what the problem is. * * 3) The hoverable area is also an HTML tag. Clicking on it opens * a new tab and links to additional details about the specific lint rule. * * The CSS required to position the circles in the right margin is tricky * and it does not always work perfectly. When lint occurs on a block element * that has a right margin (like anything blockquoted) the circle will appear * to the left of where it belongs. And if there is more **/ declare class Lint extends React.Component { _positionTimeout: number | undefined; state: State; componentDidMount(): void; componentWillUnmount(): void; getPosition: () => void; renderLink: (arg1: any) => React.ReactElement; render(): React.ReactNode; } export default Lint;