Parent
#114
Summary
Publish modular, tree-shakeable component and hook entry points so consumers pay only for the Echo UI features they import.
The current distributed module behaves like a pre-bundled application artifact. Importing a basic control, Card, or a single icon can retain most of Echo UI together with Tone.js and visualization-related code. This makes small imports unexpectedly expensive and prevents consumers from relying on normal ESM tree-shaking.
Scope
- Separate the modular ESM output from the UMD or all-in-one distribution artifact.
- Publish focused public entry points for components, hooks, icons, and visualization features where they provide meaningful isolation.
- Preserve the package root as a backward-compatible convenience entry.
- Ensure non-audio components do not retain Tone.js.
- Ensure basic controls and icons do not retain visualization-only code.
- Keep CSS discoverable and correctly marked as a side effect without marking all JavaScript modules as side-effectful.
- Generate type declarations that resolve correctly for root and focused imports.
- Verify package exports in supported ESM and CommonJS consumer configurations.
- Make peer and runtime dependency boundaries explicit.
- Add bundle regression fixtures for representative public imports.
- Document the recommended import forms and any older-bundler caveats.
Acceptance criteria
Compatibility requirements
- Treat focused entry points as additive.
- Avoid renaming existing public component or hook exports.
- Preserve the current CSS entry point unless a migration path is documented.
- Document any unavoidable resolution limitation for older bundlers.
Out of scope
- Runtime optimization of analyzers or visualizers.
- Redesigning component APIs.
- Removing the package root export.
- Replacing Tone.js or D3 solely to improve package size.
Validation
- Run all consumer build fixtures against the packed package artifact.
- Compare focused imports with the root import using the same bundler configuration.
- Inspect output to verify that unrelated dependencies are absent rather than merely compressed.
- Run unit tests, typecheck, lint, library builds, and example builds.
Dependencies
Blocked by: #115.
Parent
#114
Summary
Publish modular, tree-shakeable component and hook entry points so consumers pay only for the Echo UI features they import.
The current distributed module behaves like a pre-bundled application artifact. Importing a basic control, Card, or a single icon can retain most of Echo UI together with Tone.js and visualization-related code. This makes small imports unexpectedly expensive and prevents consumers from relying on normal ESM tree-shaking.
Scope
Acceptance criteria
Compatibility requirements
Out of scope
Validation
Dependencies
Blocked by: #115.