# Alpine.js (vendored)

Local copy of Alpine.js, bundled into the Conductør app so the dashboard
does not depend on a CDN at runtime. Conductør runs at venues where
internet may be unreliable; offline-at-load is a hard requirement.

## Current version

| Field    | Value                                                              |
|----------|--------------------------------------------------------------------|
| File     | `alpine-3.15.12.min.js`                                            |
| Version  | 3.15.12                                                            |
| Source   | https://unpkg.com/alpinejs@3.15.12/dist/cdn.min.js                 |
| SHA-256  | `57b37d7cae9a27d965fdae4adcc844245dfdc407e655aee85dcfff3a08036a3f` |
| Size     | 46,346 bytes raw (~15 KB gzipped)                                  |

## Updating

```bash
cd conductor/web/static/vendor/alpine
VERSION=3.15.12   # bump
curl -sL "https://unpkg.com/alpinejs@${VERSION}/dist/cdn.min.js" -o "alpine-${VERSION}.min.js"
shasum -a 256 "alpine-${VERSION}.min.js"
# update SHA + version in this README and in templates/index.html, then
# delete the old alpine-*.min.js
```

## Why pinned by filename

The version is in the filename (`alpine-3.15.12.min.js`) rather than in
a query string or a manifest. This keeps the cache story trivial:
WKWebView and WebView2 cache by URL, so a new version = a new URL = an
automatic cache miss. No manual cache busting required.

## Script tag

Loaded in `templates/index.html` with `defer` so Alpine initializes
after DOM parsing. Must appear before any module that uses
`Alpine.store()`, since Alpine's internal init listens for
`DOMContentLoaded`.
