UNPKG

tiny-essentials

Version:

Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.

40 lines 1.83 kB
/** * Checks if two DOM elements are colliding on the screen. * * @param {Element} elem1 - First DOM element. * @param {Element} elem2 - Second DOM element. * @returns {boolean} - Returns true if the elements are colliding. * @deprecated - Use TinyHtml.isCollWith instead. */ export function areHtmlElsColliding(elem1: Element, elem2: Element): boolean; /** * Checks if two DOM elements are colliding on the screen. * * @param {Element} elem1 - First DOM element. * @param {Element} elem2 - Second DOM element. * @returns {boolean} - Returns true if the elements are colliding. * @deprecated - Use TinyHtml.isCollPerfWith instead. */ export function areHtmlElsPerfColliding(elem1: Element, elem2: Element): boolean; /** * Checks if the given element is at least partially visible in the viewport. * * @param {HTMLElement} element - The DOM element to check. * @returns {boolean} True if the element is partially in the viewport, false otherwise. * @deprecated - Use TinyHtml.isInViewport instead. */ export function isInViewport(element: HTMLElement): boolean; /** * Checks if the given element is fully visible in the viewport (top and bottom). * * @param {HTMLElement} element - The DOM element to check. * @returns {boolean} True if the element is fully visible in the viewport, false otherwise. * @deprecated - Use TinyHtml.isScrolledIntoView instead. */ export function isScrolledIntoView(element: HTMLElement): boolean; export function getHtmlElBordersWidth(el: Element): HtmlElBoxSides; export function getHtmlElBorders(el: Element): HtmlElBoxSides; export function getHtmlElMargin(el: Element): HtmlElBoxSides; export function getHtmlElPadding(el: Element): HtmlElBoxSides; export type HtmlElBoxSides = import("../libs/TinyHtml.mjs").HtmlElBoxSides; //# sourceMappingURL=html_deprecated.d.mts.map