/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type sheetKeys } from "@elaraai/e3-ui/internal"; import { type BuilderFrameDock } from "@elaraai/east-ui-components"; import type { SheetWords } from "../words.js"; import type { SheetValue } from "./index.js"; import type { FollowedSources } from "../../shared/schedule/follow-sources.js"; /** One template, decoded. */ type SheetTemplateValue = SheetValue["templates"][number]; /** An author's tab, decoded. */ type SheetAuthorTabValue = Extract["value"]; /** The names the sheet keeps its viewer's state under. */ type SheetKeys = ReturnType; /** Props of {@link useSheetLibrary}. */ export interface SheetLibraryProps { /** The sheet's payload: the sheet, the templates and the library's tabs. */ value: SheetValue; /** The names the sheet keeps its viewer's state under. */ keys: SheetKeys; /** The columns this viewer hides, by key. */ hidden: ReadonlySet; /** Hides a column the grid shows, or shows a hidden one again. */ onToggleColumn: (key: string) => void; /** The sheet's words. */ words: SheetWords; /** What each source the library follows shows (#1345). */ followed: FollowedSources; } /** * A template's card's key (#1345): its key in its templates record, beside * its list's source — two lists' templates may share a key, each in its own * record. What the Rows tab's cards drag by, and the sheet's drops find them by. * * @param template - The template: its list's source, and its key in that list's record * @returns Its card's key */ export declare function templateCardKey(template: Pick): string; /** * The library a sheet's templates drag from — the Rows tab's (#1187). * * @param keys - The sheet's keys * @returns The library's id */ export declare function templatesLibrary(keys: SheetKeys): string; /** * The library an author's tab's cards drag from (#1187). * * @param keys - The sheet's keys * @param tab - The author's tab * @returns The library's id */ export declare function tabLibrary(keys: SheetKeys, tab: SheetAuthorTabValue): string; /** * The library pane, as `BuilderFrame` draws it — see the module docs. * * @param props - The payload, the sheet's keys, the columns hidden and their toggle, and the words * @returns The pane — its tabs the ones `library` lists, each with its count; 272px wide; its collapsed state kept per viewer (SB24) — or `undefined`, no pane, when `library` lists none */ export declare function useSheetLibrary({ value, keys, hidden, onToggleColumn, words, followed }: SheetLibraryProps): BuilderFrameDock | undefined; export {}; //# sourceMappingURL=library.d.ts.map