/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * Which of a form's fields hold a number to bounds (#1585): what every builder * checks its rows against — through the form's own check and words, * `fieldBreaches` — and where a form holds none, it checks nothing. A * builder's readiness raises each breach of a changed row as an issue * (`breachIssue`), which a builder wording its own issues knows for one * (`breachOf`). A builder reads each row it draws through `rowBreaches`: * the row wears the warn ring, stored or changed, and a stored row's breach * is a warning that holds no Save. * * @packageDocumentation */ import { type EastType } from "@elaraai/east"; import type { FieldSpecValue } from "@elaraai/east-ui/internal"; import { type EditIssue, type FieldBreach } from "@elaraai/east-ui-components"; /** * Whether a field holds a number to a least or a most. * * @param spec - The field, as `Fields.specs` resolved it * @returns Whether its editor is a number's with a least or a most */ export declare function isBounded(spec: FieldSpecValue): boolean; /** * A changed row's breach as an issue of a builder's readiness, as * `fieldBreachIssue` raises it, kept for {@link breachOf}. * * @param breach - The bound broken * @param entry - The row's entry * @returns The issue */ export declare function breachIssue(breach: FieldBreach, entry: string): EditIssue; /** * The breach an issue of a builder's readiness says: what a builder wording * its own issues names the field and the bound by. * * @param issue - The issue * @returns The breach; `undefined` for any other issue */ export declare function breachOf(issue: EditIssue): FieldBreach | undefined; /** * A form's check over its rows as bytes: each row decoded once and checked against the form's bounded fields — those its * builder holds the row to, where it says, as its Save does — kept while its bytes are the same object. A form holding no * bounded field decodes nothing. * * @param specs - The row's form, as `Fields.specs` resolved it * @param rowType - The row's type * @param heldTo - The bounded fields a row is held to, from the row: every one unless given * @returns Each row's breaches, by its bytes */ export declare function rowBreaches(specs: readonly FieldSpecValue[], rowType: EastType, heldTo?: (row: unknown) => readonly FieldSpecValue[]): (bytes: Uint8Array) => readonly FieldBreach[]; //# sourceMappingURL=bounds.d.ts.map