import { type PluginView } from "@tiptap/pm/state"; import type { EditorView } from "@tiptap/pm/view"; /** * This plugin centralizes the logic for showing and hiding the row and column * handle buttons (the ones that on click open a floating menu). * * Ideally, hiding and showing the handles would be handled using only CSS, * but identifying the topmost cell in a column is not trivial, as the grouping * of cells in a column is not clearly defined in the DOM (only by colgroup), * and CSS cannot dynamically select it depending on the hovered cell. * * Another option was to dynamically generate hardcoded selectors, given that * we know the number of rows and cells, but inline styles can only contain * property declarations, not pseudo-classes like :hover. * * That leaves us with handling it solely in JavaScript, which is what this * plugin does. */ export declare class TableHandlesPluginView implements PluginView { private readonly view; private abortController; private currentRowHandle; private currentColumnHandle; constructor(view: EditorView); update(view: EditorView): void; destroy(): void; private attachEventListeners; private showCurrentHandles; private hidePreviousHandles; private getRowHandle; private getColumnHandle; private displayHandle; private hideHandle; }