@ruckc/truss-code 1.48.0 → 1.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CodeBlock.svelte +29 -9
- package/dist/CodeBlock.svelte.d.ts +13 -1
- package/dist/CodeEditor.svelte +29 -6
- package/dist/CodeEditor.svelte.d.ts +13 -1
- package/dist/DiffEditor.svelte +26 -5
- package/dist/DiffEditor.svelte.d.ts +11 -0
- package/dist/DiffFiles.svelte +81 -16
- package/dist/DiffFiles.svelte.d.ts +39 -0
- package/dist/DiffView.svelte +244 -46
- package/dist/DiffView.svelte.d.ts +126 -0
- package/dist/MergeView.svelte +267 -48
- package/dist/MergeView.svelte.d.ts +144 -3
- package/dist/PatchText.svelte +22 -4
- package/dist/PatchText.svelte.d.ts +11 -1
- package/dist/diff.d.ts +12 -6
- package/dist/diff.js +11 -5
- package/dist/index.d.ts +2 -0
- package/dist/labels.d.ts +6 -0
- package/dist/labels.js +23 -0
- package/dist/lite.d.ts +6 -1
- package/package.json +1 -1
package/dist/DiffView.svelte
CHANGED
|
@@ -1,4 +1,197 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import { CHANGE_DEFAULTS, type ChangeLabels } from './diff.js';
|
|
3
|
+
|
|
4
|
+
export type DiffViewLabels = ChangeLabels & {
|
|
5
|
+
/** Accessible name of the diff when `label` is not set. */
|
|
6
|
+
diff: string;
|
|
7
|
+
/** Accessible name of the diff when it has a file name: the label and the name. */
|
|
8
|
+
named: (label: string, name: string) => string;
|
|
9
|
+
/** Toolbar summary of a binary file. */
|
|
10
|
+
binaryFile: string;
|
|
11
|
+
/** Toolbar summary of a diff too large to draw. */
|
|
12
|
+
largeDiff: string;
|
|
13
|
+
/** Toolbar summary when nothing changed. */
|
|
14
|
+
noChanges: string;
|
|
15
|
+
/** Toolbar summary: the number of changes. */
|
|
16
|
+
changeCount: (n: number) => string;
|
|
17
|
+
/** Toolbar summary: the number of moved blocks. */
|
|
18
|
+
movedCount: (n: number) => string;
|
|
19
|
+
/** Placeholder of the find field. */
|
|
20
|
+
find: string;
|
|
21
|
+
/** Accessible name of the find field. */
|
|
22
|
+
findInDiff: string;
|
|
23
|
+
/** Beside the find field: the number of matches. */
|
|
24
|
+
matchCount: (n: number) => string;
|
|
25
|
+
/** Placeholder and accessible name of the go-to-line field. */
|
|
26
|
+
goToLine: string;
|
|
27
|
+
/** Accessible name of the previous-change button. */
|
|
28
|
+
previousChange: string;
|
|
29
|
+
/** Accessible name of the next-change button. */
|
|
30
|
+
nextChange: string;
|
|
31
|
+
/** Accessible name of the layout switch. */
|
|
32
|
+
layout: string;
|
|
33
|
+
/** Layout option: one column. */
|
|
34
|
+
unified: string;
|
|
35
|
+
/** Layout option: two columns. */
|
|
36
|
+
split: string;
|
|
37
|
+
/** Layout option: one column with the changed words marked in line. */
|
|
38
|
+
inline: string;
|
|
39
|
+
/** Selection bar: how many lines are selected, on which side (`old` or `new`) and which numbers (`3` or `3–5`). */
|
|
40
|
+
selected: (count: number, side: string, range: string) => string;
|
|
41
|
+
/** A number of lines, as said in the copy confirmation. */
|
|
42
|
+
lineCount: (n: number) => string;
|
|
43
|
+
/** Button that copies the selected lines. */
|
|
44
|
+
copyLines: string;
|
|
45
|
+
/** Button that clears the selection. */
|
|
46
|
+
clear: string;
|
|
47
|
+
/** Confirmation after a copy; `what` is `lineCount`, `hunkName` or `hunkText`. */
|
|
48
|
+
copied: (what: string) => string;
|
|
49
|
+
/** Confirmation text when copying failed. */
|
|
50
|
+
copyFailed: string;
|
|
51
|
+
/** What was copied: a whole hunk (from 1). */
|
|
52
|
+
hunkName: (n: number) => string;
|
|
53
|
+
/** What was copied: one side of a hunk (from 1). */
|
|
54
|
+
hunkText: (side: 'new' | 'old', n: number) => string;
|
|
55
|
+
/** Hunk button: copy the hunk as a patch. */
|
|
56
|
+
copyHunk: string;
|
|
57
|
+
/** Accessible name of that button. */
|
|
58
|
+
copyHunkAria: (n: number) => string;
|
|
59
|
+
/** Hunk button: copy the new text. */
|
|
60
|
+
copyNew: string;
|
|
61
|
+
/** Accessible name of that button. */
|
|
62
|
+
copyNewAria: (n: number) => string;
|
|
63
|
+
/** Hunk button: copy the old text. */
|
|
64
|
+
copyOld: string;
|
|
65
|
+
/** Accessible name of that button. */
|
|
66
|
+
copyOldAria: (n: number) => string;
|
|
67
|
+
/** Gap between hunks of a patch whose lines are not available: how many lines it hides. */
|
|
68
|
+
unchangedNotInPatch: (count: number) => string;
|
|
69
|
+
/** The same, when the number of lines is not known. */
|
|
70
|
+
notInPatch: string;
|
|
71
|
+
/** Accessible name of the button that shows more lines above a gap. */
|
|
72
|
+
showAbove: (n: number) => string;
|
|
73
|
+
/** Accessible name of the button that shows more lines below a gap. */
|
|
74
|
+
showBelow: (n: number) => string;
|
|
75
|
+
/** Button that unfolds a gap of `count` lines. */
|
|
76
|
+
expand: (count: number) => string;
|
|
77
|
+
/** Button that tries again after the file could not be loaded. */
|
|
78
|
+
retry: string;
|
|
79
|
+
/** Shown beside it; `message` is the loader's error message. */
|
|
80
|
+
loadFailed: (message: string) => string;
|
|
81
|
+
/** Binary file in place of the diff. */
|
|
82
|
+
binaryNotShown: string;
|
|
83
|
+
/** Large diff in place of the diff: how many lines. */
|
|
84
|
+
largeNote: (lines: number) => string;
|
|
85
|
+
/** Button that draws a large diff. */
|
|
86
|
+
showAnyway: string;
|
|
87
|
+
/** Shown when the two texts are equal. */
|
|
88
|
+
noDifferences: string;
|
|
89
|
+
/** Accessible name of the diff table when it has no file name. */
|
|
90
|
+
changes: string;
|
|
91
|
+
/** Accessible name of the diff table of a named file. */
|
|
92
|
+
changesIn: (name: string) => string;
|
|
93
|
+
/** Accessible name and tooltip of the overview ruler. */
|
|
94
|
+
overview: (changes: number, added: number, removed: number, moved: number, notes: number) => string;
|
|
95
|
+
/** Accessible name of a line number button: the side (`old` or `new`) and the number. */
|
|
96
|
+
selectLine: (side: string, n: number) => string;
|
|
97
|
+
/** Announcement: no such line. */
|
|
98
|
+
noLine: (n: number) => string;
|
|
99
|
+
/** Announcement: moved to this line. */
|
|
100
|
+
line: (n: number) => string;
|
|
101
|
+
/** Announcement: the go-to-line field holds nothing usable. */
|
|
102
|
+
lineHint: string;
|
|
103
|
+
/** Announcement: the find found nothing. */
|
|
104
|
+
noMatches: string;
|
|
105
|
+
/** Announcement: this is match `n` of `total`. */
|
|
106
|
+
matchOf: (n: number, total: number) => string;
|
|
107
|
+
/** Label of the link on a moved block's first line: where it went (line from 1). */
|
|
108
|
+
movedTo: (line: number) => string;
|
|
109
|
+
/** Label of the link on a moved block's first line: where it came from. */
|
|
110
|
+
movedFrom: (line: number) => string;
|
|
111
|
+
/** Screen-reader text before an added line. */
|
|
112
|
+
added: string;
|
|
113
|
+
/** Screen-reader text before a removed line. */
|
|
114
|
+
removed: string;
|
|
115
|
+
/** Screen-reader text before the first line of a moved block that arrived here. */
|
|
116
|
+
movedHere: string;
|
|
117
|
+
/** Screen-reader text before the first line of a moved block that left. */
|
|
118
|
+
movedAway: string;
|
|
119
|
+
/** Screen-reader text before a line whose words changed (inline layout). */
|
|
120
|
+
changed: string;
|
|
121
|
+
/** Wraps one of those words so it reads as a prefix of the line, e.g. `added:`. */
|
|
122
|
+
mark: (what: string) => string;
|
|
123
|
+
/** After a line that has no final newline. */
|
|
124
|
+
noNewline: string;
|
|
125
|
+
};
|
|
126
|
+
const DEFAULTS: DiffViewLabels = {
|
|
127
|
+
...CHANGE_DEFAULTS,
|
|
128
|
+
diff: 'Diff',
|
|
129
|
+
named: (label, name) => `${label}: ${name}`,
|
|
130
|
+
binaryFile: 'Binary file',
|
|
131
|
+
largeDiff: 'Large diff',
|
|
132
|
+
noChanges: 'No changes',
|
|
133
|
+
changeCount: (n) => `${n} ${n === 1 ? 'change' : 'changes'}`,
|
|
134
|
+
movedCount: (n) => `${n} moved`,
|
|
135
|
+
find: 'Find',
|
|
136
|
+
findInDiff: 'Find in diff',
|
|
137
|
+
matchCount: (n) => `${n} ${n === 1 ? 'match' : 'matches'}`,
|
|
138
|
+
goToLine: 'Go to line',
|
|
139
|
+
previousChange: 'Previous change',
|
|
140
|
+
nextChange: 'Next change',
|
|
141
|
+
layout: 'Diff layout',
|
|
142
|
+
unified: 'Unified',
|
|
143
|
+
split: 'Split',
|
|
144
|
+
inline: 'Inline',
|
|
145
|
+
selected: (count, side, range) => `${count} ${count === 1 ? 'line' : 'lines'} selected (${side}, ${range})`,
|
|
146
|
+
lineCount: (n) => `${n} ${n === 1 ? 'line' : 'lines'}`,
|
|
147
|
+
copyLines: 'Copy lines',
|
|
148
|
+
clear: 'Clear',
|
|
149
|
+
copied: (what) => `Copied ${what}`,
|
|
150
|
+
copyFailed: 'Copy failed',
|
|
151
|
+
hunkName: (n) => `hunk ${n}`,
|
|
152
|
+
hunkText: (side, n) => `${side} text of hunk ${n}`,
|
|
153
|
+
copyHunk: 'Copy hunk',
|
|
154
|
+
copyHunkAria: (n) => `Copy hunk ${n} as a patch`,
|
|
155
|
+
copyNew: 'Copy new',
|
|
156
|
+
copyNewAria: (n) => `Copy the new text of hunk ${n}`,
|
|
157
|
+
copyOld: 'Copy old',
|
|
158
|
+
copyOldAria: (n) => `Copy the old text of hunk ${n}`,
|
|
159
|
+
unchangedNotInPatch: (count) => `${count} unchanged ${count === 1 ? 'line' : 'lines'} not in this patch`,
|
|
160
|
+
notInPatch: 'Lines not in this patch',
|
|
161
|
+
showAbove: (n) => `Show ${n} more lines from above`,
|
|
162
|
+
showBelow: (n) => `Show ${n} more lines from below`,
|
|
163
|
+
expand: (count) => `Expand ${count === 1 ? '1 line' : `${count} lines`}`,
|
|
164
|
+
retry: 'Retry',
|
|
165
|
+
loadFailed: (message) => `Could not load the file: ${message}`,
|
|
166
|
+
binaryNotShown: 'Binary file not shown.',
|
|
167
|
+
largeNote: (lines) => `This diff is large (${lines} lines), so it is not drawn until you ask.`,
|
|
168
|
+
showAnyway: 'Show anyway',
|
|
169
|
+
noDifferences: 'No differences.',
|
|
170
|
+
changes: 'Changes',
|
|
171
|
+
changesIn: (name) => `Changes in ${name}`,
|
|
172
|
+
overview: (changes, added, removed, moved, notes) =>
|
|
173
|
+
`Overview of ${changes} ${changes === 1 ? 'change' : 'changes'}: ${added} lines added, ${removed} removed` +
|
|
174
|
+
(moved ? `, ${moved} moved ${moved === 1 ? 'block' : 'blocks'}` : '') + (notes ? `, ${notes} annotations` : '') + '. Click or drag to scroll.',
|
|
175
|
+
selectLine: (side, n) => `Select ${side} line ${n}`,
|
|
176
|
+
noLine: (n) => `No line ${n}`,
|
|
177
|
+
line: (n) => `Line ${n}`,
|
|
178
|
+
lineHint: 'Type a line number, such as 42 or old 42',
|
|
179
|
+
noMatches: 'No matches',
|
|
180
|
+
matchOf: (n, total) => `Match ${n} of ${total}`,
|
|
181
|
+
movedTo: (line) => `Moved to line ${line}`,
|
|
182
|
+
movedFrom: (line) => `Moved from line ${line}`,
|
|
183
|
+
added: 'added',
|
|
184
|
+
removed: 'removed',
|
|
185
|
+
movedHere: 'moved here',
|
|
186
|
+
movedAway: 'moved away',
|
|
187
|
+
changed: 'changed',
|
|
188
|
+
mark: (what) => `${what}:`,
|
|
189
|
+
noNewline: 'No newline at end of file'
|
|
190
|
+
};
|
|
191
|
+
</script>
|
|
192
|
+
|
|
1
193
|
<script lang="ts">
|
|
194
|
+
import { useLabels } from './labels.js';
|
|
2
195
|
import { cssvars, csstext } from './cssvars.js';
|
|
3
196
|
import SsrStyle from './SsrStyle.svelte';
|
|
4
197
|
const uid = $props.id();
|
|
@@ -46,7 +239,7 @@
|
|
|
46
239
|
moveMinLines = 3,
|
|
47
240
|
hunkActions = true,
|
|
48
241
|
selection = $bindable(null),
|
|
49
|
-
label
|
|
242
|
+
label,
|
|
50
243
|
toolbar = true,
|
|
51
244
|
annotations = [],
|
|
52
245
|
annotation,
|
|
@@ -58,6 +251,7 @@
|
|
|
58
251
|
load,
|
|
59
252
|
class: cls,
|
|
60
253
|
style: userStyle,
|
|
254
|
+
labels,
|
|
61
255
|
...rest
|
|
62
256
|
}: {
|
|
63
257
|
/** The original text. */
|
|
@@ -108,6 +302,7 @@
|
|
|
108
302
|
hunkActions?: boolean;
|
|
109
303
|
/** The selected lines: a range of line numbers on the old or the new side. Click a line number, Shift+click to extend; Space and Shift+Up/Down on a focused row. */
|
|
110
304
|
selection?: LineSelection | null;
|
|
305
|
+
/** Accessible name of the diff (default: "Diff"). */
|
|
111
306
|
label?: string;
|
|
112
307
|
/** Show the summary, layout switch and change navigation. */
|
|
113
308
|
toolbar?: boolean;
|
|
@@ -130,8 +325,12 @@
|
|
|
130
325
|
*/
|
|
131
326
|
load?: LoadText;
|
|
132
327
|
class?: string;
|
|
328
|
+
/** Replaces the built-in texts (translation). Missing keys keep the defaults. */
|
|
329
|
+
labels?: Partial<DiffViewLabels>;
|
|
133
330
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'class' | 'role' | 'tabindex' | 'onkeydown' | 'onselect'> = $props();
|
|
134
331
|
|
|
332
|
+
const L = useLabels('DiffView', DEFAULTS, () => labels);
|
|
333
|
+
|
|
135
334
|
const AUTO = 2000; // rows above which virtual rendering starts by itself
|
|
136
335
|
const OVERSCAN = 20;
|
|
137
336
|
const HIGHLIGHT_MAX = 20000;
|
|
@@ -202,8 +401,8 @@
|
|
|
202
401
|
return a;
|
|
203
402
|
});
|
|
204
403
|
const heads = $derived(new Map<number, { text: string; target: number }>(moves.flatMap((m) => [
|
|
205
|
-
[m.from.start, { text:
|
|
206
|
-
[m.to.start, { text:
|
|
404
|
+
[m.from.start, { text: L.movedTo(m.newNo!), target: m.to.start }] as const,
|
|
405
|
+
[m.to.start, { text: L.movedFrom(m.oldNo!), target: m.from.start }] as const
|
|
207
406
|
])));
|
|
208
407
|
|
|
209
408
|
// ───── intra-line and inline-word marks, worked out for a pair of lines the first time a row shows them
|
|
@@ -381,7 +580,7 @@
|
|
|
381
580
|
|
|
382
581
|
async function go(n: number) {
|
|
383
582
|
cur = n;
|
|
384
|
-
announce = describeChange(lines, starts, n);
|
|
583
|
+
announce = describeChange(lines, starts, n, L);
|
|
385
584
|
await show(starts[n], 'nearest');
|
|
386
585
|
// a change that fits the view is shown whole, not just its first row
|
|
387
586
|
if (virt) {
|
|
@@ -406,9 +605,9 @@
|
|
|
406
605
|
/** Scrolls to a line number and selects it, unfolding what hides it. Without a side the new file is tried first, then the old one. Returns whether the line exists. */
|
|
407
606
|
export function gotoLine(line: number, side?: Side): boolean {
|
|
408
607
|
const hit = locateLine(lines, sidesOld, sidesNew, line, side);
|
|
409
|
-
if (!hit) { announce =
|
|
608
|
+
if (!hit) { announce = L.noLine(line); return false; }
|
|
410
609
|
pick(hit.side, line, false);
|
|
411
|
-
announce =
|
|
610
|
+
announce = L.line(line);
|
|
412
611
|
show(hit.index, 'center');
|
|
413
612
|
return true;
|
|
414
613
|
}
|
|
@@ -419,7 +618,7 @@
|
|
|
419
618
|
if (e.key !== 'Enter') return;
|
|
420
619
|
e.preventDefault();
|
|
421
620
|
const ref = parseLineRef(input.value);
|
|
422
|
-
if (ref) gotoLine(ref.line, ref.side); else announce =
|
|
621
|
+
if (ref) gotoLine(ref.line, ref.side); else announce = L.lineHint;
|
|
423
622
|
}
|
|
424
623
|
|
|
425
624
|
// ───── find
|
|
@@ -432,9 +631,9 @@
|
|
|
432
631
|
if (e.key !== 'Enter') return;
|
|
433
632
|
e.preventDefault();
|
|
434
633
|
const n = matches.length;
|
|
435
|
-
if (!n) { announce =
|
|
634
|
+
if (!n) { announce = L.noMatches; return; }
|
|
436
635
|
hitCur = hitCur < 0 ? (e.shiftKey ? n - 1 : 0) : (hitCur + (e.shiftKey ? -1 : 1) + n) % n;
|
|
437
|
-
announce =
|
|
636
|
+
announce = L.matchOf(hitCur + 1, n);
|
|
438
637
|
show(matches[hitCur], 'center');
|
|
439
638
|
}
|
|
440
639
|
const showFind = $derived(find ?? virt);
|
|
@@ -496,9 +695,9 @@
|
|
|
496
695
|
async function copy(text: string, what: string) {
|
|
497
696
|
try {
|
|
498
697
|
await navigator.clipboard.writeText(text);
|
|
499
|
-
copied =
|
|
698
|
+
copied = L.copied(what);
|
|
500
699
|
} catch {
|
|
501
|
-
copied =
|
|
700
|
+
copied = L.copyFailed;
|
|
502
701
|
}
|
|
503
702
|
clearTimeout(timer);
|
|
504
703
|
timer = setTimeout(() => (copied = ''), 2500);
|
|
@@ -506,7 +705,7 @@
|
|
|
506
705
|
function copyHunk(n: number, how: 'patch' | 'new' | 'old') {
|
|
507
706
|
const h = hunks[n];
|
|
508
707
|
const body = how === 'patch' ? (name ? `--- a/${name}\n+++ b/${name}\n` : '') + formatHunks([h]) : h.lines.filter((l) => l.type === 'ctx' || l.type === (how === 'new' ? 'add' : 'del')).map((l) => l.text).join('\n');
|
|
509
|
-
return copy(body, how === 'patch' ?
|
|
708
|
+
return copy(body, how === 'patch' ? L.hunkName(n + 1) : L.hunkText(how, n + 1));
|
|
510
709
|
}
|
|
511
710
|
|
|
512
711
|
// ───── keys
|
|
@@ -545,8 +744,7 @@
|
|
|
545
744
|
});
|
|
546
745
|
const noteCount = $derived(rows.filter((r) => r.k === 'note').length);
|
|
547
746
|
const overviewText = $derived(
|
|
548
|
-
|
|
549
|
-
(moves.length ? `, ${moves.length} moved ${moves.length === 1 ? 'block' : 'blocks'}` : '') + (noteCount ? `, ${noteCount} annotations` : '') + '. Click or drag to scroll.'
|
|
747
|
+
L.overview(starts.length, stats.additions, stats.deletions, moves.length, noteCount)
|
|
550
748
|
);
|
|
551
749
|
// where the part in view sits on the ruler, as percentages (all of it before anything is measured)
|
|
552
750
|
const thumb = $derived<[number, number]>(content > 0 ? [(top / content) * 100, Math.min(100, (vh / content) * 100)] : [0, 100]);
|
|
@@ -562,7 +760,7 @@
|
|
|
562
760
|
}
|
|
563
761
|
|
|
564
762
|
const SYM = { add: '+', del: '−', ctx: '', gap: '' } as const;
|
|
565
|
-
const SR = { add:
|
|
763
|
+
const SR = $derived({ add: L.added, del: L.removed, ctx: '', gap: '' } as const);
|
|
566
764
|
const grow = (f: Fold, how: 'top' | 'bottom' | 'all') => (expansion = expandFold(expansion, f, how, EXPAND));
|
|
567
765
|
/** Fetches the whole file for a gap between hunks, fills the gaps with its lines and opens the region that was asked for. */
|
|
568
766
|
async function fill(f: Fold) {
|
|
@@ -588,7 +786,7 @@
|
|
|
588
786
|
// without wrapping, the code column is as wide as the longest line
|
|
589
787
|
const longest = $derived(wrap ? 0 : lines.reduce((m, l) => Math.max(m, l.text.replace(/\t/g, ' ').length), 0));
|
|
590
788
|
const style = $derived((theme ? paletteVars(theme.palette) + `;--dv-font:${theme.metrics.fontSize}px` : ''));
|
|
591
|
-
const sr = (i: number) => (moveAt[i] >= 0 ? (lines[i].type === 'add' ?
|
|
789
|
+
const sr = (i: number) => (moveAt[i] >= 0 ? (lines[i].type === 'add' ? L.movedHere : L.movedAway) : SR[lines[i].type]);
|
|
592
790
|
</script>
|
|
593
791
|
|
|
594
792
|
<SsrStyle
|
|
@@ -602,48 +800,48 @@
|
|
|
602
800
|
}}
|
|
603
801
|
/>
|
|
604
802
|
<!-- svelte-ignore a11y_no_noninteractive_tabindex, a11y_no_noninteractive_element_interactions -->
|
|
605
|
-
<div bind:this={root} data-sv={uid} class={['dv', cls]} {...rest} {@attach csstext(() => [style, userStyle].join(';'))} role="group" aria-label={name ?
|
|
803
|
+
<div bind:this={root} data-sv={uid} class={['dv', cls]} {...rest} {@attach csstext(() => [style, userStyle].join(';'))} role="group" aria-label={name ? L.named(label ?? L.diff, name) : (label ?? L.diff)} tabindex="0" onkeydown={onkey}>
|
|
606
804
|
{#if toolbar}
|
|
607
805
|
<div class="bar">
|
|
608
806
|
<span class="sum" data-testid="summary">
|
|
609
|
-
{#if model.binary}
|
|
807
|
+
{#if model.binary}{L.binaryFile}{:else if model.oversize}{L.largeDiff}{:else if !starts.length}{L.noChanges}{:else}{L.changeCount(starts.length)}<span class="plus">+{stats.additions}</span><span class="minus">−{stats.deletions}</span>{#if moves.length}<span class="moved-sum" data-testid="moved-summary">{L.movedCount(moves.length)}</span>{/if}{/if}
|
|
610
808
|
</span>
|
|
611
809
|
<span class="grow"></span>
|
|
612
810
|
{#if showFind}
|
|
613
|
-
<input class="field" type="search" placeholder=
|
|
614
|
-
{#if q.trim()}<span class="cnt" data-testid="find-count">{
|
|
811
|
+
<input class="field" type="search" placeholder={L.find} size="10" aria-label={L.findInDiff} bind:value={q} onkeydown={findStep} />
|
|
812
|
+
{#if q.trim()}<span class="cnt" data-testid="find-count">{L.matchCount(matches.length)}</span>{/if}
|
|
615
813
|
{/if}
|
|
616
814
|
{#if !model.binary && !model.oversize && starts.length}
|
|
617
|
-
<input class="field" type="text" inputmode="numeric" placeholder=
|
|
815
|
+
<input class="field" type="text" inputmode="numeric" placeholder={L.goToLine} size="9" aria-label={L.goToLine} aria-keyshortcuts="Control+G Meta+G" bind:this={gotoInput} onkeydown={jump} />
|
|
618
816
|
{/if}
|
|
619
|
-
<Button variant="minimal" intent="neutral" size="sm" icon="chevron-up" aria-label=
|
|
620
|
-
<Button variant="minimal" intent="neutral" size="sm" icon="chevron-down" aria-label=
|
|
621
|
-
<SegmentedControl size="sm" label=
|
|
817
|
+
<Button variant="minimal" intent="neutral" size="sm" icon="chevron-up" aria-label={L.previousChange} shortcut="p" disabled={!starts.length} onclick={prev} />
|
|
818
|
+
<Button variant="minimal" intent="neutral" size="sm" icon="chevron-down" aria-label={L.nextChange} shortcut="n" disabled={!starts.length} onclick={next} />
|
|
819
|
+
<SegmentedControl size="sm" label={L.layout} value={layout} onchange={setLayout} options={[{ value: 'unified', label: L.unified }, { value: 'split', label: L.split }, { value: 'inline-word', label: L.inline }]} />
|
|
622
820
|
</div>
|
|
623
821
|
{/if}
|
|
624
822
|
{#if selection}
|
|
625
823
|
<div class="selbar" data-testid="selection">
|
|
626
|
-
<span>{selectionCount
|
|
627
|
-
<Button size="sm" variant="minimal" intent="neutral" onclick={() => copy(selectionText(),
|
|
628
|
-
<Button size="sm" variant="minimal" intent="neutral" onclick={() => setSel(null)}>
|
|
824
|
+
<span>{L.selected(selectionCount, selection.side, selection.start === selection.end ? String(selection.start) : `${selection.start}–${selection.end}`)}</span>
|
|
825
|
+
<Button size="sm" variant="minimal" intent="neutral" onclick={() => copy(selectionText(), L.lineCount(selectionCount))}>{L.copyLines}</Button>
|
|
826
|
+
<Button size="sm" variant="minimal" intent="neutral" onclick={() => setSel(null)}>{L.clear}</Button>
|
|
629
827
|
</div>
|
|
630
828
|
{/if}
|
|
631
829
|
<div class="vh" role="status" aria-live="polite">{announce}</div>
|
|
632
830
|
<div class="copied" class:on={copied} role="status" aria-live="polite" data-testid="copied">{copied}</div>
|
|
633
831
|
|
|
634
832
|
{#if model.binary}
|
|
635
|
-
<p class="ph">
|
|
833
|
+
<p class="ph">{L.binaryNotShown}</p>
|
|
636
834
|
{:else if model.oversize}
|
|
637
835
|
<div class="ph">
|
|
638
|
-
<p>
|
|
639
|
-
<Button size="sm" variant="outlined" intent="neutral" onclick={() => (forced = true)}>
|
|
836
|
+
<p>{L.largeNote(countLines(oldText) + countLines(newText))}</p>
|
|
837
|
+
<Button size="sm" variant="outlined" intent="neutral" onclick={() => (forced = true)}>{L.showAnyway}</Button>
|
|
640
838
|
</div>
|
|
641
839
|
{:else if !starts.length}
|
|
642
|
-
<p class="ph" role="status">
|
|
840
|
+
<p class="ph" role="status">{L.noDifferences}</p>
|
|
643
841
|
{:else}
|
|
644
842
|
<div class="view">
|
|
645
843
|
<div class="scroll" class:virt class:nowrap={!wrap} bind:this={scroller} bind:clientHeight={vh} {onscroll} {@attach cssvars(() => ({ 'max-height': maxH }))} data-virtual={virt}>
|
|
646
|
-
<table class="tbl" data-layout={layout} {@attach cssvars(() => ({ '--dv-no': `${figures + 1}ch` }))} {@attach cssvars(() => ({ '--dv-code': wrap ? undefined : `calc(${longest + 1}ch + 2 * var(--tr-space-2))` }))} aria-label={name ?
|
|
844
|
+
<table class="tbl" data-layout={layout} {@attach cssvars(() => ({ '--dv-no': `${figures + 1}ch` }))} {@attach cssvars(() => ({ '--dv-code': wrap ? undefined : `calc(${longest + 1}ch + 2 * var(--tr-space-2))` }))} aria-label={name ? L.changesIn(name) : L.changes} aria-rowcount={rows.length}>
|
|
647
845
|
{#if layout === 'split'}
|
|
648
846
|
<colgroup>
|
|
649
847
|
{#each ['old', 'new'] as s (s)}<col class="c-no" /><col class="c-sym" /><col class="c-code" />{/each}
|
|
@@ -683,22 +881,22 @@
|
|
|
683
881
|
<tr class="hunk" aria-rowindex={ri + 1} data-vk={e.key} data-hunk={e.n}>
|
|
684
882
|
<td colspan={cols}>
|
|
685
883
|
<span class="hh">{hunkHeader(hunks[e.n])}</span>
|
|
686
|
-
<Button size="sm" variant="minimal" intent="neutral" aria-label=
|
|
687
|
-
<Button size="sm" variant="minimal" intent="neutral" aria-label=
|
|
688
|
-
<Button size="sm" variant="minimal" intent="neutral" aria-label=
|
|
884
|
+
<Button size="sm" variant="minimal" intent="neutral" aria-label={L.copyHunkAria(e.n + 1)} onclick={() => copyHunk(e.n, 'patch')}>{L.copyHunk}</Button>
|
|
885
|
+
<Button size="sm" variant="minimal" intent="neutral" aria-label={L.copyNewAria(e.n + 1)} onclick={() => copyHunk(e.n, 'new')}>{L.copyNew}</Button>
|
|
886
|
+
<Button size="sm" variant="minimal" intent="neutral" aria-label={L.copyOldAria(e.n + 1)} onclick={() => copyHunk(e.n, 'old')}>{L.copyOld}</Button>
|
|
689
887
|
</td>
|
|
690
888
|
</tr>
|
|
691
889
|
{:else if e.k === 'fold'}
|
|
692
890
|
<tr class="fold" aria-rowindex={ri + 1} data-vk={e.key}><td colspan={cols}>
|
|
693
891
|
{#if e.f.fixed && !load}
|
|
694
|
-
<span class="note">{e.f.count ?
|
|
892
|
+
<span class="note">{e.f.count ? L.unchangedNotInPatch(e.f.count) : L.notInPatch}</span>
|
|
695
893
|
{:else}
|
|
696
894
|
{#if !e.f.fixed && e.f.count > EXPAND}
|
|
697
|
-
<Button size="sm" variant="minimal" intent="neutral" aria-label=
|
|
698
|
-
<Button size="sm" variant="minimal" intent="neutral" aria-label=
|
|
895
|
+
<Button size="sm" variant="minimal" intent="neutral" aria-label={L.showAbove(EXPAND)} data-testid="diff-expand-above" data-fold={e.f.key} data-fold-id="diff-expand-above-{e.f.key}" onclick={() => grow(e.f, 'top')}>↓ {EXPAND}</Button>
|
|
896
|
+
<Button size="sm" variant="minimal" intent="neutral" aria-label={L.showBelow(EXPAND)} data-testid="diff-expand-below" data-fold={e.f.key} data-fold-id="diff-expand-below-{e.f.key}" onclick={() => grow(e.f, 'bottom')}>↑ {EXPAND}</Button>
|
|
699
897
|
{/if}
|
|
700
|
-
<Button size="sm" variant="minimal" intent="neutral" data-testid="diff-expand" data-fold={e.f.key} data-fold-id="diff-expand-{e.f.key}" data-lines={e.f.count} loading={busy === e.f.key} onclick={() => (e.f.fixed ? fill(e.f) : grow(e.f, 'all'))}>{failed?.key === e.f.key ?
|
|
701
|
-
{#if failed?.key === e.f.key}<span class="note err" role="alert">
|
|
898
|
+
<Button size="sm" variant="minimal" intent="neutral" data-testid="diff-expand" data-fold={e.f.key} data-fold-id="diff-expand-{e.f.key}" data-lines={e.f.count} loading={busy === e.f.key} onclick={() => (e.f.fixed ? fill(e.f) : grow(e.f, 'all'))}>{failed?.key === e.f.key ? L.retry : L.expand(e.f.count)}</Button>
|
|
899
|
+
{#if failed?.key === e.f.key}<span class="note err" role="alert">{L.loadFailed(failed.message)}</span>{/if}
|
|
702
900
|
{/if}
|
|
703
901
|
</td></tr>
|
|
704
902
|
{:else if e.k === 'note'}
|
|
@@ -708,7 +906,7 @@
|
|
|
708
906
|
<tr class="row {l.type}" class:moved={moveAt[e.i] >= 0} class:hit={hitCur >= 0 && matches[hitCur] === e.i} tabindex={kb === ri ? 0 : -1} onfocus={() => (kb = ri)} aria-rowindex={ri + 1} aria-selected={selection ? rowSel(e) : undefined} data-sel={rowSel(e)} data-vk={e.key} data-line="1" data-i={e.i} data-active={active(e.i)}>
|
|
709
907
|
<td class="no">{#if l.type !== 'add'}{@render ln('old', l.oldNo!)}{#if lineActions}<span class="act">{@render lineActions({ line: l, side: 'old', number: l.oldNo! })}</span>{/if}{/if}</td>
|
|
710
908
|
<td class="no">{#if l.type !== 'del'}{@render ln('new', l.newNo!)}{#if lineActions && l.type === 'add'}<span class="act">{@render lineActions({ line: l, side: 'new', number: l.newNo! })}</span>{/if}{/if}</td>
|
|
711
|
-
<td class="sym" aria-hidden={sr(e.i) ? undefined : 'true'}>{#if sr(e.i)}<span aria-hidden="true">{SYM[l.type]}</span><span class="vh">{sr(e.i)}
|
|
909
|
+
<td class="sym" aria-hidden={sr(e.i) ? undefined : 'true'}>{#if sr(e.i)}<span aria-hidden="true">{SYM[l.type]}</span><span class="vh">{L.mark(sr(e.i))}</span>{/if}</td>
|
|
712
910
|
<td class="code">{@render code(e.i)}</td>
|
|
713
911
|
</tr>
|
|
714
912
|
{:else if e.k === 'w'}
|
|
@@ -716,8 +914,8 @@
|
|
|
716
914
|
<tr class="row word" class:hit={hitCur >= 0 && (matches[hitCur] === e.i || matches[hitCur] === e.j)} tabindex={kb === ri ? 0 : -1} onfocus={() => (kb = ri)} aria-rowindex={ri + 1} aria-selected={selection ? rowSel(e) : undefined} data-sel={rowSel(e)} data-vk={e.key} data-line="1" data-i={e.i} data-active={active(e.i, e.j)}>
|
|
717
915
|
<td class="no">{@render ln('old', lines[e.i].oldNo!)}</td>
|
|
718
916
|
<td class="no">{@render ln('new', lines[e.j].newNo!)}</td>
|
|
719
|
-
<td class="sym"><span aria-hidden="true">±</span><span class="vh">changed
|
|
720
|
-
<td class="code">{#each wordsFor(e.i)! as p}{#if p.kind === 'eq'}{p.text}{:else if p.kind === 'del'}<del class="wd">{p.text}</del>{:else}<ins class="wi">{p.text}</ins>{/if}{/each}{#if lines[e.j].noEol}<span class="eof">↵
|
|
917
|
+
<td class="sym"><span aria-hidden="true">±</span><span class="vh">{L.mark(L.changed)}</span></td>
|
|
918
|
+
<td class="code">{#each wordsFor(e.i)! as p}{#if p.kind === 'eq'}{p.text}{:else if p.kind === 'del'}<del class="wd">{p.text}</del>{:else}<ins class="wi">{p.text}</ins>{/if}{/each}{#if lines[e.j].noEol}<span class="eof">↵ {L.noNewline}</span>{/if}</td>
|
|
721
919
|
</tr>
|
|
722
920
|
{:else}
|
|
723
921
|
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
|
@@ -729,11 +927,11 @@
|
|
|
729
927
|
{/snippet}
|
|
730
928
|
|
|
731
929
|
{#snippet ln(side: Side, n: number)}
|
|
732
|
-
<button type="button" class="ln" tabindex="-1" aria-label=
|
|
930
|
+
<button type="button" class="ln" tabindex="-1" aria-label={L.selectLine(side, n)} onclick={(e) => pick(side, n, e.shiftKey)}>{n}</button>
|
|
733
931
|
{/snippet}
|
|
734
932
|
|
|
735
933
|
{#snippet code(i: number)}
|
|
736
|
-
{#if heads.has(i)}{@const h = heads.get(i)!}<button type="button" class="mv" onclick={() => show(h.target, 'center')}><span aria-hidden="true">↪</span> {h.text}</button>{/if}{#each pieces(i) as p}{#if p.role || p.changed}<span class:chg={p.changed} class={p.role ? `s-${p.role}` : undefined}>{p.text}</span>{:else}{p.text}{/if}{/each}{#if lines[i].noEol}<span class="eof">↵
|
|
934
|
+
{#if heads.has(i)}{@const h = heads.get(i)!}<button type="button" class="mv" onclick={() => show(h.target, 'center')}><span aria-hidden="true">↪</span> {h.text}</button>{/if}{#each pieces(i) as p}{#if p.role || p.changed}<span class:chg={p.changed} class={p.role ? `s-${p.role}` : undefined}>{p.text}</span>{:else}{p.text}{/if}{/each}{#if lines[i].noEol}<span class="eof">↵ {L.noNewline}</span>{/if}
|
|
737
935
|
{/snippet}
|
|
738
936
|
|
|
739
937
|
{#snippet side(i: number | null, which: Side, kind: 'del' | 'add' | 'ctx')}
|
|
@@ -743,7 +941,7 @@
|
|
|
743
941
|
{@const l = lines[i]}
|
|
744
942
|
{@const num = which === 'old' ? l.oldNo : l.newNo}
|
|
745
943
|
<td class="no {kind}" class:sel={inSel(i, which)} class:moved={moveAt[i] >= 0} data-side={which}>{@render ln(which, num!)}{#if lineActions}<span class="act">{@render lineActions({ line: l, side: which, number: num! })}</span>{/if}</td>
|
|
746
|
-
<td class="sym {kind}" class:sel={inSel(i, which)} class:moved={moveAt[i] >= 0}>{#if sr(i)}<span aria-hidden="true">{SYM[kind]}</span><span class="vh">{sr(i)}
|
|
944
|
+
<td class="sym {kind}" class:sel={inSel(i, which)} class:moved={moveAt[i] >= 0}>{#if sr(i)}<span aria-hidden="true">{SYM[kind]}</span><span class="vh">{L.mark(sr(i))}</span>{/if}</td>
|
|
747
945
|
<td class="code {kind}" class:sel={inSel(i, which)} class:moved={moveAt[i] >= 0} data-side={which}>{@render code(i)}</td>
|
|
748
946
|
{/if}
|
|
749
947
|
{/snippet}
|
|
@@ -1,3 +1,126 @@
|
|
|
1
|
+
import { type ChangeLabels } from './diff.js';
|
|
2
|
+
export type DiffViewLabels = ChangeLabels & {
|
|
3
|
+
/** Accessible name of the diff when `label` is not set. */
|
|
4
|
+
diff: string;
|
|
5
|
+
/** Accessible name of the diff when it has a file name: the label and the name. */
|
|
6
|
+
named: (label: string, name: string) => string;
|
|
7
|
+
/** Toolbar summary of a binary file. */
|
|
8
|
+
binaryFile: string;
|
|
9
|
+
/** Toolbar summary of a diff too large to draw. */
|
|
10
|
+
largeDiff: string;
|
|
11
|
+
/** Toolbar summary when nothing changed. */
|
|
12
|
+
noChanges: string;
|
|
13
|
+
/** Toolbar summary: the number of changes. */
|
|
14
|
+
changeCount: (n: number) => string;
|
|
15
|
+
/** Toolbar summary: the number of moved blocks. */
|
|
16
|
+
movedCount: (n: number) => string;
|
|
17
|
+
/** Placeholder of the find field. */
|
|
18
|
+
find: string;
|
|
19
|
+
/** Accessible name of the find field. */
|
|
20
|
+
findInDiff: string;
|
|
21
|
+
/** Beside the find field: the number of matches. */
|
|
22
|
+
matchCount: (n: number) => string;
|
|
23
|
+
/** Placeholder and accessible name of the go-to-line field. */
|
|
24
|
+
goToLine: string;
|
|
25
|
+
/** Accessible name of the previous-change button. */
|
|
26
|
+
previousChange: string;
|
|
27
|
+
/** Accessible name of the next-change button. */
|
|
28
|
+
nextChange: string;
|
|
29
|
+
/** Accessible name of the layout switch. */
|
|
30
|
+
layout: string;
|
|
31
|
+
/** Layout option: one column. */
|
|
32
|
+
unified: string;
|
|
33
|
+
/** Layout option: two columns. */
|
|
34
|
+
split: string;
|
|
35
|
+
/** Layout option: one column with the changed words marked in line. */
|
|
36
|
+
inline: string;
|
|
37
|
+
/** Selection bar: how many lines are selected, on which side (`old` or `new`) and which numbers (`3` or `3–5`). */
|
|
38
|
+
selected: (count: number, side: string, range: string) => string;
|
|
39
|
+
/** A number of lines, as said in the copy confirmation. */
|
|
40
|
+
lineCount: (n: number) => string;
|
|
41
|
+
/** Button that copies the selected lines. */
|
|
42
|
+
copyLines: string;
|
|
43
|
+
/** Button that clears the selection. */
|
|
44
|
+
clear: string;
|
|
45
|
+
/** Confirmation after a copy; `what` is `lineCount`, `hunkName` or `hunkText`. */
|
|
46
|
+
copied: (what: string) => string;
|
|
47
|
+
/** Confirmation text when copying failed. */
|
|
48
|
+
copyFailed: string;
|
|
49
|
+
/** What was copied: a whole hunk (from 1). */
|
|
50
|
+
hunkName: (n: number) => string;
|
|
51
|
+
/** What was copied: one side of a hunk (from 1). */
|
|
52
|
+
hunkText: (side: 'new' | 'old', n: number) => string;
|
|
53
|
+
/** Hunk button: copy the hunk as a patch. */
|
|
54
|
+
copyHunk: string;
|
|
55
|
+
/** Accessible name of that button. */
|
|
56
|
+
copyHunkAria: (n: number) => string;
|
|
57
|
+
/** Hunk button: copy the new text. */
|
|
58
|
+
copyNew: string;
|
|
59
|
+
/** Accessible name of that button. */
|
|
60
|
+
copyNewAria: (n: number) => string;
|
|
61
|
+
/** Hunk button: copy the old text. */
|
|
62
|
+
copyOld: string;
|
|
63
|
+
/** Accessible name of that button. */
|
|
64
|
+
copyOldAria: (n: number) => string;
|
|
65
|
+
/** Gap between hunks of a patch whose lines are not available: how many lines it hides. */
|
|
66
|
+
unchangedNotInPatch: (count: number) => string;
|
|
67
|
+
/** The same, when the number of lines is not known. */
|
|
68
|
+
notInPatch: string;
|
|
69
|
+
/** Accessible name of the button that shows more lines above a gap. */
|
|
70
|
+
showAbove: (n: number) => string;
|
|
71
|
+
/** Accessible name of the button that shows more lines below a gap. */
|
|
72
|
+
showBelow: (n: number) => string;
|
|
73
|
+
/** Button that unfolds a gap of `count` lines. */
|
|
74
|
+
expand: (count: number) => string;
|
|
75
|
+
/** Button that tries again after the file could not be loaded. */
|
|
76
|
+
retry: string;
|
|
77
|
+
/** Shown beside it; `message` is the loader's error message. */
|
|
78
|
+
loadFailed: (message: string) => string;
|
|
79
|
+
/** Binary file in place of the diff. */
|
|
80
|
+
binaryNotShown: string;
|
|
81
|
+
/** Large diff in place of the diff: how many lines. */
|
|
82
|
+
largeNote: (lines: number) => string;
|
|
83
|
+
/** Button that draws a large diff. */
|
|
84
|
+
showAnyway: string;
|
|
85
|
+
/** Shown when the two texts are equal. */
|
|
86
|
+
noDifferences: string;
|
|
87
|
+
/** Accessible name of the diff table when it has no file name. */
|
|
88
|
+
changes: string;
|
|
89
|
+
/** Accessible name of the diff table of a named file. */
|
|
90
|
+
changesIn: (name: string) => string;
|
|
91
|
+
/** Accessible name and tooltip of the overview ruler. */
|
|
92
|
+
overview: (changes: number, added: number, removed: number, moved: number, notes: number) => string;
|
|
93
|
+
/** Accessible name of a line number button: the side (`old` or `new`) and the number. */
|
|
94
|
+
selectLine: (side: string, n: number) => string;
|
|
95
|
+
/** Announcement: no such line. */
|
|
96
|
+
noLine: (n: number) => string;
|
|
97
|
+
/** Announcement: moved to this line. */
|
|
98
|
+
line: (n: number) => string;
|
|
99
|
+
/** Announcement: the go-to-line field holds nothing usable. */
|
|
100
|
+
lineHint: string;
|
|
101
|
+
/** Announcement: the find found nothing. */
|
|
102
|
+
noMatches: string;
|
|
103
|
+
/** Announcement: this is match `n` of `total`. */
|
|
104
|
+
matchOf: (n: number, total: number) => string;
|
|
105
|
+
/** Label of the link on a moved block's first line: where it went (line from 1). */
|
|
106
|
+
movedTo: (line: number) => string;
|
|
107
|
+
/** Label of the link on a moved block's first line: where it came from. */
|
|
108
|
+
movedFrom: (line: number) => string;
|
|
109
|
+
/** Screen-reader text before an added line. */
|
|
110
|
+
added: string;
|
|
111
|
+
/** Screen-reader text before a removed line. */
|
|
112
|
+
removed: string;
|
|
113
|
+
/** Screen-reader text before the first line of a moved block that arrived here. */
|
|
114
|
+
movedHere: string;
|
|
115
|
+
/** Screen-reader text before the first line of a moved block that left. */
|
|
116
|
+
movedAway: string;
|
|
117
|
+
/** Screen-reader text before a line whose words changed (inline layout). */
|
|
118
|
+
changed: string;
|
|
119
|
+
/** Wraps one of those words so it reads as a prefix of the line, e.g. `added:`. */
|
|
120
|
+
mark: (what: string) => string;
|
|
121
|
+
/** After a line that has no final newline. */
|
|
122
|
+
noNewline: string;
|
|
123
|
+
};
|
|
1
124
|
import { type Snippet } from 'svelte';
|
|
2
125
|
import { type DiffLine, type LineSelection, type Side } from './diff.js';
|
|
3
126
|
import { type Layout } from './rows.js';
|
|
@@ -54,6 +177,7 @@ type $$ComponentProps = {
|
|
|
54
177
|
hunkActions?: boolean;
|
|
55
178
|
/** The selected lines: a range of line numbers on the old or the new side. Click a line number, Shift+click to extend; Space and Shift+Up/Down on a focused row. */
|
|
56
179
|
selection?: LineSelection | null;
|
|
180
|
+
/** Accessible name of the diff (default: "Diff"). */
|
|
57
181
|
label?: string;
|
|
58
182
|
/** Show the summary, layout switch and change navigation. */
|
|
59
183
|
toolbar?: boolean;
|
|
@@ -80,6 +204,8 @@ type $$ComponentProps = {
|
|
|
80
204
|
*/
|
|
81
205
|
load?: LoadText;
|
|
82
206
|
class?: string;
|
|
207
|
+
/** Replaces the built-in texts (translation). Missing keys keep the defaults. */
|
|
208
|
+
labels?: Partial<DiffViewLabels>;
|
|
83
209
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'class' | 'role' | 'tabindex' | 'onkeydown' | 'onselect'>;
|
|
84
210
|
declare const DiffView: import("svelte").Component<$$ComponentProps, {
|
|
85
211
|
next: () => void;
|