/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { SheetColumnMeta } from "../model.js"; import type { SheetMemberValue } from "../values.js"; /** The driver's sides value. */ export type SidesValue = "both" | "from" | "to" | "in"; /** One half's state. */ export interface HalfState { /** The half takes members: predicted into, Tab reaches it. */ live: boolean; /** The lock tag's text when the half is locked (`""` = locked without a tag, or live). */ lock: string; } /** Both halves of a link cell. */ export interface LinkHalves { from: HalfState; to: HalfState; /** `in` — the divider draws as a minus. */ isIn: boolean; sides: SidesValue; } /** The decoded sides declaration of a link column, flattened. */ export interface SidesDecl { byDriver: ReadonlyMap; locks: readonly { half: "from" | "to"; when: SidesValue; label: string; }[]; } /** Read a link column's sides declaration off the decoded kind (`undefined` when it declares none). */ export declare function sidesDeclOf(meta: SheetColumnMeta): SidesDecl | undefined; /** The halves a row's driver value makes live, and the tags its locks show. */ export declare function halvesFor(decl: SidesDecl | undefined, driverKey: string | undefined): LinkHalves; /** The half the caret opens in: the first live half still empty, else the destination. */ export declare function startSide(halves: LinkHalves, groups: readonly [readonly SheetMemberValue[], readonly SheetMemberValue[]]): 0 | 1; /** Whether a half with content sits under a lock — the warn treatment. */ export declare function halfWarns(half: HalfState, members: readonly SheetMemberValue[]): boolean; //# sourceMappingURL=sides.d.ts.map