import { PrismEditor } from '../../types'; /** Postion of the cursor relative to the editor's overlays. */ export type CursorPosition = { top: number; bottom: number; left: number; right: number; height: number; }; export interface Cursor { /** Gets the cursor position relative to the editor's overlays. */ getPosition(): CursorPosition; /** Scrolls the cursor into view. */ scrollIntoView(): void; } /** * Hook making it easier to calculate the position of the cursor and scroll it into view. * This is used by {@link useDefaultCommands} to keep the cursor in view while typing. * * The extension can be accessed from `editor.extensions.cursor` after layout effects * have been run. */ export declare const useCursorPosition: (editor: PrismEditor) => void;