import { HoverState } from '@sourcegraph/codeintellify'; import * as H from 'history'; import * as React from 'react'; import { TextDocumentDecoration } from 'sourcegraph/module/protocol/plainTypes'; import { AbsoluteRepoFile, RenderMode } from '..'; import { ModeSpec } from '../../backend/features'; import { ExtensionsDocumentsProps } from '../../extensions/environment/ExtensionsEnvironment'; import { ConfigurationCascadeProps, ExtensionsControllerProps, ExtensionsProps } from '../../extensions/ExtensionsClientCommonContext'; import { ErrorLike } from '../../util/errors'; interface BlobProps extends AbsoluteRepoFile, ModeSpec, ConfigurationCascadeProps, ExtensionsProps, ExtensionsDocumentsProps, ExtensionsControllerProps { /** The raw content of the blob. */ content: string; /** The trusted syntax-highlighted code as HTML */ html: string; location: H.Location; history: H.History; className: string; wrapCode: boolean; renderMode: RenderMode; } interface BlobState extends HoverState { /** The desired position of the discussions gutter overlay */ discussionsGutterOverlayPosition?: { left: number; top: number; }; /** * blameLineIDs is a map from line numbers with portal nodes created to portal IDs. * It's used to render the portals for blames. The line numbers are taken from the blob * so they are 1-indexed. */ blameLineIDs: { [key: number]: string; }; /** The decorations to display in the blob. */ decorationsOrError?: TextDocumentDecoration[] | null | ErrorLike; } export declare class Blob extends React.Component { /** Emits with the latest Props on every componentDidUpdate and on componentDidMount */ private componentUpdates; /** Emits whenever the ref callback for the code element is called */ private codeViewElements; private nextCodeViewElement; /** Emits whenever the ref callback for the blob element is called */ private blobElements; private nextBlobElement; /** Emits whenever the ref callback for the hover element is called */ private hoverOverlayElements; private nextOverlayElement; /** Emits when the go to definition button was clicked */ private goToDefinitionClicks; private nextGoToDefinitionClick; /** Emits when the close button was clicked */ private closeButtonClicks; private nextCloseButtonClick; /** Subscriptions to be disposed on unmout */ private subscriptions; constructor(props: BlobProps); private getLSPTextDocumentPositionParams; /** * Appends a blame portal DOM node to the given code cell if it doesn't contain one already. * * @param line 1-indexed line number * @param codeCell The `` element */ private createBlameDomNode; componentDidMount(): void; shouldComponentUpdate(nextProps: Readonly, nextState: Readonly): boolean; componentDidUpdate(): void; componentWillUnmount(): void; render(): React.ReactNode; } export {}; //# sourceMappingURL=Blob.d.ts.map