[**@fungi.computer/caps**](../README.md) --- [@fungi.computer/caps](../README.md) / components/diff-view # components/diff-view ## Type Aliases ### DiffViewLine ```ts type DiffViewLine = Readonly<{ kind: "add" | "context" | "file" | "hunk" | "remove"; text: string; }>; ``` One presentational diff line; the caller owns parsing. --- ### DiffViewProps ```ts type DiffViewProps = object & Omit, "children">; ``` Props accepted by DiffView. #### Type Declaration | Name | Type | Description | | -------------- | ------------------------------------------ | --------------------------------------------------- | | `lines` | readonly [`DiffViewLine`](#diffviewline)[] | - | | `hiddenLines?` | `number` | Lines the caller omitted, shown as a trailing note. | ## Functions ### DiffView() ```ts function DiffView(__namedParameters): Element; ``` A compact monospace diff with add/remove/hunk/file line tones. #### Parameters | Parameter | Type | | ------------------- | --------------------------------- | | `__namedParameters` | [`DiffViewProps`](#diffviewprops) | #### Returns `Element`