/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. * * The events whose rows break their kind's bounds (#1585): each element of one * wears the warn ring, stored or changed, as an event holding a conflict does, * and a stored one's breach is a warning beside the history's issues, holding * no Save — a changed one's is the refusal its session's readiness raises, * which holds Save. A warning names its event by its title, as the banners * read it, then the field by its label and the bound in its hint's own words, * as a refusal does. A kind whose form holds no number to a least or a most is * read for nothing. * Every event's row of a kind is read at once (`planRows`), drafts in place, * from the rows the canvas reads over its range — the reads its blocks make, so * no request of their own, and no event read by its key; a kind read by its * cells is read from the rows they hold, an event a draft changed read with * its draft in place. A kind past the cap draws none of its events, and nor * does a kind the viewer hides: neither is read. * * The read runs in a component of its own, {@link PlanBoundsReader}, which * hands the canvas the events only as they move: what it reads lands in as * many settles as the searches it touches, and each would otherwise render * the whole canvas (#1343). * * @packageDocumentation */ import { type ValueTypeOf } from "@elaraai/east"; import { type PlanPayloadType } from "@elaraai/e3-ui/internal"; import { type EditIssue } from "@elaraai/east-ui-components"; import { type ScheduleCellsRead } from "../../shared/schedule/cells.js"; import type { PlanEventEditing } from "../edit/events.js"; import type { PlanEventRange } from "./events.js"; /** One event kind, as the Plan's payload carries it. */ type PlanEventKindValue = ValueTypeOf["events"][number]; /** A stored event's breach: a warning beside the history's issues, which holds no Save. */ export interface PlanBoundsWarning { /** The event's kind's slot. */ readonly kind: string; /** The breach, as an issue of the event naming its field: what its Go to asks the event's form for. */ readonly issue: EditIssue; /** Its words: the event's title, then the field's label and the bound. */ readonly text: string; } /** The events whose rows break their kind's bounds: those that wear the warn ring, and the stored ones' breaches. */ export interface PlanBreaches { /** Every such event, stored or changed, by its elements' key. */ readonly bounded: ReadonlySet; /** The stored ones' breaches, in the kinds' order. */ readonly warnings: readonly PlanBoundsWarning[]; } /** No event whose row breaks its kind's bounds. */ export declare const NO_BREACHES: PlanBreaches; /** Props of {@link PlanBoundsReader}. */ export interface PlanBoundsReaderProps { /** The event kinds, as the payload carries them. */ kinds: readonly PlanEventKindValue[]; /** The kinds' editing: each kind's drafts, which every read puts in place, and its session's refusals. */ editing: PlanEventEditing; /** The range the canvas reads its event kinds' rows over. */ range: PlanEventRange; /** The kinds' cells and counts; `undefined` until the reader of the kinds' rows hands them on. */ cells: ScheduleCellsRead | undefined; /** The ids the viewer hides in the library's Series tab. */ hidden: readonly string[]; /** Where the events and the warnings go: called only when they move, each kept while it says the same. */ onBreaches: (breaches: PlanBreaches) => void; } /** * The events whose rows break their kind's bounds, and the stored ones' * breaches, read in a component of its own (see the module docs). Until the * kinds' cells are read, which kinds they hold is not known, and nothing is * read: a kind read by its cells is never read over the range. A read in * flight, or one that failed, hands nothing on. * * @param props - What is read, over what, and where it goes * @returns Nothing: it reads */ export declare function PlanBoundsReader({ kinds, editing, range, cells, hidden, onBreaches }: PlanBoundsReaderProps): null; export {}; //# sourceMappingURL=bounds.d.ts.map