/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { DrawnItem, DrawnZone } from "./canvas/drawn.js"; import { type IndexAreaKind, type SchematicIndexArea } from "./index-area.js"; import type { SchematicWords } from "./messages.js"; /** The item kinds read by area, as the Index reads them (#1393, D52). */ export interface SchematicIndexAreaProps { /** The kinds, each with its source of the slice and its area indexes. */ readonly kinds: readonly IndexAreaKind[]; /** Its reads, kept across renders. */ readonly reader: SchematicIndexArea; /** The layers hidden, by key: the Index lists none of the items on them. */ readonly hiddenLayers: ReadonlySet; /** * The rows of those kinds a draft holds, by id: each is listed as the canvas draws it — moved, edited or made — never * as its record stores it, and none a draft deletes or unplaces. */ readonly drafted: ReadonlySet; /** Of them, those a gesture made: no source holds them, so the search finds them as it finds a kind read whole's. */ readonly created: ReadonlySet; /** * Hears the revision the tab read each of those kinds at, by slot, as it moves — none once the tab is gone: what a * Save landed of a kind is drawn until the tab has read it since (`drafted.ts`' `landedRead`). */ readonly onRead?: ((revisions: ReadonlyMap) => void) | undefined; } /** Props of {@link SchematicIndexTab}. */ export interface SchematicIndexTabProps { /** The zones the canvas draws: a hidden layer's left out. */ readonly zones: readonly DrawnZone[]; /** The items the canvas draws: a hidden layer's left out. */ readonly items: readonly DrawnItem[]; /** An item kind's name, by its slot: what the search reads beside an item's label and key. */ readonly kindName: (slot: string) => string; /** The zone the viewport is in, by its id; `undefined` for none. */ readonly inView: string | undefined; /** What the canvas has selected, by id: its rows are marked. */ readonly selected: ReadonlySet; /** Flies to an item or a zone, by its id, and selects it. */ readonly onReveal: (id: string) => void; /** The Schematic's words. */ readonly words: SchematicWords; /** The item kinds read by area, which the tab reads itself; `undefined` with none. */ readonly area?: SchematicIndexAreaProps | undefined; } /** * The Index tab's body — see the module docs. * * @param props - The zones and items drawn, the kinds' names, the zone in view, the selection, what a row's click does and the words * @returns The tab's body: its search over its tree */ export declare function SchematicIndexTab({ zones, items, kindName, inView, selected, onReveal, words, area }: SchematicIndexTabProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=index-tab.d.ts.map