Engine API improvements (move complexity into the library so consumers
don't need defensive workarounds):
- New `fit` prop on <ParallaxSite> ('viewport' (default) | 'container').
With fit="container" the engine fills its host element instead of
stretching to the viewport, and auto-substitutes the legacy
`height: 100vh` section default with `100%` so layers resolve their
positions against the box. Use this when embedding the engine as a
widget (hero, modal, card) inside a larger page.
- <ParallaxSite> auto-normalizes the incoming `site` prop through the
Zod schema, applying defaults for optional fields (parallaxMode,
animations, fonts, anchor, opacity, …). Consumers can hand the engine
a raw site.json with no manual validateSite call.
- Defensive `?? []` on injectFonts (meta.fonts), ParallaxLayer
(parallaxMode), and TextElement (animations) so a raw site never
crashes the engine on iteration.
- New test (tests/fit-and-normalize.test.ts) locks the auto-normalize
contract: validateSite must populate optional defaults that the
engine then relies on.
OSS housekeeping:
- Issue templates (bug/feature/question + config), PR template.
- SECURITY.md, CODE_OF_CONDUCT.md (Contributor Covenant 2.1).
- .github/dependabot.yml grouped npm updates (weekly) + actions (monthly).
- CHANGELOG.md (Keep-a-Changelog format).
- Favicon set (16/32/180/192/512) + site.webmanifest.
- 1200x630 Open Graph + Twitter card image.
- docs/index.html now embeds a live ParallaxSite hero — the engine
renders its own landing instead of a CSS mock. Uses fit="container".
- README rewritten: badges, code example, features table, learn-more
pointers, link-friendly Markdown.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>