API Reference Entry Points
The package publishes three independent entry points. Import from the owner shown here; internal source paths are not public APIs.
| Entry point | Exports | Runtime and module formats | Dependency boundary |
|---|---|---|---|
wallpaper-engine |
Project, built-in property, listener, media, RGB, and iCUE types; ambient host globals | Type-oriented root; ESM and CommonJS | No runtime API or Vite import |
wallpaper-engine/plugin |
Vite plugin, nine property builders, inference/options types, and 16 re-exported project-schema types | ESM only | The only public entry allowed to import Vite |
wallpaper-engine/helpers |
Side-effect-free browser functions, audio and average-color types, and DefaultWEProps defaults |
ESM and CommonJS | Individually tree-shakeable browser utilities |
Boundary examples
Section titled “Boundary examples”import type { WallpaperMediaPlaybackEvent, WallpaperPropertyListenerOf } from 'wallpaper-engine';import { toFileUrl, wallpaperColorToHex } from 'wallpaper-engine/helpers';import { wallpaperEnginePlugin } from 'wallpaper-engine/plugin';import 'wallpaper-engine';- Use the root import for host contracts and global augmentation.
- Use
/pluginfrom Vite configuration and shared property-schema modules. Browser code may import its types, but should not pull the Vite runtime into application bundles. - Use
/helpersin browser runtime modules. Helpers do not register listeners or initialize the simulator. - Do not cross-import one public entry through another or reach into
dist/srcpackage internals.
Reference pages
Section titled “Reference pages”- Root Types & Host Globals: exported types and ambient host names.
- Plugin API: generation, links, builders, inference, and re-exported schemas.
- Helpers API: exact signatures, allocation, errors, and lifecycle.
The authoritative export map is packages/wallpaper-engine/package.json.
Next steps
Section titled “Next steps”Start with Root Types for host integration, Plugin API for build configuration, or Helpers API for runtime tasks.