- 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.
34 lines
652 B
TypeScript
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));
|
|
}
|