Skip to content

Add @bomb.sh/dom for headless interactive applications - #14

Open
cowboyd wants to merge 1 commit into
mainfrom
dom-spike
Open

cowboyd wants to merge 1 commit into
mainfrom
dom-spike

Conversation

@cowboyd

@cowboyd cowboyd commented Oct 21, 2026 •

Copy link
Copy Markdown

What does this PR do?

Introduce @bomb.sh/dom, an independently maintained in-memory DOM for interactive applications such as terminal UIs. It provides explicit, independent documents without installing process globals or requiring a browser.

  • Implement a shared node hierarchy with validated mutations, ownership, adoption, cloning, namespaces, and protected collections.
  • Add event propagation and cancellation, MutationObserver, and separate connected-document invalidation for external renderers.
  • Add focus management, host keyboard dispatch, input/textarea selection, and live document ranges.
  • Implement tested subsets of autonomous custom elements, templates, shadow roots, and slots, with opt-in HTML parsing.
  • Include strict TypeScript declarations, ESM exports, provenance, standards differences, and a capability matrix.

This is the core layer of the stack. Framework integrations, their dependencies, demos, and acceptance tests are in the next layer.

Scope and limitations

This establishes a tested DOM subset, not full DOM or Web Components conformance. Remaining work includes additional Range/Selection APIs, selectors, and broader custom-element and shadow-tree coverage.

Terminal rendering, layout, input decoding, and output scheduling remain consumer responsibilities.

Validation

Validated independently with the framework packages absent:

  • pnpm install --frozen-lockfile --ignore-scripts succeeded.
  • pnpm test: 227 tests passed, including 216 DOM tests and 11 existing workspace tests. The DOM tests include 20 unchanged upstream WPT cases.
  • Core TypeScript checking and ESM/declaration build passed.
  • pnpm format:check passed.
  • pnpm lint passed with 78 existing workspace warnings.

Type of change

  • Bug fix
  • Feature
  • Refactor (no behavior change)
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • All tests pass (pnpm test)
  • Files are formatted (pnpm format)
  • I have added/updated tests for my changes (if applicable)
  • I have added a changeset

AI-generated code disclosure

  • This PR includes AI-generated code

@socket-security

socket-security Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​parse5@​8.0.11001008585100

View full report

@cowboyd
cowboyd added this pull request to stack #16 October 21, 2026 20:24
@cowboyd cowboyd changed the title spike out a fuller dom with focus, selection, mutation observer, etc Add @bomb.sh/dom for headless interactive applications Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant