/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * Member checks (B§2 `check` — `Sheet Spec.md` §3.4): `exists` is the * grammar's own — an identified, counted or range member must name a * register key; a placeholder or text passes — and the rest are the * author's, bridged wire functions over the check context returning * `some(message)` to flag a member. Flags are shown, never enforced; a check * that throws flags nothing and logs (fail-open). */ import type { LinkVocabulary } from "./grammar.js"; import type { SheetColumnMeta } from "../model.js"; import type { SheetMessages } from "../messages.js"; import type { SheetCheckContextValue, SheetCheckValue, SheetLinkValue, SheetMemberValue } from "../values.js"; /** One check of a link column — the decoded wire check: `exists`, or the author's bridged rule. */ export type CheckDecl = SheetCheckValue; /** Read a link column's checks off the decoded kind. */ export declare function checksOf(meta: SheetColumnMeta): readonly CheckDecl[]; /** The flags on the members of a link — per half, per member index. */ export interface LinkFlags { from: string[][]; to: string[][]; } /** No flags. */ export declare const NO_FLAGS: LinkFlags; /** Whether any member is flagged. */ export declare function hasFlags(flags: LinkFlags): boolean; /** * The `exists` check on one member, flagged in the sheet's words (#861). * * @param m - The member * @param vocab - The column's vocabulary * @param messages - The sheet's message table * @returns The flag, or `undefined` when the member passes */ export declare function existsFlag(m: SheetMemberValue, vocab: LinkVocabulary, messages: SheetMessages): string | undefined; /** * Run a column's checks over a link. * * @param link - The link value * @param checks - The column's checks * @param vocab - The column's vocabulary (for `exists`) * @param contextFor - The wire check context for a member (`half`, `member` filled by the caller) * @param messages - The sheet's message table (the `exists` flag's words) * @returns The flags, per half and member */ export declare function checkLink(link: SheetLinkValue, checks: readonly CheckDecl[], vocab: LinkVocabulary, contextFor: (half: "from" | "to", member: SheetMemberValue) => SheetCheckContextValue, messages: SheetMessages): LinkFlags; //# sourceMappingURL=checks.d.ts.map