import { type ComponentProps, type ReactNode } from "react"; import { type OpenGeniText } from "../../messages/runtime.js"; /** * Shared chrome for artifact surfaces: the Opengeni console and embedding hosts * render the same header, controls, and load states. Class names use the * package theme aliases, so the console's own Tailwind build and the compiled * `.og-root` stylesheet resolve them identically. */ export type ArtifactKind = "document" | "spreadsheet" | "presentation" | "site" | "image" | "file"; declare const BUTTON_VARIANT: { readonly ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50"; readonly outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-border dark:bg-input/30 dark:hover:bg-input/50"; }; declare const BUTTON_SIZE: { readonly sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5"; readonly icon: "size-9"; readonly "icon-sm": "size-8"; }; export declare function ArtifactButton({ variant, size, className, type, ...props }: ComponentProps<"button"> & { variant?: keyof typeof BUTTON_VARIANT; size?: keyof typeof BUTTON_SIZE; }): import("react").JSX.Element; export declare function ArtifactBadge({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element; export declare const ArtifactSelect: import("react").ForwardRefExoticComponent, HTMLSelectElement>, "ref"> & import("react").RefAttributes>; export declare function artifactKindIcon(kind: ArtifactKind): ReactNode; export declare function artifactKindSubtitle(t: OpenGeniText, kind: ArtifactKind): string; type LoadErrorCopy = Readonly>; /** * Every user-facing string in the artifact surfaces (inline Site preview, Site * frame, viewer header and states). Hosts translate by passing a partial * `labels` object; unspecified keys keep the English defaults. */ export type ArtifactLabels = Readonly<{ back: string; close: string; /** Header title and loading copy until an artifact's title is known. */ opening: string; /** Header title when an artifact cannot be opened. */ artifact: string; startingEditor: string; kindSubtitle: (kind: ArtifactKind) => string; live: string; reloadSite: string; openFullScreen: string; editWithAgent: string; editShort: string; preview: string; loadPreview: string; loadSitePreview: string; siteVersion: string; savedVersion: string; version: (revision: number) => string; openSite: string; loadingSite: string; siteArchived: string; siteUnpublished: string; siteReferenceInvalid: string; siteLoadFailed: string; retry: string; tryAgain: string; toolCount: (count: number) => string; toolsAvailable: (count: number) => string; sourceFileCount: (count: number) => string; viewingDisabled: { title: string; message: string; }; editorsMissing: { title: string; message: string; }; siteErrors: LoadErrorCopy; editableErrors: LoadErrorCopy; reference: (id: string) => string; }>; export declare const DEFAULT_ARTIFACT_LABELS: (t: OpenGeniText) => ArtifactLabels; /** Translate every artifact surface below; nested providers override outer ones. */ export declare function ArtifactLabelsProvider({ labels, children, }: { labels: Partial | undefined; children: ReactNode; }): import("react").JSX.Element; export declare function useArtifactLabels(): ArtifactLabels; /** * One artifact header: optional Back, the kind tile, title (or a host-supplied * title control), trailing actions, and optional Close. The console dock and * embedded viewers share it. */ export declare function ArtifactViewerHeader({ kind, title, subtitle, titleSlot, onBack, backLabel, actions, onClose, closeLabel, }: Readonly<{ /** `null` while the host does not know the modality yet. */ kind: ArtifactKind | null; title: string; subtitle?: string | undefined; /** Replaces the title text, for example with a picker. */ titleSlot?: ReactNode; onBack?: (() => void) | undefined; backLabel?: string | undefined; actions?: ReactNode; onClose?: (() => void) | undefined; closeLabel?: string | undefined; }>): import("react").JSX.Element; export declare function ArtifactLoading({ label }: { label: string; }): import("react").JSX.Element; export declare function ArtifactProblem({ view, onRetry, }: { view: ArtifactLoadErrorView; onRetry?: (() => void) | undefined; }): import("react").JSX.Element; export type ArtifactLoadErrorKind = "site" | "editable"; export type ArtifactLoadErrorView = Readonly<{ title: string; message: string; retryable: boolean; correlationId?: string; }>; /** Site/editor load copy. Never surfaces raw Opengeni API status text. */ export declare function artifactLoadErrorView(t: OpenGeniText, error: unknown, kind: ArtifactLoadErrorKind, labels?: ArtifactLabels): ArtifactLoadErrorView; export declare function artifactLoadErrorMessage(t: OpenGeniText, view: ArtifactLoadErrorView, labels?: ArtifactLabels): string; export {};