How evmar/webtreemap works
webtreemap is a browser-based DOM treemap library with a command-line path that converts size/path input into a self-contained HTML visualization, plus a backward-compatible API. The web workflow accepts a tree and renders it into a container; the CLI parses lines, prepares a tree, and embeds the renderer in HTML. The legacy entry point adapts older data before rendering. Connections for CLI embedding and web invocation follow README statements; unsampled demo behavior is not expanded.
Main entry points: treemap.ts DOM treemap renderer · tree.ts Tree transformations · cli.ts Tree preparation · oldapi.ts Legacy data adapter
Components 10
Web rendering
- Public API
src/index.ts - DOM treemap renderer
src/treemap.ts
Tree data
- Tree transformations
src/tree.ts
Command line
- Line input parsing
src/cli.ts - Tree preparation
src/cli.ts - Self-contained HTML
src/cli.ts
Legacy API
- Legacy global entry
src/oldapi-main.ts - Legacy data adapter
src/oldapi.ts
Other components
- Web caller
- CLI data producer
Connections 12
- Web caller → DOM treemap renderer: requests render
README.md - Public API → Tree transformations: exports types
src/index.ts - Public API → DOM treemap renderer: exports rendering
src/index.ts - DOM treemap renderer → Tree transformations: lays out tree
src/treemap.ts - CLI data producer → Line input parsing: provides lines
README.md - Line input parsing → Tree preparation: parses lines
src/cli.ts - Tree preparation → Tree transformations: builds and normalizes
src/cli.ts - Tree preparation → Self-contained HTML: serializes tree
src/cli.ts - DOM treemap renderer → Self-contained HTML: embedded by CLI
README.md - Legacy global entry → Legacy data adapter: registers render
src/oldapi-main.ts - Legacy data adapter → Tree transformations: converts data
src/oldapi.ts - Legacy data adapter → DOM treemap renderer: renders converted tree
src/oldapi.ts