You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
891 B
28 lines
891 B
declare global {
|
|
interface Window {
|
|
visualViewport?: {
|
|
height: number;
|
|
width: number;
|
|
};
|
|
}
|
|
}
|
|
declare type ScrollLogicalPosition = 'start' | 'center' | 'end' | 'nearest';
|
|
declare type ScrollMode = 'always' | 'if-needed';
|
|
declare type SkipOverflowHiddenElements = boolean;
|
|
interface Options {
|
|
block?: ScrollLogicalPosition;
|
|
inline?: ScrollLogicalPosition;
|
|
scrollMode?: ScrollMode;
|
|
boundary?: CustomScrollBoundary;
|
|
skipOverflowHiddenElements?: SkipOverflowHiddenElements;
|
|
}
|
|
declare type CustomScrollBoundaryCallback = (parent: Element) => boolean;
|
|
declare type CustomScrollBoundary = Element | CustomScrollBoundaryCallback | null;
|
|
interface CustomScrollAction {
|
|
el: Element;
|
|
top: number;
|
|
left: number;
|
|
}
|
|
declare const _default: (target: Element, options: Options) => CustomScrollAction[];
|
|
export default _default;
|