/*!--------------------------------------------------------------------------------------------- * Copyright (c) StackBlitz. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as React from "react"; import { type ReactNode } from "react"; import { type GetTargetScrollTop, type ScrollToBottom, type StickToBottomInstance, type StickToBottomOptions, type StickToBottomState, type StopScroll } from "./useStickToBottom.js"; export interface StickToBottomContext { contentRef: React.MutableRefObject & React.RefCallback; scrollRef: React.MutableRefObject & React.RefCallback; scrollToBottom: ScrollToBottom; stopScroll: StopScroll; isAtBottom: boolean; escapedFromLock: boolean; get targetScrollTop(): GetTargetScrollTop | null; set targetScrollTop(targetScrollTop: GetTargetScrollTop | null); state: StickToBottomState; } export interface StickToBottomProps extends Omit, "children">, StickToBottomOptions { contextRef?: React.Ref; instance?: StickToBottomInstance; children: ((context: StickToBottomContext) => ReactNode) | ReactNode; } export declare function StickToBottom({ instance, children, resize, initial, mass, damping, stiffness, targetScrollTop: currentTargetScrollTop, contextRef, ...props }: StickToBottomProps): ReactNode; export declare namespace StickToBottom { interface ContentProps extends Omit, "children"> { children: ((context: StickToBottomContext) => ReactNode) | ReactNode; scrollClassName?: string; } function Content({ children, scrollClassName, ...props }: ContentProps): ReactNode; } /** * Use this hook inside a component to gain access to whether the component is at the bottom of the scrollable area. */ export declare function useStickToBottomContext(): StickToBottomContext;