diff2html 3.4.38 → 3.4.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/lib/src/diff-parser.d.ts +10 -0
  2. package/lib/src/diff-parser.d.ts.map +1 -0
  3. package/lib/src/diff2html-templates.d.ts +7 -0
  4. package/lib/src/diff2html-templates.d.ts.map +1 -0
  5. package/lib/src/diff2html.d.ts +23 -0
  6. package/lib/src/diff2html.d.ts.map +1 -0
  7. package/lib/src/file-list-renderer.d.ts +4 -0
  8. package/lib/src/file-list-renderer.d.ts.map +1 -0
  9. package/lib/src/hoganjs-utils.d.ts +20 -0
  10. package/lib/src/hoganjs-utils.d.ts.map +1 -0
  11. package/lib/src/line-by-line-renderer.d.ts +50 -0
  12. package/lib/src/line-by-line-renderer.d.ts.map +1 -0
  13. package/lib/src/rematch.d.ts +11 -0
  14. package/lib/src/rematch.d.ts.map +1 -0
  15. package/lib/src/render-utils.d.ts +35 -0
  16. package/lib/src/render-utils.d.ts.map +1 -0
  17. package/lib/src/side-by-side-renderer.d.ts +50 -0
  18. package/lib/src/side-by-side-renderer.d.ts.map +1 -0
  19. package/lib/src/types.d.ts +75 -0
  20. package/lib/src/types.d.ts.map +1 -0
  21. package/lib/src/ui/js/diff2html-ui-base.d.ts +50 -0
  22. package/lib/src/ui/js/diff2html-ui-base.d.ts.map +1 -0
  23. package/lib/src/ui/js/diff2html-ui-slim.d.ts +8 -0
  24. package/lib/src/ui/js/diff2html-ui-slim.d.ts.map +1 -0
  25. package/lib/src/ui/js/diff2html-ui.d.ts +8 -0
  26. package/lib/src/ui/js/diff2html-ui.d.ts.map +1 -0
  27. package/lib/src/ui/js/highlight.js-helpers.d.ts +12 -0
  28. package/lib/src/ui/js/highlight.js-helpers.d.ts.map +1 -0
  29. package/lib/src/ui/js/highlight.js-slim.d.ts +3 -0
  30. package/lib/src/ui/js/highlight.js-slim.d.ts.map +1 -0
  31. package/lib/src/utils.d.ts +4 -0
  32. package/lib/src/utils.d.ts.map +1 -0
  33. package/lib/website/main.d.ts +2 -0
  34. package/lib/website/main.d.ts.map +1 -0
  35. package/lib/website/templates/pages/demo/demo.d.ts +6 -0
  36. package/lib/website/templates/pages/demo/demo.d.ts.map +1 -0
  37. package/lib/website/templates/pages/index/index.d.ts +4 -0
  38. package/lib/website/templates/pages/index/index.d.ts.map +1 -0
  39. package/package.json +6 -5
@@ -0,0 +1,10 @@
1
+ import { DiffFile } from './types';
2
+ export interface DiffParserConfig {
3
+ srcPrefix?: string;
4
+ dstPrefix?: string;
5
+ diffMaxChanges?: number;
6
+ diffMaxLineLength?: number;
7
+ diffTooBigMessage?: (fileIndex: number) => string;
8
+ }
9
+ export declare function parse(diffInput: string, config?: DiffParserConfig): DiffFile[];
10
+ //# sourceMappingURL=diff-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff-parser.d.ts","sourceRoot":"","sources":["../../src/diff-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiC,MAAM,SAAS,CAAC;AAGlE,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CACnD;AA6CD,wBAAgB,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,GAAE,gBAAqB,GAAG,QAAQ,EAAE,CA4alF"}
@@ -0,0 +1,7 @@
1
+ import * as Hogan from "hogan.js";
2
+ type CompiledTemplates = {
3
+ [name: string]: Hogan.Template;
4
+ };
5
+ export declare const defaultTemplates: CompiledTemplates;
6
+ export {};
7
+ //# sourceMappingURL=diff2html-templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff2html-templates.d.ts","sourceRoot":"","sources":["../../src/diff2html-templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,KAAK,iBAAiB,GAAG;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAA;CAAE,CAAC;AAC5D,eAAO,MAAM,gBAAgB,EAAE,iBAAsB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import * as DiffParser from './diff-parser';
2
+ import { LineByLineRendererConfig } from './line-by-line-renderer';
3
+ import { SideBySideRendererConfig } from './side-by-side-renderer';
4
+ import { DiffFile, OutputFormatType } from './types';
5
+ import { HoganJsUtilsConfig } from './hoganjs-utils';
6
+ export interface Diff2HtmlConfig extends DiffParser.DiffParserConfig, LineByLineRendererConfig, SideBySideRendererConfig, HoganJsUtilsConfig {
7
+ outputFormat?: OutputFormatType;
8
+ drawFileList?: boolean;
9
+ }
10
+ export declare const defaultDiff2HtmlConfig: {
11
+ outputFormat: OutputFormatType;
12
+ drawFileList: boolean;
13
+ renderNothingWhenEmpty: boolean;
14
+ matchingMaxComparisons: number;
15
+ maxLineSizeInBlockForComparison: number;
16
+ matching: import("./types").LineMatchingType;
17
+ matchWordsThreshold: number;
18
+ maxLineLengthHighlight: number;
19
+ diffStyle: import("./types").DiffStyleType;
20
+ };
21
+ export declare function parse(diffInput: string, configuration?: Diff2HtmlConfig): DiffFile[];
22
+ export declare function html(diffInput: string | DiffFile[], configuration?: Diff2HtmlConfig): string;
23
+ //# sourceMappingURL=diff2html.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff2html.d.ts","sourceRoot":"","sources":["../../src/diff2html.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAE5C,OAA2B,EAAE,wBAAwB,EAAmC,MAAM,yBAAyB,CAAC;AACxH,OAA2B,EAAE,wBAAwB,EAAmC,MAAM,yBAAyB,CAAC;AACxH,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAqB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEnE,MAAM,WAAW,eACf,SAAQ,UAAU,CAAC,gBAAgB,EACjC,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB;IACpB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;CAKlC,CAAC;AAEF,wBAAgB,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,GAAE,eAAoB,GAAG,QAAQ,EAAE,CAExF;AAED,wBAAgB,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,aAAa,GAAE,eAAoB,GAAG,MAAM,CAehG"}
@@ -0,0 +1,4 @@
1
+ import HoganJsUtils from './hoganjs-utils';
2
+ import { DiffFile } from './types';
3
+ export declare function render(diffFiles: DiffFile[], hoganUtils: HoganJsUtils): string;
4
+ //# sourceMappingURL=file-list-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-list-renderer.d.ts","sourceRoot":"","sources":["../../src/file-list-renderer.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKnC,wBAAgB,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,YAAY,GAAG,MAAM,CAyB9E"}
@@ -0,0 +1,20 @@
1
+ import * as Hogan from 'hogan.js';
2
+ export interface RawTemplates {
3
+ [name: string]: string;
4
+ }
5
+ export interface CompiledTemplates {
6
+ [name: string]: Hogan.Template;
7
+ }
8
+ export interface HoganJsUtilsConfig {
9
+ compiledTemplates?: CompiledTemplates;
10
+ rawTemplates?: RawTemplates;
11
+ }
12
+ export default class HoganJsUtils {
13
+ private preCompiledTemplates;
14
+ constructor({ compiledTemplates, rawTemplates }: HoganJsUtilsConfig);
15
+ static compile(templateString: string): Hogan.Template;
16
+ render(namespace: string, view: string, params: Hogan.Context, partials?: Hogan.Partials, indent?: string): string;
17
+ template(namespace: string, view: string): Hogan.Template;
18
+ private templateKey;
19
+ }
20
+ //# sourceMappingURL=hoganjs-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hoganjs-utils.d.ts","sourceRoot":"","sources":["../../src/hoganjs-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAIlC,MAAM,WAAW,YAAY;IAC3B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,OAAO,CAAC,oBAAoB,CAAoB;gBAEpC,EAAE,iBAAsB,EAAE,YAAiB,EAAE,EAAE,kBAAkB;IAY7E,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,KAAK,CAAC,QAAQ;IAItD,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAUlH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,QAAQ;IAIzD,OAAO,CAAC,WAAW;CAGpB"}
@@ -0,0 +1,50 @@
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(file: DiffFile, isCombined: boolean, oldLines: DiffLine[], newLines: DiffLine[]): FileHtml;
30
+ generateLineHtml(file: DiffFile, oldLine?: DiffPreparedLine, newLine?: DiffPreparedLine): FileHtml;
31
+ generateSingleLineHtml(file: DiffFile, line?: DiffPreparedLine): string;
32
+ }
33
+ type DiffLineGroups = [
34
+ (DiffLineContext & DiffLineContent)[],
35
+ (DiffLineDeleted & DiffLineContent)[],
36
+ (DiffLineInserted & DiffLineContent)[]
37
+ ][];
38
+ type DiffPreparedLine = {
39
+ type: renderUtils.CSSLineClass;
40
+ prefix: string;
41
+ content: string;
42
+ oldNumber?: number;
43
+ newNumber?: number;
44
+ };
45
+ type FileHtml = {
46
+ left: string;
47
+ right: string;
48
+ };
49
+ export {};
50
+ //# sourceMappingURL=line-by-line-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-by-line-renderer.d.ts","sourceRoot":"","sources":["../../src/line-by-line-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,QAAQ,EACR,QAAQ,EAER,SAAS,EACT,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,wBAAyB,SAAQ,WAAW,CAAC,YAAY;IACxE,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,+BAA+B,CAAC,EAAE,MAAM,CAAC;CAC1C;AAED,eAAO,MAAM,+BAA+B;;;;;;;;CAK3C,CAAC;AAOF,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAe;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyC;gBAEpD,UAAU,EAAE,YAAY,EAAE,MAAM,GAAE,wBAA6B;IAK3E,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM;IAgBrC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAwBvD,iBAAiB,IAAI,MAAM;IAO3B,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM;IA8CxC,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,cAAc;IAsCpD,oBAAoB,CAClB,QAAQ,EAAE,QAAQ,EAAE,EACpB,QAAQ,EAAE,QAAQ,EAAE,EACpB,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,GACnC,QAAQ,EAAE,EAAE,EAAE;IAcjB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,QAAQ;IA4D9G,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ;IAOlG,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,MAAM;CAmBxE;AAED,KAAK,cAAc,GAAG;IACpB,CAAC,eAAe,GAAG,eAAe,CAAC,EAAE;IACrC,CAAC,eAAe,GAAG,eAAe,CAAC,EAAE;IACrC,CAAC,gBAAgB,GAAG,eAAe,CAAC,EAAE;CACvC,EAAE,CAAC;AAEJ,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,WAAW,CAAC,YAAY,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -0,0 +1,11 @@
1
+ export type BestMatch = {
2
+ indexA: number;
3
+ indexB: number;
4
+ score: number;
5
+ };
6
+ export declare function levenshtein(a: string, b: string): number;
7
+ export type DistanceFn<T> = (x: T, y: T) => number;
8
+ export declare function newDistanceFn<T>(str: (value: T) => string): DistanceFn<T>;
9
+ export type MatcherFn<T> = (a: T[], b: T[], level?: number, cache?: Map<string, number>) => T[][][];
10
+ export declare function newMatcherFn<T>(distance: (x: T, y: T) => number): MatcherFn<T>;
11
+ //# sourceMappingURL=rematch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rematch.d.ts","sourceRoot":"","sources":["../../src/rematch.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAcF,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAwCxD;AAED,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;AAEnD,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAOzE;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;AAEpG,wBAAgB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAwD9E"}
@@ -0,0 +1,35 @@
1
+ import { LineMatchingType, DiffStyleType, LineType, DiffLineParts, DiffFile, DiffFileName } from './types';
2
+ export type CSSLineClass = 'd2h-ins' | 'd2h-del' | 'd2h-cntx' | 'd2h-info' | 'd2h-ins d2h-change' | 'd2h-del d2h-change';
3
+ export declare const CSSLineClass: {
4
+ [_: string]: CSSLineClass;
5
+ };
6
+ export type HighlightedLines = {
7
+ oldLine: {
8
+ prefix: string;
9
+ content: string;
10
+ };
11
+ newLine: {
12
+ prefix: string;
13
+ content: string;
14
+ };
15
+ };
16
+ export interface RenderConfig {
17
+ matching?: LineMatchingType;
18
+ matchWordsThreshold?: number;
19
+ maxLineLengthHighlight?: number;
20
+ diffStyle?: DiffStyleType;
21
+ }
22
+ export declare const defaultRenderConfig: {
23
+ matching: LineMatchingType;
24
+ matchWordsThreshold: number;
25
+ maxLineLengthHighlight: number;
26
+ diffStyle: DiffStyleType;
27
+ };
28
+ export declare function toCSSClass(lineType: LineType): CSSLineClass;
29
+ export declare function escapeForHtml(str: string): string;
30
+ export declare function deconstructLine(line: string, isCombined: boolean, escape?: boolean): DiffLineParts;
31
+ export declare function filenameDiff(file: DiffFileName): string;
32
+ export declare function getHtmlId(file: DiffFileName): string;
33
+ export declare function getFileIcon(file: DiffFile): string;
34
+ export declare function diffHighlight(diffLine1: string, diffLine2: string, isCombined: boolean, config?: RenderConfig): HighlightedLines;
35
+ //# sourceMappingURL=render-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-utils.d.ts","sourceRoot":"","sources":["../../src/render-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE3G,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,GACV,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB,eAAO,MAAM,YAAY,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,YAAY,CAAA;CAOrD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,eAAO,MAAM,mBAAmB;;;;;CAK/B,CAAC;AAqBF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAS3D;AAaD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CASjD;AAKD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,UAAO,GAAG,aAAa,CAM/F;AAaD,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CA4DvD;AAKD,wBAAgB,SAAS,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAEpD;AAKD,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAiBlD;AAKD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,OAAO,EACnB,MAAM,GAAE,YAAiB,GACxB,gBAAgB,CA4DlB"}
@@ -0,0 +1,50 @@
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, file?: DiffFile): string;
30
+ processChangedLines(isCombined: boolean, oldLines: DiffLine[], newLines: DiffLine[]): FileHtml;
31
+ generateLineHtml(oldLine?: DiffPreparedLine, newLine?: DiffPreparedLine): FileHtml;
32
+ generateSingleHtml(line?: DiffPreparedLine): string;
33
+ }
34
+ type DiffLineGroups = [
35
+ (DiffLineContext & DiffLineContent)[],
36
+ (DiffLineDeleted & DiffLineContent)[],
37
+ (DiffLineInserted & DiffLineContent)[]
38
+ ][];
39
+ type DiffPreparedLine = {
40
+ type: renderUtils.CSSLineClass;
41
+ prefix: string;
42
+ content: string;
43
+ number: number;
44
+ };
45
+ type FileHtml = {
46
+ left: string;
47
+ right: string;
48
+ };
49
+ export {};
50
+ //# sourceMappingURL=side-by-side-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"side-by-side-renderer.d.ts","sourceRoot":"","sources":["../../src/side-by-side-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,QAAQ,EAER,QAAQ,EACR,SAAS,EACT,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,wBAAyB,SAAQ,WAAW,CAAC,YAAY;IACxE,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,+BAA+B,CAAC,EAAE,MAAM,CAAC;CAC1C;AAED,eAAO,MAAM,+BAA+B;;;;;;;;CAK3C,CAAC;AAOF,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAe;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyC;gBAEpD,UAAU,EAAE,YAAY,EAAE,MAAM,GAAE,wBAA6B;IAK3E,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM;IAgBrC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,GAAG,MAAM;IAwBzD,iBAAiB,IAAI,QAAQ;IAU7B,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ;IA0D1C,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,cAAc;IAsCpD,oBAAoB,CAClB,QAAQ,EAAE,QAAQ,EAAE,EACpB,QAAQ,EAAE,QAAQ,EAAE,EACpB,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,GACnC,QAAQ,EAAE,EAAE,EAAE;IAcjB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM;IAS5D,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,QAAQ;IA0D9F,gBAAgB,CAAC,OAAO,CAAC,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ;IAOlF,kBAAkB,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,MAAM;CAapD;AAED,KAAK,cAAc,GAAG;IACpB,CAAC,eAAe,GAAG,eAAe,CAAC,EAAE;IACrC,CAAC,eAAe,GAAG,eAAe,CAAC,EAAE;IACrC,CAAC,gBAAgB,GAAG,eAAe,CAAC,EAAE;CACvC,EAAE,CAAC;AAEJ,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,WAAW,CAAC,YAAY,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -0,0 +1,75 @@
1
+ export type DiffLineParts = {
2
+ prefix: string;
3
+ content: string;
4
+ };
5
+ export declare enum LineType {
6
+ INSERT = "insert",
7
+ DELETE = "delete",
8
+ CONTEXT = "context"
9
+ }
10
+ export interface DiffLineDeleted {
11
+ type: LineType.DELETE;
12
+ oldNumber: number;
13
+ newNumber: undefined;
14
+ }
15
+ export interface DiffLineInserted {
16
+ type: LineType.INSERT;
17
+ oldNumber: undefined;
18
+ newNumber: number;
19
+ }
20
+ export interface DiffLineContext {
21
+ type: LineType.CONTEXT;
22
+ oldNumber: number;
23
+ newNumber: number;
24
+ }
25
+ export type DiffLineContent = {
26
+ content: string;
27
+ };
28
+ export type DiffLine = (DiffLineDeleted | DiffLineInserted | DiffLineContext) & DiffLineContent;
29
+ export interface DiffBlock {
30
+ oldStartLine: number;
31
+ oldStartLine2?: number;
32
+ newStartLine: number;
33
+ header: string;
34
+ lines: DiffLine[];
35
+ }
36
+ export interface DiffFileName {
37
+ oldName: string;
38
+ newName: string;
39
+ }
40
+ export interface DiffFile extends DiffFileName {
41
+ addedLines: number;
42
+ deletedLines: number;
43
+ isCombined: boolean;
44
+ isGitDiff: boolean;
45
+ language: string;
46
+ blocks: DiffBlock[];
47
+ oldMode?: string | string[];
48
+ newMode?: string;
49
+ deletedFileMode?: string;
50
+ newFileMode?: string;
51
+ isDeleted?: boolean;
52
+ isNew?: boolean;
53
+ isCopy?: boolean;
54
+ isRename?: boolean;
55
+ isBinary?: boolean;
56
+ isTooBig?: boolean;
57
+ unchangedPercentage?: number;
58
+ changedPercentage?: number;
59
+ checksumBefore?: string | string[];
60
+ checksumAfter?: string;
61
+ mode?: string;
62
+ }
63
+ export type OutputFormatType = 'line-by-line' | 'side-by-side';
64
+ export declare const OutputFormatType: {
65
+ [_: string]: OutputFormatType;
66
+ };
67
+ export type LineMatchingType = 'lines' | 'words' | 'none';
68
+ export declare const LineMatchingType: {
69
+ [_: string]: LineMatchingType;
70
+ };
71
+ export type DiffStyleType = 'word' | 'char';
72
+ export declare const DiffStyleType: {
73
+ [_: string]: DiffStyleType;
74
+ };
75
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,QAAQ;IAClB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,eAAe,GAAG,gBAAgB,GAAG,eAAe,CAAC,GAAG,eAAe,CAAC;AAEhG,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,cAAc,CAAC;AAE/D,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAG7D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1D,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAI7D,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5C,eAAO,MAAM,aAAa,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,aAAa,CAAA;CAGvD,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { Diff2HtmlConfig } from '../../diff2html';
2
+ import { DiffFile } from '../../types';
3
+ import { HLJSApi } from 'highlight.js';
4
+ export interface Diff2HtmlUIConfig extends Diff2HtmlConfig {
5
+ synchronisedScroll?: boolean;
6
+ highlight?: boolean;
7
+ fileListToggle?: boolean;
8
+ fileListStartVisible?: boolean;
9
+ highlightLanguages?: Map<string, string>;
10
+ smartSelection?: boolean;
11
+ fileContentToggle?: boolean;
12
+ stickyFileHeaders?: boolean;
13
+ }
14
+ export declare const defaultDiff2HtmlUIConfig: {
15
+ synchronisedScroll: boolean;
16
+ highlight: boolean;
17
+ fileListToggle: boolean;
18
+ fileListStartVisible: boolean;
19
+ highlightLanguages: Map<string, string>;
20
+ smartSelection: boolean;
21
+ fileContentToggle: boolean;
22
+ stickyFileHeaders: boolean;
23
+ outputFormat: import("../../types").OutputFormatType;
24
+ drawFileList: boolean;
25
+ renderNothingWhenEmpty: boolean;
26
+ matchingMaxComparisons: number;
27
+ maxLineSizeInBlockForComparison: number;
28
+ matching: import("../../types").LineMatchingType;
29
+ matchWordsThreshold: number;
30
+ maxLineLengthHighlight: number;
31
+ diffStyle: import("../../types").DiffStyleType;
32
+ };
33
+ export declare class Diff2HtmlUI {
34
+ readonly config: typeof defaultDiff2HtmlUIConfig;
35
+ readonly diffHtml: string;
36
+ readonly targetElement: HTMLElement;
37
+ readonly hljs: HLJSApi | null;
38
+ currentSelectionColumnId: number;
39
+ constructor(target: HTMLElement, diffInput?: string | DiffFile[], config?: Diff2HtmlUIConfig, hljs?: HLJSApi);
40
+ draw(): void;
41
+ synchronisedScroll(): void;
42
+ fileListToggle(startVisible: boolean): void;
43
+ fileContentToggle(): void;
44
+ highlightCode(): void;
45
+ stickyFileHeaders(): void;
46
+ smartSelection(): void;
47
+ private getHashTag;
48
+ private isElement;
49
+ }
50
+ //# sourceMappingURL=diff2html-ui-base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff2html-ui-base.d.ts","sourceRoot":"","sources":["../../../../src/ui/js/diff2html-ui-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,eAAe,EAA0B,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAmB,OAAO,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAKzC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;CAcpC,CAAC;AAEF,qBAAa,WAAW;IACtB,QAAQ,CAAC,MAAM,EAAE,OAAO,wBAAwB,CAAC;IACjD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAQ;IAErC,wBAAwB,SAAM;gBAElB,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,MAAM,GAAE,iBAAsB,EAAE,IAAI,CAAC,EAAE,OAAO;IAOhH,IAAI,IAAI,IAAI;IASZ,kBAAkB,IAAI,IAAI;IAsB1B,cAAc,CAAC,YAAY,EAAE,OAAO,GAAG,IAAI;IA6B3C,iBAAiB,IAAI,IAAI;IA0BzB,aAAa,IAAI,IAAI;IAsDrB,iBAAiB,IAAI,IAAI;IASzB,cAAc,IAAI,IAAI;IAItB,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,SAAS;CAGlB"}
@@ -0,0 +1,8 @@
1
+ import { DiffFile } from '../../types';
2
+ import { Diff2HtmlUI as Diff2HtmlUIBase, Diff2HtmlUIConfig, defaultDiff2HtmlUIConfig } from './diff2html-ui-base';
3
+ export declare class Diff2HtmlUI extends Diff2HtmlUIBase {
4
+ constructor(target: HTMLElement, diffInput?: string | DiffFile[], config?: Diff2HtmlUIConfig);
5
+ }
6
+ export { defaultDiff2HtmlUIConfig };
7
+ export type { Diff2HtmlUIConfig };
8
+ //# sourceMappingURL=diff2html-ui-slim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff2html-ui-slim.d.ts","sourceRoot":"","sources":["../../../../src/ui/js/diff2html-ui-slim.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAElH,qBAAa,WAAY,SAAQ,eAAe;gBAClC,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,MAAM,GAAE,iBAAsB;CAGjG;AAED,OAAO,EAAE,wBAAwB,EAAE,CAAC;AACpC,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { DiffFile } from '../../types';
2
+ import { Diff2HtmlUI as Diff2HtmlUIBase, Diff2HtmlUIConfig, defaultDiff2HtmlUIConfig } from './diff2html-ui-base';
3
+ export declare class Diff2HtmlUI extends Diff2HtmlUIBase {
4
+ constructor(target: HTMLElement, diffInput?: string | DiffFile[], config?: Diff2HtmlUIConfig);
5
+ }
6
+ export { defaultDiff2HtmlUIConfig };
7
+ export type { Diff2HtmlUIConfig };
8
+ //# sourceMappingURL=diff2html-ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff2html-ui.d.ts","sourceRoot":"","sources":["../../../../src/ui/js/diff2html-ui.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAElH,qBAAa,WAAY,SAAQ,eAAe;gBAClC,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,MAAM,GAAE,iBAAsB;CAGjG;AAED,OAAO,EAAE,wBAAwB,EAAE,CAAC;AACpC,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { HighlightResult } from 'highlight.js';
2
+ type NodeEvent = {
3
+ event: 'start' | 'stop';
4
+ offset: number;
5
+ node: Node;
6
+ };
7
+ export declare function nodeStream(node: Node): NodeEvent[];
8
+ export declare function mergeStreams(original: NodeEvent[], highlighted: NodeEvent[], value: string): string;
9
+ export declare function closeTags(res: HighlightResult): HighlightResult;
10
+ export declare function getLanguage(fileExtension: string): string;
11
+ export {};
12
+ //# sourceMappingURL=highlight.js-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlight.js-helpers.d.ts","sourceRoot":"","sources":["../../../../src/ui/js/highlight.js-helpers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAc/C,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,EAAE,CAgClD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA+EnG;AAGD,wBAAgB,SAAS,CAAC,GAAG,EAAE,eAAe,GAAG,eAAe,CAkB/D;AA6eD,wBAAgB,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEzD"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="highlight.js" />
2
+ export declare const hljs: import("highlight.js").HLJSApi;
3
+ //# sourceMappingURL=highlight.js-slim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlight.js-slim.d.ts","sourceRoot":"","sources":["../../../../src/ui/js/highlight.js-slim.ts"],"names":[],"mappings":";AAsYA,eAAO,MAAM,IAAI,gCAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function escapeForRegExp(str: string): string;
2
+ export declare function unifyPath(path: string): string;
3
+ export declare function hashCode(text: string): number;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AA4BA,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnD;AAKD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAKD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW7C"}
@@ -0,0 +1,2 @@
1
+ import 'bulma/css/bulma.css';
2
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../website/main.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import '../../../main.ts';
2
+ import '../../../main.css';
3
+ import 'highlight.js/styles/github.css';
4
+ import '../../../../src/ui/css/diff2html.css';
5
+ import './demo.css';
6
+ //# sourceMappingURL=demo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../../website/templates/pages/demo/demo.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,gCAAgC,CAAC;AACxC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import '../../../main.ts';
2
+ import '../../../main.css';
3
+ import './index.css';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../website/templates/pages/index/index.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diff2html",
3
- "version": "3.4.38",
3
+ "version": "3.4.39",
4
4
  "homepage": "https://diff2html.xyz",
5
5
  "description": "Fast Diff to colorized HTML",
6
6
  "keywords": [
@@ -41,9 +41,9 @@
41
41
  "prettier": "prettier --ignore-path .gitignore '**/*.+(js|jsx|ts|tsx|json|css|html|md|mdx)'",
42
42
  "format:check": "yarn run prettier --check",
43
43
  "format:fix": "yarn run prettier --write",
44
- "build": "yarn run build:css && yarn run build:templates && yarn run build:es5 && yarn run build:esm && yarn run build:bundles && yarn run build:website",
45
- "build:es5": "rm -rf lib; tsc -p tsconfig.json --outDir lib",
46
- "build:esm": "rm -rf lib-esm; tsc -p tsconfig.json -m es6 --outDir lib-esm",
44
+ "build": "yarn run build:css && yarn run build:templates && yarn run build:commonjs && yarn run build:esm && yarn run build:bundles && yarn run build:website",
45
+ "build:commonjs": "rm -rf lib; tsc -p tsconfig.json --outDir lib",
46
+ "build:esm": "rm -rf lib-esm; tsc -p tsconfig.json -m ESNext --outDir lib-esm",
47
47
  "build:bundles": "rm -rf ./bundles/js; webpack --mode production --config webpack.bundles.ts",
48
48
  "build:css": "rm -rf ./bundles/css; postcss --config ./postcss.config.js --no-map -o ./bundles/css/diff2html.min.css ./src/ui/css/diff2html.css",
49
49
  "build:templates": "ts-node ./scripts/hulk.ts --wrapper ts --variable 'defaultTemplates' ./src/templates/*.mustache > ./src/diff2html-templates.ts",
@@ -150,7 +150,8 @@
150
150
  "trim-newlines": ">=3.0.1",
151
151
  "async": ">=2.6.4",
152
152
  "terser": ">=5.14.2",
153
- "semver-regex": ">=4.0.5"
153
+ "semver-regex": ">=4.0.5",
154
+ "http-cache-semantics": ">=4.1.1"
154
155
  },
155
156
  "license": "MIT",
156
157
  "files": [