Files
buzz-sheet/lib/image-export
T

Custom image exports render from serializable data in a lazily created Web Worker using Takumi WASM. Templates use export primitives and shared calculation helpers; they do not mount webpage components. GuideImageExport remains the screenshot path for extra webpage sections.

prepare-image-export.mjs copies the pinned WASM binary and compiles export CSS using the application's design tokens. Dev, build, and test scripts run it automatically; Docker runs it with Node before Next builds. The generated public/takumi.wasm and public/takumi.css are ignored by Git. Restart dev after changing export utility classes or theme tokens to regenerate the CSS.

Load fonts from local assets. Original artwork and mask URLs are fetched in the worker, including blob URLs for unsaved uploads. Remote assets need CORS permission. Fetch failures reject the export; they do not fall back to a screenshot.

Keep intrinsically sized artifact columns in Flexbox: nested auto-height grids can measure as zero in the current WASM renderer. Regression tests render actual WASM output, check sizes and constellation bar pixels, and cover artifact selections, notes, WebP, failed assets, and worker retries.