0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Newsletter signup, unsubscribe, and preferences forms wired through VBService('newsletter'). Progressive enhancement on top of native form action.
Overview
Add data-vb-newsletter-form to a <form> to wire it through VBService('newsletter') against the /go/newsletter/* endpoints. Three modes share the same attribute — subscribe (default), unsubscribe, and preferences. Without JS the form falls back to its native action, so the same markup works as a server-side post.
Subscribe
The default mode. Reads list ids from any <input type="checkbox" name="lists"> children that are checked, or from data-vb-newsletter-lists as a comma-separated default. POSTs { email, lists } to /go/newsletter/subscribe.
Loads existing subscriptions for the email on commit (blur or change of the email field) and fills in the checkboxes. Submitting computes the diff and posts subscribe + unsubscribe in parallel, then re-snapshots the new state. Useful as a per-user “manage your subscriptions” surface.
The vb-newsletter-form:preferences event fires when the load completes, with detail { email, subscriptions, available } — useful for syncing parent UI (e.g., disabling lists not exposed by the backend).