import type { Ctx, Draft, View } from "./context"; /** Page controls Enter or Space would activate. */ export declare const ACTIVATES = "a,button,summary,[role=button],[role=link],[role=switch],[role=tab],[role=checkbox],input[type=checkbox],input[type=radio],input[type=submit],input[type=button],input[type=reset]"; /** The keyboard's hint: shown as a toast, and read with the block cursor's first landing. */ export declare const KEYS_HINT = "Tab moves between blocks \u00B7 \u2191 \u2193 change level \u00B7 Enter comments \u00B7 Hold Space to use the page \u00B7 Esc to finish \u00B7 F7 selects text"; /** Comment mode's view. */ export interface CommentMode extends View { /** Escape's step: clears a chosen block; false when there was none (comment mode ends next). */ back(): boolean; /** The keyboard's block cursor is in use (started, and not put away by a click, a selection or the mouse). */ cursor(): boolean; /** The block cursor was put away by the mouse or a selection: the shortcut brings it back. */ away(): boolean; /** Starts the block cursor, or brings it back: on its last block if still here, else where focus is, else the first block in view. */ resume(): boolean; /** Focuses the block cursor on its block again, as a move, so its name is read afresh. */ refocus(): void; /** Back to the open draft's block: it is outlined and named again, and the cursor (when out) is on it. */ toDraft(): void; /** A draft brought back (Undo) belongs to its block again. */ adopt(d: Draft): void; } /** * Comment mode: the page goes quiet, an outline glides to the obvious block under the pointer, and a click * chooses it. Listeners are on window in the capture phase and stop propagation there, so the page's own * handlers never run while Pipeup's other window listeners (selection, the menu) still do, whatever their order. * * Known limits: the page's CSS `:hover` still applies; page listeners on window in the capture phase that were * added before comment mode started still hear events. */ export declare function createCommentMode(ctx: Ctx): CommentMode;