API reference
components/diff-view
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/diff-view";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | DiffViewLine | One presentational diff line; the caller owns parsing. |
| type alias | DiffViewProps | Props accepted by DiffView. |
| function | DiffView() | A compact monospace diff with add/remove/hunk/file line tones. |
DiffViewLinetype alias
Section titled “DiffViewLine”type DiffViewLine = Readonly<{ kind: "add" | "context" | "file" | "hunk" | "remove"; text: string;}>;One presentational diff line; the caller owns parsing.
DiffViewPropstype alias
Section titled “DiffViewProps”type DiffViewProps = object & Omit<HTMLAttributes<HTMLPreElement>, "children">;Props accepted by DiffView.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
lines |
readonly DiffViewLine[] |
- |
hiddenLines? |
number |
Lines the caller omitted, shown as a trailing note. |
DiffView()function
Section titled “DiffView()”function DiffView(__namedParameters): Element;A compact monospace diff with add/remove/hunk/file line tones.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
DiffViewProps |
Returns
Section titled “Returns”Element