/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * The agenda keeps the keyboard as a card's own action takes its card away * (#1398). A narrow Calendar's cards carry their explicit actions outside * Details — Delete, Return to backlog, Move — and one that takes its card from * where it was drawn would leave the focus, on a control that went with the * card, on the page's body, where the next Tab starts again at the page's top. * The agenda keeps it, as Details keep theirs (`../shared/focus-home.ts`): once * the agenda is drawn again, the focus lands on the head of the card drawn in * its place — the same event's, a Move to another of the agenda's days — else * of the card that came after it, else of the one before it, else on the * Calendar's main. A focus that left the agenda — for another element, for the * page with the control it was on still there, or a press anywhere outside it — * is let be; one in a popover a card's control opened — Move's, Resize's — is * the agenda's still, so a Move that takes its card to another day lands on it * there. * * @packageDocumentation */ import { type FocusEvent, type RefObject } from "react"; /** What the agenda's element spreads: its ref, and its focus and blur listeners. */ export interface AgendaLanding { /** The agenda's element. */ readonly ref: RefObject; /** Hears the focus enter the agenda, or move within it. */ readonly onFocus: (event: FocusEvent) => void; /** Hears the focus leave an element of the agenda. */ readonly onBlur: (event: FocusEvent) => void; } /** * Keeps the keyboard in the agenda (see the module docs). * * @returns What the agenda's element spreads */ export declare function useAgendaLanding(): AgendaLanding; //# sourceMappingURL=agenda-focus.d.ts.map