Screen

import { Screen } from '@hanzo/ui/agents'

No examples yet.

Types

export interface Ticket {
/** The page to embed. Already carries whatever the grant put in it. */
url: string
/** Seconds until it stops working. Absent, the view is not refreshed. */
expiresIn?: number
}
export type ScreenKind = 'sandbox' | 'browser'
export interface ScreenProps extends Col {
/** The run being watched. Changing it re-mints. */
sessionId: string
/**
* What this run has to look at. `null` means nothing does — the honest empty
* state, and the common case. The caller decides; this component never guesses
* from a session's shape.
*/
kind?: ScreenKind | null
/**
* Mint a view. Called on mount, on `sessionId` change, and shortly before the
* previous ticket expires. Throwing renders the failure with a retry.
*/
mint?: (sessionId: string) => Promise<Ticket>
/** Shown when `kind` is null. */
empty?: ReactNode
title?: string
}

Exports

Screentype ScreenKindtype ScreenPropstype Ticket