import { Config } from 'dompurify'; import { Maybe } from 'yummies/types'; /** * Вытаскивает RGB из любого цвета * * Не рекомендуется к использованию так как вызывает reflow */ declare const getComputedColor: (color?: string) => string | null; declare const downloadUsingAnchor: (urlOrBlob: string | Blob, fileName?: string) => void; /** * Surrounds string in an anchor tag */ declare function wrapTextToTagLink(link: string): string; declare const collectOffsetTop: (element: HTMLElement | null) => number; declare const skipEvent: (e: Event) => boolean; declare const globalScrollIntoViewForY: (node: HTMLElement) => void; declare const sanitizeHtml: (html: Maybe, config?: Config) => string; declare const checkElementHasParent: (element: HTMLElement | null, parent: Maybe) => boolean; /** * Executes a function within a view transition if supported by the browser. * * @param {VoidFunction} fn - The function to be executed. * @returns {ViewTransition} - The result of the executed function. * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition | MDN: Document.startViewTransition} */ declare const startViewTransitionSafety: (fn: VoidFunction, params?: { disabled?: boolean; }) => ViewTransition | undefined; /** * Вычисляет размер скроллбара */ declare const calcScrollbarWidth: (elementToAppend?: HTMLElement) => number; /** * Calculates the inner height of an HTML element, accounting for padding. */ declare function getElementInnerHeight(element: HTMLElement): number; /** * Calculates the inner width of an HTML element, accounting for padding. */ declare function getElementInnerWidth(el: HTMLElement): number; declare const isPrefersDarkTheme: () => boolean; declare const isPrefersLightTheme: () => boolean; export { calcScrollbarWidth, checkElementHasParent, collectOffsetTop, downloadUsingAnchor, getComputedColor, getElementInnerHeight, getElementInnerWidth, globalScrollIntoViewForY, isPrefersDarkTheme, isPrefersLightTheme, sanitizeHtml, skipEvent, startViewTransitionSafety, wrapTextToTagLink };