/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type SheetColumnMeta, type SheetRegisterIndex } from "./model.js"; import type { SheetGridHost } from "./parts.js"; import type { SheetCellValue } from "./values.js"; /** A step: the next state, the one before, or the first — a cycle's first member, a toggle's or a boolean's off. */ export type SheetStep = 1 | -1 | "first"; /** * Whether a column's cells step in place rather than open an editor. * * @param meta - The column * @returns Whether its cell is a cycle, a toggle or a boolean */ export declare function stepsInPlace(meta: SheetColumnMeta | undefined): boolean; /** * Whether a column's cells edit out of place: the host opens them where it * edits them, and no editor, typing, paste or clear reaches them in the grid. * A host that opens nothing — a Record with no inspector — edits a title in * its cell, as a text. * * @param meta - The column * @param host - The host's grid; `undefined` for the Sheet's own * @returns Whether its cell is a title the host opens */ export declare function editsOutOfPlace(meta: SheetColumnMeta | undefined, host: Pick | undefined): boolean; /** * A boolean's or a toggle's typed text as its state: a toggle's own words * first, then the words every checkbox reads. * * @param meta - The boolean or toggle column * @param text - What was typed * @returns The state, or `undefined` for text that names none */ export declare function booleanOf(meta: SheetColumnMeta, text: string): boolean | undefined; /** * A stepping cell's next state: a cycle's next member in the register's * order, round to the first — from no member, the first (the last going * back) — or its first; a toggle's or a boolean's other state, or its first: * off, or empty where a clear empties it. * * @param meta - The column * @param cell - The cell as it stands * @param registers - The registers * @param step - Which way, or the first * @returns The cell after the step; `undefined` for a column that does not step, or a step it does not take */ export declare function stepCell(meta: SheetColumnMeta | undefined, cell: SheetCellValue | undefined, registers: SheetRegisterIndex, step: SheetStep): SheetCellValue | undefined; /** * The cell a key sets on a stepping cell (K4): on a cycle, the member the * key names — by its key or an alias, else by its label, as every register * column is typed; nothing on a toggle or a boolean. * * @param meta - The column * @param key - The key pressed * @param registers - The registers * @returns The cell, or `undefined` where the key names no member */ export declare function keyedCell(meta: SheetColumnMeta | undefined, key: string, registers: SheetRegisterIndex): SheetCellValue | undefined; //# sourceMappingURL=steps.d.ts.map