import { DOMElement, TextNode, LayoutTree } from '@wolf-tui/core'; /** Proxy target shape for the style property — satisfies Svelte's style access patterns */ interface StyleProxy { cssText: string; [key: string]: string; } interface NodeOpsConfig { getLayoutTree: () => LayoutTree; getScheduleRender: () => (() => void) | null; } export declare function setNodeOpsConfig(cfg: NodeOpsConfig): void; /** * Base class for all wolfie DOM wrapper nodes. Assigned to globalThis.Node so * Svelte's init_operations() finds our prototype getters via * Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild'). * * All traversal getters, ChildNode methods (remove, before, after, replaceWith), * and ParentNode methods (appendChild, insertBefore, removeChild, append) live * here. WolfieElement overrides the core-DOM delegation hooks. */ export declare abstract class WolfieNode { static readonly ELEMENT_NODE = 1; static readonly TEXT_NODE = 3; static readonly COMMENT_NODE = 8; static readonly DOCUMENT_FRAGMENT_NODE = 11; _wchildren: WolfieNode[]; _wparent: WolfieNode | null; _wdead: boolean; abstract readonly nodeType: number; abstract readonly nodeName: string; __click: unknown; __className: unknown; __attributes: unknown; __style: unknown; __e: unknown; get firstChild(): WolfieNode | null; get lastChild(): WolfieNode | null; get nextSibling(): WolfieNode | null; get previousSibling(): WolfieNode | null; get parentNode(): WolfieNode | null; get parentElement(): WolfieNode | null; get childNodes(): WolfieNode[]; get isConnected(): boolean; get ownerDocument(): unknown; appendChild(child: WolfieNode): WolfieNode; insertBefore(newChild: WolfieNode, refChild: WolfieNode | null): WolfieNode; removeChild(child: WolfieNode): WolfieNode; replaceChild(newChild: WolfieNode, oldChild: WolfieNode): WolfieNode; /** ParentNode.append — Svelte calls element.append(child) heavily */ append(...nodes: Array): void; /** ParentNode.prepend */ prepend(...nodes: Array): void; /** ChildNode.before — Svelte calls anchor.before(node) for insertion */ before(...nodes: Array): void; /** ChildNode.after — Svelte calls node.after(text) */ after(...nodes: Array): void; /** ChildNode.remove — THE key fix for Svelte's remove_effect_dom() */ remove(): void; /** ChildNode.replaceWith */ replaceWith(...nodes: Array): void; contains(node: WolfieNode | null): boolean; cloneNode(deep?: boolean): WolfieNode; get textContent(): string; set textContent(value: string); protected _coreDomAppend(_child: WolfieNode): void; protected _coreDomInsertBefore(_newChild: WolfieNode, _refChild: WolfieNode): void; protected _coreDomRemove(_child: WolfieNode): void; protected abstract _cloneImpl(deep: boolean): WolfieNode; } /** * Wraps a core DOMElement. Each WolfieElement owns one DOMElement from @wolf-tui/core. * All attribute/style/child operations delegate to the core DOM API. * Assigned to globalThis.Element and globalThis.HTMLElement. */ export declare class WolfieElement extends WolfieNode { readonly nodeType = 1; readonly nodeName: string; readonly domElement: DOMElement; private _listeners; constructor(tagName: string, domEl?: DOMElement); setAttribute(key: string, value: string): void; getAttribute(key: string): string | null; removeAttribute(key: string): void; setAttributeNS(_ns: string | null, key: string, value: string): void; hasAttribute(key: string): boolean; get className(): string; set className(value: string); get classList(): { add: (...tokens: string[]) => void; remove: (...tokens: string[]) => void; toggle: (token: string, force?: boolean) => boolean; contains: (token: string) => boolean; }; get style(): StyleProxy; addEventListener(type: string, listener: EventListenerOrEventListenerObject): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject): void; dispatchEvent(event: Event): boolean; getBoundingClientRect(): { x: number; y: number; width: number; height: number; top: number; right: number; bottom: number; left: number; }; get innerHTML(): string; set innerHTML(_value: string); /** Template compat — `content` returns self so `template.content.cloneNode()` works */ get content(): WolfieElement; get internal_transform(): import('@wolf-tui/core').OutputTransformer | undefined; set internal_transform(value: import('@wolf-tui/core').OutputTransformer | undefined); get internal_static(): boolean | undefined; set internal_static(value: boolean | undefined); get internal_accessibility(): { role?: "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar"; state?: { busy?: boolean; checked?: boolean; disabled?: boolean; expanded?: boolean; multiline?: boolean; multiselectable?: boolean; readonly?: boolean; required?: boolean; selected?: boolean; }; } | undefined; set internal_accessibility(value: { role?: "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar"; state?: { busy?: boolean; checked?: boolean; disabled?: boolean; expanded?: boolean; multiline?: boolean; multiselectable?: boolean; readonly?: boolean; required?: boolean; selected?: boolean; }; } | undefined); protected _coreDomAppend(child: WolfieNode): void; protected _coreDomInsertBefore(newChild: WolfieNode, refChild: WolfieNode): void; protected _coreDomRemove(child: WolfieNode): void; protected _cloneImpl(deep: boolean): WolfieElement; } /** * Wraps a core TextNode. Delegates text value changes to setTextNodeValue(). * Assigned to globalThis.Text. */ export declare class WolfieText extends WolfieNode { readonly nodeType = 3; readonly nodeName = "#text"; readonly textNode: TextNode; __t: unknown; constructor(text?: string); get data(): string; set data(value: string); get nodeValue(): string; set nodeValue(value: string); get textContent(): string; set textContent(value: string); get wholeText(): string; protected _cloneImpl(_deep: boolean): WolfieText; } /** * Dummy node for Svelte's anchor comments ({#if}, {#each}, etc.). * No core DOM node — purely tracked in the wrapper tree for sibling navigation. * Assigned to globalThis.Comment. */ export declare class WolfieComment extends WolfieNode { readonly nodeType = 8; readonly nodeName = "#comment"; data: string; constructor(text?: string); get nodeValue(): string; set nodeValue(value: string); get textContent(): string; set textContent(value: string); protected _cloneImpl(_deep: boolean): WolfieComment; } /** * Fragment node. When appended to a parent, its children move to the parent * (standard DOM fragment semantics). Used by Svelte for {#if}/{#each} blocks. * Assigned to globalThis.DocumentFragment. */ export declare class WolfieDocumentFragment extends WolfieNode { readonly nodeType = 11; readonly nodeName = "#document-fragment"; protected _cloneImpl(deep: boolean): WolfieDocumentFragment; } export {}; //# sourceMappingURL=wolfie-element.d.ts.map