/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { LinkHalves } from "./link/sides.js"; import type { CommitDir, EditBuffer, LinkEditCtx, LinkGroups, SheetEvent, SheetMachineCtx, SheetUiState, Transition } from "./sheet-types.js"; /** The core's commit, injected. */ export type CommitFn = (s: SheetUiState, dir: CommitDir, ctx: SheetMachineCtx) => Transition; /** The half the caret opens in: the first live half still empty, else the destination. */ export declare function linkStartSide(halves: LinkHalves, groups: LinkGroups): 0 | 1; /** The halves with the buffer resolved into the active one. */ export declare function withBuffer(edit: EditBuffer, linkCtx: LinkEditCtx): LinkGroups; /** Hop the caret to a half — the buffer resolves into the half it leaves. */ export declare function switchSide(s: SheetUiState, side: 0 | 1, ctx: SheetMachineCtx): Transition; /** The link editor's typing: `,` resolves the buffer, an arrow hops From → To (dropped in To). */ export declare function linkChange(s: SheetUiState, val: string, ctx: SheetMachineCtx): Transition; /** The link editor's keys (B§4.4). */ export declare function linkKey(s: SheetUiState, e: Extract, ctx: SheetMachineCtx, commit: CommitFn): Transition; //# sourceMappingURL=sheet-link-state.d.ts.map