import { FC, ReactNode } from 'react'; import { AssistantStepRailProps } from './AssistantStepRail'; import { AssistantPreviewFollow, AssistantPreviewStep } from './entityPreviewState'; export interface AssistantPreviewTab { /** * Stable id. * * ★ Matching a STEP id is what makes the surface follow the run — see * `nextActiveTab`. Ids that match nothing are still perfectly valid; such a * tab is simply never auto-selected. */ readonly id: string; readonly label: string; /** Optional count, e.g. how many widgets this tab holds. */ readonly badge?: string | number; /** Rendered only while the tab is active, so an inactive tab costs nothing. */ readonly render: () => ReactNode; } export interface AssistantEntityPreviewProps { readonly title: string; readonly steps?: readonly AssistantPreviewStep[]; readonly tabs?: readonly AssistantPreviewTab[]; /** * Identifies the current run. A CHANGE releases the viewer's tab choice. * * ★ Without it a tab pinned during one run silently governs the next, so the * surface sat on a stale tab while a new build ran behind it. */ readonly runKey?: string | null; /** * Which step the surface follows when nothing is pinned. Defaults to * `produced` — see `AssistantPreviewFollow`; the intuitive "follow the running * step" parks the viewer on a tab whose entity does not exist yet. */ readonly follow?: AssistantPreviewFollow; /** What the run says it is doing right now. */ readonly caption?: string | null; /** Set when the run failed, so the surface stops pretending to be live. */ readonly error?: string | null; /** * Free-form status line — "updated 2m ago", a live badge, a count. * * ★ `ReactNode`, not a string: the real consumer's version of this line is a * pulsing "Live" pill beside the timestamp. Forcing it to a string would have * meant either losing that or pushing the whole header back into the product. */ readonly meta?: ReactNode; readonly onClose?: () => void; /** * Replaces the default close button. * * ★ A product with its own button vocabulary (an icon-only ghost button, say) * should not have to choose between this surface and its own design system. * `onClose` remains the simple path for products that have no opinion. */ readonly headerActions?: ReactNode; /** Already-translated chrome strings. This component holds no translator. */ readonly labels?: { readonly close?: string; readonly steps?: string; readonly skipped?: string; readonly stepsHeading?: string; /** * How each step STATUS is said, for people who cannot see the glyph. * * ★★ Forwarded to the rail. Without this a non-English product could * translate every visible string and still have "completed" and "failed" * announced in English — the one place where the difference between them * is the whole message. */ readonly stepStatus?: AssistantStepRailProps['statusLabels']; /** * Names the failure above the message — "Build stopped", "Import failed". * * ★ Optional. A raw transport message ("ECONNRESET") tells a viewer that * something broke but not WHAT, and only the product knows what the run was * called. Omit it and the message stands alone, as before. */ readonly errorHeading?: string; }; /** Body shown when there are no tabs. */ readonly children?: ReactNode; } export declare const AssistantEntityPreview: FC; //# sourceMappingURL=AssistantEntityPreview.d.ts.map