/** * Minimal, partial DOM implementation for use in the Node extension host. * * Observable Notebook Kit's `serialize`/`deserialize` helpers * (see `refs/notebook-kit/src/lib/serialize.ts`) require a small subset of the * DOM API. Rather than depend on the heavyweight `jsdom` package (which cannot * be safely bundled and drags in large runtime assets), we provide just enough * of the DOM to satisfy those two functions. * * Surface required by `serialize`: * - `document.createElement(tag)` and `document.createTextNode(text)` * - element `setAttribute`, `appendChild`, `textContent`, `id`, `type`, `outerHTML` * * Surface required by `deserialize`: * - `new DOMParser().parseFromString(data, "text/html")` * - document `querySelector`/`querySelectorAll` * - element `getAttribute`, `hasAttribute`, `id`, `textContent` */ /** * Returns the document object to pass into Observable Notebook Kit's * `serialize` helper. If a native DOM is available, it is used directly; * otherwise the local shim is used. */ export declare function getSerializeDocument(): Document; /** * Creates the parser object to pass into Observable Notebook Kit's * `deserialize` helper. If a native DOMParser is available, it is used; * otherwise the local shim parser is returned. */ export declare function createDeserializeParser(): DOMParser;