Diff
Since 0.1.0-alpha.20IzzyBlazor.Diff in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.20 assembly
and its doc comments.
Properties (15)
OldTextstring?The old text. Line ends \n, \r\n and \r all count as one.
NewTextstring?The new text.
LinesIReadOnlyList<DiffLine>?Languagestring?The language, such as "xml", "csharp" or "json": colors the lines as Code does, when the highlighter knows it (see Languages).
Titlestring?A file name or caption, such as "rules.xml" or "v3 → v4", in a header row above the lines.
LayoutDiffLayout = DiffLayout.UnifiedDiffLayout.Unified (the default): one column, removed lines before added. DiffLayout.Split: the old text beside the new, shown as unified where the diff is narrower than 45rem.
Contextint = 3The unchanged lines kept on each side of a change when the rest are folded. Defaults to 3.
Foldbool = trueFolds runs of unchanged lines away from the changes into a row that opens them. Defaults to true.
MarkWordsbool = trueMarks the changed words of a removed line and the added line paired with it. Defaults to true. A pair isn't marked when less than half of the longer line is unchanged.
LineNumbersbool = trueShows the old and new line numbers. Defaults to true. They aren't selected or copied with the lines.
MaxHeightLength?The tallest the lines get before they scroll, such as Length.Rem(30).
MaxChangesint = 1000The most lines removed and added to look for. Texts that differ by more show TooManyText. Defaults to 1,000.
SameTextstring?Shown when the two texts are the same. Defaults to "The two texts are the same."
TooManyTextstring?Shown when the texts differ by more than MaxChanges lines.
Plus 16 item props and 4 common props.
Show them hereEvents (0)
No events.
Types (3)
DiffLayout
enumHow a Diff lays out the two texts.
| Value | Description |
|---|---|
Unified | One column: each change's removed lines, then its added lines. |
Split | The old text beside the new, each line beside the one it became; unified where the diff is narrow. |
DiffLine
recordA line of a diff.
| Member | Description |
|---|---|
Kind DiffKind | Which texts have it. |
OldNumber int? | Its number in the old text, from 1. Null for a line added. |
NewNumber int? | Its number in the new text, from 1. Null for a line removed. |
Text string | The line, without its end. |
Length
structA width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.
| Member | Description |
|---|---|
Sm | 640px (matches the |
Md | 768px (matches the |
Lg | 1024px (matches the |
Xl | 1280px (matches the |
Prose | A comfortable reading width, 68 characters. |
Full | 100% of the containing block. |
Auto |
|
FitContent |
|
MinContent |
|
MaxContent |
|
Px(double value) | Pixels. |
Rem(double value) | Root ems (16px each by default). |
Percent(double value) | Percent of the containing block. |
Ch(double value) | Character widths, for text measures. |
Vw(double value) | Percent of the viewport width. |
Dvh(double value) | Percent of the dynamic viewport height (accounts for mobile browser bars). |
Of(string css) | Any CSS length, such as |
Css string | The CSS value this length renders as. |