# zidane-ui/chat/blocks

Import: `import { … } from 'zidane-ui/chat/blocks'`. Source: [ui/src/chat/blocks/index.ts](https://github.com/Tahul/zidane/blob/main/ui/src/chat/blocks/index.ts).

## Components

### `ViewFence`

Component.

A \`\`\`view fence: the view the host stored for its anchor (turn and fence
index), or until there is one, the fence parsed on the client. A fence
drawn as a draft keeps it until the stored view can draw at once (its
record and its parts' chunks loaded), so the two swap in one commit, with
no empty frame between them. Once swapped, it stays the stored view: a
new version (a refresh, a source fetch) draws the one before until it
loads, never the draft again. A stored view with no height yet holds its
place with the fence drawn from its source.

```ts
function ViewFence(props: ViewFenceProps): Element
```

**Parameters**

- `props` (`ViewFenceProps`): `ViewFenceProps`.

**Returns** `Element`

Source: [ui/src/views/TranscriptViews.tsx:37](https://github.com/Tahul/zidane/blob/main/ui/src/views/TranscriptViews.tsx#L37)

### `ViewTurnScope`

Component.

A reply's turn for the view fences in it, and the unplaced codemode views
of its exchange above it when it is the final reply (docs/VIEWS.md, Life of a view).

```ts
function ViewTurnScope(props: ViewTurnScopeProps): Element
```

**Parameters**

- `props` (`ViewTurnScopeProps`): The `ViewTurnScopeProps`.

**Returns** `Element`

Source: [ui/src/chat/transcript/view-scope.tsx:519](https://github.com/Tahul/zidane/blob/main/ui/src/chat/transcript/view-scope.tsx#L519)

## Functions

### `createBlocksHighlighter`

Function.

A code highlighter for the blocks' page.

```ts
function createBlocksHighlighter(): CodeHighlighter
```

**Returns** `CodeHighlighter`

Source: [ui/src/chat/blocks/highlighter.ts:11](https://github.com/Tahul/zidane/blob/main/ui/src/chat/blocks/highlighter.ts#L11)

## Re-exports

These names are documented on the entry point that owns them.

- [zidane-ui/chat](https://zidane.si/docs/reference/ui-chat.md): [`ChatProvider`](https://zidane.si/docs/reference/ui-chat.md#ChatProvider)
- [code/CodeHighlightProvider](https://zidane.si/docs/reference/ui-code-code-highlight-provider.md): [`CodeHighlightProvider`](https://zidane.si/docs/reference/ui-code-code-highlight-provider.md#CodeHighlightProvider)
- [components/CodeFrame](https://zidane.si/docs/reference/ui-components-code-frame.md): [`CodeWrapProvider`](https://zidane.si/docs/reference/ui-components-code-frame.md#CodeWrapProvider)
- [theme/css-vars](https://zidane.si/docs/reference/ui-theme-css-vars.md): [`contrastToCssVars`](https://zidane.si/docs/reference/ui-theme-css-vars.md#contrastToCssVars), [`depthToCssVars`](https://zidane.si/docs/reference/ui-theme-css-vars.md#depthToCssVars), [`paletteToCssVars`](https://zidane.si/docs/reference/ui-theme-css-vars.md#paletteToCssVars)
- [code/HighlightedCode](https://zidane.si/docs/reference/ui-code-highlighted-code.md): [`HighlightedCode`](https://zidane.si/docs/reference/ui-code-highlighted-code.md#HighlightedCode)
- [zidane-ui/chat/transcript](https://zidane.si/docs/reference/ui-chat-transcript.md): [`MarkdownViews`](https://zidane.si/docs/reference/ui-chat-transcript.md#MarkdownViews), [`MermaidDiagram`](https://zidane.si/docs/reference/ui-chat-transcript.md#MermaidDiagram)
- [code/shiki-theme](https://zidane.si/docs/reference/ui-code-shiki-theme.md): [`shikiThemeFor`](https://zidane.si/docs/reference/ui-code-shiki-theme.md#shikiThemeFor)
- [zidane-ui/views/headless](https://zidane.si/docs/reference/ui-views-headless.md): [`ViewAnswers`](https://zidane.si/docs/reference/ui-views-headless.md#ViewAnswers)
- [zidane-ui/views](https://zidane.si/docs/reference/ui-views.md): [`ViewsProvider`](https://zidane.si/docs/reference/ui-views.md#ViewsProvider)
