import { HostBackend } from "./backend.js"; //#region src/dom.d.ts /** A minimal structural view of the DOM we use (so types don't require `lib.dom`). */ interface DomDocument { createElement(tag: string): DomElement; createTextNode(data: string): DomText; } interface DomNode { parentNode: DomNode | null; nextSibling: DomNode | null; nodeType: number; removeChild(child: DomNode): DomNode; insertBefore(node: DomNode, ref: DomNode | null): DomNode; } interface DomElement extends DomNode { setAttribute(name: string, value: string): void; removeAttribute(name: string): void; addEventListener(type: string, listener: (e: unknown) => void): void; removeEventListener(type: string, listener: (e: unknown) => void): void; style: Record & { cssText: string; }; } interface DomText extends DomNode { data: string; } /** Map a MindeesNative tag to its DOM tag. Unknown tags pass through. */ declare function domTagFor(type: string): string; /** * Create a {@link HostBackend} that renders to real DOM nodes. * * @param doc - The document to create nodes with. Defaults to the global * `document`; pass a happy-dom/jsdom document for headless tests. */ declare function createDomBackend(doc?: DomDocument): HostBackend; //#endregion export { type DomDocument, type DomElement, type DomNode, type DomText, createDomBackend, domTagFor }; //# sourceMappingURL=dom.d.ts.map