Expand description
Compatibility re-exports for vtcode-diff preview semantics.
New internal consumers should depend on vtcode-diff directly. These
exports remain for one release so downstream callers can migrate.
Structs§
- Diff
Cell - One side of a semantic preview row.
- Diff
Change Counts - Aggregate addition/deletion counts retained for compatibility.
- Diff
Display Line - A semantic legacy display line.
- DiffRow
- A renderer-neutral row, optionally containing paired side-by-side cells.
- Diff
Segment - One independently styled content segment.
- Intraline
Range - Intraline byte range, always aligned to UTF-8 boundaries.
- Layout
Options - Width and bounded-excerpt options for semantic layout.
- Side
BySide Row - One paired row in the compatibility side-by-side model.
Enums§
- Diff
Display Kind - Semantic role used by legacy preview consumers.
- Diff
Layout - Requested preview layout.
- Diff
RowKind - Semantic role for a renderer-neutral row.
Functions§
- annotate_
word_ level_ diffs - Adds byte-safe intraline ranges to consecutive deletion/addition groups.
- count_
diff_ changes - Counts additions and deletions in structured hunks.
- diff_
display_ line_ number_ width - Computes the clamped line-number gutter width.
- display_
lines_ from_ hunks - Converts hunks to semantic display lines and bounded intraline ranges.
- display_
lines_ from_ unified_ diff - Parses unified text into display lines, retaining metadata lines.
- format_
numbered_ unified_ diff - Formats a numbered unified diff without ANSI color.
- layout_
display_ lines - Lays out precomputed display lines without repeating intraline analysis.
- side_
by_ side_ rows - Pairs deletions and additions for side-by-side presentation.
- word_
level_ changed_ ranges - Computes byte-safe word-level changed ranges for a line pair.
Type Aliases§
- Word
Changed Ranges - Intra-line highlight ranges retained for compatibility.