From c572011aa6ee3ffe2c27b99706845ff41664d856 Mon Sep 17 00:00:00 2001 From: Amadeus Demarzi Date: Fri, 27 Mar 2026 14:42:21 -0700 Subject: [PATCH 1/6] Realized git diff actually often uses a default of 3 for context lines, so aligning everything here... --- packages/diffs/src/utils/parseDiffFromFile.ts | 5 ++++- packages/diffs/src/utils/parseMergeConflictDiffFromFile.ts | 2 +- packages/diffs/src/utils/trimPatchContext.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/diffs/src/utils/parseDiffFromFile.ts b/packages/diffs/src/utils/parseDiffFromFile.ts index dd5dc8f57..ba9ced1d9 100644 --- a/packages/diffs/src/utils/parseDiffFromFile.ts +++ b/packages/diffs/src/utils/parseDiffFromFile.ts @@ -24,7 +24,10 @@ export function parseDiffFromFile( newFile.contents, oldFile.header, newFile.header, - options + // NOTE(amadeus): By default, git defaults to 3 context lines, but for some + // reason this library does 4. I want this to _feel_ like git by default, + // and it can always be changed if people want to override + { ...options, context: options?.context ?? 3 } ); const fileData = processFile(patch, { diff --git a/packages/diffs/src/utils/parseMergeConflictDiffFromFile.ts b/packages/diffs/src/utils/parseMergeConflictDiffFromFile.ts index 2fa546ad3..a47e78abe 100644 --- a/packages/diffs/src/utils/parseMergeConflictDiffFromFile.ts +++ b/packages/diffs/src/utils/parseMergeConflictDiffFromFile.ts @@ -197,7 +197,7 @@ export function getMergeConflictActionAnchor( // 3. Result assembly — joins line arrays, builds marker rows for the UI export function parseMergeConflictDiffFromFile( file: FileContents, - maxContextLines: number = 6 + maxContextLines: number = 3 ): ParseMergeConflictDiffFromFileResult { // Never allow maxContextLines to drop below 1 or else things break. maxContextLines = Math.max(maxContextLines, 1); diff --git a/packages/diffs/src/utils/trimPatchContext.ts b/packages/diffs/src/utils/trimPatchContext.ts index ae4d7b8b9..845351c16 100644 --- a/packages/diffs/src/utils/trimPatchContext.ts +++ b/packages/diffs/src/utils/trimPatchContext.ts @@ -17,7 +17,7 @@ type ContextFlushMode = 'before-change' | 'leading' | 'trailing'; * well as be able to create new hunks where necessary if there's excessive * context between changes */ -export function trimPatchContext(patch: string, contextSize = 10): string { +export function trimPatchContext(patch: string, contextSize = 3): string { const lines: string[] = []; let currentHunk: CurrentHunk | undefined; From 9b004dbb1ecf460c4ea1c4efd0b56ece33908686 Mon Sep 17 00:00:00 2001 From: Amadeus Demarzi Date: Fri, 27 Mar 2026 15:54:38 -0700 Subject: [PATCH 2/6] Fix tests --- .../DiffHunksRendererVirtualization.test.ts | 113 +- ...ffHunksRendererVirtualization.test.ts.snap | 7237 ++++++----------- .../__snapshots__/annotations.test.ts.snap | 174 +- .../parseDiffFromFile.test.ts.snap | 448 +- packages/diffs/test/iterateOverDiff.test.ts | 29 +- 5 files changed, 2778 insertions(+), 5223 deletions(-) diff --git a/packages/diffs/test/DiffHunksRendererVirtualization.test.ts b/packages/diffs/test/DiffHunksRendererVirtualization.test.ts index db42d2fb6..a977718e2 100644 --- a/packages/diffs/test/DiffHunksRendererVirtualization.test.ts +++ b/packages/diffs/test/DiffHunksRendererVirtualization.test.ts @@ -24,6 +24,22 @@ describe('DiffHunksRenderer - Virtualization', () => { diffStyle: 'split', }); + const totalUnifiedRows = fileDiff.hunks.reduce( + (sum, hunk) => sum + hunk.unifiedLineCount, + 0 + ); + const totalSplitAdditionRows = fileDiff.hunks.reduce( + (sum, hunk) => sum + hunk.additionCount, + 0 + ); + const totalSplitDeletionRows = fileDiff.hunks.reduce( + (sum, hunk) => sum + hunk.deletionCount, + 0 + ); + const finalHunkVisibleStart = fileDiff.hunks + .slice(0, -1) + .reduce((sum, hunk) => sum + hunk.unifiedLineCount, 0); + // Diff structure from fileOld/fileNew: // - 14 hunks total // - Total unified lines: 514 @@ -54,7 +70,7 @@ describe('DiffHunksRenderer - Virtualization', () => { const lineCount = countRenderedLines(result.unifiedContentAST); // Total unified lines that are rendered - expect(lineCount).toBe(517); + expect(lineCount).toBe(totalUnifiedRows); }); test('1.2: No buffers (baseline) - split mode', async () => { @@ -85,8 +101,8 @@ describe('DiffHunksRenderer - Virtualization', () => { // These are somewhat arbitrary because there's lots of stuff collapsed // between change hunks - expect(deletionLines).toBe(267); - expect(additionLines).toBe(431); + expect(deletionLines).toBe(totalSplitDeletionRows); + expect(additionLines).toBe(totalSplitAdditionRows); }); }); @@ -120,7 +136,7 @@ describe('DiffHunksRenderer - Virtualization', () => { ); const unifiedLines = countRenderedLines(unifiedResult.unifiedContentAST); - expect(unifiedLines).toBe(517); + expect(unifiedLines).toBe(totalUnifiedRows); // In split mode, total lines across both columns const splitAdditionLines = countRenderedLines( @@ -152,8 +168,7 @@ describe('DiffHunksRenderer - Virtualization', () => { expect(lineCount).toBeLessThanOrEqual(30); const { unifiedIndices } = extractLineNumbers(result.unifiedContentAST); - // Hunk 0 has collapsedBefore: 3, so first index is 3 - expect(unifiedIndices[0]).toBe(3); + expect(unifiedIndices[0]).toBe(fileDiff.hunks[0]?.unifiedLineStart); expect(unifiedIndices.length).toBe(30); }); @@ -178,10 +193,7 @@ describe('DiffHunksRenderer - Virtualization', () => { // Line indices might not be continuous due to collapsed regions // But we should have rendered exactly 50 lines expect(unifiedIndices.length).toBe(50); - // First rendered line index -- it's hard coded because it's a bit hard - // to figure out, so mostly a good reference if tests change these - // assumptions - expect(unifiedIndices[0]).toBe(184); + expect(unifiedIndices[0]).toBeGreaterThanOrEqual(100); }); test('2.4: Split vs Unified line counting', async () => { @@ -224,7 +236,8 @@ describe('DiffHunksRenderer - Virtualization', () => { ); expect(unifiedLines).toBe(50); - expect(splitAdditionLines).toBe(37); + expect(splitAdditionLines).toBeGreaterThan(0); + expect(splitAdditionLines).toBeLessThanOrEqual(50); expect(splitDeletionLines).toBe(50); }); }); @@ -298,14 +311,15 @@ describe('DiffHunksRenderer - Virtualization', () => { expect(unifiedIndices.length).toBe(unexpandedLineCount + 20); - // Verify the specific expanded lines are present - // Hunk 3 collapsed region is 57-106, expanding 20 from start should show 57-76 - const expandedLines = unifiedIndices.filter( - (idx) => idx >= 57 && idx <= 76 + const unexpandedIndices = new Set( + extractLineNumbers(unexpandedResult.unifiedContentAST).unifiedIndices ); - expect(expandedLines.length).toBe(20); - expect(expandedLines[0]).toBe(57); - expect(expandedLines[19]).toBe(76); + const expandedOnlyLines = unifiedIndices.filter( + (idx) => !unexpandedIndices.has(idx) + ); + expect(expandedOnlyLines).toHaveLength(20); + expect(expandedOnlyLines[0]).toBe(56); + expect(expandedOnlyLines[19]).toBe(75); expect(result).toMatchSnapshot('expansion fromStart 20 lines'); }); @@ -352,14 +366,15 @@ describe('DiffHunksRenderer - Virtualization', () => { expect(unifiedIndices.length).toBe(unexpandedLineCount + 15); - // Verify the specific expanded lines are present - // Hunk 3 collapsed region is 57-106, expanding 15 from end should show 92-106 - const expandedLines = unifiedIndices.filter( - (idx) => idx >= 92 && idx <= 106 + const unexpandedIndices = new Set( + extractLineNumbers(unexpandedResult.unifiedContentAST).unifiedIndices + ); + const expandedOnlyLines = unifiedIndices.filter( + (idx) => !unexpandedIndices.has(idx) ); - expect(expandedLines.length).toBe(15); - expect(expandedLines[0]).toBe(92); - expect(expandedLines[14]).toBe(106); + expect(expandedOnlyLines).toHaveLength(15); + expect(expandedOnlyLines[0]).toBe(93); + expect(expandedOnlyLines[14]).toBe(107); // Verify line indices are monotonically increasing for (let i = 1; i < unifiedIndices.length; i++) { @@ -411,22 +426,16 @@ describe('DiffHunksRenderer - Virtualization', () => { expect(unifiedIndices.length).toBe(unexpandedLineCount + 20); - // Verify the specific expanded lines are present - // Hunk 3 collapsed region is 57-106 - // Expanding 10 from start should show 57-66 - // Expanding 10 from end should show 97-106 - const expandedFromStart = unifiedIndices.filter( - (idx) => idx >= 57 && idx <= 66 - ); - const expandedFromEnd = unifiedIndices.filter( - (idx) => idx >= 97 && idx <= 106 - ); - expect(expandedFromStart.length).toBe(10); - expect(expandedFromStart[0]).toBe(57); - expect(expandedFromStart[9]).toBe(66); - expect(expandedFromEnd.length).toBe(10); - expect(expandedFromEnd[0]).toBe(97); - expect(expandedFromEnd[9]).toBe(106); + const unexpandedIndices = new Set( + extractLineNumbers(unexpandedResult.unifiedContentAST).unifiedIndices + ); + const expandedOnlyLines = unifiedIndices.filter( + (idx) => !unexpandedIndices.has(idx) + ); + expect(expandedOnlyLines).toEqual([ + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, + ]); expect(result).toMatchSnapshot('expansion both directions 10 lines each'); }); @@ -500,14 +509,14 @@ describe('DiffHunksRenderer - Virtualization', () => { ); const fullyExpandedRange = unifiedIndices.filter( - (idx) => idx >= 57 && idx <= 106 + (idx) => idx >= 56 && idx <= 107 ); - expect(fullyExpandedRange).toHaveLength(50); - expect(fullyExpandedRange[0]).toBe(57); - expect(fullyExpandedRange[49]).toBe(106); + expect(fullyExpandedRange).toHaveLength(52); + expect(fullyExpandedRange[0]).toBe(56); + expect(fullyExpandedRange[51]).toBe(107); // Separator rows are not counted by countRenderedLines (no data-line), - // so expanding this 50-line collapsed range adds exactly 50 line rows. - expect(lineCount).toBe(unexpandedLineCount + 50); + // so expanding this collapsed range adds exactly its visible line rows. + expect(lineCount).toBe(unexpandedLineCount + 52); // Verify we only expanded this hunk range, not the entire file. // Hunk 0 still has collapsed leading lines (0..2), so they should // remain hidden. @@ -784,10 +793,10 @@ describe('DiffHunksRenderer - Virtualization', () => { describe('final hunk handling', () => { test('7.1: Final hunk with early break', async () => { - // Hunk 13 (final): unified 478-513 (36 lines) - // Window ends mid-final-hunk + // Start at the visible-row offset where the final hunk begins so we + // exercise the end-of-file early-break path. const result = await unifiedRenderer.asyncRender(fileDiff, { - startingLine: 478, + startingLine: finalHunkVisibleStart, totalLines: 20, bufferBefore: 0, bufferAfter: 0, @@ -820,11 +829,11 @@ describe('DiffHunksRenderer - Virtualization', () => { ); const fullCount = countRenderedLines(result.unifiedContentAST); - expect(fullCount).toBe(517); + expect(fullCount).toBe(totalUnifiedRows); // Compare to partial render const partialResult = await unifiedRenderer.asyncRender(fileDiff, { - startingLine: 478, + startingLine: finalHunkVisibleStart, totalLines: 20, bufferBefore: 0, bufferAfter: 0, diff --git a/packages/diffs/test/__snapshots__/DiffHunksRendererVirtualization.test.ts.snap b/packages/diffs/test/__snapshots__/DiffHunksRendererVirtualization.test.ts.snap index 9176133e6..fe4feff18 100644 --- a/packages/diffs/test/__snapshots__/DiffHunksRendererVirtualization.test.ts.snap +++ b/packages/diffs/test/__snapshots__/DiffHunksRendererVirtualization.test.ts.snap @@ -128,7 +128,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": false, }, "hunkIndex": 0, - "lines": 3, + "lines": 4, "slotName": "hunk-separator-unified-0", "type": "unified", }, @@ -139,7 +139,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 1, - "lines": 6, + "lines": 8, "slotName": "hunk-separator-unified-1", "type": "unified", }, @@ -150,7 +150,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 2, - "lines": 14, + "lines": 16, "slotName": "hunk-separator-unified-2", "type": "unified", }, @@ -161,10 +161,21 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 3, - "lines": 30, + "lines": 32, "slotName": "hunk-separator-unified-3", "type": "unified", }, + { + "expandable": { + "chunked": false, + "down": true, + "up": true, + }, + "hunkIndex": 4, + "lines": 3, + "slotName": "hunk-separator-unified-4", + "type": "unified", + }, { "expandable": { "chunked": false, @@ -172,10 +183,21 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 5, - "lines": 11, + "lines": 13, "slotName": "hunk-separator-unified-5", "type": "unified", }, + { + "expandable": { + "chunked": false, + "down": true, + "up": true, + }, + "hunkIndex": 6, + "lines": 3, + "slotName": "hunk-separator-unified-6", + "type": "unified", + }, { "expandable": { "chunked": true, @@ -183,7 +205,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 7, - "lines": 44, + "lines": 46, "slotName": "hunk-separator-unified-7", "type": "unified", }, @@ -194,7 +216,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 8, - "lines": 10, + "lines": 12, "slotName": "hunk-separator-unified-8", "type": "unified", }, @@ -205,10 +227,21 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 9, - "lines": 7, + "lines": 9, "slotName": "hunk-separator-unified-9", "type": "unified", }, + { + "expandable": { + "chunked": false, + "down": true, + "up": true, + }, + "hunkIndex": 10, + "lines": 3, + "slotName": "hunk-separator-unified-10", + "type": "unified", + }, { "expandable": { "chunked": false, @@ -216,7 +249,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 11, - "lines": 5, + "lines": 7, "slotName": "hunk-separator-unified-11", "type": "unified", }, @@ -227,7 +260,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 12, - "lines": 31, + "lines": 33, "slotName": "hunk-separator-unified-12", "type": "unified", }, @@ -238,7 +271,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 13, - "lines": 56, + "lines": 58, "slotName": "hunk-separator-unified-13", "type": "unified", }, @@ -249,7 +282,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "up": true, }, "hunkIndex": 14, - "lines": 43, + "lines": 44, "slotName": "hunk-separator-unified-14", "type": "unified", }, @@ -270,7 +303,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "pre", "type": "element", }, - "rowCount": 549, + "rowCount": 521, "themeStyles": "--diffs-dark:#fbfbfb;--diffs-dark-bg:#070707;--diffs-dark-addition-color:#00cab1;--diffs-dark-deletion-color:#ff2e3f;--diffs-dark-modified-color:#009fff;--diffs-light:#070707;--diffs-light-bg:#ffffff;--diffs-light-addition-color:#00cab1;--diffs-light-deletion-color:#ff2e3f;--diffs-light-modified-color:#009fff;", "totalLines": 711, "unifiedContentAST": [ @@ -317,7 +350,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "3 unmodified lines", + "value": "4 unmodified lines", }, ], "properties": { @@ -351,29 +384,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " DecorationItem,", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 4, - "data-line": 4, - "data-line-index": "3,3", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -535,29 +545,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 11, - "data-line": 12, - "data-line-index": "11,11", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -601,7 +588,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "6 unmodified lines", + "value": "8 unmodified lines", }, ], "properties": { @@ -635,29 +622,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " setupPreNode,", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 18, - "data-line": 19, - "data-line-index": "18,18", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -957,29 +921,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " hunkIndex: number;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 25, - "data-line": 33, - "data-line-index": "32,32", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -1023,7 +964,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "14 unmodified lines", + "value": "16 unmodified lines", }, ], "properties": { @@ -1057,29 +998,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " hunk: Hunk;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 40, - "data-line": 48, - "data-line-index": "47,47", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -1282,7 +1200,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "data-alt-line": 49, "data-line": 55, "data-line-index": "56,56", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -1724,29 +1642,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " theme?: never;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 69, - "data-line": 75, - "data-line-index": "76,76", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -1823,7 +1718,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "30 unmodified lines", + "value": "32 unmodified lines", }, ], "properties": { @@ -1872,29 +1767,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " this.highlighter = await getSharedHighlighter(this.getHighlighterOptions());", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 100, - "data-line": 106, - "data-line-index": "107,107", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -2434,66 +2306,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part { "children": [ { - "type": "text", - "value": " return;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 118, - "data-line": 118, - "data-line-index": "128,125", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " }", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 119, - "data-line": 119, - "data-line-index": "129,126", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": " if (this.highlighter == null) {", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], - "properties": {}, - "tagName": "span", + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", "type": "element", }, ], "properties": { - "data-alt-line": 120, - "data-line": 120, - "data-line-index": "130,127", - "data-line-type": "context", + "data-expand-index": 4, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -3020,29 +2900,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " unified === true", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 137, - "data-line": 136, - "data-line-index": "150,144", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -3086,7 +2943,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "11 unmodified lines", + "value": "13 unmodified lines", }, ], "properties": { @@ -3120,29 +2977,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " const codeDeletions = createCodeNode({ columnType: 'deletions' });", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 149, - "data-line": 148, - "data-line-index": "162,156", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -3309,66 +3143,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part { "children": [ { - "type": "text", - "value": " codeUnified.appendChild(createHunkSeparator());", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 157, - "data-line": 155, - "data-line-index": "170,164", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " } else {", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 158, - "data-line": 156, - "data-line-index": "171,165", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": " codeAdditions.appendChild(createHunkSeparator());", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], - "properties": {}, - "tagName": "span", + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", "type": "element", }, ], "properties": { - "data-alt-line": 159, - "data-line": 157, - "data-line-index": "172,166", - "data-line-type": "context", + "data-expand-index": 6, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -3971,29 +3813,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " });", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 186, - "data-line": 169, - "data-line-index": "199,193", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -4070,7 +3889,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "44 unmodified lines", + "value": "46 unmodified lines", }, ], "properties": { @@ -4119,29 +3938,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " hunk,", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 231, - "data-line": 214, - "data-line-index": "244,238", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -7086,29 +6882,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " lastType !== 'context' &&", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 265, - "data-line": 338, - "data-line-index": "373,367", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -7152,7 +6925,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "10 unmodified lines", + "value": "12 unmodified lines", }, ], "properties": { @@ -7186,29 +6959,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " }", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 276, - "data-line": 349, - "data-line-index": "384,378", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -8196,29 +7946,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 301, - "data-line": 375, - "data-line-index": "414,404", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -8262,7 +7989,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "7 unmodified lines", + "value": "9 unmodified lines", }, ], "properties": { @@ -8296,29 +8023,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 309, - "data-line": 383, - "data-line-index": "422,412", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -8930,66 +8634,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part { "children": [ { - "type": "text", - "value": " };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 325, - "data-line": 400, - "data-line-index": "441,429", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " deletionGroupSize++;", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 326, - "data-line": 401, - "data-line-index": "442,430", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": " deletionLineIndex++;", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], - "properties": {}, - "tagName": "span", + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", "type": "element", }, ], "properties": { - "data-alt-line": 327, - "data-line": 402, - "data-line-index": "443,431", - "data-line-type": "context", + "data-expand-index": 10, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -9600,29 +9312,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 343, - "data-line": 419, - "data-line-index": "462,448", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -9666,7 +9355,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "5 unmodified lines", + "value": "7 unmodified lines", }, ], "properties": { @@ -9700,29 +9389,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 349, - "data-line": 425, - "data-line-index": "468,454", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -13549,29 +13215,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " let firstChild: RootContent | Element | Root | null = nodes.children[0];", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 401, - "data-line": 518, - "data-line-index": "603,576", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -13648,7 +13291,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "31 unmodified lines", + "value": "33 unmodified lines", }, ], "properties": { @@ -13697,29 +13340,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " return { langs, themes, preferWasmHighlighter };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 433, - "data-line": 550, - "data-line-index": "635,608", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -14295,29 +13915,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " state: SharedRenderState", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 440, - "data-line": 576, - "data-line-index": "661,634", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -14394,7 +13991,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "56 unmodified lines", + "value": "58 unmodified lines", }, ], "properties": { @@ -14443,29 +14040,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " children: [],", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 497, - "data-line": 633, - "data-line-index": "718,691", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -15248,29 +14822,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "} {", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 504, - "data-line": 668, - "data-line-index": "753,726", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -15314,7 +14865,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "43 unmodified lines", + "value": "44 unmodified lines", }, ], "properties": { @@ -15408,7 +14959,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "3 unmodified lines", + "value": "4 unmodified lines", }, ], "properties": { @@ -15442,30 +14993,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "4", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 4, - "data-line-index": "3,3", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -15634,30 +15161,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "12", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 12, - "data-line-index": "11,11", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -15701,7 +15204,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "6 unmodified lines", + "value": "8 unmodified lines", }, ], "properties": { @@ -15735,30 +15238,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "19", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 19, - "data-line-index": "18,18", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -16071,30 +15550,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "33", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 33, - "data-line-index": "32,32", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -16138,7 +15593,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "14 unmodified lines", + "value": "16 unmodified lines", }, ], "properties": { @@ -16172,30 +15627,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "48", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 48, - "data-line-index": "47,47", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -16407,7 +15838,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "properties": { "data-column-number": 55, "data-line-index": "56,56", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -16868,30 +16299,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "75", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 75, - "data-line-index": "76,76", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -16968,7 +16375,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "30 unmodified lines", + "value": "32 unmodified lines", }, ], "properties": { @@ -17017,6 +16424,126 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "107", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 107, + "data-line-index": "108,108", + "data-line-type": "context", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "108", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 108, + "data-line-index": "109,109", + "data-line-type": "context", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "109", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 109, + "data-line-index": "110,110", + "data-line-type": "context", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "104", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 104, + "data-line-index": "111,111", + "data-line-type": "change-deletion", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "105", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 105, + "data-line-index": "112,112", + "data-line-type": "change-deletion", + }, + "tagName": "div", + "type": "element", + }, { "children": [ { @@ -17035,8 +16562,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part ], "properties": { "data-column-number": 106, - "data-line-index": "107,107", - "data-line-type": "context", + "data-line-index": "113,113", + "data-line-type": "change-deletion", }, "tagName": "div", "type": "element", @@ -17047,7 +16574,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "107", + "value": "110", }, ], "properties": { @@ -17058,176 +16585,32 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part }, ], "properties": { - "data-column-number": 107, - "data-line-index": "108,108", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "108", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 108, - "data-line-index": "109,109", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "109", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 109, - "data-line-index": "110,110", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "104", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 104, - "data-line-index": "111,111", - "data-line-type": "change-deletion", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "105", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 105, - "data-line-index": "112,112", - "data-line-type": "change-deletion", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "106", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 106, - "data-line-index": "113,113", - "data-line-type": "change-deletion", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "110", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 110, - "data-line-index": "114,111", - "data-line-type": "change-addition", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "111", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 111, - "data-line-index": "115,114", + "data-column-number": 110, + "data-line-index": "114,111", + "data-line-type": "change-addition", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "111", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 111, + "data-line-index": "115,114", "data-line-type": "context", }, "tagName": "div", @@ -17526,69 +16909,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part { "children": [ { - "type": "text", - "value": "118", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 118, - "data-line-index": "128,125", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "119", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 119, - "data-line-index": "129,126", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": "120", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], "properties": { - "data-line-number-content": "", + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", }, - "tagName": "span", + "tagName": "div", "type": "element", }, ], "properties": { - "data-column-number": 120, - "data-line-index": "130,127", - "data-line-type": "context", + "data-expand-index": 4, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -18049,30 +17437,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "136", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 136, - "data-line-index": "150,144", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -18116,7 +17480,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "11 unmodified lines", + "value": "13 unmodified lines", }, ], "properties": { @@ -18150,30 +17514,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "148", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 148, - "data-line-index": "162,156", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -18347,69 +17687,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part { "children": [ { - "type": "text", - "value": "155", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 155, - "data-line-index": "170,164", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "156", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 156, - "data-line-index": "171,165", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": "157", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], "properties": { - "data-line-number-content": "", + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", }, - "tagName": "span", + "tagName": "div", "type": "element", }, ], "properties": { - "data-column-number": 157, - "data-line-index": "172,166", - "data-line-type": "context", + "data-expand-index": 6, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -19038,30 +18383,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "169", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 169, - "data-line-index": "199,193", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -19138,7 +18459,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "44 unmodified lines", + "value": "46 unmodified lines", }, ], "properties": { @@ -19187,30 +18508,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "214", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 214, - "data-line-index": "244,238", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -22283,30 +21580,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "338", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 338, - "data-line-index": "373,367", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -22350,7 +21623,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "10 unmodified lines", + "value": "12 unmodified lines", }, ], "properties": { @@ -22384,30 +21657,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "349", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 349, - "data-line-index": "384,378", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -23104,30 +22353,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "375", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 375, - "data-line-index": "414,404", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -23171,7 +22396,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "7 unmodified lines", + "value": "9 unmodified lines", }, ], "properties": { @@ -23205,30 +22430,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "383", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 383, - "data-line-index": "422,412", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -23666,69 +22867,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part { "children": [ { - "type": "text", - "value": "400", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 400, - "data-line-index": "441,429", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "401", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 401, - "data-line-index": "442,430", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": "402", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], "properties": { - "data-line-number-content": "", + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", }, - "tagName": "span", + "tagName": "div", "type": "element", }, ], "properties": { - "data-column-number": 402, - "data-line-index": "443,431", - "data-line-type": "context", + "data-expand-index": 10, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -24165,30 +23371,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "419", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 419, - "data-line-index": "462,448", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -24232,7 +23414,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "5 unmodified lines", + "value": "7 unmodified lines", }, ], "properties": { @@ -24266,30 +23448,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "425", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 425, - "data-line-index": "468,454", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -27506,30 +26664,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "518", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 518, - "data-line-index": "603,576", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -27606,7 +26740,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "31 unmodified lines", + "value": "33 unmodified lines", }, ], "properties": { @@ -27655,30 +26789,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "550", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 550, - "data-line-index": "635,608", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -28279,30 +27389,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "576", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 576, - "data-line-index": "661,634", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -28379,7 +27465,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "56 unmodified lines", + "value": "58 unmodified lines", }, ], "properties": { @@ -28428,30 +27514,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "633", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 633, - "data-line-index": "718,691", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -29268,30 +28330,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "668", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 668, - "data-line-index": "753,726", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -29335,7 +28373,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.2: Part "children": [ { "type": "text", - "value": "43 unmodified lines", + "value": "44 unmodified lines", }, ], "properties": { @@ -29516,7 +28554,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": false, }, "hunkIndex": 0, - "lines": 3, + "lines": 4, "slotName": "hunk-separator-unified-0", "type": "unified", }, @@ -29527,18 +28565,18 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": true, }, "hunkIndex": 1, - "lines": 6, + "lines": 8, "slotName": "hunk-separator-unified-1", "type": "unified", }, { "expandable": { - "chunked": false, + "chunked": true, "down": true, "up": true, }, "hunkIndex": 2, - "lines": 14, + "lines": 16, "slotName": "hunk-separator-unified-2", "type": "unified", }, @@ -29549,10 +28587,21 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": true, }, "hunkIndex": 3, - "lines": 35, + "lines": 37, "slotName": "hunk-separator-unified-3", "type": "unified", }, + { + "expandable": { + "chunked": false, + "down": true, + "up": true, + }, + "hunkIndex": 4, + "lines": 3, + "slotName": "hunk-separator-unified-4", + "type": "unified", + }, { "expandable": { "chunked": false, @@ -29560,10 +28609,21 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": true, }, "hunkIndex": 5, - "lines": 11, + "lines": 13, "slotName": "hunk-separator-unified-5", "type": "unified", }, + { + "expandable": { + "chunked": false, + "down": true, + "up": true, + }, + "hunkIndex": 6, + "lines": 3, + "slotName": "hunk-separator-unified-6", + "type": "unified", + }, { "expandable": { "chunked": true, @@ -29571,7 +28631,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": true, }, "hunkIndex": 7, - "lines": 44, + "lines": 46, "slotName": "hunk-separator-unified-7", "type": "unified", }, @@ -29582,7 +28642,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": true, }, "hunkIndex": 8, - "lines": 10, + "lines": 12, "slotName": "hunk-separator-unified-8", "type": "unified", }, @@ -29593,10 +28653,21 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": true, }, "hunkIndex": 9, - "lines": 7, + "lines": 9, "slotName": "hunk-separator-unified-9", "type": "unified", }, + { + "expandable": { + "chunked": false, + "down": true, + "up": true, + }, + "hunkIndex": 10, + "lines": 3, + "slotName": "hunk-separator-unified-10", + "type": "unified", + }, { "expandable": { "chunked": false, @@ -29604,7 +28675,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": true, }, "hunkIndex": 11, - "lines": 5, + "lines": 7, "slotName": "hunk-separator-unified-11", "type": "unified", }, @@ -29615,7 +28686,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": true, }, "hunkIndex": 12, - "lines": 31, + "lines": 33, "slotName": "hunk-separator-unified-12", "type": "unified", }, @@ -29626,7 +28697,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": true, }, "hunkIndex": 13, - "lines": 56, + "lines": 58, "slotName": "hunk-separator-unified-13", "type": "unified", }, @@ -29637,7 +28708,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "up": true, }, "hunkIndex": 14, - "lines": 43, + "lines": 44, "slotName": "hunk-separator-unified-14", "type": "unified", }, @@ -29658,7 +28729,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "pre", "type": "element", }, - "rowCount": 544, + "rowCount": 516, "themeStyles": "--diffs-dark:#fbfbfb;--diffs-dark-bg:#070707;--diffs-dark-addition-color:#00cab1;--diffs-dark-deletion-color:#ff2e3f;--diffs-dark-modified-color:#009fff;--diffs-light:#070707;--diffs-light-bg:#ffffff;--diffs-light-addition-color:#00cab1;--diffs-light-deletion-color:#ff2e3f;--diffs-light-modified-color:#009fff;", "totalLines": 711, "unifiedContentAST": [ @@ -29705,7 +28776,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "3 unmodified lines", + "value": "4 unmodified lines", }, ], "properties": { @@ -29739,29 +28810,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " DecorationItem,", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 4, - "data-line": 4, - "data-line-index": "3,3", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -29923,29 +28971,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 11, - "data-line": 12, - "data-line-index": "11,11", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -29989,7 +29014,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "6 unmodified lines", + "value": "8 unmodified lines", }, ], "properties": { @@ -30023,29 +29048,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " setupPreNode,", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 18, - "data-line": 19, - "data-line-index": "18,18", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -30350,28 +29352,38 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part { "children": [ { - "type": "text", - "value": " hunkIndex: number;", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": undefined, + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": "", + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 25, - "data-line": 33, - "data-line-index": "32,32", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { "children": [ { @@ -30379,7 +29391,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part { "children": [], "properties": { - "href": "#diffs-icon-expand-all", + "href": "#diffs-icon-expand", }, "tagName": "use", "type": "element", @@ -30396,9 +29408,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part }, ], "properties": { - "data-expand-both": "", + "data-expand-both": undefined, "data-expand-button": "", - "data-expand-down": undefined, + "data-expand-down": "", "data-expand-up": undefined, "role": "button", }, @@ -30411,7 +29423,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "14 unmodified lines", + "value": "16 unmodified lines", }, ], "properties": { @@ -30427,9 +29439,24 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, + { + "children": [ + { + "type": "text", + "value": "Expand all", + }, + ], + "properties": { + "data-expand-all-button": "", + "data-expand-button": "", + "role": "button", + }, + "tagName": "div", + "type": "element", + }, ], "properties": { - "data-separator-multi-button": undefined, + "data-separator-multi-button": "", "data-separator-wrapper": "", }, "tagName": "div", @@ -30445,29 +29472,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " hunk: Hunk;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 40, - "data-line": 48, - "data-line-index": "47,47", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -30652,29 +29656,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " codeUnified: HTMLElement;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 49, - "data-line": 55, - "data-line-index": "56,56", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -30751,7 +29732,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "35 unmodified lines", + "value": "37 unmodified lines", }, ], "properties": { @@ -30800,29 +29781,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " diff: FileMetadata | undefined;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 85, - "data-line": 91, - "data-line-index": "92,92", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -31163,7 +30121,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "data-alt-line": 100, "data-line": 106, "data-line-index": "107,107", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -31707,66 +30665,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part { "children": [ { - "type": "text", - "value": " return;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 118, - "data-line": 118, - "data-line-index": "128,125", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " }", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 119, - "data-line": 119, - "data-line-index": "129,126", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": " if (this.highlighter == null) {", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], - "properties": {}, - "tagName": "span", + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", "type": "element", }, ], "properties": { - "data-alt-line": 120, - "data-line": 120, - "data-line-index": "130,127", - "data-line-type": "context", + "data-expand-index": 4, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -32293,29 +31259,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " unified === true", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 137, - "data-line": 136, - "data-line-index": "150,144", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -32359,7 +31302,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "11 unmodified lines", + "value": "13 unmodified lines", }, ], "properties": { @@ -32393,29 +31336,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " const codeDeletions = createCodeNode({ columnType: 'deletions' });", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 149, - "data-line": 148, - "data-line-index": "162,156", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -32582,66 +31502,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part { "children": [ { - "type": "text", - "value": " codeUnified.appendChild(createHunkSeparator());", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 157, - "data-line": 155, - "data-line-index": "170,164", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " } else {", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 158, - "data-line": 156, - "data-line-index": "171,165", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": " codeAdditions.appendChild(createHunkSeparator());", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], - "properties": {}, - "tagName": "span", + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", "type": "element", }, ], "properties": { - "data-alt-line": 159, - "data-line": 157, - "data-line-index": "172,166", - "data-line-type": "context", + "data-expand-index": 6, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -33244,29 +32172,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " });", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 186, - "data-line": 169, - "data-line-index": "199,193", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -33343,7 +32248,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "44 unmodified lines", + "value": "46 unmodified lines", }, ], "properties": { @@ -33392,29 +32297,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " hunk,", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 231, - "data-line": 214, - "data-line-index": "244,238", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -36359,29 +35241,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " lastType !== 'context' &&", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 265, - "data-line": 338, - "data-line-index": "373,367", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -36425,7 +35284,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "10 unmodified lines", + "value": "12 unmodified lines", }, ], "properties": { @@ -36459,29 +35318,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " }", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 276, - "data-line": 349, - "data-line-index": "384,378", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -37469,29 +36305,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 301, - "data-line": 375, - "data-line-index": "414,404", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -37535,7 +36348,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "7 unmodified lines", + "value": "9 unmodified lines", }, ], "properties": { @@ -37569,29 +36382,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 309, - "data-line": 383, - "data-line-index": "422,412", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -38203,66 +36993,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part { "children": [ { - "type": "text", - "value": " };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 325, - "data-line": 400, - "data-line-index": "441,429", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " deletionGroupSize++;", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 326, - "data-line": 401, - "data-line-index": "442,430", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": " deletionLineIndex++;", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], - "properties": {}, - "tagName": "span", + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", "type": "element", }, ], "properties": { - "data-alt-line": 327, - "data-line": 402, - "data-line-index": "443,431", - "data-line-type": "context", + "data-expand-index": 10, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -38873,29 +37671,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 343, - "data-line": 419, - "data-line-index": "462,448", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -38939,7 +37714,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "5 unmodified lines", + "value": "7 unmodified lines", }, ], "properties": { @@ -38973,29 +37748,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 349, - "data-line": 425, - "data-line-index": "468,454", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -42822,29 +41574,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " let firstChild: RootContent | Element | Root | null = nodes.children[0];", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 401, - "data-line": 518, - "data-line-index": "603,576", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -42921,7 +41650,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "31 unmodified lines", + "value": "33 unmodified lines", }, ], "properties": { @@ -42970,29 +41699,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " return { langs, themes, preferWasmHighlighter };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 433, - "data-line": 550, - "data-line-index": "635,608", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -43568,29 +42274,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " state: SharedRenderState", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 440, - "data-line": 576, - "data-line-index": "661,634", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -43667,7 +42350,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "56 unmodified lines", + "value": "58 unmodified lines", }, ], "properties": { @@ -43716,29 +42399,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " children: [],", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 497, - "data-line": 633, - "data-line-index": "718,691", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -44521,29 +43181,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "} {", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 504, - "data-line": 668, - "data-line-index": "753,726", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -44587,7 +43224,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "43 unmodified lines", + "value": "44 unmodified lines", }, ], "properties": { @@ -44681,7 +43318,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "3 unmodified lines", + "value": "4 unmodified lines", }, ], "properties": { @@ -44715,30 +43352,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "4", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 4, - "data-line-index": "3,3", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -44907,30 +43520,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "12", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 12, - "data-line-index": "11,11", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -44974,7 +43563,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "6 unmodified lines", + "value": "8 unmodified lines", }, ], "properties": { @@ -45008,30 +43597,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "19", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 19, - "data-line-index": "18,18", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -45349,29 +43914,38 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part { "children": [ { - "type": "text", - "value": "33", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": undefined, + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": "", + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 33, - "data-line-index": "32,32", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { "children": [ { @@ -45379,7 +43953,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part { "children": [], "properties": { - "href": "#diffs-icon-expand-all", + "href": "#diffs-icon-expand", }, "tagName": "use", "type": "element", @@ -45396,9 +43970,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part }, ], "properties": { - "data-expand-both": "", + "data-expand-both": undefined, "data-expand-button": "", - "data-expand-down": undefined, + "data-expand-down": "", "data-expand-up": undefined, "role": "button", }, @@ -45411,7 +43985,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "14 unmodified lines", + "value": "16 unmodified lines", }, ], "properties": { @@ -45427,9 +44001,24 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, + { + "children": [ + { + "type": "text", + "value": "Expand all", + }, + ], + "properties": { + "data-expand-all-button": "", + "data-expand-button": "", + "role": "button", + }, + "tagName": "div", + "type": "element", + }, ], "properties": { - "data-separator-multi-button": undefined, + "data-separator-multi-button": "", "data-separator-wrapper": "", }, "tagName": "div", @@ -45445,30 +44034,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "48", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 48, - "data-line-index": "47,47", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -45661,30 +44226,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "55", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 55, - "data-line-index": "56,56", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -45761,7 +44302,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "35 unmodified lines", + "value": "37 unmodified lines", }, ], "properties": { @@ -45810,30 +44351,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "91", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 91, - "data-line-index": "92,92", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -46189,7 +44706,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "properties": { "data-column-number": 106, "data-line-index": "107,107", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -46679,69 +45196,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part { "children": [ { - "type": "text", - "value": "118", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 118, - "data-line-index": "128,125", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "119", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 119, - "data-line-index": "129,126", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": "120", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], "properties": { - "data-line-number-content": "", + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", }, - "tagName": "span", + "tagName": "div", "type": "element", }, ], "properties": { - "data-column-number": 120, - "data-line-index": "130,127", - "data-line-type": "context", + "data-expand-index": 4, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -47202,30 +45724,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "136", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 136, - "data-line-index": "150,144", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -47269,7 +45767,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "11 unmodified lines", + "value": "13 unmodified lines", }, ], "properties": { @@ -47303,30 +45801,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "148", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 148, - "data-line-index": "162,156", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -47500,69 +45974,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part { "children": [ { - "type": "text", - "value": "155", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 155, - "data-line-index": "170,164", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "156", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 156, - "data-line-index": "171,165", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": "157", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], "properties": { - "data-line-number-content": "", + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", }, - "tagName": "span", + "tagName": "div", "type": "element", }, ], "properties": { - "data-column-number": 157, - "data-line-index": "172,166", - "data-line-type": "context", + "data-expand-index": 6, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -48191,30 +46670,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "169", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 169, - "data-line-index": "199,193", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -48291,7 +46746,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "44 unmodified lines", + "value": "46 unmodified lines", }, ], "properties": { @@ -48340,30 +46795,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "214", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 214, - "data-line-index": "244,238", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -51436,30 +49867,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "338", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 338, - "data-line-index": "373,367", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -51503,7 +49910,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "10 unmodified lines", + "value": "12 unmodified lines", }, ], "properties": { @@ -51537,30 +49944,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "349", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 349, - "data-line-index": "384,378", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -52257,30 +50640,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "375", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 375, - "data-line-index": "414,404", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -52324,7 +50683,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "7 unmodified lines", + "value": "9 unmodified lines", }, ], "properties": { @@ -52358,30 +50717,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "383", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 383, - "data-line-index": "422,412", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -52819,69 +51154,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part { "children": [ { - "type": "text", - "value": "400", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 400, - "data-line-index": "441,429", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "401", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 401, - "data-line-index": "442,430", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": "402", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], "properties": { - "data-line-number-content": "", + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", }, - "tagName": "span", + "tagName": "div", "type": "element", }, ], "properties": { - "data-column-number": 402, - "data-line-index": "443,431", - "data-line-type": "context", + "data-expand-index": 10, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -53318,30 +51658,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "419", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 419, - "data-line-index": "462,448", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -53385,7 +51701,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "5 unmodified lines", + "value": "7 unmodified lines", }, ], "properties": { @@ -53419,30 +51735,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "425", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 425, - "data-line-index": "468,454", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -56659,30 +54951,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "518", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 518, - "data-line-index": "603,576", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -56759,7 +55027,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "31 unmodified lines", + "value": "33 unmodified lines", }, ], "properties": { @@ -56808,30 +55076,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "550", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 550, - "data-line-index": "635,608", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -57432,30 +55676,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "576", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 576, - "data-line-index": "661,634", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -57532,7 +55752,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "56 unmodified lines", + "value": "58 unmodified lines", }, ], "properties": { @@ -57581,30 +55801,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "633", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 633, - "data-line-index": "718,691", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -58421,30 +56617,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "668", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 668, - "data-line-index": "753,726", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -58488,7 +56660,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.3: Part "children": [ { "type": "text", - "value": "43 unmodified lines", + "value": "44 unmodified lines", }, ], "properties": { @@ -58669,7 +56841,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": false, }, "hunkIndex": 0, - "lines": 3, + "lines": 4, "slotName": "hunk-separator-unified-0", "type": "unified", }, @@ -58680,7 +56852,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": true, }, "hunkIndex": 1, - "lines": 6, + "lines": 8, "slotName": "hunk-separator-unified-1", "type": "unified", }, @@ -58691,7 +56863,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": true, }, "hunkIndex": 2, - "lines": 14, + "lines": 16, "slotName": "hunk-separator-unified-2", "type": "unified", }, @@ -58702,10 +56874,21 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": true, }, "hunkIndex": 3, - "lines": 30, + "lines": 32, "slotName": "hunk-separator-unified-3", "type": "unified", }, + { + "expandable": { + "chunked": false, + "down": true, + "up": true, + }, + "hunkIndex": 4, + "lines": 3, + "slotName": "hunk-separator-unified-4", + "type": "unified", + }, { "expandable": { "chunked": true, @@ -58713,10 +56896,21 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": true, }, "hunkIndex": 5, - "lines": 11, + "lines": 13, "slotName": "hunk-separator-unified-5", "type": "unified", }, + { + "expandable": { + "chunked": false, + "down": true, + "up": true, + }, + "hunkIndex": 6, + "lines": 3, + "slotName": "hunk-separator-unified-6", + "type": "unified", + }, { "expandable": { "chunked": true, @@ -58724,18 +56918,18 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": true, }, "hunkIndex": 7, - "lines": 44, + "lines": 46, "slotName": "hunk-separator-unified-7", "type": "unified", }, { "expandable": { - "chunked": false, + "chunked": true, "down": true, "up": true, }, "hunkIndex": 8, - "lines": 10, + "lines": 12, "slotName": "hunk-separator-unified-8", "type": "unified", }, @@ -58746,10 +56940,21 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": true, }, "hunkIndex": 9, - "lines": 7, + "lines": 9, "slotName": "hunk-separator-unified-9", "type": "unified", }, + { + "expandable": { + "chunked": false, + "down": true, + "up": true, + }, + "hunkIndex": 10, + "lines": 3, + "slotName": "hunk-separator-unified-10", + "type": "unified", + }, { "expandable": { "chunked": false, @@ -58757,7 +56962,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": true, }, "hunkIndex": 11, - "lines": 5, + "lines": 7, "slotName": "hunk-separator-unified-11", "type": "unified", }, @@ -58768,7 +56973,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": true, }, "hunkIndex": 12, - "lines": 31, + "lines": 33, "slotName": "hunk-separator-unified-12", "type": "unified", }, @@ -58779,7 +56984,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": true, }, "hunkIndex": 13, - "lines": 56, + "lines": 58, "slotName": "hunk-separator-unified-13", "type": "unified", }, @@ -58790,7 +56995,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "up": true, }, "hunkIndex": 14, - "lines": 43, + "lines": 44, "slotName": "hunk-separator-unified-14", "type": "unified", }, @@ -58811,7 +57016,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "pre", "type": "element", }, - "rowCount": 549, + "rowCount": 521, "themeStyles": "--diffs-dark:#fbfbfb;--diffs-dark-bg:#070707;--diffs-dark-addition-color:#00cab1;--diffs-dark-deletion-color:#ff2e3f;--diffs-dark-modified-color:#009fff;--diffs-light:#070707;--diffs-light-bg:#ffffff;--diffs-light-addition-color:#00cab1;--diffs-light-deletion-color:#ff2e3f;--diffs-light-modified-color:#009fff;", "totalLines": 711, "unifiedContentAST": [ @@ -58858,7 +57063,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "3 unmodified lines", + "value": "4 unmodified lines", }, ], "properties": { @@ -58892,29 +57097,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " DecorationItem,", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 4, - "data-line": 4, - "data-line-index": "3,3", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -59076,29 +57258,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 11, - "data-line": 12, - "data-line-index": "11,11", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -59142,7 +57301,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "6 unmodified lines", + "value": "8 unmodified lines", }, ], "properties": { @@ -59176,29 +57335,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " setupPreNode,", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 18, - "data-line": 19, - "data-line-index": "18,18", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -59498,29 +57634,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " hunkIndex: number;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 25, - "data-line": 33, - "data-line-index": "32,32", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -59597,7 +57710,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "14 unmodified lines", + "value": "16 unmodified lines", }, ], "properties": { @@ -59646,29 +57759,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " hunk: Hunk;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 40, - "data-line": 48, - "data-line-index": "47,47", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -59871,7 +57961,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "data-alt-line": 49, "data-line": 55, "data-line-index": "56,56", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -60083,29 +58173,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " spans: Record;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 59, - "data-line": 65, - "data-line-index": "66,66", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -60182,7 +58249,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "30 unmodified lines", + "value": "32 unmodified lines", }, ], "properties": { @@ -60231,29 +58298,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 90, - "data-line": 96, - "data-line-index": "97,97", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -60479,7 +58523,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "data-alt-line": 100, "data-line": 106, "data-line-index": "107,107", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -61023,66 +59067,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [ { - "type": "text", - "value": " return;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 118, - "data-line": 118, - "data-line-index": "128,125", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " }", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 119, - "data-line": 119, - "data-line-index": "129,126", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": " if (this.highlighter == null) {", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], - "properties": {}, - "tagName": "span", + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", "type": "element", }, ], "properties": { - "data-alt-line": 120, - "data-line": 120, - "data-line-index": "130,127", - "data-line-type": "context", + "data-expand-index": 4, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -61609,29 +59661,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " unified === true", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 137, - "data-line": 136, - "data-line-index": "150,144", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -61708,7 +59737,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "11 unmodified lines", + "value": "13 unmodified lines", }, ], "properties": { @@ -61757,29 +59786,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " const codeDeletions = createCodeNode({ columnType: 'deletions' });", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 149, - "data-line": 148, - "data-line-index": "162,156", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -61946,66 +59952,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [ { - "type": "text", - "value": " codeUnified.appendChild(createHunkSeparator());", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 157, - "data-line": 155, - "data-line-index": "170,164", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " } else {", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 158, - "data-line": 156, - "data-line-index": "171,165", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": " codeAdditions.appendChild(createHunkSeparator());", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], - "properties": {}, - "tagName": "span", + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", "type": "element", }, ], "properties": { - "data-alt-line": 159, - "data-line": 157, - "data-line-index": "172,166", - "data-line-type": "context", + "data-expand-index": 6, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -62608,29 +60622,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " });", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 186, - "data-line": 169, - "data-line-index": "199,193", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -62707,7 +60698,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "44 unmodified lines", + "value": "46 unmodified lines", }, ], "properties": { @@ -62756,29 +60747,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " hunk,", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 231, - "data-line": 214, - "data-line-index": "244,238", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -65728,28 +63696,38 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [ { - "type": "text", - "value": " lastType !== 'context' &&", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": undefined, + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": "", + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 265, - "data-line": 338, - "data-line-index": "373,367", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { "children": [ { @@ -65757,7 +63735,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [], "properties": { - "href": "#diffs-icon-expand-all", + "href": "#diffs-icon-expand", }, "tagName": "use", "type": "element", @@ -65774,9 +63752,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part }, ], "properties": { - "data-expand-both": "", + "data-expand-both": undefined, "data-expand-button": "", - "data-expand-down": undefined, + "data-expand-down": "", "data-expand-up": undefined, "role": "button", }, @@ -65789,7 +63767,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "10 unmodified lines", + "value": "12 unmodified lines", }, ], "properties": { @@ -65805,9 +63783,24 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, + { + "children": [ + { + "type": "text", + "value": "Expand all", + }, + ], + "properties": { + "data-expand-all-button": "", + "data-expand-button": "", + "role": "button", + }, + "tagName": "div", + "type": "element", + }, ], "properties": { - "data-separator-multi-button": undefined, + "data-separator-multi-button": "", "data-separator-wrapper": "", }, "tagName": "div", @@ -65823,29 +63816,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " }", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 276, - "data-line": 349, - "data-line-index": "384,378", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -66833,29 +64803,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 301, - "data-line": 375, - "data-line-index": "414,404", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -66899,7 +64846,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "7 unmodified lines", + "value": "9 unmodified lines", }, ], "properties": { @@ -66933,29 +64880,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 309, - "data-line": 383, - "data-line-index": "422,412", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -67567,66 +65491,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [ { - "type": "text", - "value": " };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 325, - "data-line": 400, - "data-line-index": "441,429", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " deletionGroupSize++;", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 326, - "data-line": 401, - "data-line-index": "442,430", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": " deletionLineIndex++;", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], - "properties": {}, - "tagName": "span", + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", "type": "element", }, ], "properties": { - "data-alt-line": 327, - "data-line": 402, - "data-line-index": "443,431", - "data-line-type": "context", + "data-expand-index": 10, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -68237,29 +66169,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 343, - "data-line": 419, - "data-line-index": "462,448", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -68303,7 +66212,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "5 unmodified lines", + "value": "7 unmodified lines", }, ], "properties": { @@ -68337,29 +66246,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 349, - "data-line": 425, - "data-line-index": "468,454", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -72186,29 +70072,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " let firstChild: RootContent | Element | Root | null = nodes.children[0];", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 401, - "data-line": 518, - "data-line-index": "603,576", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -72285,7 +70148,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "31 unmodified lines", + "value": "33 unmodified lines", }, ], "properties": { @@ -72334,29 +70197,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " return { langs, themes, preferWasmHighlighter };", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 433, - "data-line": 550, - "data-line-index": "635,608", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -72932,29 +70772,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " state: SharedRenderState", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 440, - "data-line": 576, - "data-line-index": "661,634", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -73031,7 +70848,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "56 unmodified lines", + "value": "58 unmodified lines", }, ], "properties": { @@ -73080,29 +70897,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " children: [],", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 497, - "data-line": 633, - "data-line-index": "718,691", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -73885,29 +71679,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "} {", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 504, - "data-line": 668, - "data-line-index": "753,726", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -73951,7 +71722,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "43 unmodified lines", + "value": "44 unmodified lines", }, ], "properties": { @@ -74045,7 +71816,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "3 unmodified lines", + "value": "4 unmodified lines", }, ], "properties": { @@ -74079,30 +71850,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "4", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 4, - "data-line-index": "3,3", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -74271,30 +72018,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "12", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 12, - "data-line-index": "11,11", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -74338,7 +72061,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "6 unmodified lines", + "value": "8 unmodified lines", }, ], "properties": { @@ -74372,30 +72095,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "19", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 19, - "data-line-index": "18,18", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -74708,30 +72407,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "33", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 33, - "data-line-index": "32,32", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -74808,7 +72483,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "14 unmodified lines", + "value": "16 unmodified lines", }, ], "properties": { @@ -74857,30 +72532,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "48", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 48, - "data-line-index": "47,47", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -75092,7 +72743,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "properties": { "data-column-number": 55, "data-line-index": "56,56", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -75313,30 +72964,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "65", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 65, - "data-line-index": "66,66", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -75413,7 +73040,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "30 unmodified lines", + "value": "32 unmodified lines", }, ], "properties": { @@ -75462,30 +73089,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "96", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 96, - "data-line-index": "97,97", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -75721,7 +73324,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "properties": { "data-column-number": 106, "data-line-index": "107,107", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -76211,69 +73814,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [ { - "type": "text", - "value": "118", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 118, - "data-line-index": "128,125", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "119", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 119, - "data-line-index": "129,126", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": "120", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], "properties": { - "data-line-number-content": "", + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", }, - "tagName": "span", + "tagName": "div", "type": "element", }, ], "properties": { - "data-column-number": 120, - "data-line-index": "130,127", - "data-line-type": "context", + "data-expand-index": 4, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -76734,30 +74342,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "136", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 136, - "data-line-index": "150,144", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -76834,7 +74418,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "11 unmodified lines", + "value": "13 unmodified lines", }, ], "properties": { @@ -76883,30 +74467,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "148", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 148, - "data-line-index": "162,156", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -77080,69 +74640,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [ { - "type": "text", - "value": "155", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 155, - "data-line-index": "170,164", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "156", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 156, - "data-line-index": "171,165", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": "157", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], "properties": { - "data-line-number-content": "", + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", }, - "tagName": "span", + "tagName": "div", "type": "element", }, ], "properties": { - "data-column-number": 157, - "data-line-index": "172,166", - "data-line-type": "context", + "data-expand-index": 6, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -77771,30 +75336,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "169", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 169, - "data-line-index": "199,193", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -77871,7 +75412,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "44 unmodified lines", + "value": "46 unmodified lines", }, ], "properties": { @@ -77920,30 +75461,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "214", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 214, - "data-line-index": "244,238", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -81021,29 +78538,38 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [ { - "type": "text", - "value": "338", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": undefined, + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": "", + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 338, - "data-line-index": "373,367", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { "children": [ { @@ -81051,7 +78577,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [], "properties": { - "href": "#diffs-icon-expand-all", + "href": "#diffs-icon-expand", }, "tagName": "use", "type": "element", @@ -81068,9 +78594,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part }, ], "properties": { - "data-expand-both": "", + "data-expand-both": undefined, "data-expand-button": "", - "data-expand-down": undefined, + "data-expand-down": "", "data-expand-up": undefined, "role": "button", }, @@ -81083,7 +78609,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "10 unmodified lines", + "value": "12 unmodified lines", }, ], "properties": { @@ -81099,9 +78625,24 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, + { + "children": [ + { + "type": "text", + "value": "Expand all", + }, + ], + "properties": { + "data-expand-all-button": "", + "data-expand-button": "", + "role": "button", + }, + "tagName": "div", + "type": "element", + }, ], "properties": { - "data-separator-multi-button": undefined, + "data-separator-multi-button": "", "data-separator-wrapper": "", }, "tagName": "div", @@ -81117,30 +78658,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "349", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 349, - "data-line-index": "384,378", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -81837,30 +79354,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "375", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 375, - "data-line-index": "414,404", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -81904,7 +79397,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "7 unmodified lines", + "value": "9 unmodified lines", }, ], "properties": { @@ -81938,30 +79431,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "383", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 383, - "data-line-index": "422,412", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -82399,69 +79868,74 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [ { - "type": "text", - "value": "400", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 400, - "data-line-index": "441,429", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "401", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 401, - "data-line-index": "442,430", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ { - "type": "text", - "value": "402", + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", }, ], "properties": { - "data-line-number-content": "", + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", }, - "tagName": "span", + "tagName": "div", "type": "element", }, ], "properties": { - "data-column-number": 402, - "data-line-index": "443,431", - "data-line-type": "context", + "data-expand-index": 10, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -82898,30 +80372,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "419", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 419, - "data-line-index": "462,448", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -82965,7 +80415,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "5 unmodified lines", + "value": "7 unmodified lines", }, ], "properties": { @@ -82999,30 +80449,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "425", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 425, - "data-line-index": "468,454", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -86244,61 +83670,37 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part { "children": [ { - "type": "text", - "value": "518", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 518, - "data-line-index": "603,576", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [], - "properties": { - "href": "#diffs-icon-expand", - }, - "tagName": "use", - "type": "element", - }, - ], - "properties": { - "data-icon": "", - "height": 16, - "viewBox": "0 0 16 16", - "width": 16, - }, - "tagName": "svg", - "type": "element", - }, - ], - "properties": { - "data-expand-both": undefined, - "data-expand-button": "", - "data-expand-down": undefined, - "data-expand-up": "", - "role": "button", - }, - "tagName": "div", - "type": "element", + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": undefined, + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": "", + "role": "button", + }, + "tagName": "div", + "type": "element", }, { "children": [ @@ -86339,7 +83741,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "31 unmodified lines", + "value": "33 unmodified lines", }, ], "properties": { @@ -86388,30 +83790,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "550", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 550, - "data-line-index": "635,608", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -87012,30 +84390,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "576", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 576, - "data-line-index": "661,634", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -87112,7 +84466,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "56 unmodified lines", + "value": "58 unmodified lines", }, ], "properties": { @@ -87161,30 +84515,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "633", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 633, - "data-line-index": "718,691", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -88001,30 +85331,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "668", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 668, - "data-line-index": "753,726", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -88068,7 +85374,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.4: Part "children": [ { "type": "text", - "value": "43 unmodified lines", + "value": "44 unmodified lines", }, ], "properties": { @@ -88249,10 +85555,21 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "up": true, }, "hunkIndex": 3, - "lines": 30, + "lines": 32, "slotName": "hunk-separator-unified-3", "type": "unified", }, + { + "expandable": { + "chunked": false, + "down": true, + "up": true, + }, + "hunkIndex": 4, + "lines": 3, + "slotName": "hunk-separator-unified-4", + "type": "unified", + }, ], "preNode": { "children": [], @@ -88270,125 +85587,10 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "tagName": "pre", "type": "element", }, - "rowCount": 51, + "rowCount": 52, "themeStyles": "--diffs-dark:#fbfbfb;--diffs-dark-bg:#070707;--diffs-dark-addition-color:#00cab1;--diffs-dark-deletion-color:#ff2e3f;--diffs-dark-modified-color:#009fff;--diffs-light:#070707;--diffs-light-bg:#ffffff;--diffs-light-addition-color:#00cab1;--diffs-light-deletion-color:#ff2e3f;--diffs-light-modified-color:#009fff;", "totalLines": 711, "unifiedContentAST": [ - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 46, - "data-line": 52, - "data-line-index": "53,53", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " codeAdditions: HTMLElement;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 47, - "data-line": 53, - "data-line-index": "54,54", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " codeDeletions: HTMLElement;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 48, - "data-line": 54, - "data-line-index": "55,55", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " codeUnified: HTMLElement;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 49, - "data-line": 55, - "data-line-index": "56,56", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "}", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 50, - "data-line": 56, - "data-line-index": "57,57", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -88803,29 +86005,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " theme?: never;", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 69, - "data-line": 75, - "data-line-index": "76,76", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -88902,7 +86081,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "30 unmodified lines", + "value": "32 unmodified lines", }, ], "properties": { @@ -88951,29 +86130,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": " this.highlighter = await getSharedHighlighter(this.getHighlighterOptions());", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 100, - "data-line": 106, - "data-line-index": "107,107", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -89508,13 +86664,90 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "tagName": "div", "type": "element", }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", + }, + ], + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", + "type": "element", + }, + ], + "properties": { + "data-expand-index": 4, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, + }, + "tagName": "div", + "type": "element", + }, { "children": [ { "children": [ { "type": "text", - "value": " return;", + "value": " this.highlighter = await this.initializeHighlighter();", }, ], "properties": {}, @@ -89523,9 +86756,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-alt-line": 118, - "data-line": 118, - "data-line-index": "128,125", + "data-alt-line": 121, + "data-line": 121, + "data-line-index": "131,128", "data-line-type": "context", }, "tagName": "div", @@ -89546,10 +86779,10 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-alt-line": 119, - "data-line": 119, - "data-line-index": "129,126", - "data-line-type": "context-expanded", + "data-alt-line": 122, + "data-line": 122, + "data-line-index": "132,129", + "data-line-type": "context", }, "tagName": "div", "type": "element", @@ -89560,7 +86793,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": " if (this.highlighter == null) {", + "value": "", }, ], "properties": {}, @@ -89569,9 +86802,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-alt-line": 120, - "data-line": 120, - "data-line-index": "130,127", + "data-alt-line": 123, + "data-line": 123, + "data-line-index": "133,130", "data-line-type": "context", }, "tagName": "div", @@ -89583,7 +86816,39 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": " this.highlighter = await this.initializeHighlighter();", + "value": " const [source, wrapper", + }, + ], + "properties": {}, + "tagName": "span", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": ", decorations", + }, + ], + "properties": {}, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "class": undefined, + "data-diff-span": "", + }, + "tagName": "span", + "type": "element", + }, + { + "children": [ + { + "type": "text", + "value": "] = this.queuedRenderArgs;", }, ], "properties": {}, @@ -89592,10 +86857,10 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-alt-line": 121, - "data-line": 121, - "data-line-index": "131,128", - "data-line-type": "context", + "data-alt-line": undefined, + "data-line": 124, + "data-line-index": "134,131", + "data-line-type": "change-deletion", }, "tagName": "div", "type": "element", @@ -89606,7 +86871,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": " }", + "value": " const [source, wrapper] = this.queuedRenderArgs;", }, ], "properties": {}, @@ -89615,35 +86880,32 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-alt-line": 122, - "data-line": 122, - "data-line-index": "132,129", - "data-line-type": "context", + "data-alt-line": undefined, + "data-line": 124, + "data-line-index": "135,131", + "data-line-type": "change-addition", }, "tagName": "div", "type": "element", }, - ], - "unifiedGutterAST": [ { "children": [ { "children": [ { "type": "text", - "value": "52", + "value": " this.queuedRenderArgs = undefined;", }, ], - "properties": { - "data-line-number-content": "", - }, + "properties": {}, "tagName": "span", "type": "element", }, ], "properties": { - "data-column-number": 52, - "data-line-index": "53,53", + "data-alt-line": 125, + "data-line": 125, + "data-line-index": "136,132", "data-line-type": "context", }, "tagName": "div", @@ -89655,19 +86917,96 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "53", + "value": " this.renderDiff(wrapper, source, this.highlighter", + }, + ], + "properties": {}, + "tagName": "span", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": ", decorations", + }, + ], + "properties": {}, + "tagName": "span", + "type": "element", }, ], "properties": { - "data-line-number-content": "", + "class": undefined, + "data-diff-span": "", }, "tagName": "span", "type": "element", }, + { + "children": [ + { + "type": "text", + "value": ");", + }, + ], + "properties": {}, + "tagName": "span", + "type": "element", + }, ], "properties": { - "data-column-number": 53, - "data-line-index": "54,54", + "data-alt-line": undefined, + "data-line": 126, + "data-line-index": "137,133", + "data-line-type": "change-deletion", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": " this.renderDiff(wrapper, source, this.highlighter);", + }, + ], + "properties": {}, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-alt-line": undefined, + "data-line": 126, + "data-line-index": "138,133", + "data-line-type": "change-addition", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": " }", + }, + ], + "properties": {}, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-alt-line": 127, + "data-line": 127, + "data-line-index": "139,134", "data-line-type": "context", }, "tagName": "div", @@ -89679,19 +87018,18 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "54", + "value": "", }, ], - "properties": { - "data-line-number-content": "", - }, + "properties": {}, "tagName": "span", "type": "element", }, ], "properties": { - "data-column-number": 54, - "data-line-index": "55,55", + "data-alt-line": 128, + "data-line": 128, + "data-line-index": "140,135", "data-line-type": "context", }, "tagName": "div", @@ -89703,19 +87041,18 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "55", + "value": " private renderDiff(", }, ], - "properties": { - "data-line-number-content": "", - }, + "properties": {}, "tagName": "span", "type": "element", }, ], "properties": { - "data-column-number": 55, - "data-line-index": "56,56", + "data-alt-line": 129, + "data-line": 129, + "data-line-index": "141,136", "data-line-type": "context", }, "tagName": "div", @@ -89727,24 +87064,25 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "56", + "value": " wrapper: HTMLPreElement,", }, ], - "properties": { - "data-line-number-content": "", - }, + "properties": {}, "tagName": "span", "type": "element", }, ], "properties": { - "data-column-number": 56, - "data-line-index": "57,57", - "data-line-type": "context-expanded", + "data-alt-line": 130, + "data-line": 130, + "data-line-index": "142,137", + "data-line-type": "context", }, "tagName": "div", "type": "element", }, + ], + "unifiedGutterAST": [ { "children": [ { @@ -90177,30 +87515,6 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "tagName": "div", "type": "element", }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "75", - }, - ], - "properties": { - "data-line-number-content": "", - }, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-column-number": 75, - "data-line-index": "76,76", - "data-line-type": "context-expanded", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -90277,7 +87591,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "30 unmodified lines", + "value": "32 unmodified lines", }, ], "properties": { @@ -90326,6 +87640,126 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "tagName": "div", "type": "element", }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "107", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 107, + "data-line-index": "108,108", + "data-line-type": "context", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "108", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 108, + "data-line-index": "109,109", + "data-line-type": "context", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "109", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 109, + "data-line-index": "110,110", + "data-line-type": "context", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "104", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 104, + "data-line-index": "111,111", + "data-line-type": "change-deletion", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "105", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 105, + "data-line-index": "112,112", + "data-line-type": "change-deletion", + }, + "tagName": "div", + "type": "element", + }, { "children": [ { @@ -90344,8 +87778,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind ], "properties": { "data-column-number": 106, - "data-line-index": "107,107", - "data-line-type": "context", + "data-line-index": "113,113", + "data-line-type": "change-deletion", }, "tagName": "div", "type": "element", @@ -90356,7 +87790,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "107", + "value": "110", }, ], "properties": { @@ -90367,8 +87801,32 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 107, - "data-line-index": "108,108", + "data-column-number": 110, + "data-line-index": "114,111", + "data-line-type": "change-addition", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "111", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 111, + "data-line-index": "115,114", "data-line-type": "context", }, "tagName": "div", @@ -90392,8 +87850,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind ], "properties": { "data-column-number": 108, - "data-line-index": "109,109", - "data-line-type": "context", + "data-line-index": "116,115", + "data-line-type": "change-deletion", }, "tagName": "div", "type": "element", @@ -90416,8 +87874,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind ], "properties": { "data-column-number": 109, - "data-line-index": "110,110", - "data-line-type": "context", + "data-line-index": "117,116", + "data-line-type": "change-deletion", }, "tagName": "div", "type": "element", @@ -90428,7 +87886,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "104", + "value": "110", }, ], "properties": { @@ -90439,8 +87897,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 104, - "data-line-index": "111,111", + "data-column-number": 110, + "data-line-index": "118,117", "data-line-type": "change-deletion", }, "tagName": "div", @@ -90452,7 +87910,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "105", + "value": "111", }, ], "properties": { @@ -90463,8 +87921,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 105, - "data-line-index": "112,112", + "data-column-number": 111, + "data-line-index": "119,118", "data-line-type": "change-deletion", }, "tagName": "div", @@ -90476,7 +87934,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "106", + "value": "112", }, ], "properties": { @@ -90487,8 +87945,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 106, - "data-line-index": "113,113", + "data-column-number": 112, + "data-line-index": "120,119", "data-line-type": "change-deletion", }, "tagName": "div", @@ -90500,7 +87958,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "110", + "value": "112", }, ], "properties": { @@ -90511,8 +87969,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 110, - "data-line-index": "114,111", + "data-column-number": 112, + "data-line-index": "121,115", "data-line-type": "change-addition", }, "tagName": "div", @@ -90524,7 +87982,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "111", + "value": "113", }, ], "properties": { @@ -90535,8 +87993,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 111, - "data-line-index": "115,114", + "data-column-number": 113, + "data-line-index": "122,120", "data-line-type": "context", }, "tagName": "div", @@ -90548,7 +88006,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "108", + "value": "114", }, ], "properties": { @@ -90559,8 +88017,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 108, - "data-line-index": "116,115", + "data-column-number": 114, + "data-line-index": "123,121", "data-line-type": "change-deletion", }, "tagName": "div", @@ -90572,7 +88030,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "109", + "value": "114", }, ], "properties": { @@ -90583,9 +88041,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 109, - "data-line-index": "117,116", - "data-line-type": "change-deletion", + "data-column-number": 114, + "data-line-index": "124,121", + "data-line-type": "change-addition", }, "tagName": "div", "type": "element", @@ -90596,7 +88054,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "110", + "value": "115", }, ], "properties": { @@ -90607,9 +88065,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 110, - "data-line-index": "118,117", - "data-line-type": "change-deletion", + "data-column-number": 115, + "data-line-index": "125,122", + "data-line-type": "context", }, "tagName": "div", "type": "element", @@ -90620,7 +88078,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "111", + "value": "116", }, ], "properties": { @@ -90631,9 +88089,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 111, - "data-line-index": "119,118", - "data-line-type": "change-deletion", + "data-column-number": 116, + "data-line-index": "126,123", + "data-line-type": "context", }, "tagName": "div", "type": "element", @@ -90644,7 +88102,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "112", + "value": "117", }, ], "properties": { @@ -90655,9 +88113,86 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 112, - "data-line-index": "120,119", - "data-line-type": "change-deletion", + "data-column-number": 117, + "data-line-index": "127,124", + "data-line-type": "context", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [], + "properties": { + "href": "#diffs-icon-expand-all", + }, + "tagName": "use", + "type": "element", + }, + ], + "properties": { + "data-icon": "", + "height": 16, + "viewBox": "0 0 16 16", + "width": 16, + }, + "tagName": "svg", + "type": "element", + }, + ], + "properties": { + "data-expand-both": "", + "data-expand-button": "", + "data-expand-down": undefined, + "data-expand-up": undefined, + "role": "button", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "3 unmodified lines", + }, + ], + "properties": { + "data-unmodified-lines": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-separator-content": "", + }, + "tagName": "div", + "type": "element", + }, + ], + "properties": { + "data-separator-multi-button": undefined, + "data-separator-wrapper": "", + }, + "tagName": "div", + "type": "element", + }, + ], + "properties": { + "data-expand-index": 4, + "data-separator": "line-info", + "data-separator-first": undefined, + "data-separator-last": undefined, }, "tagName": "div", "type": "element", @@ -90668,7 +88203,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "112", + "value": "121", }, ], "properties": { @@ -90679,9 +88214,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 112, - "data-line-index": "121,115", - "data-line-type": "change-addition", + "data-column-number": 121, + "data-line-index": "131,128", + "data-line-type": "context", }, "tagName": "div", "type": "element", @@ -90692,7 +88227,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "113", + "value": "122", }, ], "properties": { @@ -90703,8 +88238,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 113, - "data-line-index": "122,120", + "data-column-number": 122, + "data-line-index": "132,129", "data-line-type": "context", }, "tagName": "div", @@ -90716,7 +88251,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "114", + "value": "123", }, ], "properties": { @@ -90727,9 +88262,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 114, - "data-line-index": "123,121", - "data-line-type": "change-deletion", + "data-column-number": 123, + "data-line-index": "133,130", + "data-line-type": "context", }, "tagName": "div", "type": "element", @@ -90740,7 +88275,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "114", + "value": "124", }, ], "properties": { @@ -90751,9 +88286,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 114, - "data-line-index": "124,121", - "data-line-type": "change-addition", + "data-column-number": 124, + "data-line-index": "134,131", + "data-line-type": "change-deletion", }, "tagName": "div", "type": "element", @@ -90764,7 +88299,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "115", + "value": "124", }, ], "properties": { @@ -90775,9 +88310,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 115, - "data-line-index": "125,122", - "data-line-type": "context", + "data-column-number": 124, + "data-line-index": "135,131", + "data-line-type": "change-addition", }, "tagName": "div", "type": "element", @@ -90788,7 +88323,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "116", + "value": "125", }, ], "properties": { @@ -90799,8 +88334,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 116, - "data-line-index": "126,123", + "data-column-number": 125, + "data-line-index": "136,132", "data-line-type": "context", }, "tagName": "div", @@ -90812,7 +88347,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "117", + "value": "126", }, ], "properties": { @@ -90823,9 +88358,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 117, - "data-line-index": "127,124", - "data-line-type": "context", + "data-column-number": 126, + "data-line-index": "137,133", + "data-line-type": "change-deletion", }, "tagName": "div", "type": "element", @@ -90836,7 +88371,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "118", + "value": "126", }, ], "properties": { @@ -90847,9 +88382,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 118, - "data-line-index": "128,125", - "data-line-type": "context", + "data-column-number": 126, + "data-line-index": "138,133", + "data-line-type": "change-addition", }, "tagName": "div", "type": "element", @@ -90860,7 +88395,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "119", + "value": "127", }, ], "properties": { @@ -90871,9 +88406,9 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 119, - "data-line-index": "129,126", - "data-line-type": "context-expanded", + "data-column-number": 127, + "data-line-index": "139,134", + "data-line-type": "context", }, "tagName": "div", "type": "element", @@ -90884,7 +88419,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "120", + "value": "128", }, ], "properties": { @@ -90895,8 +88430,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 120, - "data-line-index": "130,127", + "data-column-number": 128, + "data-line-index": "140,135", "data-line-type": "context", }, "tagName": "div", @@ -90908,7 +88443,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "121", + "value": "129", }, ], "properties": { @@ -90919,8 +88454,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 121, - "data-line-index": "131,128", + "data-column-number": 129, + "data-line-index": "141,136", "data-line-type": "context", }, "tagName": "div", @@ -90932,7 +88467,7 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind "children": [ { "type": "text", - "value": "122", + "value": "130", }, ], "properties": { @@ -90943,8 +88478,8 @@ exports[`DiffHunksRenderer - Virtualization expanded collapsed regions 3.5: Wind }, ], "properties": { - "data-column-number": 122, - "data-line-index": "132,129", + "data-column-number": 130, + "data-line-index": "142,137", "data-line-type": "context", }, "tagName": "div", @@ -91095,75 +88630,6 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.1: Rendered "themeStyles": "--diffs-dark:#fbfbfb;--diffs-dark-bg:#070707;--diffs-dark-addition-color:#00cab1;--diffs-dark-deletion-color:#ff2e3f;--diffs-dark-modified-color:#009fff;--diffs-light:#070707;--diffs-light-bg:#ffffff;--diffs-light-addition-color:#00cab1;--diffs-light-deletion-color:#ff2e3f;--diffs-light-modified-color:#009fff;", "totalLines": 711, "unifiedContentAST": [ - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "} from './utils/html_render_utils';", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 19, - "data-line": 20, - "data-line-index": "19,19", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "import { parseLineType } from './utils/parseLineType';", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 20, - "data-line": 21, - "data-line-index": "20,20", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, - { - "children": [ - { - "children": [ - { - "type": "text", - "value": "", - }, - ], - "properties": {}, - "tagName": "span", - "type": "element", - }, - ], - "properties": { - "data-alt-line": 21, - "data-line": 22, - "data-line-index": "21,21", - "data-line-type": "context", - }, - "tagName": "div", - "type": "element", - }, { "children": [ { @@ -91325,27 +88791,24 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.1: Rendered "tagName": "div", "type": "element", }, - ], - "unifiedGutterAST": [ { "children": [ { "children": [ { "type": "text", - "value": "20", + "value": "export interface DiffDecorationItem extends DecorationItem {", }, ], - "properties": { - "data-line-number-content": "", - }, + "properties": {}, "tagName": "span", "type": "element", }, ], "properties": { - "data-column-number": 20, - "data-line-index": "19,19", + "data-alt-line": 22, + "data-line": 30, + "data-line-index": "29,29", "data-line-type": "context", }, "tagName": "div", @@ -91357,19 +88820,18 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.1: Rendered "children": [ { "type": "text", - "value": "21", + "value": " type: 'additions' | 'deletions';", }, ], - "properties": { - "data-line-number-content": "", - }, + "properties": {}, "tagName": "span", "type": "element", }, ], "properties": { - "data-column-number": 21, - "data-line-index": "20,20", + "data-alt-line": 23, + "data-line": 31, + "data-line-index": "30,30", "data-line-type": "context", }, "tagName": "div", @@ -91381,24 +88843,25 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.1: Rendered "children": [ { "type": "text", - "value": "22", + "value": " // Kinda hate this API for now... need to think about it more...", }, ], - "properties": { - "data-line-number-content": "", - }, + "properties": {}, "tagName": "span", "type": "element", }, ], "properties": { - "data-column-number": 22, - "data-line-index": "21,21", + "data-alt-line": 24, + "data-line": 32, + "data-line-index": "31,31", "data-line-type": "context", }, "tagName": "div", "type": "element", }, + ], + "unifiedGutterAST": [ { "children": [ { @@ -91567,31 +89030,25 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.1: Rendered "tagName": "div", "type": "element", }, - ], -} -`; - -exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered content matches source - split: split window 10-20 1`] = ` -{ - "additionsContentAST": [ { "children": [ { "children": [ { "type": "text", - "value": "} from './utils/html_render_utils';", + "value": "30", }, ], - "properties": {}, + "properties": { + "data-line-number-content": "", + }, "tagName": "span", "type": "element", }, ], "properties": { - "data-alt-line": 19, - "data-line": 20, - "data-line-index": "19,19", + "data-column-number": 30, + "data-line-index": "29,29", "data-line-type": "context", }, "tagName": "div", @@ -91603,18 +89060,19 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered "children": [ { "type": "text", - "value": "import { parseLineType } from './utils/parseLineType';", + "value": "31", }, ], - "properties": {}, + "properties": { + "data-line-number-content": "", + }, "tagName": "span", "type": "element", }, ], "properties": { - "data-alt-line": 20, - "data-line": 21, - "data-line-index": "20,20", + "data-column-number": 31, + "data-line-index": "30,30", "data-line-type": "context", }, "tagName": "div", @@ -91626,23 +89084,31 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered "children": [ { "type": "text", - "value": "", + "value": "32", }, ], - "properties": {}, + "properties": { + "data-line-number-content": "", + }, "tagName": "span", "type": "element", }, ], "properties": { - "data-alt-line": 21, - "data-line": 22, - "data-line-index": "21,21", + "data-column-number": 32, + "data-line-index": "31,31", "data-line-type": "context", }, "tagName": "div", "type": "element", }, + ], +} +`; + +exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered content matches source - split: split window 10-20 1`] = ` +{ + "additionsContentAST": [ { "children": [ { @@ -91804,27 +89270,24 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered "tagName": "div", "type": "element", }, - ], - "additionsGutterAST": [ { "children": [ { "children": [ { "type": "text", - "value": "20", + "value": "export interface DiffDecorationItem extends DecorationItem {", }, ], - "properties": { - "data-line-number-content": "", - }, + "properties": {}, "tagName": "span", "type": "element", }, ], "properties": { - "data-column-number": 20, - "data-line-index": "19,19", + "data-alt-line": 22, + "data-line": 30, + "data-line-index": "29,29", "data-line-type": "context", }, "tagName": "div", @@ -91836,19 +89299,18 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered "children": [ { "type": "text", - "value": "21", + "value": " type: 'additions' | 'deletions';", }, ], - "properties": { - "data-line-number-content": "", - }, + "properties": {}, "tagName": "span", "type": "element", }, ], "properties": { - "data-column-number": 21, - "data-line-index": "20,20", + "data-alt-line": 23, + "data-line": 31, + "data-line-index": "30,30", "data-line-type": "context", }, "tagName": "div", @@ -91860,24 +89322,25 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered "children": [ { "type": "text", - "value": "22", + "value": " // Kinda hate this API for now... need to think about it more...", }, ], - "properties": { - "data-line-number-content": "", - }, + "properties": {}, "tagName": "span", "type": "element", }, ], "properties": { - "data-column-number": 22, - "data-line-index": "21,21", + "data-alt-line": 24, + "data-line": 32, + "data-line-index": "31,31", "data-line-type": "context", }, "tagName": "div", "type": "element", }, + ], + "additionsGutterAST": [ { "children": [ { @@ -92046,19 +89509,101 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered "tagName": "div", "type": "element", }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "30", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 30, + "data-line-index": "29,29", + "data-line-type": "context", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "31", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 31, + "data-line-index": "30,30", + "data-line-type": "context", + }, + "tagName": "div", + "type": "element", + }, + { + "children": [ + { + "children": [ + { + "type": "text", + "value": "32", + }, + ], + "properties": { + "data-line-number-content": "", + }, + "tagName": "span", + "type": "element", + }, + ], + "properties": { + "data-column-number": 32, + "data-line-index": "31,31", + "data-line-type": "context", + }, + "tagName": "div", + "type": "element", + }, ], "baseThemeType": undefined, "bufferAfter": 0, "bufferBefore": 0, "css": "", "deletionsContentAST": [ + { + "children": [], + "properties": { + "data-buffer-size": 7, + "data-content-buffer": "", + "style": "grid-row: span 7;min-height:calc(7 * 1lh)", + }, + "tagName": "div", + "type": "element", + }, { "children": [ { "children": [ { "type": "text", - "value": "} from './utils/html_render_utils';", + "value": "export interface DiffDecorationItem extends DecorationItem {", }, ], "properties": {}, @@ -92067,9 +89612,9 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered }, ], "properties": { - "data-alt-line": 20, - "data-line": 19, - "data-line-index": "19,19", + "data-alt-line": 30, + "data-line": 22, + "data-line-index": "29,29", "data-line-type": "context", }, "tagName": "div", @@ -92081,7 +89626,7 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered "children": [ { "type": "text", - "value": "import { parseLineType } from './utils/parseLineType';", + "value": " type: 'additions' | 'deletions';", }, ], "properties": {}, @@ -92090,9 +89635,9 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered }, ], "properties": { - "data-alt-line": 21, - "data-line": 20, - "data-line-index": "20,20", + "data-alt-line": 31, + "data-line": 23, + "data-line-index": "30,30", "data-line-type": "context", }, "tagName": "div", @@ -92104,7 +89649,7 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered "children": [ { "type": "text", - "value": "", + "value": " // Kinda hate this API for now... need to think about it more...", }, ], "properties": {}, @@ -92113,33 +89658,34 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered }, ], "properties": { - "data-alt-line": 22, - "data-line": 21, - "data-line-index": "21,21", + "data-alt-line": 32, + "data-line": 24, + "data-line-index": "31,31", "data-line-type": "context", }, "tagName": "div", "type": "element", }, + ], + "deletionsGutterAST": [ { "children": [], "properties": { "data-buffer-size": 7, - "data-content-buffer": "", - "style": "grid-row: span 7;min-height:calc(7 * 1lh)", + "data-gutter-buffer": "buffer", + "data-line-type": undefined, + "style": "grid-row: span 7;min-height:calc(7 * 1lh);", }, "tagName": "div", "type": "element", }, - ], - "deletionsGutterAST": [ { "children": [ { "children": [ { "type": "text", - "value": "19", + "value": "22", }, ], "properties": { @@ -92150,8 +89696,8 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered }, ], "properties": { - "data-column-number": 19, - "data-line-index": "19,19", + "data-column-number": 22, + "data-line-index": "29,29", "data-line-type": "context", }, "tagName": "div", @@ -92163,7 +89709,7 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered "children": [ { "type": "text", - "value": "20", + "value": "23", }, ], "properties": { @@ -92174,8 +89720,8 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered }, ], "properties": { - "data-column-number": 20, - "data-line-index": "20,20", + "data-column-number": 23, + "data-line-index": "30,30", "data-line-type": "context", }, "tagName": "div", @@ -92187,7 +89733,7 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered "children": [ { "type": "text", - "value": "21", + "value": "24", }, ], "properties": { @@ -92198,24 +89744,13 @@ exports[`DiffHunksRenderer - Virtualization correct lines rendered 6.2: Rendered }, ], "properties": { - "data-column-number": 21, - "data-line-index": "21,21", + "data-column-number": 24, + "data-line-index": "31,31", "data-line-type": "context", }, "tagName": "div", "type": "element", }, - { - "children": [], - "properties": { - "data-buffer-size": 7, - "data-gutter-buffer": "buffer", - "data-line-type": undefined, - "style": "grid-row: span 7;min-height:calc(7 * 1lh);", - }, - "tagName": "div", - "type": "element", - }, ], "headerElement": { "children": [ diff --git a/packages/diffs/test/__snapshots__/annotations.test.ts.snap b/packages/diffs/test/__snapshots__/annotations.test.ts.snap index 624e1928c..b148a7de0 100644 --- a/packages/diffs/test/__snapshots__/annotations.test.ts.snap +++ b/packages/diffs/test/__snapshots__/annotations.test.ts.snap @@ -162,7 +162,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 4, "data-line": 4, "data-line-index": "3,3", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -928,7 +928,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 11, "data-line": 12, "data-line-index": "11,11", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -1389,7 +1389,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 18, "data-line": 19, "data-line-index": "18,18", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -2221,7 +2221,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 25, "data-line": 33, "data-line-index": "32,32", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -2247,7 +2247,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p }, ], "properties": { - "data-line-annotation": "1,32", + "data-line-annotation": "2,32", }, "tagName": "div", "type": "element", @@ -3137,7 +3137,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 40, "data-line": 48, "data-line-index": "47,47", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -3798,7 +3798,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 49, "data-line": 55, "data-line-index": "56,56", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -7073,7 +7073,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 100, "data-line": 106, "data-line-index": "107,107", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -8695,7 +8695,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 118, "data-line": 118, "data-line-index": "128,125", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -8849,7 +8849,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 120, "data-line": 120, "data-line-index": "130,127", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -10732,7 +10732,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 137, "data-line": 136, "data-line-index": "150,144", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -11897,7 +11897,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 149, "data-line": 148, "data-line-index": "162,156", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -12760,7 +12760,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 157, "data-line": 155, "data-line-index": "170,164", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -12901,7 +12901,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 159, "data-line": 157, "data-line-index": "172,166", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -14720,7 +14720,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 186, "data-line": 169, "data-line-index": "199,193", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -18096,7 +18096,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 231, "data-line": 214, "data-line-index": "244,238", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -28112,7 +28112,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 265, "data-line": 338, "data-line-index": "373,367", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -28881,7 +28881,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 276, "data-line": 349, "data-line-index": "384,378", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -31493,7 +31493,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 301, "data-line": 375, "data-line-index": "414,404", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -31882,7 +31882,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 309, "data-line": 383, "data-line-index": "422,412", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -33444,7 +33444,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 325, "data-line": 400, "data-line-index": "441,429", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -33546,7 +33546,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 327, "data-line": 402, "data-line-index": "443,431", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -35082,7 +35082,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 343, "data-line": 419, "data-line-index": "462,448", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -35304,7 +35304,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 349, "data-line": 425, "data-line-index": "468,454", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -46474,7 +46474,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 401, "data-line": 518, "data-line-index": "603,576", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -48828,7 +48828,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 433, "data-line": 550, "data-line-index": "635,608", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -50214,7 +50214,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 440, "data-line": 576, "data-line-index": "661,634", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -54643,7 +54643,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 497, "data-line": 633, "data-line-index": "718,691", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -57027,7 +57027,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 504, "data-line": 668, "data-line-index": "753,726", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -60060,7 +60060,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 4, "data-line": 4, "data-line-index": "3,3", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -60826,7 +60826,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 11, "data-line": 12, "data-line-index": "11,11", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -61287,7 +61287,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 18, "data-line": 19, "data-line-index": "18,18", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -62119,7 +62119,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 25, "data-line": 33, "data-line-index": "32,32", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -62136,7 +62136,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p }, ], "properties": { - "data-line-annotation": "1,32", + "data-line-annotation": "2,32", }, "tagName": "div", "type": "element", @@ -63026,7 +63026,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 40, "data-line": 48, "data-line-index": "47,47", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -63491,7 +63491,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 49, "data-line": 55, "data-line-index": "56,56", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -66766,7 +66766,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 100, "data-line": 106, "data-line-index": "107,107", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -67692,7 +67692,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 118, "data-line": 118, "data-line-index": "128,125", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -67846,7 +67846,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 120, "data-line": 120, "data-line-index": "130,127", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -69128,7 +69128,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 137, "data-line": 136, "data-line-index": "150,144", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -70293,7 +70293,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 149, "data-line": 148, "data-line-index": "162,156", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -71050,7 +71050,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 157, "data-line": 155, "data-line-index": "170,164", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -71191,7 +71191,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 159, "data-line": 157, "data-line-index": "172,166", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -71706,7 +71706,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 186, "data-line": 169, "data-line-index": "199,193", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -75082,7 +75082,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 231, "data-line": 214, "data-line-index": "244,238", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -84753,7 +84753,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 265, "data-line": 338, "data-line-index": "373,367", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -85522,7 +85522,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 276, "data-line": 349, "data-line-index": "384,378", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -87497,7 +87497,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 301, "data-line": 375, "data-line-index": "414,404", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -87886,7 +87886,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 309, "data-line": 383, "data-line-index": "422,412", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -89118,7 +89118,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 325, "data-line": 400, "data-line-index": "441,429", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -89220,7 +89220,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 327, "data-line": 402, "data-line-index": "443,431", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -90426,7 +90426,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 343, "data-line": 419, "data-line-index": "462,448", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -90648,7 +90648,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 349, "data-line": 425, "data-line-index": "468,454", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -98420,7 +98420,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 401, "data-line": 518, "data-line-index": "603,576", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -100774,7 +100774,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 433, "data-line": 550, "data-line-index": "635,608", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -102160,7 +102160,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 440, "data-line": 576, "data-line-index": "661,634", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -106589,7 +106589,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 497, "data-line": 633, "data-line-index": "718,691", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -108973,7 +108973,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 504, "data-line": 668, "data-line-index": "753,726", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -112006,7 +112006,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 4, "data-line": 4, "data-line-index": "3,3", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -112631,7 +112631,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 12, "data-line": 11, "data-line-index": "11,11", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -113092,7 +113092,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 19, "data-line": 18, "data-line-index": "18,18", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -113574,7 +113574,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 33, "data-line": 25, "data-line-index": "32,32", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -113600,7 +113600,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p }, ], "properties": { - "data-line-annotation": "1,32", + "data-line-annotation": "2,32", }, "tagName": "div", "type": "element", @@ -114490,7 +114490,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 48, "data-line": 40, "data-line-index": "47,47", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -115151,7 +115151,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 55, "data-line": 49, "data-line-index": "56,56", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -118426,7 +118426,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 106, "data-line": 100, "data-line-index": "107,107", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -119576,7 +119576,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 118, "data-line": 118, "data-line-index": "128,125", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -119730,7 +119730,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 120, "data-line": 120, "data-line-index": "130,127", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -121174,7 +121174,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 136, "data-line": 137, "data-line-index": "150,144", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -122339,7 +122339,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 148, "data-line": 149, "data-line-index": "162,156", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -123202,7 +123202,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 155, "data-line": 157, "data-line-index": "170,164", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -123343,7 +123343,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 157, "data-line": 159, "data-line-index": "172,166", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -125162,7 +125162,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 169, "data-line": 186, "data-line-index": "199,193", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -128538,7 +128538,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 214, "data-line": 231, "data-line-index": "244,238", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -131299,7 +131299,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 338, "data-line": 265, "data-line-index": "373,367", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -132068,7 +132068,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 349, "data-line": 276, "data-line-index": "384,378", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -134079,7 +134079,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 375, "data-line": 301, "data-line-index": "414,404", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -134468,7 +134468,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 383, "data-line": 309, "data-line-index": "422,412", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -135704,7 +135704,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 400, "data-line": 325, "data-line-index": "441,429", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -135806,7 +135806,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 402, "data-line": 327, "data-line-index": "443,431", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -137016,7 +137016,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 419, "data-line": 343, "data-line-index": "462,448", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -137238,7 +137238,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 425, "data-line": 349, "data-line-index": "468,454", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -141265,7 +141265,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 518, "data-line": 401, "data-line-index": "603,576", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -143619,7 +143619,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 550, "data-line": 433, "data-line-index": "635,608", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -143928,7 +143928,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 576, "data-line": 440, "data-line-index": "661,634", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -148357,7 +148357,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 633, "data-line": 497, "data-line-index": "718,691", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", @@ -148666,7 +148666,7 @@ exports[`Annotation Rendering line index matching annotation lineIndex matches p "data-alt-line": 668, "data-line": 504, "data-line-index": "753,726", - "data-line-type": "context", + "data-line-type": "context-expanded", }, "tagName": "div", "type": "element", diff --git a/packages/diffs/test/__snapshots__/parseDiffFromFile.test.ts.snap b/packages/diffs/test/__snapshots__/parseDiffFromFile.test.ts.snap index 1e891b767..f4b7a9eaf 100644 --- a/packages/diffs/test/__snapshots__/parseDiffFromFile.test.ts.snap +++ b/packages/diffs/test/__snapshots__/parseDiffFromFile.test.ts.snap @@ -5041,20 +5041,20 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match ], "hunks": [ { - "additionCount": 9, - "additionLineIndex": 3, + "additionCount": 7, + "additionLineIndex": 4, "additionLines": 1, - "additionStart": 4, - "collapsedBefore": 3, - "deletionCount": 8, - "deletionLineIndex": 3, + "additionStart": 5, + "collapsedBefore": 4, + "deletionCount": 6, + "deletionLineIndex": 4, "deletionLines": 0, - "deletionStart": 4, + "deletionStart": 5, "hunkContent": [ { - "additionLineIndex": 3, - "deletionLineIndex": 3, - "lines": 4, + "additionLineIndex": 4, + "deletionLineIndex": 4, + "lines": 3, "type": "context", }, { @@ -5067,37 +5067,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 8, "deletionLineIndex": 7, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -4,8 +4,9 @@ +"@@ -5,6 +5,7 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 9, - "splitLineStart": 3, - "unifiedLineCount": 9, - "unifiedLineStart": 3, + "splitLineCount": 7, + "splitLineStart": 4, + "unifiedLineCount": 7, + "unifiedLineStart": 4, }, { - "additionCount": 15, - "additionLineIndex": 18, + "additionCount": 13, + "additionLineIndex": 19, "additionLines": 7, - "additionStart": 19, - "collapsedBefore": 6, - "deletionCount": 8, - "deletionLineIndex": 17, + "additionStart": 20, + "collapsedBefore": 8, + "deletionCount": 6, + "deletionLineIndex": 18, "deletionLines": 0, - "deletionStart": 18, + "deletionStart": 19, "hunkContent": [ { - "additionLineIndex": 18, - "deletionLineIndex": 17, - "lines": 4, + "additionLineIndex": 19, + "deletionLineIndex": 18, + "lines": 3, "type": "context", }, { @@ -5110,37 +5110,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 29, "deletionLineIndex": 21, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -18,8 +19,15 @@ +"@@ -19,6 +20,13 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 15, - "splitLineStart": 18, - "unifiedLineCount": 15, - "unifiedLineStart": 18, + "splitLineCount": 13, + "splitLineStart": 19, + "unifiedLineCount": 13, + "unifiedLineStart": 19, }, { - "additionCount": 8, - "additionLineIndex": 47, + "additionCount": 6, + "additionLineIndex": 48, "additionLines": 0, - "additionStart": 48, - "collapsedBefore": 14, - "deletionCount": 10, - "deletionLineIndex": 39, + "additionStart": 49, + "collapsedBefore": 16, + "deletionCount": 8, + "deletionLineIndex": 40, "deletionLines": 2, - "deletionStart": 40, + "deletionStart": 41, "hunkContent": [ { - "additionLineIndex": 47, - "deletionLineIndex": 39, - "lines": 4, + "additionLineIndex": 48, + "deletionLineIndex": 40, + "lines": 3, "type": "context", }, { @@ -5153,37 +5153,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 51, "deletionLineIndex": 45, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -40,10 +48,8 @@ +"@@ -41,8 +49,6 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 10, - "splitLineStart": 47, - "unifiedLineCount": 10, - "unifiedLineStart": 47, + "splitLineCount": 8, + "splitLineStart": 48, + "unifiedLineCount": 8, + "unifiedLineStart": 48, }, { - "additionCount": 13, - "additionLineIndex": 105, + "additionCount": 11, + "additionLineIndex": 106, "additionLines": 3, - "additionStart": 106, - "collapsedBefore": 50, - "deletionCount": 19, - "deletionLineIndex": 99, + "additionStart": 107, + "collapsedBefore": 52, + "deletionCount": 17, + "deletionLineIndex": 100, "deletionLines": 9, - "deletionStart": 100, + "deletionStart": 101, "hunkContent": [ { - "additionLineIndex": 105, - "deletionLineIndex": 99, - "lines": 4, + "additionLineIndex": 106, + "deletionLineIndex": 100, + "lines": 3, "type": "context", }, { @@ -5222,37 +5222,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 114, "deletionLineIndex": 114, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -100,19 +106,13 @@ +"@@ -101,17 +107,11 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 19, - "splitLineStart": 107, - "unifiedLineCount": 22, - "unifiedLineStart": 107, + "splitLineCount": 17, + "splitLineStart": 108, + "unifiedLineCount": 20, + "unifiedLineStart": 108, }, { - "additionCount": 17, - "additionLineIndex": 119, + "additionCount": 15, + "additionLineIndex": 120, "additionLines": 3, - "additionStart": 120, - "collapsedBefore": 1, - "deletionCount": 18, - "deletionLineIndex": 119, + "additionStart": 121, + "collapsedBefore": 3, + "deletionCount": 16, + "deletionLineIndex": 120, "deletionLines": 4, - "deletionStart": 120, + "deletionStart": 121, "hunkContent": [ { - "additionLineIndex": 119, - "deletionLineIndex": 119, - "lines": 4, + "additionLineIndex": 120, + "deletionLineIndex": 120, + "lines": 3, "type": "context", }, { @@ -5291,37 +5291,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 132, "deletionLineIndex": 133, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -120,18 +120,17 @@ +"@@ -121,16 +121,15 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 18, - "splitLineStart": 127, - "unifiedLineCount": 21, - "unifiedLineStart": 130, + "splitLineCount": 16, + "splitLineStart": 128, + "unifiedLineCount": 19, + "unifiedLineStart": 131, }, { - "additionCount": 8, - "additionLineIndex": 147, + "additionCount": 6, + "additionLineIndex": 148, "additionLines": 0, - "additionStart": 148, - "collapsedBefore": 11, - "deletionCount": 9, - "deletionLineIndex": 148, + "additionStart": 149, + "collapsedBefore": 13, + "deletionCount": 7, + "deletionLineIndex": 149, "deletionLines": 1, - "deletionStart": 149, + "deletionStart": 150, "hunkContent": [ { - "additionLineIndex": 147, - "deletionLineIndex": 148, - "lines": 4, + "additionLineIndex": 148, + "deletionLineIndex": 149, + "lines": 3, "type": "context", }, { @@ -5334,37 +5334,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 151, "deletionLineIndex": 153, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -149,9 +148,8 @@ +"@@ -150,7 +149,6 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 9, - "splitLineStart": 156, - "unifiedLineCount": 9, - "unifiedLineStart": 162, + "splitLineCount": 7, + "splitLineStart": 157, + "unifiedLineCount": 7, + "unifiedLineStart": 163, }, { - "additionCount": 13, - "additionLineIndex": 156, + "additionCount": 11, + "additionLineIndex": 157, "additionLines": 0, - "additionStart": 157, - "collapsedBefore": 1, - "deletionCount": 28, - "deletionLineIndex": 158, + "additionStart": 158, + "collapsedBefore": 3, + "deletionCount": 26, + "deletionLineIndex": 159, "deletionLines": 15, - "deletionStart": 159, + "deletionStart": 160, "hunkContent": [ { - "additionLineIndex": 156, - "deletionLineIndex": 158, - "lines": 4, + "additionLineIndex": 157, + "deletionLineIndex": 159, + "lines": 3, "type": "context", }, { @@ -5390,37 +5390,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 165, "deletionLineIndex": 182, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -159,28 +157,13 @@ +"@@ -160,26 +158,11 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 28, - "splitLineStart": 166, - "unifiedLineCount": 28, - "unifiedLineStart": 172, + "splitLineCount": 26, + "splitLineStart": 167, + "unifiedLineCount": 26, + "unifiedLineStart": 173, }, { - "additionCount": 125, - "additionLineIndex": 213, + "additionCount": 123, + "additionLineIndex": 214, "additionLines": 95, - "additionStart": 214, - "collapsedBefore": 44, - "deletionCount": 35, - "deletionLineIndex": 230, + "additionStart": 215, + "collapsedBefore": 46, + "deletionCount": 33, + "deletionLineIndex": 231, "deletionLines": 5, - "deletionStart": 231, + "deletionStart": 232, "hunkContent": [ { - "additionLineIndex": 213, - "deletionLineIndex": 230, - "lines": 4, + "additionLineIndex": 214, + "deletionLineIndex": 231, + "lines": 3, "type": "context", }, { @@ -5537,37 +5537,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 334, "deletionLineIndex": 261, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -231,35 +214,125 @@ +"@@ -232,33 +215,123 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 130, - "splitLineStart": 238, - "unifiedLineCount": 130, - "unifiedLineStart": 244, + "splitLineCount": 128, + "splitLineStart": 239, + "unifiedLineCount": 128, + "unifiedLineStart": 245, }, { - "additionCount": 27, - "additionLineIndex": 348, + "additionCount": 25, + "additionLineIndex": 349, "additionLines": 5, - "additionStart": 349, - "collapsedBefore": 10, - "deletionCount": 26, - "deletionLineIndex": 275, + "additionStart": 350, + "collapsedBefore": 12, + "deletionCount": 24, + "deletionLineIndex": 276, "deletionLines": 4, - "deletionStart": 276, + "deletionStart": 277, "hunkContent": [ { - "additionLineIndex": 348, - "deletionLineIndex": 275, - "lines": 4, + "additionLineIndex": 349, + "deletionLineIndex": 276, + "lines": 3, "type": "context", }, { @@ -5619,37 +5619,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 371, "deletionLineIndex": 297, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -276,26 +349,27 @@ +"@@ -277,24 +350,25 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 27, - "splitLineStart": 378, - "unifiedLineCount": 31, - "unifiedLineStart": 384, + "splitLineCount": 25, + "splitLineStart": 379, + "unifiedLineCount": 29, + "unifiedLineStart": 385, }, { - "additionCount": 18, - "additionLineIndex": 382, + "additionCount": 16, + "additionLineIndex": 383, "additionLines": 3, - "additionStart": 383, - "collapsedBefore": 7, - "deletionCount": 17, - "deletionLineIndex": 308, + "additionStart": 384, + "collapsedBefore": 9, + "deletionCount": 15, + "deletionLineIndex": 309, "deletionLines": 2, - "deletionStart": 309, + "deletionStart": 310, "hunkContent": [ { - "additionLineIndex": 382, - "deletionLineIndex": 308, - "lines": 4, + "additionLineIndex": 383, + "deletionLineIndex": 309, + "lines": 3, "type": "context", }, { @@ -5688,37 +5688,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 396, "deletionLineIndex": 321, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -309,17 +383,18 @@ +"@@ -310,15 +384,16 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 18, - "splitLineStart": 412, - "unifiedLineCount": 20, - "unifiedLineStart": 422, + "splitLineCount": 16, + "splitLineStart": 413, + "unifiedLineCount": 18, + "unifiedLineStart": 423, }, { - "additionCount": 18, - "additionLineIndex": 401, + "additionCount": 16, + "additionLineIndex": 402, "additionLines": 3, - "additionStart": 402, - "collapsedBefore": 1, - "deletionCount": 17, - "deletionLineIndex": 326, + "additionStart": 403, + "collapsedBefore": 3, + "deletionCount": 15, + "deletionLineIndex": 327, "deletionLines": 2, - "deletionStart": 327, + "deletionStart": 328, "hunkContent": [ { - "additionLineIndex": 401, - "deletionLineIndex": 326, - "lines": 4, + "additionLineIndex": 402, + "deletionLineIndex": 327, + "lines": 3, "type": "context", }, { @@ -5757,37 +5757,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 415, "deletionLineIndex": 339, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -327,17 +402,18 @@ +"@@ -328,15 +403,16 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 18, - "splitLineStart": 431, - "unifiedLineCount": 20, - "unifiedLineStart": 443, + "splitLineCount": 16, + "splitLineStart": 432, + "unifiedLineCount": 18, + "unifiedLineStart": 444, }, { - "additionCount": 94, - "additionLineIndex": 424, + "additionCount": 92, + "additionLineIndex": 425, "additionLines": 83, - "additionStart": 425, - "collapsedBefore": 5, - "deletionCount": 53, - "deletionLineIndex": 348, + "additionStart": 426, + "collapsedBefore": 7, + "deletionCount": 51, + "deletionLineIndex": 349, "deletionLines": 42, - "deletionStart": 349, + "deletionStart": 350, "hunkContent": [ { - "additionLineIndex": 424, - "deletionLineIndex": 348, - "lines": 4, + "additionLineIndex": 425, + "deletionLineIndex": 349, + "lines": 3, "type": "context", }, { @@ -5839,37 +5839,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 514, "deletionLineIndex": 397, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -349,53 +425,94 @@ +"@@ -350,51 +426,92 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 123, - "splitLineStart": 454, - "unifiedLineCount": 136, - "unifiedLineStart": 468, + "splitLineCount": 121, + "splitLineStart": 455, + "unifiedLineCount": 134, + "unifiedLineStart": 469, }, { - "additionCount": 27, - "additionLineIndex": 549, + "additionCount": 25, + "additionLineIndex": 550, "additionLines": 19, - "additionStart": 550, - "collapsedBefore": 31, - "deletionCount": 8, - "deletionLineIndex": 432, + "additionStart": 551, + "collapsedBefore": 33, + "deletionCount": 6, + "deletionLineIndex": 433, "deletionLines": 0, - "deletionStart": 433, + "deletionStart": 434, "hunkContent": [ { - "additionLineIndex": 549, - "deletionLineIndex": 432, - "lines": 4, + "additionLineIndex": 550, + "deletionLineIndex": 433, + "lines": 3, "type": "context", }, { @@ -5882,37 +5882,37 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 572, "deletionLineIndex": 436, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -433,8 +550,27 @@ +"@@ -434,6 +551,25 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 27, - "splitLineStart": 608, - "unifiedLineCount": 27, - "unifiedLineStart": 635, + "splitLineCount": 25, + "splitLineStart": 609, + "unifiedLineCount": 25, + "unifiedLineStart": 636, }, { - "additionCount": 36, - "additionLineIndex": 632, + "additionCount": 34, + "additionLineIndex": 633, "additionLines": 28, - "additionStart": 633, - "collapsedBefore": 56, - "deletionCount": 8, - "deletionLineIndex": 496, + "additionStart": 634, + "collapsedBefore": 58, + "deletionCount": 6, + "deletionLineIndex": 497, "deletionLines": 0, - "deletionStart": 497, + "deletionStart": 498, "hunkContent": [ { - "additionLineIndex": 632, - "deletionLineIndex": 496, - "lines": 4, + "additionLineIndex": 633, + "deletionLineIndex": 497, + "lines": 3, "type": "context", }, { @@ -5925,21 +5925,21 @@ exports[`parseDiffFromFile should parse diff from fileOld and fileNew and match { "additionLineIndex": 664, "deletionLineIndex": 500, - "lines": 4, + "lines": 3, "type": "context", }, ], "hunkContext": undefined, "hunkSpecs": -"@@ -497,8 +633,36 @@ +"@@ -498,6 +634,34 @@ " , "noEOFCRAdditions": false, "noEOFCRDeletions": false, - "splitLineCount": 36, - "splitLineStart": 691, - "unifiedLineCount": 36, - "unifiedLineStart": 718, + "splitLineCount": 34, + "splitLineStart": 692, + "unifiedLineCount": 34, + "unifiedLineStart": 719, }, ], "isPartial": false, diff --git a/packages/diffs/test/iterateOverDiff.test.ts b/packages/diffs/test/iterateOverDiff.test.ts index 8805ffafc..028c51d0d 100644 --- a/packages/diffs/test/iterateOverDiff.test.ts +++ b/packages/diffs/test/iterateOverDiff.test.ts @@ -11,6 +11,14 @@ describe('iterateOverDiff', () => { { name: 'test.txt', contents: fileOld }, { name: 'test.txt', contents: fileNew } ); + const totalUnifiedRows = diff.hunks.reduce( + (sum, hunk) => sum + hunk.unifiedLineCount, + 0 + ); + const totalSplitRows = diff.hunks.reduce( + (sum, hunk) => sum + hunk.splitLineCount, + 0 + ); test('unified iteration produces expected sequence', () => { const results: Array<{ @@ -48,16 +56,15 @@ describe('iterateOverDiff', () => { }); // Check total lines matches expected - expect(results.length).toBe(517); + expect(results.length).toBe(totalUnifiedRows); - // First hunk starts at its unifiedLineStart (which is 3 because collapsedBefore=3) + // First hunk starts at its unifiedLineStart. // The lineIndex is the actual unified line index, not a sequential counter expect(results[0].lineIndex).toBe(diff.hunks[0].unifiedLineStart); expect(results[0].hunkIndex).toBe(0); - // First line should be context with collapsedBefore = 3 (from hunk 0) - // Actually, hunk 0 has collapsedBefore=3, so first rendered line should signal this - expect(results[0].collapsedBefore).toBe(3); + // First line should signal the leading collapsed region for hunk 0. + expect(results[0].collapsedBefore).toBe(diff.hunks[0].collapsedBefore); }); test('split iteration produces expected sequence', () => { @@ -88,7 +95,7 @@ describe('iterateOverDiff', () => { }); // Check total lines matches expected for split mode - expect(results.length).toBe(490); + expect(results.length).toBe(totalSplitRows); }); test('expanded hunks work correctly', () => { @@ -123,9 +130,11 @@ describe('iterateOverDiff', () => { }, }); - // With 3 collapsedBefore and fromStart=2, fromEnd=1, we should have: + const firstHunkCollapsedBefore = diff.hunks[0]?.collapsedBefore ?? 0; + + // With collapsedBefore and fromStart=2, fromEnd=1, we should have: // - 2 context-expanded lines (fromStart) - // - collapsedBefore = 0 (3 - 2 - 1 = 0, fully expanded) + // - remaining collapsedBefore after the trailing expansion marker // - 1 context-expanded line (fromEnd) // - then hunk content @@ -136,7 +145,9 @@ describe('iterateOverDiff', () => { expect(results[1].collapsedBefore).toBe(0); // Third line should also be context-expanded (fromEnd) expect(results[2].type).toBe('context-expanded'); - expect(results[2].collapsedBefore).toBe(0); + expect(results[2].collapsedBefore).toBe( + Math.max(firstHunkCollapsedBefore - 3, 0) + ); }); test('windowing skips lines correctly', () => { From be3774acc7447391ac5cdb2bc47745a949f47b48 Mon Sep 17 00:00:00 2001 From: Amadeus Demarzi Date: Fri, 27 Mar 2026 14:53:11 -0700 Subject: [PATCH 3/6] phase 1: plumbing/types --- packages/diffs/src/types.ts | 3 +- .../diffs/src/utils/diffAcceptRejectHunk.ts | 39 +++++++++++++------ packages/diffs/src/utils/resolveRegion.ts | 1 + .../diffs/test/diffAcceptRejectHunk.test.ts | 22 +++++++++++ 4 files changed, 52 insertions(+), 13 deletions(-) diff --git a/packages/diffs/src/types.ts b/packages/diffs/src/types.ts index f31db98a2..3c5a07f21 100644 --- a/packages/diffs/src/types.ts +++ b/packages/diffs/src/types.ts @@ -702,7 +702,8 @@ export type ConflictResolverTypes = 'current' | 'incoming' | 'both'; export interface DiffAcceptRejectHunkConfig { type: DiffAcceptRejectHunkType; - changeIndex: number; + changeIndex?: number; + trimContextLines?: boolean | number; } /** diff --git a/packages/diffs/src/utils/diffAcceptRejectHunk.ts b/packages/diffs/src/utils/diffAcceptRejectHunk.ts index d91c65f2f..40df2f087 100644 --- a/packages/diffs/src/utils/diffAcceptRejectHunk.ts +++ b/packages/diffs/src/utils/diffAcceptRejectHunk.ts @@ -10,6 +10,18 @@ type DiffAcceptRejectHunkOptions = | DiffAcceptRejectHunkType | DiffAcceptRejectHunkConfig; +function normalizeTrimContextLines( + trimContextLines: DiffAcceptRejectHunkConfig['trimContextLines'] +): number | undefined { + if (trimContextLines === true) { + return 3; + } + if (typeof trimContextLines === 'number') { + return trimContextLines; + } + return undefined; +} + export function diffAcceptRejectHunk( diff: FileDiffMetadata, hunkIndex: number, @@ -21,20 +33,23 @@ export function diffAcceptRejectHunk( throw new Error('diffAcceptRejectHunk: Invalid hunk index'); } + const startContentIndex = + typeof options === 'object' && options.changeIndex != null + ? options.changeIndex + : 0; + const endContentIndex = + typeof options === 'object' && options.changeIndex != null + ? options.changeIndex + : Math.max(0, (hunk.hunkContent.length ?? 1) - 1); + return resolveRegion(diff, { resolution: normalizeDiffResolution(options), hunkIndex, - ...(() => { - if (typeof options === 'object') { - return { - startContentIndex: options.changeIndex, - endContentIndex: options.changeIndex, - }; - } - return { - startContentIndex: 0, - endContentIndex: Math.max(0, (hunk.hunkContent.length ?? 1) - 1), - }; - })(), + startContentIndex, + endContentIndex, + trimContextLines: + typeof options === 'object' + ? normalizeTrimContextLines(options.trimContextLines) + : undefined, }); } diff --git a/packages/diffs/src/utils/resolveRegion.ts b/packages/diffs/src/utils/resolveRegion.ts index 3b9783c0e..1b2b5a67f 100644 --- a/packages/diffs/src/utils/resolveRegion.ts +++ b/packages/diffs/src/utils/resolveRegion.ts @@ -11,6 +11,7 @@ interface RegionResolutionTarget { endContentIndex: number; resolution: 'deletions' | 'additions' | 'both'; indexesToDelete?: Set; + trimContextLines?: number; } interface CursorState { diff --git a/packages/diffs/test/diffAcceptRejectHunk.test.ts b/packages/diffs/test/diffAcceptRejectHunk.test.ts index 20692036f..50b015105 100644 --- a/packages/diffs/test/diffAcceptRejectHunk.test.ts +++ b/packages/diffs/test/diffAcceptRejectHunk.test.ts @@ -353,6 +353,28 @@ describe('diffAcceptRejectHunk', () => { }); }); + test('object input without changeIndex resolves the full hunk', () => { + const diff = createFixture(); + const earlierHunks = [snapshotHunk(diff, 0), snapshotHunk(diff, 1)]; + const resolvedSnapshot = snapshotHunk(diff, 2); + const trailingHunk = snapshotHunk(diff, 3); + + const result = diffAcceptRejectHunk(diff, 2, { type: 'accept' }); + + assertUnresolvedHunkMatchesSnapshot(result, 0, earlierHunks[0]); + assertUnresolvedHunkMatchesSnapshot(result, 1, earlierHunks[1]); + assertResolvedHunkMatchesExpected( + result, + 2, + getResolvedLines(resolvedSnapshot, 'accept') + ); + assertUnresolvedHunkMatchesSnapshot(result, 3, trailingHunk); + expect(verifyFileDiffHunkValues(result)).toEqual({ + valid: true, + errors: [], + }); + }); + test('reject keeps later hunk indices accurate after resolving a replacement hunk', () => { const diff = createFixture(); const earlierHunks = [snapshotHunk(diff, 0), snapshotHunk(diff, 1)]; From 7ef1b0f278063fd13f437f998d7ee1723bb71a0d Mon Sep 17 00:00:00 2001 From: Amadeus Demarzi Date: Fri, 27 Mar 2026 15:07:54 -0700 Subject: [PATCH 4/6] phase 2: help methods and tests --- packages/diffs/src/utils/trimResolvedHunk.ts | 246 +++++++++++++++++++ packages/diffs/test/trimResolvedHunk.test.ts | 148 +++++++++++ 2 files changed, 394 insertions(+) create mode 100644 packages/diffs/src/utils/trimResolvedHunk.ts create mode 100644 packages/diffs/test/trimResolvedHunk.test.ts diff --git a/packages/diffs/src/utils/trimResolvedHunk.ts b/packages/diffs/src/utils/trimResolvedHunk.ts new file mode 100644 index 000000000..23cb7d94c --- /dev/null +++ b/packages/diffs/src/utils/trimResolvedHunk.ts @@ -0,0 +1,246 @@ +import type { ChangeContent, ContextContent, Hunk } from '../types'; + +export interface TrimmedResolvedHunk { + additionStart: number; + additionCount: number; + additionLines: number; + additionLineIndex: number; + deletionStart: number; + deletionCount: number; + deletionLines: number; + deletionLineIndex: number; + splitLineCount: number; + unifiedLineCount: number; + hunkContent: (ContextContent | ChangeContent)[]; +} + +interface ContextBuffer { + segments: ContextContent[]; + totalLines: number; +} + +/** + * Trim one resolved hunk down to the context needed around its remaining + * change blocks, and split it when a large context run separates those blocks. + */ +export function trimResolvedHunk( + hunk: Hunk, + contextSize: number +): TrimmedResolvedHunk[] { + if (!hunk.hunkContent.some((content) => content.type === 'change')) { + return []; + } + + const normalizedContextSize = Number.isFinite(contextSize) + ? Math.max(0, Math.trunc(contextSize)) + : 0; + const trimmedHunks: TrimmedResolvedHunk[] = []; + const currentBlocks: (ContextContent | ChangeContent)[] = []; + let pendingContext: ContextBuffer = createEmptyContextBuffer(); + + for (const content of hunk.hunkContent) { + if (content.type === 'context') { + appendContext(pendingContext, content); + continue; + } + + if ( + currentBlocks.length > 0 && + pendingContext.totalLines > normalizedContextSize * 2 + ) { + pushContents( + currentBlocks, + takeLeadingContext(pendingContext, normalizedContextSize) + ); + trimmedHunks.push(createTrimmedResolvedHunk(currentBlocks)); + + const trailingContext = takeTrailingContext( + pendingContext, + normalizedContextSize + ); + currentBlocks.length = 0; + pushContents(currentBlocks, trailingContext); + } else if (currentBlocks.length === 0) { + pushContents( + currentBlocks, + takeTrailingContext(pendingContext, normalizedContextSize) + ); + } else { + pushContents(currentBlocks, pendingContext.segments); + } + + pendingContext = createEmptyContextBuffer(); + pushContent(currentBlocks, content); + } + + if (currentBlocks.length === 0) { + return []; + } + + pushContents( + currentBlocks, + takeLeadingContext(pendingContext, normalizedContextSize) + ); + trimmedHunks.push(createTrimmedResolvedHunk(currentBlocks)); + + return trimmedHunks; +} + +function createTrimmedResolvedHunk( + blocks: (ContextContent | ChangeContent)[] +): TrimmedResolvedHunk { + const firstBlock = blocks[0]; + if (firstBlock == null) { + throw new Error('createTrimmedResolvedHunk: missing hunk content'); + } + + let additionCount = 0; + let deletionCount = 0; + let additionLines = 0; + let deletionLines = 0; + let splitLineCount = 0; + let unifiedLineCount = 0; + + for (const content of blocks) { + if (content.type === 'context') { + additionCount += content.lines; + deletionCount += content.lines; + splitLineCount += content.lines; + unifiedLineCount += content.lines; + continue; + } + + additionCount += content.additions; + deletionCount += content.deletions; + additionLines += content.additions; + deletionLines += content.deletions; + splitLineCount += Math.max(content.deletions, content.additions); + unifiedLineCount += content.deletions + content.additions; + } + + return { + additionStart: firstBlock.additionLineIndex + 1, + additionCount, + additionLines, + additionLineIndex: firstBlock.additionLineIndex, + deletionStart: firstBlock.deletionLineIndex + 1, + deletionCount, + deletionLines, + deletionLineIndex: firstBlock.deletionLineIndex, + splitLineCount, + unifiedLineCount, + hunkContent: blocks.map((content) => ({ ...content })), + }; +} + +function createEmptyContextBuffer(): ContextBuffer { + return { + segments: [], + totalLines: 0, + }; +} + +function appendContext(buffer: ContextBuffer, content: ContextContent) { + if (content.lines <= 0) { + return; + } + + buffer.segments.push({ ...content }); + buffer.totalLines += content.lines; +} + +function takeLeadingContext( + buffer: ContextBuffer, + lineCount: number +): ContextContent[] { + if (lineCount <= 0) { + return []; + } + + const leadingContext: ContextContent[] = []; + let remaining = lineCount; + + for (const segment of buffer.segments) { + if (remaining <= 0) { + break; + } + + const keptLines = Math.min(segment.lines, remaining); + leadingContext.push({ + type: 'context', + lines: keptLines, + additionLineIndex: segment.additionLineIndex, + deletionLineIndex: segment.deletionLineIndex, + }); + remaining -= keptLines; + } + + return leadingContext; +} + +function takeTrailingContext( + buffer: ContextBuffer, + lineCount: number +): ContextContent[] { + if (lineCount <= 0) { + return []; + } + + const trailingContext: ContextContent[] = []; + let remaining = lineCount; + + for (let index = buffer.segments.length - 1; index >= 0; index--) { + if (remaining <= 0) { + break; + } + + const segment = buffer.segments[index]; + if (segment == null) { + continue; + } + + const keptLines = Math.min(segment.lines, remaining); + trailingContext.unshift({ + type: 'context', + lines: keptLines, + additionLineIndex: segment.additionLineIndex + segment.lines - keptLines, + deletionLineIndex: segment.deletionLineIndex + segment.lines - keptLines, + }); + remaining -= keptLines; + } + + return trailingContext; +} + +function pushContents( + target: (ContextContent | ChangeContent)[], + contents: (ContextContent | ChangeContent)[] +) { + for (const content of contents) { + pushContent(target, content); + } +} + +function pushContent( + target: (ContextContent | ChangeContent)[], + content: ContextContent | ChangeContent +) { + if (content.type === 'context') { + if (content.lines <= 0) { + return; + } + + const previous = target.at(-1); + if ( + previous?.type === 'context' && + previous.additionLineIndex + previous.lines === + content.additionLineIndex && + previous.deletionLineIndex + previous.lines === content.deletionLineIndex + ) { + previous.lines += content.lines; + return; + } + } + + target.push({ ...content }); +} diff --git a/packages/diffs/test/trimResolvedHunk.test.ts b/packages/diffs/test/trimResolvedHunk.test.ts new file mode 100644 index 000000000..6ae5a1a3b --- /dev/null +++ b/packages/diffs/test/trimResolvedHunk.test.ts @@ -0,0 +1,148 @@ +import { describe, expect, test } from 'bun:test'; + +import type { ChangeContent, ContextContent, Hunk } from '../src/types'; +import { trimResolvedHunk } from '../src/utils/trimResolvedHunk'; + +function context(lines: number, lineIndex: number): ContextContent { + return { + type: 'context', + lines, + additionLineIndex: lineIndex, + deletionLineIndex: lineIndex, + }; +} + +function change( + deletions: number, + additions: number, + deletionLineIndex: number, + additionLineIndex = deletionLineIndex +): ChangeContent { + return { + type: 'change', + deletions, + additions, + deletionLineIndex, + additionLineIndex, + }; +} + +function createHunk( + hunkContent: (ContextContent | ChangeContent)[], + collapsedBefore = 0 +): Hunk { + const first = hunkContent[0] ?? context(0, 0); + + let additionCount = 0; + let deletionCount = 0; + let additionLines = 0; + let deletionLines = 0; + let splitLineCount = 0; + let unifiedLineCount = 0; + + for (const content of hunkContent) { + if (content.type === 'context') { + additionCount += content.lines; + deletionCount += content.lines; + splitLineCount += content.lines; + unifiedLineCount += content.lines; + continue; + } + + additionCount += content.additions; + deletionCount += content.deletions; + additionLines += content.additions; + deletionLines += content.deletions; + splitLineCount += Math.max(content.additions, content.deletions); + unifiedLineCount += content.additions + content.deletions; + } + + return { + collapsedBefore, + additionStart: first.additionLineIndex + 1, + additionCount, + additionLines, + additionLineIndex: first.additionLineIndex, + deletionStart: first.deletionLineIndex + 1, + deletionCount, + deletionLines, + deletionLineIndex: first.deletionLineIndex, + hunkContent, + splitLineStart: 0, + splitLineCount, + unifiedLineStart: 0, + unifiedLineCount, + noEOFCRAdditions: false, + noEOFCRDeletions: false, + }; +} + +describe('trimResolvedHunk', () => { + test('drops hunks that are pure context after resolution', () => { + const hunk = createHunk([context(9, 4)]); + + expect(trimResolvedHunk(hunk, 3)).toEqual([]); + }); + + test('trims excess leading and trailing context around a remaining change', () => { + const hunk = createHunk([context(5, 10), change(1, 1, 15), context(6, 16)]); + + const result = trimResolvedHunk(hunk, 3); + + expect(result).toHaveLength(1); + expect(result[0]).toEqual({ + additionStart: 13, + additionCount: 7, + additionLines: 1, + additionLineIndex: 12, + deletionStart: 13, + deletionCount: 7, + deletionLines: 1, + deletionLineIndex: 12, + splitLineCount: 7, + unifiedLineCount: 8, + hunkContent: [context(3, 12), change(1, 1, 15), context(3, 16)], + }); + }); + + test('splits a hunk when the remaining changes are separated by a large context run', () => { + const hunk = createHunk([ + context(1, 10), + change(1, 1, 11), + context(8, 12), + change(1, 1, 20), + context(1, 21), + ]); + + const result = trimResolvedHunk(hunk, 3); + + expect(result).toEqual([ + { + additionStart: 11, + additionCount: 5, + additionLines: 1, + additionLineIndex: 10, + deletionStart: 11, + deletionCount: 5, + deletionLines: 1, + deletionLineIndex: 10, + splitLineCount: 5, + unifiedLineCount: 6, + hunkContent: [context(1, 10), change(1, 1, 11), context(3, 12)], + }, + { + additionStart: 18, + additionCount: 5, + additionLines: 1, + additionLineIndex: 17, + deletionStart: 18, + deletionCount: 5, + deletionLines: 1, + deletionLineIndex: 17, + splitLineCount: 5, + unifiedLineCount: 6, + hunkContent: [context(3, 17), change(1, 1, 20), context(1, 21)], + }, + ]); + }); +}); From e849cea1a6474e15dc78a256c08039c5d5dae917 Mon Sep 17 00:00:00 2001 From: Amadeus Demarzi Date: Fri, 27 Mar 2026 15:29:07 -0700 Subject: [PATCH 5/6] phase 3: actually hook up the method... --- packages/diffs/src/utils/resolveRegion.ts | 128 +++++++++++++++--- packages/diffs/src/utils/trimResolvedHunk.ts | 81 ++++++++--- .../diffs/test/diffAcceptRejectHunk.test.ts | 128 ++++++++++++++++++ 3 files changed, 297 insertions(+), 40 deletions(-) diff --git a/packages/diffs/src/utils/resolveRegion.ts b/packages/diffs/src/utils/resolveRegion.ts index 1b2b5a67f..76517ae15 100644 --- a/packages/diffs/src/utils/resolveRegion.ts +++ b/packages/diffs/src/utils/resolveRegion.ts @@ -4,6 +4,7 @@ import type { FileDiffMetadata, Hunk, } from '../types'; +import { trimResolvedHunk } from './trimResolvedHunk'; interface RegionResolutionTarget { hunkIndex: number; @@ -23,6 +24,28 @@ interface CursorState { unifiedLineCount: number; } +interface EmissionState { + nextAdditionStart: number; + nextDeletionStart: number; + splitLineCount: number; + unifiedLineCount: number; +} + +type EmitReadyHunk = Pick< + Hunk, + | 'additionStart' + | 'additionCount' + | 'additionLines' + | 'additionLineIndex' + | 'deletionStart' + | 'deletionCount' + | 'deletionLines' + | 'deletionLineIndex' + | 'splitLineCount' + | 'unifiedLineCount' + | 'hunkContent' +>; + export function resolveRegion( diff: FileDiffMetadata, target: RegionResolutionTarget @@ -33,6 +56,7 @@ export function resolveRegion( startContentIndex, endContentIndex, indexesToDelete = new Set(), + trimContextLines, } = target; const currentHunk = diff.hunks[hunkIndex]; if (currentHunk == null) { @@ -60,7 +84,7 @@ export function resolveRegion( unifiedLineCount: 0, cacheKey: diff.cacheKey != null - ? `${diff.cacheKey}:${resolution[0]}-${hunkIndex}:${startContentIndex}-${endContentIndex}` + ? `${diff.cacheKey}:${resolution[0]}-${hunkIndex}:${startContentIndex}-${endContentIndex}${trimContextLines != null ? `:t-${trimContextLines}` : ''}` : undefined, }; @@ -72,6 +96,12 @@ export function resolveRegion( splitLineCount: 0, unifiedLineCount: 0, }; + const emissionState: EmissionState = { + nextAdditionStart: 1, + nextDeletionStart: 1, + splitLineCount: 0, + unifiedLineCount: 0, + }; const updatesEOFState = hunkIndex === hunks.length - 1 && endContentIndex === currentHunk.hunkContent.length - 1; @@ -88,22 +118,7 @@ export function resolveRegion( shouldProcessCollapsedContext ); - const newHunk: Hunk = { - ...hunk, - hunkContent: [], - additionStart: cursor.nextAdditionStart, - deletionStart: cursor.nextDeletionStart, - additionLineIndex: cursor.nextAdditionLineIndex, - deletionLineIndex: cursor.nextDeletionLineIndex, - additionCount: 0, - deletionCount: 0, - deletionLines: 0, - additionLines: 0, - splitLineStart: cursor.splitLineCount, - unifiedLineStart: cursor.unifiedLineCount, - splitLineCount: 0, - unifiedLineCount: 0, - }; + const newHunk = createScannedHunk(hunk, cursor); for (const [contentIndex, content] of hunk.hunkContent.entries()) { // If we are outside of the targeted hunk or content region @@ -186,7 +201,20 @@ export function resolveRegion( newHunk.noEOFCRDeletions = noEOFCR; } - resolvedDiff.hunks.push(newHunk); + const emittedHunks = + index === hunkIndex && trimContextLines != null + ? trimResolvedHunk(newHunk, trimContextLines) + : [newHunk]; + + emitResolvedHunks(resolvedDiff, newHunk, emittedHunks, emissionState); + } + + if (resolvedDiff.hunks.length === 0) { + resolvedDiff.deletionLines = []; + resolvedDiff.additionLines = []; + resolvedDiff.splitLineCount = 0; + resolvedDiff.unifiedLineCount = 0; + return resolvedDiff; } const finalHunk = hunks.at(-1); @@ -212,6 +240,70 @@ export function resolveRegion( return resolvedDiff; } +function createScannedHunk(hunk: Hunk, cursor: CursorState): Hunk { + return { + ...hunk, + collapsedBefore: 0, + hunkContent: [], + additionStart: cursor.nextAdditionStart, + deletionStart: cursor.nextDeletionStart, + additionLineIndex: cursor.nextAdditionLineIndex, + deletionLineIndex: cursor.nextDeletionLineIndex, + additionCount: 0, + deletionCount: 0, + deletionLines: 0, + additionLines: 0, + splitLineStart: 0, + unifiedLineStart: 0, + splitLineCount: 0, + unifiedLineCount: 0, + }; +} + +function emitResolvedHunks( + diff: FileDiffMetadata, + sourceHunk: Hunk, + hunks: EmitReadyHunk[], + emissionState: EmissionState +) { + for (const [index, hunk] of hunks.entries()) { + const collapsedBefore = Math.max( + hunk.additionStart - emissionState.nextAdditionStart, + 0 + ); + const emittedHunk: Hunk = { + ...sourceHunk, + ...hunk, + collapsedBefore, + splitLineStart: emissionState.splitLineCount + collapsedBefore, + unifiedLineStart: emissionState.unifiedLineCount + collapsedBefore, + hunkSpecs: createHunkSpecs(hunk, sourceHunk.hunkContext), + noEOFCRAdditions: + index === hunks.length - 1 ? sourceHunk.noEOFCRAdditions : false, + noEOFCRDeletions: + index === hunks.length - 1 ? sourceHunk.noEOFCRDeletions : false, + }; + + diff.hunks.push(emittedHunk); + emissionState.nextAdditionStart = + emittedHunk.additionStart + emittedHunk.additionCount; + emissionState.nextDeletionStart = + emittedHunk.deletionStart + emittedHunk.deletionCount; + emissionState.splitLineCount = + emittedHunk.splitLineStart + emittedHunk.splitLineCount; + emissionState.unifiedLineCount = + emittedHunk.unifiedLineStart + emittedHunk.unifiedLineCount; + } +} + +function createHunkSpecs(hunk: EmitReadyHunk, hunkContext: string | undefined) { + return `@@ -${formatHunkRange(hunk.deletionStart, hunk.deletionCount)} +${formatHunkRange(hunk.additionStart, hunk.additionCount)} @@${hunkContext != null ? ` ${hunkContext}` : ''}\n`; +} + +function formatHunkRange(start: number, count: number): string { + return count === 1 ? `${start}` : `${start},${count}`; +} + function pushCollapsedContextLines( diff: FileDiffMetadata, deletionLines: string[], diff --git a/packages/diffs/src/utils/trimResolvedHunk.ts b/packages/diffs/src/utils/trimResolvedHunk.ts index 23cb7d94c..4fa01c589 100644 --- a/packages/diffs/src/utils/trimResolvedHunk.ts +++ b/packages/diffs/src/utils/trimResolvedHunk.ts @@ -15,10 +15,21 @@ export interface TrimmedResolvedHunk { } interface ContextBuffer { - segments: ContextContent[]; + segments: BufferedContextContent[]; totalLines: number; } +interface BlockStarts { + additionStart: number; + deletionStart: number; +} + +interface BufferedContextContent extends ContextContent, BlockStarts {} + +interface BufferedChangeContent extends ChangeContent, BlockStarts {} + +type BufferedContent = BufferedContextContent | BufferedChangeContent; + /** * Trim one resolved hunk down to the context needed around its remaining * change blocks, and split it when a large context run separates those blocks. @@ -35,12 +46,21 @@ export function trimResolvedHunk( ? Math.max(0, Math.trunc(contextSize)) : 0; const trimmedHunks: TrimmedResolvedHunk[] = []; - const currentBlocks: (ContextContent | ChangeContent)[] = []; + const currentBlocks: BufferedContent[] = []; let pendingContext: ContextBuffer = createEmptyContextBuffer(); + let { additionStart: nextAdditionStart, deletionStart: nextDeletionStart } = + hunk; for (const content of hunk.hunkContent) { if (content.type === 'context') { - appendContext(pendingContext, content); + appendContext( + pendingContext, + content, + nextAdditionStart, + nextDeletionStart + ); + nextAdditionStart += content.lines; + nextDeletionStart += content.lines; continue; } @@ -70,7 +90,13 @@ export function trimResolvedHunk( } pendingContext = createEmptyContextBuffer(); - pushContent(currentBlocks, content); + pushContent(currentBlocks, { + ...content, + additionStart: nextAdditionStart, + deletionStart: nextDeletionStart, + }); + nextAdditionStart += content.additions; + nextDeletionStart += content.deletions; } if (currentBlocks.length === 0) { @@ -87,7 +113,7 @@ export function trimResolvedHunk( } function createTrimmedResolvedHunk( - blocks: (ContextContent | ChangeContent)[] + blocks: BufferedContent[] ): TrimmedResolvedHunk { const firstBlock = blocks[0]; if (firstBlock == null) { @@ -119,17 +145,21 @@ function createTrimmedResolvedHunk( } return { - additionStart: firstBlock.additionLineIndex + 1, + additionStart: firstBlock.additionStart, additionCount, additionLines, additionLineIndex: firstBlock.additionLineIndex, - deletionStart: firstBlock.deletionLineIndex + 1, + deletionStart: firstBlock.deletionStart, deletionCount, deletionLines, deletionLineIndex: firstBlock.deletionLineIndex, splitLineCount, unifiedLineCount, - hunkContent: blocks.map((content) => ({ ...content })), + hunkContent: blocks.map( + ({ additionStart: _a, deletionStart: _d, ...content }) => ({ + ...content, + }) + ), }; } @@ -140,24 +170,33 @@ function createEmptyContextBuffer(): ContextBuffer { }; } -function appendContext(buffer: ContextBuffer, content: ContextContent) { +function appendContext( + buffer: ContextBuffer, + content: ContextContent, + additionStart: number, + deletionStart: number +) { if (content.lines <= 0) { return; } - buffer.segments.push({ ...content }); + buffer.segments.push({ + ...content, + additionStart, + deletionStart, + }); buffer.totalLines += content.lines; } function takeLeadingContext( buffer: ContextBuffer, lineCount: number -): ContextContent[] { +): BufferedContextContent[] { if (lineCount <= 0) { return []; } - const leadingContext: ContextContent[] = []; + const leadingContext: BufferedContextContent[] = []; let remaining = lineCount; for (const segment of buffer.segments) { @@ -171,6 +210,8 @@ function takeLeadingContext( lines: keptLines, additionLineIndex: segment.additionLineIndex, deletionLineIndex: segment.deletionLineIndex, + additionStart: segment.additionStart, + deletionStart: segment.deletionStart, }); remaining -= keptLines; } @@ -181,12 +222,12 @@ function takeLeadingContext( function takeTrailingContext( buffer: ContextBuffer, lineCount: number -): ContextContent[] { +): BufferedContextContent[] { if (lineCount <= 0) { return []; } - const trailingContext: ContextContent[] = []; + const trailingContext: BufferedContextContent[] = []; let remaining = lineCount; for (let index = buffer.segments.length - 1; index >= 0; index--) { @@ -205,6 +246,8 @@ function takeTrailingContext( lines: keptLines, additionLineIndex: segment.additionLineIndex + segment.lines - keptLines, deletionLineIndex: segment.deletionLineIndex + segment.lines - keptLines, + additionStart: segment.additionStart + segment.lines - keptLines, + deletionStart: segment.deletionStart + segment.lines - keptLines, }); remaining -= keptLines; } @@ -212,19 +255,13 @@ function takeTrailingContext( return trailingContext; } -function pushContents( - target: (ContextContent | ChangeContent)[], - contents: (ContextContent | ChangeContent)[] -) { +function pushContents(target: BufferedContent[], contents: BufferedContent[]) { for (const content of contents) { pushContent(target, content); } } -function pushContent( - target: (ContextContent | ChangeContent)[], - content: ContextContent | ChangeContent -) { +function pushContent(target: BufferedContent[], content: BufferedContent) { if (content.type === 'context') { if (content.lines <= 0) { return; diff --git a/packages/diffs/test/diffAcceptRejectHunk.test.ts b/packages/diffs/test/diffAcceptRejectHunk.test.ts index 50b015105..4b73e4c3b 100644 --- a/packages/diffs/test/diffAcceptRejectHunk.test.ts +++ b/packages/diffs/test/diffAcceptRejectHunk.test.ts @@ -479,6 +479,134 @@ describe('diffAcceptRejectHunk', () => { }); }); + test('trimContextLines removes a resolved hunk and folds its context into the next hunk', () => { + const diff = createFixture(); + const earlierHunks = [snapshotHunk(diff, 0), snapshotHunk(diff, 1)]; + const trailingHunk = snapshotHunk(diff, 3); + + const result = diffAcceptRejectHunk(diff, 2, { + type: 'accept', + trimContextLines: true, + }); + + expect(result.hunks).toHaveLength(3); + assertUnresolvedHunkMatchesSnapshot(result, 0, earlierHunks[0]); + assertUnresolvedHunkMatchesSnapshot(result, 1, earlierHunks[1]); + assertUnresolvedHunkMatchesSnapshot(result, 2, trailingHunk); + expect(result.hunks[2]?.collapsedBefore).toBe(5); + expect(result.cacheKey).toBeUndefined(); + expect(verifyFileDiffHunkValues(result)).toEqual({ + valid: true, + errors: [], + }); + }); + + test('trimContextLines can collapse a fully resolved file to an empty diff', () => { + const diff = parseDiffFromFile( + { name: 'example.ts', contents: 'before\nold\nafter\n', cacheKey: 'old' }, + { name: 'example.ts', contents: 'before\nnew\nafter\n', cacheKey: 'new' }, + { context: 1 } + ); + + const result = diffAcceptRejectHunk(diff, 0, { + type: 'accept', + trimContextLines: true, + }); + + expect(result.hunks).toEqual([]); + expect(result.additionLines).toEqual([]); + expect(result.deletionLines).toEqual([]); + expect(result.splitLineCount).toBe(0); + expect(result.unifiedLineCount).toBe(0); + expect(result.cacheKey).toBe('old:new:a-0:0-2:t-3'); + expect(verifyFileDiffHunkValues(result)).toEqual({ + valid: true, + errors: [], + }); + }); + + test('trimContextLines can split a partially resolved hunk into two hunks', () => { + const diff = parsePatchFiles(`diff --git a/example.ts b/example.ts +--- a/example.ts ++++ b/example.ts +@@ -1,11 +1,11 @@ + line 1 +-line 2 old ++line 2 new + line 3 + line 4 + line 5 +-line 6 old ++line 6 new + line 7 + line 8 + line 9 +-line 10 old ++line 10 new + line 11 +`)[0]?.files[0]; + + expect(diff).toBeDefined(); + if (diff == null) { + return; + } + + const result = diffAcceptRejectHunk(diff, 0, { + type: 'accept', + changeIndex: 3, + trimContextLines: 1, + }); + + expect( + result.hunks.map((hunk) => ({ + collapsedBefore: hunk.collapsedBefore, + additionStart: hunk.additionStart, + deletionStart: hunk.deletionStart, + additionCount: hunk.additionCount, + deletionCount: hunk.deletionCount, + blocks: hunk.hunkContent.map((content) => + content.type === 'context' + ? { type: 'context', lines: content.lines } + : { + type: 'change', + additions: content.additions, + deletions: content.deletions, + } + ), + })) + ).toEqual([ + { + collapsedBefore: 0, + additionStart: 1, + deletionStart: 1, + additionCount: 3, + deletionCount: 3, + blocks: [ + { type: 'context', lines: 1 }, + { type: 'change', additions: 1, deletions: 1 }, + { type: 'context', lines: 1 }, + ], + }, + { + collapsedBefore: 5, + additionStart: 9, + deletionStart: 9, + additionCount: 3, + deletionCount: 3, + blocks: [ + { type: 'context', lines: 1 }, + { type: 'change', additions: 1, deletions: 1 }, + { type: 'context', lines: 1 }, + ], + }, + ]); + expect(result.cacheKey).toBeUndefined(); + expect(verifyFileDiffHunkValues(result)).toEqual({ + valid: true, + errors: [], + }); + }); + test('updates cacheKey when resolving a single content block', () => { const diff = parseDiffFromFile( { From 57127a2414b67d9ab3bfe2d6b187016eeac2ec42 Mon Sep 17 00:00:00 2001 From: Amadeus Demarzi Date: Fri, 27 Mar 2026 15:57:05 -0700 Subject: [PATCH 6/6] phase 4: test n things n stuff --- packages/diffs/src/utils/trimResolvedHunk.ts | 20 ++++-- .../diffs/test/diffAcceptRejectHunk.test.ts | 61 +++++++++++++++++++ 2 files changed, 76 insertions(+), 5 deletions(-) diff --git a/packages/diffs/src/utils/trimResolvedHunk.ts b/packages/diffs/src/utils/trimResolvedHunk.ts index 4fa01c589..db3dca3e7 100644 --- a/packages/diffs/src/utils/trimResolvedHunk.ts +++ b/packages/diffs/src/utils/trimResolvedHunk.ts @@ -126,6 +126,7 @@ function createTrimmedResolvedHunk( let deletionLines = 0; let splitLineCount = 0; let unifiedLineCount = 0; + const hunkContent: (ContextContent | ChangeContent)[] = []; for (const content of blocks) { if (content.type === 'context') { @@ -133,6 +134,12 @@ function createTrimmedResolvedHunk( deletionCount += content.lines; splitLineCount += content.lines; unifiedLineCount += content.lines; + hunkContent.push({ + type: 'context', + lines: content.lines, + additionLineIndex: content.additionLineIndex, + deletionLineIndex: content.deletionLineIndex, + }); continue; } @@ -142,6 +149,13 @@ function createTrimmedResolvedHunk( deletionLines += content.deletions; splitLineCount += Math.max(content.deletions, content.additions); unifiedLineCount += content.deletions + content.additions; + hunkContent.push({ + type: 'change', + additions: content.additions, + deletions: content.deletions, + additionLineIndex: content.additionLineIndex, + deletionLineIndex: content.deletionLineIndex, + }); } return { @@ -155,11 +169,7 @@ function createTrimmedResolvedHunk( deletionLineIndex: firstBlock.deletionLineIndex, splitLineCount, unifiedLineCount, - hunkContent: blocks.map( - ({ additionStart: _a, deletionStart: _d, ...content }) => ({ - ...content, - }) - ), + hunkContent, }; } diff --git a/packages/diffs/test/diffAcceptRejectHunk.test.ts b/packages/diffs/test/diffAcceptRejectHunk.test.ts index 4b73e4c3b..dd88bcdab 100644 --- a/packages/diffs/test/diffAcceptRejectHunk.test.ts +++ b/packages/diffs/test/diffAcceptRejectHunk.test.ts @@ -456,6 +456,29 @@ describe('diffAcceptRejectHunk', () => { expect(result.cacheKey).toBe('old-key:new-key:b-0:0-0'); }); + test('updates cacheKey when trimContextLines is used for a full hunk', () => { + const diff = parseDiffFromFile( + { + name: 'example.ts', + contents: 'before\nold\nafter\n', + cacheKey: 'old-key', + }, + { + name: 'example.ts', + contents: 'before\nnew\nafter\n', + cacheKey: 'new-key', + }, + { context: 1 } + ); + + const result = diffAcceptRejectHunk(diff, 0, { + type: 'accept', + trimContextLines: true, + }); + + expect(result.cacheKey).toBe('old-key:new-key:a-0:0-2:t-3'); + }); + test('accept resolves a partial patch without materializing omitted context', () => { const diff = createPartialFixture(); const snapshot = snapshotHunk(diff, 0); @@ -669,6 +692,44 @@ describe('diffAcceptRejectHunk', () => { expect(result.cacheKey).toBe('old-key:new-key:a-2:1-1'); }); + test('updates cacheKey when trimming a single resolved content block', () => { + const diff = parsePatchFiles( + `diff --git a/example.ts b/example.ts +--- a/example.ts ++++ b/example.ts +@@ -1,11 +1,11 @@ + line 1 +-line 2 old ++line 2 new + line 3 + line 4 + line 5 +-line 6 old ++line 6 new + line 7 + line 8 + line 9 +-line 10 old ++line 10 new + line 11 +`, + 'cache-key' + )[0]?.files[0]; + + expect(diff).toBeDefined(); + if (diff == null) { + return; + } + + const result = diffAcceptRejectHunk(diff, 0, { + type: 'accept', + changeIndex: 3, + trimContextLines: 1, + }); + + expect(result.cacheKey).toBe('cache-key-0-0:a-0:3-3:t-1'); + }); + test('both should inherit noEOFCR from additions', () => { const diff = parseDiffFromFile( { name: 'example.ts', contents: 'start\nold\n' },