UNPKG

874 BTypeScriptView Raw
1import Affix from '.';
2export declare type BindElement = HTMLElement | Window | null | undefined;
3export declare type Rect = ClientRect | DOMRect;
4export declare function getTargetRect(target: BindElement): ClientRect;
5export declare function getFixedTop(placeholderReact: Rect, targetRect: Rect, offsetTop: number | undefined): number | undefined;
6export declare function getFixedBottom(placeholderReact: Rect, targetRect: Rect, offsetBottom: number | undefined): number | undefined;
7interface ObserverEntity {
8 target: HTMLElement | Window;
9 affixList: Affix[];
10 eventHandlers: {
11 [eventName: string]: any;
12 };
13}
14export declare function getObserverEntities(): ObserverEntity[];
15export declare function addObserveTarget(target: HTMLElement | Window | null, affix: Affix): void;
16export declare function removeObserveTarget(affix: Affix): void;
17export {};