import * as React from "react"; import { type VariableEditorBaseProps } from "./shared"; /** * Determines if a click landed in the empty space of a VariableInput and returns * the correct target position to place the caret, or null if no correction is needed. * * This handles two cases where the browser's native click handler misplaces the caret * inside a flex-layout ProseMirror editor with non-editable variable chip nodes: * * Case 1 (depth === 0): posAtCoords returned {inside: -1}, meaning the click didn't * land inside any node. The resolved position is at the doc level. * * Case 2 (depth > 0, clickX past content): posAtCoords returned a paragraph-level * position, but the click coordinates are past the visible content's right edge. * Common when content ends with a variable chip. */ export declare function resolveEmptySpaceClick(posDepth: number, pos: number, paragraphContentSize: number, clickX: number, endCoordsRight: number | null): { targetPos: number; bias: -1 | 1; } | null; export interface VariableInputProps extends VariableEditorBaseProps { /** Whether the input is read-only */ readOnly?: boolean; /** Whether to show the variable toolbar */ showToolbar?: boolean; } /** * A single-line input that renders {{variable}} patterns as styled chips. * Uses a minimal TipTap editor under the hood for rich content rendering. */ export declare const VariableInput: React.ForwardRefExoticComponent>;