@fluido/react-components
Version:
Fluido webapp components
27 lines (26 loc) • 1.11 kB
TypeScript
/** Pegar o nó e transformar em Array */
interface ParseHtmlCollectionToArrayType {
(el: HTMLCollection): Element[];
}
/** Pegar as distancias dos filhos do nó */
interface GetChildrenRangeType {
(node: HTMLElement): [number, number][];
}
/** Pegar índice dos filhos mais próximos a posição */
interface GetNearestChildIndexType {
(node: HTMLElement, align?: 'none' | 'start' | 'center'): number;
}
/** Pegar as quais dos filhos do estão visiveis */
interface GetChildrenVisibleType {
(node: HTMLElement, partial?: boolean): boolean[];
}
/** Anima o scroll para posição ou elemento */
interface AnimatedScrollToType {
(node: HTMLElement, val: HTMLElement | number, align?: 'none' | 'start' | 'center'): void;
}
export declare const parseHtmlCollectionToArray: ParseHtmlCollectionToArrayType;
export declare const getChildrenRange: GetChildrenRangeType;
export declare const getChildrenVisible: GetChildrenVisibleType;
export declare const getNearestChildIndex: GetNearestChildIndexType;
export declare const animatedScrollTo: AnimatedScrollToType;
export {};