/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * `` — a log, its lines virtualized, under a band * holding the stdout/stderr tabs, a search that marks its matches and steps * through them, and Copy. The view follows the log's end while it is there, * and says when new lines arrive while it is not. * * A host that draws the view's controls in its own header (#1209) passes * `toolbar={false}`, so the view draws no band and the log fills it edge to * edge; controls the search with `search`; hears the matches with * `onMatchesChange`; and steps through them and copies the log through * `controlsRef`. * * @packageDocumentation */ import { type Ref } from 'react'; import { type UseTabsReturn } from '@chakra-ui/react'; import type { LogViewerControls } from './preview-controls.js'; /** The search's matches, as a host's "3/17" shows them (#1209). */ export interface LogMatches { /** The match shown, from 0; 0 while there are none. */ current: number; /** How many matches the log has. */ count: number; } export interface VirtualizedLogViewerProps { /** The log's text. */ content: string; /** The stdout/stderr tabs the band shows. */ tabs: UseTabsReturn; /** `false` draws no band — no tabs, search, match count or chevrons, or * Copy — and the log fills the view edge to edge, with no inset, corners * or border, for the host's frame to hold (#1209). Default `true`. */ toolbar?: boolean | undefined; /** The search, controlled: the view draws no search box, count or * chevrons of its own, marks the text's matches in any case, and scrolls * to the first; `''` clears (#1209). */ search?: string | undefined; /** Told the text of the view's own search box as it is edited, unless * `search` is given. */ onSearchChange?: ((search: string) => void) | undefined; /** Told the match shown and how many there are whenever either changes * (#1209). */ onMatchesChange?: ((matches: LogMatches) => void) | undefined; /** Given the view's next and previous match and its Copy while it is * mounted, for a host's own controls (#1209). */ controlsRef?: Ref | undefined; } export declare function VirtualizedLogViewer({ content, tabs, toolbar, search, onSearchChange, onMatchesChange, controlsRef, }: VirtualizedLogViewerProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=VirtualizedLogViewer.d.ts.map