Files
oh-my-pi/packages/utils/src/dom.ts
T
can1357 e9888367d1 refactor: migrated packages to internal utility modules and removed external dependencies
- Implemented in-house, zero-dependency utility modules in `pi-utils` covering DOM manipulation, markdown parsing, templating, browser automation helpers, and terminal buffers.
- Migrated packages across the repository to consume the new internal utilities and `omptype` schema validators instead of external dependencies.
- Removed multiple external runtime and development dependencies including Zod, Marked, LRU cache, Turndown, and Puppeteer browser packages.
2026-08-05 13:39:09 +02:00

34 lines
652 B
TypeScript

/** Behavior-compatible reimplementation of linkedom's used surface. */
import { DOMWindow } from "./dom/core";
import { parseDocument } from "./dom/parser";
export {
Attr,
Comment,
CSSStyleDeclaration,
CustomEvent,
DOMTokenList,
DOMWindow,
Document,
DocumentFragment,
Element,
Event,
EventTarget,
HTMLElement,
HTMLIFrameElement,
HTMLMetaElement,
HTMLTemplateElement,
NamedNodeMap,
Node,
NodeType,
SVGElement,
serializeNode,
Text,
} from "./dom/core";
/** Parse HTML or XML-like markup into a lightweight window and document. */
export function parseHTML(html: string): DOMWindow {
return new DOMWindow(parseDocument(html));
}