export interface UseIMECompositionOptions { /** * Called synchronously when composition starts. */ onCompositionStart?: () => void; /** * Called synchronously when composition ends (i.e. the user commits a composed character). * At the point this fires, isComposing() still returns true — which blocks the spurious * Enter keydown that some browsers fire immediately after compositionend. The flag is * cleared after the next animation frame. */ onCompositionEnd?: () => void; } /** * Custom hook to handle IME composition state for preventing IME race conditions when pressing enter to end composition. * * IME generates duplicate Enter events: * 1. First Enter: Ends composition (isComposing=true -> false) * 2. Second Enter: Triggers normal action (isComposing=false) * * This hook tracks composition lifecycle to prevent the second Enter during the brief window. * * The optional `onCompositionEnd` callback fires synchronously when composition commits, * allowing callers to process the final composed text (e.g. trigger detection in token mode). */ export declare function useIMEComposition(elementRef: React.RefObject, { onCompositionStart, onCompositionEnd }?: UseIMECompositionOptions): { isComposing: () => boolean; };