/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** The view a read of a builder's rows is made for: its period, and the choices it was read under. */ export interface ReadView { /** * The period it is of, as text: what a step of the dates moves — a window's bounds, a week's start. The same text * for the same period; the empty text for a builder whose rows follow no period. */ readonly period: string; /** The choices it was read under, as text: each source's narrowing, printed. The same text for the same choices. */ readonly choices: string; } /** How what a board shows stands to what it is asked for now (see the module docs). */ export type ViewState = "cold" | "stepping" | "filtering" | "rereading" | "current"; /** * Whether two views are one: the same period under the same choices. * * @param a - A view * @param b - Another * @returns Whether they are the same view */ export declare function sameView(a: ReadView, b: ReadView): boolean; /** * How what a board shows stands to what it is asked for now (see the module docs). * * @param shown - The view the last complete read was made for; `undefined` before one has landed * @param asked - The view asked for now * @param reading - Whether a read of the view asked is on its way * @returns The state */ export declare function viewState(shown: ReadView | undefined, asked: ReadView, reading: boolean): ViewState; /** * Whether what a board holds is of the period asked: while it is not — nothing read, or a period stepped to — it draws * none of it. * * @param state - The view's state * @returns Whether the rows held are the period's */ export declare function viewOfPeriod(state: ViewState): boolean; /** * Whether a board takes a gesture: what it shows is the view asked, read again or not. * * @param state - The view's state * @returns Whether it is live */ export declare function viewLive(state: ViewState): boolean; /** * Whether what a board shows stands in for other choices' rows of the same period: retained — readable, focusable and * selectable, taking no gesture — until they land. * * @param state - The view's state * @returns Whether it is retained */ export declare function viewRetained(state: ViewState): boolean; /** * The last complete read of a builder's rows, and the view it was made for: what stands while a newer read is on its * way. A builder's reader lands each complete read here and asks how it stands to what is asked now; it keeps no rule * of its own. * * @typeParam T - What a read holds: the builder's rows, in its own shape */ export declare class StandingRead { private held; /** * A read that completed: it stands from now. * * @param rows - What it read * @param view - The view it was made for */ land(rows: T, view: ReadView): void; /** What the last complete read holds; `undefined` before one has landed. */ get rows(): T | undefined; /** The view the last complete read was made for; `undefined` before one has landed. */ get view(): ReadView | undefined; /** * How what stands is to what is asked for now. * * @param asked - The view asked for now * @param reading - Whether a read of it is on its way * @returns The state */ state(asked: ReadView, reading: boolean): ViewState; } //# sourceMappingURL=view-read.d.ts.map