import { AcGePoint2d, AcGePoint2dLike } from '@mlightcad/data-model'; import { AcEdBaseView } from '../../view'; import { AcEdFloatingInputOptions } from './AcEdFloatingInputTypes'; import { AcEdFloatingMessage } from './AcEdFloatingMessage'; /** * A UI component providing a small floating input box used inside CAD editing * workflows. It supports both single-input (distance, angle, etc.) and * double-input (coordinate entry) modes. * * The component is responsible for: * * - Creating, styling, and destroying its HTML structure * - Handling keyboard events (Enter, Escape) * - Managing live validation (via built-in or custom callback) * - Emitting commit/change/cancel events * - Ensuring no memory leaks via `dispose()` * * This abstraction allows higher-level objects such as AcEdInputManager to * remain clean and free from DOM-handling logic. */ export declare class AcEdFloatingInput extends AcEdFloatingMessage { /** Stores last confirmed WCS point */ lastPoint: AcGePoint2d | null; /** Inject styles only once */ private static inputStylesInjected; /** Input box container (single or double input) */ private inputs?; /** Provides a temporary CAD-style rubber-band preview. */ private rubberBand?; /** OSNAP marker manager to display and hide OSNAP marker */ private osnapMarkerManager?; /** Stores last confirmed osnap point */ private lastOsnapPoint?; /** Stores last dynamic WCS point used for preview updates */ private lastDynamicPoint?; /** Callbacks */ private onCommit?; private onChange?; private onCancel?; private onNone?; /** Validation and dynamic value providers */ private validateFn; private getDynamicValue; private drawPreview?; /** Cached click handler */ private boundOnClick; /** Whether to suppress UI display while keeping input active */ private suppressDisplay; /** Cached sysvar handler */ private boundOnInputSysVarChanged; /** * Constructs a new floating input widget with the given options. * * @param view - The view associated with the floating input * @param options Configuration object controlling behavior, callbacks, * validation, and display mode. */ constructor(view: AcEdBaseView, options: AcEdFloatingInputOptions); showAt(pos: AcGePoint2dLike): void; private injectInputCSS; dispose(): void; /** * Mouse move handler. * Updates dynamic input values, rubber-band preview, OSNAP marker, * and optional preview drawing. */ protected handleMouseMove(e: MouseEvent): void; /** * Re-render the current preview using the most recent cursor position. * Useful when modifier keys change without mouse movement. */ requestPreviewRefresh(): void; private handleClick; /** * Starts rubber-band preview from a base point after the prompt has already begun. * Used by two-point distance acquisition when the first point is picked by click. */ setBasePoint(basePoint: AcGePoint2dLike, options?: { color?: string; showBaseLineOnly?: boolean; baseAngle?: number; }): void; private updateDynamicPreview; /** * Gets the current cursor position in WCS, considering OSNAP. */ private getPosition; private updateDynamicInputDisplay; private setSuppressDisplay; private setPromptVisible; private osnapMode2MarkerType; /** * Returns the priority tier for a given OSNAP mode. * Lower number = higher priority. Matches AutoCAD behavior where * Endpoint/Midpoint/Center take precedence over Nearest. */ private osnapModePriority; private getOsnapPoint; private getOsnapPoints; private getOsnapPointsInAvailableModes; private getOsnapPointsByMode; } //# sourceMappingURL=AcEdFloatingInput.d.ts.map