import type { Nullable } from '../Types/Nullable'; /** * @private */ type ElementTagNameMap = HTMLElementTagNameMap | SVGElementTagNameMap; /** * Represents the `IStaticIs` interface. * * @public */ export interface IIsElement { new (): T; get is(): string; } export declare function isElement(self: unknown): self is IIsElement; /** * The `Dom` class. * * * @public */ export declare class Dom { /** * Constructs a new instance of the `Dom` class. * * @public */ constructor(); /** * Finds the shadow DOM host element of a slotted element. * * @public * @param element The slotted element for which to find the shadow DOM host. * @param options Optional parameters to control strictness. * @returns The shadow DOM host element or null if not found. */ findShadowDomHost(element: HTMLElement, options?: { strict: true; }): T; findShadowDomHost(element: HTMLElement, options?: { strict: true; }): Nullable; /** * Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise. * * @public * @param element The element to start searching from. * @param selector The selector to match against the ancestor elements. * @param options Optional parameters to control strictness. * @returns The first matching ancestor element or null if not found. */ findAncestor(element: Element, selector: string | keyof ElementTagNameMap | IIsElement, options: { strict: true; }): T; findAncestor(element: Element, selector: string | keyof ElementTagNameMap | IIsElement, options?: { strict: false; }): Nullable; /** * Returns the first element that is a descendant of node that matches selectors. * * @public * @param element The parent node to search within. * @param selector The selector to match against the descendant elements. * @param options Optional parameters to control strictness. * @returns The first matching descendant element or null if not found. */ findDescendant(element: ParentNode, selector: T, options?: { strict: false; }): Nullable; findDescendant(element: ParentNode, selector: T, options?: { strict: true; }): HTMLElementTagNameMap[T]; findDescendant(element: ParentNode, selector: IIsElement | T | string, options?: { strict: false; }): Nullable; findDescendant(element: ParentNode, selector: IIsElement | T | string, options?: { strict: true; }): T; /** * Returns all element descendants of node that match selectors. * * @public * @param element The parent node to search within. * @param selector The selector to match against the descendant elements. * @param options Optional parameters to control strictness. * @returns An array of matching descendant elements or an empty array if none found. */ findDescendants(element: ParentNode, selector: T, options?: { strict: false; }): Nullable>; findDescendants(element: ParentNode, selector: T, options?: { strict: true; }): Array; findDescendants(element: ParentNode, selector: IIsElement | T | string, options?: { strict: false; }): Nullable>; findDescendants(element: ParentNode, selector: IIsElement | T | string, options?: { strict: true; }): Array; /** * @private */ private normalizeSelector; } /** * @public */ export declare class DomServiceLocator { private static _current; static get current(): Dom; static isSet(): boolean; static set(current: Dom): void; } export {}; //# sourceMappingURL=Dom.d.ts.map