1 | import HoganJsUtils from './hoganjs-utils';
|
2 | import * as Rematch from './rematch';
|
3 | import * as renderUtils from './render-utils';
|
4 | import { DiffFile, DiffLine, DiffBlock, DiffLineDeleted, DiffLineContent, DiffLineContext, DiffLineInserted } from './types';
|
5 | export interface LineByLineRendererConfig extends renderUtils.RenderConfig {
|
6 | renderNothingWhenEmpty?: boolean;
|
7 | matchingMaxComparisons?: number;
|
8 | maxLineSizeInBlockForComparison?: number;
|
9 | }
|
10 | export declare const defaultLineByLineRendererConfig: {
|
11 | renderNothingWhenEmpty: boolean;
|
12 | matchingMaxComparisons: number;
|
13 | maxLineSizeInBlockForComparison: number;
|
14 | matching: import("./types").LineMatchingType;
|
15 | matchWordsThreshold: number;
|
16 | maxLineLengthHighlight: number;
|
17 | diffStyle: import("./types").DiffStyleType;
|
18 | };
|
19 | export default class LineByLineRenderer {
|
20 | private readonly hoganUtils;
|
21 | private readonly config;
|
22 | constructor(hoganUtils: HoganJsUtils, config?: LineByLineRendererConfig);
|
23 | render(diffFiles: DiffFile[]): string;
|
24 | makeFileDiffHtml(file: DiffFile, diffs: string): string;
|
25 | generateEmptyDiff(): string;
|
26 | generateFileHtml(file: DiffFile): string;
|
27 | applyLineGroupping(block: DiffBlock): DiffLineGroups;
|
28 | applyRematchMatching(oldLines: DiffLine[], newLines: DiffLine[], matcher: Rematch.MatcherFn<DiffLine>): DiffLine[][][];
|
29 | processChangedLines(isCombined: boolean, oldLines: DiffLine[], newLines: DiffLine[]): FileHtml;
|
30 | generateLineHtml(oldLine?: DiffPreparedLine, newLine?: DiffPreparedLine): FileHtml;
|
31 | generateSingleLineHtml(line?: DiffPreparedLine): string;
|
32 | }
|
33 | declare type DiffLineGroups = [(DiffLineContext & DiffLineContent)[], (DiffLineDeleted & DiffLineContent)[], (DiffLineInserted & DiffLineContent)[]][];
|
34 | declare type DiffPreparedLine = {
|
35 | type: renderUtils.CSSLineClass;
|
36 | prefix: string;
|
37 | content: string;
|
38 | oldNumber?: number;
|
39 | newNumber?: number;
|
40 | };
|
41 | declare type FileHtml = {
|
42 | left: string;
|
43 | right: string;
|
44 | };
|
45 | export {};
|
46 |
|
\ | No newline at end of file |