import { Editor } from '@tiptap/core'; /** * Cursor-relative word range in the current textblock, or null when the * cursor is not adjacent to a word character (whitespace runs, empty * blocks). Position math is relative ($from.start() + parentOffset), so it * is schema-agnostic (works under dBlock wrappers). */ export declare const findWordRangeAtCursor: (editor: Editor) => { from: number; to: number; } | null; /** * Ensure a text target for anchored actions (inline comments): keep any * existing non-empty TextSelection; otherwise select the word under the * collapsed cursor. Shares findWordRangeAtCursor with enablement so * "enabled" always implies "dispatch does something". * * Only a TextSelection passes through untouched — a non-empty NodeSelection * (e.g. an image or horizontal rule selected as a node) looks "non-empty" * but has no text content, so `textBetween` over it is '' and anything * downstream that needs real text (e.g. createFloatingDraft) would silently * no-op. Falling through to findWordRangeAtCursor for any other selection * type gives either a legitimate adjacent word or null (schema-dependent — * e.g. false for a NodeSelection whose dBlock wrapper has no text). */ export declare const selectWordAtCursor: (editor: Editor) => boolean; /** * Single enablement predicate for anchored text actions (inline comments): * true when there's already a non-empty TextSelection, or a word is * reachable from a collapsed cursor via findWordRangeAtCursor. Mirrors the * passthrough condition in selectWordAtCursor so "enabled" always implies * selectWordAtCursor will produce a real text target. */ export declare const hasTextTargetAtSelection: (editor: Editor) => boolean;