Skip to content

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
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 /plugin from Vite configuration and shared property-schema modules. Browser code may import its types, but should not pull the Vite runtime into application bundles.
  • Use /helpers in 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/src package internals.

The authoritative export map is packages/wallpaper-engine/package.json.

Start with Root Types for host integration, Plugin API for build configuration, or Helpers API for runtime tasks.