import { CSSProperties } from "react"; //#region src/hooks/useAvoidKeyboard/useAvoidKeyboard.d.ts type UseAvoidKeyboardOptions = { /** * Base bottom offset in pixels when keyboard is hidden. * @default 0 */ safeAreaBottom?: number; /** * Transition duration in milliseconds for smooth animation. * @default 200 */ transitionDuration?: number; /** * Transition timing function for the animation. * @default 'ease-out' */ transitionTimingFunction?: CSSProperties['transitionTimingFunction']; /** * If true, the hook will get the initial keyboard height on mount. * @default true */ immediate?: boolean; }; type UseAvoidKeyboardResult = { /** * CSS style object to apply to the fixed bottom element. * Contains transform and transition properties. */ style: CSSProperties; }; /** * @description * `useAvoidKeyboard` is a React hook that helps fixed-bottom elements avoid the on-screen keyboard. * It returns a CSS style that can be applied to `position: fixed` elements * to smoothly move them above the keyboard when it appears. * * @param {UseAvoidKeyboardOptions} [options] - Configuration options. * @param {number} [options.safeAreaBottom=0] - Base bottom offset in pixels when the keyboard is hidden. Useful for accounting for the iPhone home indicator area. * @param {number} [options.transitionDuration=200] - Transition duration in milliseconds for smooth animation. * @param {CSSProperties['transitionTimingFunction']} [options.transitionTimingFunction='ease-out'] - Transition timing function for the animation. * @param {boolean} [options.immediate=true] - If true, gets the initial keyboard height on mount. * * @returns {UseAvoidKeyboardResult} An object containing the CSS style for keyboard avoidance. * - style `CSSProperties` - CSS style object to apply to the fixed bottom element. Contains `transform` and `transition` properties; * * @example * function FixedBottomCTA() { * const { style } = useAvoidKeyboard(); * * return ( *
* *
* ); * } * * @example * // With safe area bottom offset (e.g., for iPhone home indicator) * function FixedBottomCTA() { * const { style } = useAvoidKeyboard({ safeAreaBottom: 34 }); * * return ( *
* *
* ); * } */ declare function useAvoidKeyboard(options?: UseAvoidKeyboardOptions): UseAvoidKeyboardResult; //#endregion export { useAvoidKeyboard }; //# sourceMappingURL=useAvoidKeyboard.d.mts.map