/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type EastType } from "@elaraai/east"; import { type QueryWords } from "./model/words.js"; import type { QueryRoot } from "./one-shot.js"; /** A kind of data source: the Datasets tab's group. */ export type SourceKind = "rows" | "lookups" | "values" | "models"; /** How the open query reads a data source: as its source, or looked up. */ export type SourceRole = "source" | "lookedUp"; /** * What a data source is, by its type: its group and its icon. * * @param type - its type * @returns the group and the icon */ export declare function sourceKind(type: EastType): { kind: SourceKind; icon: string; }; /** * A data source's size in words: a list's or a lookup table's count, once its * status gives one; a tree, a record, a calculation's inputs and result, or a * value's kind otherwise. * * @param name - its name, which names its items * @param type - its type * @param rows - how many elements its status counts, if it does * @param words - the words * @returns the size, or `""` for a list or a lookup table not counted yet */ export declare function sourceSize(name: string, type: EastType, rows: number | undefined, words: QueryWords): string; /** Props of {@link DatasetsTab}. */ export interface DatasetsTabProps { /** The data sources, as the root holds them. */ readonly root: QueryRoot; /** How the open query reads each data source it reads, by name. */ readonly reads: ReadonlyMap; /** Starts a new query on a data source. */ readonly onStart: (name: string) => void; /** The tab's library's id. */ readonly id: string; /** The words. */ readonly words: QueryWords; /** Where the library keeps its state. */ readonly storageKey: string; } /** * Renders the Datasets tab — see the module docs. * * @param props - The data sources, how the open query reads them, and what a click does ({@link DatasetsTabProps}) * @returns The tab's library */ export declare const DatasetsTab: import("react").MemoExoticComponent<(props: DatasetsTabProps) => import("react/jsx-runtime").JSX.Element>; //# sourceMappingURL=datasets-tab.d.ts.map