/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type BuilderFrameDock } from "@elaraai/east-ui-components"; import { type CountWords } from "@elaraai/east-ui-components/internal"; import type { BacklogPageCount, CalendarBacklogPages } from "./backlog-pages.js"; import type { FollowedSources } from "../shared/schedule/follow-sources.js"; import { type SourceTab } from "../shared/schedule/source-tab.js"; import { type CalendarShownResources } from "./controls.js"; import type { CalendarCommands, CalendarSource } from "./actions.js"; import type { BacklogNarrowing } from "../shared/schedule/backlog.js"; import type { CalendarEventPart } from "./window.js"; import { type CalendarItem, type CalendarKind, type CalendarRow, type CalendarStyles, type CalendarTemplate, type CalendarValue } from "./model.js"; /** Library ids also name the shared drag grammar's sources. */ export declare function calendarLibraryId(key: string, tab: string): string; /** The kind and source record key identify a template. */ export declare function templateSources(value: CalendarValue): Map; /** One template's card: its id, and the template it is. */ interface TemplateEntry { id: string; kind: CalendarKind; template: CalendarTemplate; } /** The Templates tab, and the templates it shows by their card's id: what a drop or a drawn event is made from. */ export interface CalendarTemplatesTab extends SourceTab { shown: ReadonlyMap; } /** * The Templates tab (#1343): every kind's templates, each following the source * its templates list names by its record key. * * @param value - The payload * @param followed - The sources the Calendar follows * @param words - The app's number formatter * @returns The tab, and the templates it shows */ export declare function templatesTab(value: CalendarValue, followed: FollowedSources, words: CountWords): CalendarTemplatesTab; interface LibraryArgs { value: CalendarValue; selection: readonly CalendarItem[]; key: string; /** The backlog events read for what is shown: every kind's, or — while the rest are read — the kinds' read already. */ backlog: readonly CalendarItem[]; /** Whether all of the backlog is read for what is shown: until it is, the tab counts "…" and draws pending rows after `backlog`'s cards. */ backlogRead: boolean; /** Whether `backlog` stands in for a read in flight (#1398): its pane busy and its cards retained, aria-disabled (CL8). */ backlogRetained: boolean; /** * The Backlog a page at a time (#1424, `backlog-pages.ts`), when a backlog kind is narrowed through its source of the * slice: `backlog` its events in hand, the kinds' a page at a time after them; `undefined`, every kind's in hand. */ backlogPages?: CalendarBacklogPages | undefined; /** What the paged Backlog counts, once read: until then its tab says "…" (CL13). */ backlogCount?: BacklogPageCount | undefined; narrow: boolean; now: Date; day: Date; styles: CalendarStyles; commands: CalendarCommands | undefined; activeTemplate: string | undefined; onTemplate: (key: string) => void; /** The Templates tab, as the sources narrow it. */ templates: CalendarTemplatesTab; /** What the rail hides of the backlog. */ backlogNarrowing: BacklogNarrowing; /** The sources the Calendar follows: an app's tab reads the one it names. */ followed: FollowedSources; /** Each resource kind's rows the rail shows: what a placement's Chooser offers. */ shown: CalendarShownResources; /** Whether a run of the optimiser moved an event into or out of the backlog (#1409): the Backlog tab's count flashes as it lands. */ backlogFlash?: boolean | undefined; /** Whether a run of the optimiser is out (#1409, R2): no card drags, and the pane's actions are held, while the pane stays live. */ locked?: boolean | undefined; /** * Every resource row the frame holds — each kind's, a paged kind's of the windows held (#1424), and the unassigned * one: what a backlog card names its event's resource by, as the views do. */ rows: readonly CalendarRow[]; } /** The author-listed tabs, populated from the current bound reads. */ export declare function useCalendarLibrary(args: LibraryArgs): BuilderFrameDock | undefined; export {}; //# sourceMappingURL=library.d.ts.map