/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type ValueTypeOf } from "@elaraai/east"; import type { RecordSliceBindType } from "@elaraai/east-ui/internal"; import { type SlotStyles } from "@elaraai/east-ui-components/internal"; import type { SheetLoadingLine } from "../sheet/Footer.js"; import type { SheetEntries } from "../sheet/index.js"; import type { SheetColumnIndex, SheetRegisterIndex } from "../sheet/model.js"; import type { SheetRowValue } from "../sheet/values.js"; import { type SheetWords } from "../sheet/words.js"; import { type RecordLineText } from "./messages.js"; /** One member of the legend (FT2). */ export interface RecordLegendItem { /** Its chip's look — a scale's step, a valence's wash, or none; `undefined` in the mark look, which draws no chip. */ look: string | undefined; /** Its chip's words: the member's label. */ label: string; /** Its name: the member's `meta` — none beside a chip where it has none, the chip saying its label; in the mark look, which draws no chip, its label. */ name: string | undefined; } /** The legend: its members, and their chips' least width in characters — the widest label, so the chips line up. */ export interface RecordLegend { items: readonly RecordLegendItem[]; chip: number; } /** * The legend (FT2): where every cycle column names one register, its members * in its order, each drawn as the first cycle column draws it. * * @param columns - The columns * @param registers - The registers, by name * @returns The legend; none where the cycle columns name no register, or several */ export declare function legendOf(columns: SheetColumnIndex, registers: SheetRegisterIndex): RecordLegend; /** The rows the first age column with a threshold says are stale: how many, at what threshold, and what it counts. */ export interface RecordStaleCount { /** How many rows are stale. */ n: number; /** At or past this many, a row is stale. */ threshold: bigint; /** What the column counts. */ unit: "hours" | "days" | "weeks"; } /** * How many of the rows the first age column with a threshold says are stale, * to the Record's clock: what the footer's note (FT1) and the inspector's * count with no row selected (IN8) say. A new row is never stale: the record * holds no age of it yet, and the grid draws it none. * * @param columns - The columns * @param rows - The rows to count: every row the narrowing shows * @param changes - What a row's drafts changed: whether it is new * @param now - The Record's now * @returns The count; `undefined` with no such column */ export declare function staleCountOf(columns: SheetColumnIndex, rows: readonly SheetRowValue[], changes: SheetEntries["changes"], now: Date): RecordStaleCount | undefined; /** * The stale note (FT1): how many of the rows the first age column with a * threshold says are stale, to the Record's clock — a new row never. * * @param columns - The columns * @param rows - The rows to count: every row the narrowing shows * @param changes - What a row's drafts changed: whether it is new * @param now - The Record's now * @param words - The Sheet's words: the counts in the viewer's language * @returns The note; `undefined` with no such column, or no row stale */ export declare function staleNoteOf(columns: SheetColumnIndex, rows: readonly SheetRowValue[], changes: SheetEntries["changes"], now: Date, words: SheetWords): string | undefined; /** Props of {@link RecordFooter}. */ export interface RecordFooterProps { /** The record recipe's slot styles. */ styles: SlotStyles; /** The rows shown, of the record's — `N of M people`, N strong; `undefined` while either is not known. */ count: RecordLineText | undefined; /** The record's last save, from its commits — `saved 14:02` (SB22). */ saved: string | undefined; /** The stale note; `undefined` for none. */ stale: string | undefined; /** Exact, confirmed feedback when saved rows leave the `rows` source's narrowing. */ recordSlice: ValueTypeOf | undefined; /** The legend. */ legend: RecordLegend; /** The status line's words: what a phone's band says, its toolbar having no room for them. */ live: string; /** What a paged source reads now, or could not read. */ loading: SheetLoadingLine | undefined; /** What the rail counts the rows in: what the loading line names them by. */ noun: string; /** Ask the source again, when the loading line says it could not be read. */ onRetry: (() => void) | undefined; } /** Renders the footer — see the module docs. */ export declare const RecordFooter: import("react").MemoExoticComponent<({ styles, count, saved, stale, recordSlice, legend, live, loading, noun, onRetry }: RecordFooterProps) => import("react/jsx-runtime").JSX.Element>; //# sourceMappingURL=footer.d.ts.map