UNPKG

@jupyterlab/git

Version:

A JupyterLab extension for version control using git

37 lines (36 loc) 1.23 kB
import * as React from 'react'; import { ICommit, INode, IRoute } from '../generateGraphData'; export interface IGitCommitGraphProps { /** * A list of commits with its own hash and its parents' hashes. */ commits: ICommit[]; /** * Callback to inquire the height of a specific SinglePastCommitInfo component. */ getNodeHeight: (sha: string) => number; /** * Radius of the commit dot. */ dotRadius?: number; /** * Width of the lines connecting the commit dots. */ lineWidth?: number; } export declare class GitCommitGraph extends React.Component<IGitCommitGraphProps> { constructor(props: IGitCommitGraphProps); getGraphData(): INode[]; getBranchCount(): number; getWidth(): number; getHeight(): number; renderRouteNode(svgPathDataAttribute: string, branch: number): JSX.Element; renderRoute(yOffset: number, route: IRoute, height: number): JSX.Element; renderCommitNode(x: number, y: number, sha: string, dot_branch: number): JSX.Element; renderCommit(commit: INode): [JSX.Element, JSX.Element[]]; render(): JSX.Element; private _graphData; private _x_step; private _dotRadius; private _lineWidth; }