/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { HistoryAction } from "@elaraai/east-ui-components"; import type { Origin } from "./transactions.js"; import { type InsertRequest, type InsertionAnchor } from "./insertion-gesture.js"; import type { SheetSeeds } from "./use-editing.js"; import type { SheetHost } from "./parts.js"; import type { SheetDecode } from "./use-decode.js"; import type { SheetSession } from "./use-session.js"; import type { SheetBody } from "./use-body.js"; import type { SheetMachine } from "./use-machine.js"; import type { SheetWrites } from "./use-writes.js"; import type { SheetEffects } from "./use-effects.js"; /** Where a gesture's new entry comes from when it is not the sheet's own: a dropped template's seeds, and its origin (#1187). */ export interface SheetInsertFrom { seeds: SheetSeeds; origin: Origin; } /** * Takes a history step, a discard or an insertion once any open editor has committed (see the module docs). * * @param host - What the frame hands the parts * @param sheetDecode - The decoded columns, layout, callbacks, narrowing and row source * @param sheetSession - The store, the lens, the paging, the session and the rows * @param sheetBody - The body, the row space and the cells at each place * @param sheetMachine - The machine's context and dispatch * @param sheetWrites - The cell writes, the removal and the proposals' inserts * @param sheetEffects - The effect runner and what its effects reach * @returns The history's runner, the discard and the insertion */ export declare function useSheetGestures(host: SheetHost, sheetDecode: SheetDecode, sheetSession: SheetSession, sheetBody: SheetBody, sheetMachine: SheetMachine, sheetWrites: SheetWrites, sheetEffects: SheetEffects): { actedRef: import("react").RefObject<(action: HistoryAction, redoOrigin: string | undefined) => void>; anchorFor: (r: number, side: "before" | "after") => InsertionAnchor; insertWhenClosed: (request: InsertRequest, from?: SheetInsertFrom, key?: string) => boolean; onHistoryAction: (action: HistoryAction) => void; onInsert: (kind: "row" | "group", r: number, side: "before" | "after") => void; onRowDiscard: (id: string, child?: string) => void; pendingInsertFocus: import("react").RefObject<{ id: string; child?: string; edit: boolean; key?: string | undefined; } | undefined>; }; /** What {@link useSheetGestures} gives the parts after it. */ export type SheetGestures = ReturnType; //# sourceMappingURL=use-gestures.d.ts.map