1 | import HoganJsUtils from './hoganjs-utils';
|
2 | import * as Rematch from './rematch';
|
3 | import * as renderUtils from './render-utils';
|
4 | import { DiffLine, DiffFile, DiffBlock, DiffLineContext, DiffLineDeleted, DiffLineInserted, DiffLineContent } from './types';
|
5 | export interface SideBySideRendererConfig extends renderUtils.RenderConfig {
|
6 | renderNothingWhenEmpty?: boolean;
|
7 | matchingMaxComparisons?: number;
|
8 | maxLineSizeInBlockForComparison?: number;
|
9 | }
|
10 | export declare const defaultSideBySideRendererConfig: {
|
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 SideBySideRenderer {
|
20 | private readonly hoganUtils;
|
21 | private readonly config;
|
22 | constructor(hoganUtils: HoganJsUtils, config?: SideBySideRendererConfig);
|
23 | render(diffFiles: DiffFile[]): string;
|
24 | makeFileDiffHtml(file: DiffFile, diffs: FileHtml): string;
|
25 | generateEmptyDiff(): FileHtml;
|
26 | generateFileHtml(file: DiffFile): FileHtml;
|
27 | applyLineGroupping(block: DiffBlock): DiffLineGroups;
|
28 | applyRematchMatching(oldLines: DiffLine[], newLines: DiffLine[], matcher: Rematch.MatcherFn<DiffLine>): DiffLine[][][];
|
29 | makeHeaderHtml(blockHeader: string): string;
|
30 | processChangedLines(isCombined: boolean, oldLines: DiffLine[], newLines: DiffLine[]): FileHtml;
|
31 | generateLineHtml(oldLine?: DiffPreparedLine, newLine?: DiffPreparedLine): FileHtml;
|
32 | generateSingleHtml(line?: DiffPreparedLine): string;
|
33 | }
|
34 | declare type DiffLineGroups = [
|
35 | (DiffLineContext & DiffLineContent)[],
|
36 | (DiffLineDeleted & DiffLineContent)[],
|
37 | (DiffLineInserted & DiffLineContent)[]
|
38 | ][];
|
39 | declare type DiffPreparedLine = {
|
40 | type: renderUtils.CSSLineClass;
|
41 | prefix: string;
|
42 | content: string;
|
43 | number: number;
|
44 | };
|
45 | declare type FileHtml = {
|
46 | left: string;
|
47 | right: string;
|
48 | };
|
49 | export {};
|
50 |
|
\ | No newline at end of file |