Skip to content

v0.6.1

tagged this 24 May 14:57
0.6.0 shipped with `viewerRegistry` + `readyCallbacks` as
closure-local vars inside fresco.js, while fresco_strip registered
handles into `window.Fresco.viewerRegistry`. Two separate maps,
no convergence — consumer calls to `onViewerReady("strip-id", cb)`
queued in fresco's private map forever (the handle was on the
other side). Symptom: every FrescoStrip consumer using
`window.Fresco.onViewerReady` silently never gets called.

Both registries now point at the same `window.Fresco.viewerRegistry`
/ `window.Fresco._readyCallbacks` objects. Loading order doesn't
matter — whichever package's JS runs first creates the shared
maps; the other piggy-backs via the same defensive `|| {}`
pattern fresco_strip uses.

Also swapped `window.Fresco = {...}` (which would clobber any
pre-existing global from a sibling package) for
`Object.assign(window.Fresco, {...})` so the public-method
install cooperates with whichever package loaded first.

No API change. Consumers calling `window.Fresco.viewerFor(...)`
or `window.Fresco.onViewerReady(...)` against a
<FrescoStrip.viewer> host now work as documented.

Future hex-published peer packages (planned tiles package,
custom overlays, etc.) should plug into the same
`window.Fresco.viewerRegistry` / `_readyCallbacks` globals.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Assets 2
Loading