thehardwarestore.ai

where AI agents shop for the right tools

── 98851 repos indexed ── | filtered by tag: dom
preactjs/preact ★ 38901 3408 APPLICATION

Preact is a fast, lightweight React-compatible library for building user interfaces in JavaScript/JSX. It implements a virtual DOM component model with efficient diffing and reconciliation, aiming to provide the same modern API as React (ES6 classes, hooks, functional components, JSX) in a 4kB package. The architecture is a library with multiple subpackages: core (Component, render, createElement), compat (React API compatibility layer with Suspense, lazy, memo, forwardRef), hooks (React-like hooks: useState, useEffect, useRef, etc.), debug/devtools (development warnings and debugging bridge), test-utils (act, setupRerender), and jsx-runtime (JSX transform support). Key entry points include render(), createElement(), the Component class, and the options object that serves as an extension mechanism for all addons. Data flows from JSX/component trees through a diff engine that computes minimal DOM mutations, with support for keyed reconciliation, portals, and context propagation. External dependencies are minimal: core has none; optional preact-render-to-string for server-side rendering. The codebase is highly optimized for size and performance, with property mangling, bitmask state flags, and a custom build pipeline using Rollup, Babel, and Terser.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 5 reusable components found
simdjson/simdjson ★ 24404 1311 APPLICATION

simdjson is a high-performance C++ JSON parsing library that uses SIMD instructions (AVX2, AVX-512, NEON, RVV, etc.) to parse and validate JSON at multi-gigabyte-per-second speeds. It provides two primary APIs: a DOM API (`simdjson::dom`) that builds a complete in-memory tree, and an On-Demand API (`simdjson::ondemand`) that performs lazy, forward-only parsing for streaming and large-document use cases. The library also includes a builder API for JSON serialization, compile-time JSON parsing via C++26 reflection, JSON Pointer/Path support, NDJSON/JSON-sequence streaming, and a single-header amalgamated distribution. The codebase is organized around a two-stage pipeline: stage 1 performs SIMD-accelerated structural indexing and UTF-8 validation, and stage 2 builds the DOM tape or drives the on-demand iterator. Runtime CPU dispatch selects the best implementation for the host architecture, with fallbacks for non-SIMD platforms. The repository is a mature, production-grade library used by major projects (Node.js, ClickHouse, etc.) and is backed by an extensive test suite, fuzzing harnesses, and cross-architecture CI. It is primarily an application/library rather than a data-research repository, though it contains benchmark and research-oriented components (e.g., performance modeling, static reflection experiments).

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 4 reusable components found
cheeriojs/cheerio ★ 30514 1726 APPLICATION

Cheerio is a fast, flexible, and elegant library for parsing and manipulating HTML and XML on the server side (Node.js). It provides a jQuery-like API for traversing and manipulating the DOM of parsed documents, designed for web scraping, data extraction, and HTML transformation tasks. The library abstracts away the underlying parser (htmlparser2 for speed, parse5 for standards compliance) via a factory pattern, offering a consistent Cheerio API regardless of parser choice. Key entry points include the main `load` function that converts HTML strings or buffers into a Cheerio instance, static methods like `html`, `xml`, `text`, and `parseHTML`, and utility functions for CSS handling, form serialization, and attribute manipulation. External dependencies include cheerio-select for CSS selector parsing, domutils for core DOM traversal, and optional HTTP fetching via undici for live URL parsing.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 2 reusable components found
fb55/htmlparser2 ★ 4789 402 APPLICATION

htmlparser2 is a fast, forgiving HTML/XML parser for Node.js and browsers, written in TypeScript. It provides a low-level streaming tokenizer (Tokenizer) that feeds events to a higher-level Parser, which handles tag matching, implicit closing, foreign content (SVG/MathML), and entity decoding. The library also includes Node.js WritableStream and Web Streams API WritableStream adapters for piping data directly into the parser. It is the foundation for cheerio and other DOM manipulation libraries. The codebase is well-structured, thoroughly tested, and actively maintained, with a focus on performance and spec compliance for real-world HTML.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 3 reusable components found
zeux/pugixml ★ 4631 808 APPLICATION

pugixml is a lightweight, high-performance C++ XML processing library that provides a DOM-like interface, a fast non-validating parser, and XPath 1.0 support. It is designed for embedding into other applications and is used widely in game development, desktop applications, and embedded systems. The library is distributed as a single source file (`pugixml.cpp`) and header (`pugixml.hpp`), with optional header-only mode and extensive compile-time configuration via `pugiconfig.hpp`. It supports automatic encoding detection (UTF-8, UTF-16, UTF-32, Latin1), BOM handling, and full Unicode conversion. The architecture is monolithic but well-organized: the core parser uses recursive descent with custom memory pooling (page-based allocator) for fast DOM construction. The DOM tree is exposed through lightweight handle classes (`xml_node`, `xml_attribute`, `xml_text`) with iterator support for children and attributes. XPath queries are compiled into an internal representation and evaluated against the tree with full axis, function, and predicate support. Output is handled via an abstract `xml_writer` interface, allowing custom sinks. The library has zero external dependencies beyond the C++ standard library. Key entry points include `xml_document::load_file`, `load_buffer`, `load_string`, and `save_file`. Data flows involve loading XML from files, memory buffers, or streams into an in-memory DOM, then performing traversal, modification, or XPath queries, and finally saving the modified document. The library is used in production for parsing configuration files, serializing data, and processing XML messages in network protocols. It has an extensive test suite covering parsing edge cases, XPath compliance (W3C and Xalan), memory stress tests, and fuzzing harnesses. The codebase demonstrates strong craftsmanship: template-based parser specializations avoid runtime branching, memory management hooks allow custom allocators, and the compact mode reduces footprint for constrained environments. The library is well-maintained with active CI (GitHub Actions, AppVeyor), fuzz testing, and support for many compilers and platforms. The only notable technical drift is the continued support for legacy compilers (MSVC6, Borland), which adds preprocessor complexity but does not affect modern usage.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 4 reusable components found
testing-library/jest-dom ★ 4600 425 APPLICATION

This repository is the `@testing-library/jest-dom` library, a widely-used collection of custom Jest matchers for asserting the state of DOM elements in tests. It provides over 30 matchers such as `toBeVisible`, `toBeDisabled`, `toHaveAttribute`, `toHaveFormValues`, and `toHaveAccessibleName`, enabling declarative and readable test assertions. The library is designed to work with Jest, Vitest, Bun, and any Jest-compatible `expect` interface, with dedicated entry points for each. It leverages dependencies like `aria-query` and `dom-accessibility-api` to support accessibility-related matchers, and `@adobe/css-tools` for CSS style assertions. The codebase is well-structured, with each matcher in its own file, a shared utility module, and a factory pattern for generating query-based matchers (`toContainAnyBy*` / `toContainOneBy*`). Comprehensive tests and TypeScript type definitions are included. The library is actively maintained with frequent releases and a large contributor base.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 5 reusable components found
qq15725/modern-screenshot ★ 2066 95 APPLICATION

modern-screenshot is a client-side JavaScript library that renders DOM nodes into image formats (PNG, JPEG, WebP, SVG) using HTML5 Canvas and SVG ForeignObject. It clones a DOM subtree, captures computed styles (including pseudo-elements, scrollbars, CSS custom properties), embeds external resources (images, fonts, SVG symbols), and produces a bitmap or data URL. The architecture is modular: a recursive clone phase captures structure and styles, an embedding phase resolves and inlines external assets, and a rendering phase converts the cloned DOM to a Canvas via an intermediate SVG foreignObject. It supports Web Workers for parallel resource fetching, singleton context for repeated screenshots, DPI control via PNG/JFIF metadata injection, and comprehensive edge cases (shadow DOM, cross-origin iframes, @font-face with CSS layers, and Safari/Firefox quirks). The codebase is well-structured, thoroughly tested with Puppeteer-based image snapshot tests, and actively maintained.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 5 reusable components found
lightpanda-io/browser ★ 35686 1695 APPLICATION

A production-grade headless browser built from scratch in Zig, powered by V8 for JavaScript execution. It implements a vast subset of Web Platform APIs (DOM, CSSOM, HTML/SVG elements, canvas, WebGL, IndexedDB, workers, fetch, WebSocket, etc.) and exposes them through Chrome DevTools Protocol (CDP), WebDriver BiDi, and MCP (Model Context Protocol) servers. Includes a built-in LLM agent mode for natural-language-driven automation, a scripting system (PandaScript) for deterministic replay, and a full network stack with ad blocking, rate limiting, caching, and TLS. Designed for AI agents and automation workloads, it claims significant performance advantages over Chromium in startup time and resource usage. Architecturally, the browser is a monolithic server binary with distinct internal modules: a browser core managing pages, frames, and V8 isolates; a network layer using libcurl with connection pooling and request deduplication; protocol servers (CDP, BiDi, MCP) communicating over WebSocket or HTTP; and an agent subsystem that wraps LLM APIs for task planning and execution. The codebase is heavily tested with hundreds of hand-written HTML conformance tests and runs Web Platform Tests via CI. The engineering demonstrates high craftsmanship: custom arena allocators with V8 memory accounting, compile-time prototype hierarchy reflection for Web IDL bindings, a GCRA rate limiter, a singleflight pattern for request deduplication, and a generic live-collection iterator. While some APIs are stubbed or partially implemented (e.g., WebGL always returns null, video dimensions are hardcoded), the core functionality is extensive and spec-compliant where implemented. The project is actively maintained with nightly orderfile optimizations and regular CI.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 4 reusable components found
anvaka/panzoom ★ 2005 314 APPLICATION

panzoom is a mature, dependency-light JavaScript library that provides pan and zoom interactions for both DOM elements and SVG elements. The main entry point is index.js, which exposes a createPanZoom() factory that attaches mouse, touch, wheel, and keyboard event handling to a target element, orchestrates transform updates, and emits custom events such as 'pan', 'zoom', and 'transform'. Internally it uses a controller abstraction to render transforms either via CSS transforms for DOM nodes or SVG transform attributes, and it ships prebuilt dist bundles alongside a demo suite and a TypeScript declaration file. It is a library, not a standalone application, with no backend, CLI, or data pipeline components.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 5 reusable components found
d3/d3 ★ 113765 22643 APPLICATION

This is the d3/d3 monorepo — the umbrella package for D3.js v7.9.0, the canonical JavaScript library for bespoke data visualization. The repository's src/index.js is a pure re-export barrel: it aggregates 28 individual D3 modules (d3-array, d3-axis, d3-scale, d3-selection, d3-shape, d3-geo, d3-hierarchy, d3-force, d3-transition, etc.) and re-exports their entire public APIs. There is no application logic, no DOM code, and no data processing in this repo itself — all implementation lives in the individual submodule packages listed under dependencies. The repo's real content is its documentation site (VitePress-based, in docs/), its test suite (mocha tests verifying the barrel exports), and its build configuration (rollup.config.js bundles the modules into UMD and ESM distributions in dist/). The docs/ directory contains comprehensive, interactive API documentation for every submodule, with live Vue components rendering visualizations using D3 and Observable Plot. The test suite is minimal but meaningful: d3-test.js verifies that every named export from each submodule is present on the d3 namespace, and docs-test.js crawls the markdown documentation to verify that all internal links resolve to existing anchors. The CI pipeline runs tests, linting, bundle builds, and doc builds on every push to main.

RATING: 8.1/10 MAINT: active DRIFT: low
▸ 5 reusable components found
capricorn86/happy-dom ★ 4631 317 APPLICATION

Happy DOM is a JavaScript implementation of a web browser without a graphical user interface, designed to run in Node.js. It provides a comprehensive simulation of browser APIs including the DOM, HTML/SVG elements, CSSOM, Fetch, WebSocket, Canvas, Custom Elements, Shadow DOM, and more. The library is primarily used as a test environment for JavaScript frameworks (React, Vue, Angular, Lit, etc.) and supports server-side rendering via an optional server-renderer package. The codebase is a monorepo containing the core happy-dom package along with companion packages for global registration, Jest environment, server rendering, and a pluggable canvas adapter. It is actively maintained with thousands of tests and a large community. However, it exhibits moderate technical drift: some APIs are incomplete, there is significant boilerplate duplication across SVG/HTML element implementations, and a few deprecated settings linger. Overall, it is a solid, well-structured library but not exceptional in craftsmanship due to the repetitive patterns and some incomplete implementations.

RATING: 8.1/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
yoannmoinet/nipplejs ★ 1943 195 APPLICATION

NippleJS is a vanilla virtual joystick library for touch and mouse interfaces, designed for mobile games, remote controls, and interactive web applications. The core library in `packages/nipplejs/` provides a lightweight, dependency-free joystick with three modes (dynamic, semi, static), multitouch support, and extensive event-driven APIs. The architecture is built around a Factory singleton managing Collections, each of which manages multiple Joystick instances. The library is written in TypeScript, with thorough unit tests and Playwright end-to-end tests covering event accuracy, mode behavior, cleanup, and edge cases. The repository also includes a documentation site built with Astro, featuring five interactive game demos that showcase library features, along with a monorepo structure for tools and tests. While the core library is modern and well-tested, some tooling (ESLint 8, Husky v4) and the workspace Yarn version mismatch indicate minor technical drift.

RATING: 8.1/10 MAINT: active DRIFT: medium
▸ 2 reusable components found
── end of results ──
$ submit: