Skip to content

zidane-ui/settings/demos

import { … } from 'zidane-ui/settings/demos'ui/src/settings/demos/index.ts

Components#

ApprovalDemoComponent#

Renders the demo of an approval mode.

TypeScript
function ApprovalDemo(props: ApprovalDemoProps): Element
Parameters
NameTypeDescription
propsApprovalDemoProps

Component props.

Element

ui/src/settings/demos/autonomy.tsx:113

ConversationPresetPreviewComponent#

zidane-ui/settings/demos: the settings' previews and mini demos, for a page that shows them on their own (a gallery). The mini demos are small decorative scenes of what a feature, an extension or an approval mode does; the tutorial scenes are one per topic, each taking the step on show; the conversation preview draws a transcript in the settings it is given. They are kept off zidane-ui/settings, whose pages load them on demand, so the settings screen doesn't carry the transcript and every scene up front.

TypeScript
function ConversationPresetPreview(props: ConversationPresetPreviewProps): Element
Parameters
NameTypeDescription
propsConversationPresetPreviewProps

Component props.

Element
ConversationPresetPreview props
NameTypeDescription
className?string

Extra classes on the block.

maxHeight?number

The height of the preview's scroller, in pixels.

onApply(preset: TranscriptPresetId) => void

Applies a preset: every setting of transcriptPreset(id).settings.

settingsPartial<Settings>

The settings in effect.

style?CSSProperties

Inline styles on the root element.

ui/src/settings/conversation-preview.tsx:152

ConversationPreviewComponent#

zidane-ui/settings/demos: the settings' previews and mini demos, for a page that shows them on their own (a gallery). The mini demos are small decorative scenes of what a feature, an extension or an approval mode does; the tutorial scenes are one per topic, each taking the step on show; the conversation preview draws a transcript in the settings it is given. They are kept off zidane-ui/settings, whose pages load them on demand, so the settings screen doesn't carry the transcript and every scene up front.

TypeScript
function ConversationPreview(props: ConversationPreviewProps): Element
Parameters
NameTypeDescription
propsConversationPreviewProps

Component props.

Element
ConversationPreview props
NameTypeDescription
className?string

Extra classes on the window.

maxHeight?number

The height of the window's scroller, in pixels.

settingsPartial<Settings>

The settings to draw the sample with.

style?CSSProperties

Inline styles on the root element.

title?string

The caption of the window. Defaults to the preview label.

ui/src/settings/conversation-preview.tsx:101

ExtensionDemoComponent#

Renders the demo of a native extension, or nothing for an extension without one.

TypeScript
function ExtensionDemo(props: ExtensionDemoProps): Element | null
Parameters
NameTypeDescription
propsExtensionDemoProps

Component props.

Element | null

ui/src/settings/demos/extensions.tsx:231

FeatureDemoComponent#

Renders the demo of a feature, or nothing for a feature without one.

TypeScript
function FeatureDemo(props: FeatureDemoProps): Element | null
Parameters
NameTypeDescription
propsFeatureDemoProps

Component props.

Element | null

ui/src/settings/demos/features.tsx:577

SandboxDemoComponent#

Renders the sandbox demo: the project allowed, ~/.ssh blocked.

TypeScript
function SandboxDemo(props: DemoProps): Element
Parameters
NameTypeDescription
propsDemoProps

Component props.

Element
SandboxDemo props
NameTypeDescription
className?string

Extra classes on the root element.

onboolean

The switch is on: the demo plays. Off: it dims and stands still.

style?CSSProperties

Inline styles on the root element.

ui/src/settings/demos/autonomy.tsx:129

Constants#

TUTORIAL_SCENESConstant#

The scene of each tutorial.

TypeScript
const TUTORIAL_SCENES: Readonly<Record<TutorialTopic, ComponentType<SceneProps>>>

ui/src/settings/demos/how-it-works.tsx:757

Interfaces#

ConversationPresetPreviewPropsInterface#

Props of ConversationPresetPreview.

TypeScript
interface ConversationPresetPreviewProps
ConversationPresetPreviewProps properties
NameTypeDescription
className?string

Extra classes on the block.

maxHeight?number

The height of the preview's scroller, in pixels.

onApply(preset: TranscriptPresetId) => void

Applies a preset: every setting of transcriptPreset(id).settings.

settingsPartial<Settings>

The settings in effect.

style?CSSProperties

Inline styles on the root element.

ui/src/settings/conversation-preview.tsx:133

ConversationPreviewPropsInterface#

Props of ConversationPreview.

TypeScript
interface ConversationPreviewProps
ConversationPreviewProps properties
NameTypeDescription
className?string

Extra classes on the window.

maxHeight?number

The height of the window's scroller, in pixels.

settingsPartial<Settings>

The settings to draw the sample with.

style?CSSProperties

Inline styles on the root element.

title?string

The caption of the window. Defaults to the preview label.

ui/src/settings/conversation-preview.tsx:83

DemoPropsInterface#

What every demo takes: whether the switch it shows is on.

TypeScript
interface DemoProps
DemoProps properties
NameTypeDescription
className?string

Extra classes on the root element.

onboolean

The switch is on: the demo plays. Off: it dims and stands still.

style?CSSProperties

Inline styles on the root element.

ui/src/settings/demos/parts.tsx:10

ScenePropsInterface#

What every tutorial scene takes.

TypeScript
interface SceneProps
SceneProps properties
NameTypeDescription
className?string

Extra classes on the root element.

stepnumber

The step on show, from 0.

style?CSSProperties

Inline styles on the root element.

ui/src/settings/demos/tour.tsx:13

Types#

FeatureDemoIdType#

What a feature demo can show: a setting's key, or the app's motion (Appearance › Motion, not a table row).

TypeScript
type FeatureDemoId = BooleanSettingKey | 'motion'

ui/src/settings/demos/features.tsx:532