Files
NapCatQQ/.pnpm-store/v3/files/6a/7a390bd3d7423bba052e8c090eaee6cc349a5076af0b66e1bba46de13a023369531b2d0715a76a664ad89aef54744d267ad15c78a7d5638662ff69ac856116
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

51 lines
2.0 KiB
Plaintext

type ScrollOverflowVisibility = "auto" | "top" | "bottom" | "left" | "right" | "both" | "none";
type ScrollOverflowEdgeCheck = "all" | "top" | "bottom" | "left" | "right";
type ScrollOverflowOrientation = "horizontal" | "vertical";
type ScrollOverflowCheck = ScrollOverflowOrientation | "both";
interface UseDataScrollOverflowProps {
/**
* The reference to the DOM element on which we're checking overflow.
*/
domRef?: React.RefObject<HTMLElement>;
/**
* Determines the direction of overflow to check.
* - "horizontal" will check for overflow on the x-axis.
* - "vertical" will check for overflow on the y-axis.
* - "both" (default) will check for overflow on both axes.
*
* @default "both"
*/
overflowCheck?: ScrollOverflowCheck;
/**
* Controlled visible state. Passing "auto" will make the shadow visible only when the scroll reaches the edge.
* use "left" / "right" for horizontal scroll and "top" / "bottom" for vertical scroll.
* @default "auto"
*/
visibility?: ScrollOverflowVisibility;
/**
* Enables or disables the overflow checking mechanism.
* @default true
*/
isEnabled?: boolean;
/**
* Defines a buffer or margin within which we won't treat the scroll as reaching the edge.
*
* @default 0 - meaning the check will behave exactly at the edge.
*/
offset?: number;
/**
* List of dependencies to update the overflow check.
*/
updateDeps?: any[];
/**
* Callback to be called when the overflow state changes.
*
* @param visibility ScrollOverflowVisibility
*/
onVisibilityChange?: (overflow: ScrollOverflowVisibility) => void;
}
declare function useDataScrollOverflow(props?: UseDataScrollOverflowProps): void;
type UseDataScrollOverflowReturn = ReturnType<typeof useDataScrollOverflow>;
export { ScrollOverflowCheck, ScrollOverflowEdgeCheck, ScrollOverflowOrientation, ScrollOverflowVisibility, UseDataScrollOverflowProps, UseDataScrollOverflowReturn, useDataScrollOverflow };