Skip to content

v0.6.0

tagged this 24 May 14:28
Vertical-scroll strip mode moves to its own package
[`fresco_strip`](https://hex.pm/packages/fresco_strip). Consumers
who only need the viewer / canvas surface (lightboxes, paged
readers, document viewers, lookbooks) now ship with ~19% less
code; consumers who need strip mode pick up `fresco_strip` as a
sibling dep.

Both packages contribute handles to the same
`window.Fresco.viewerRegistry` global so peer libraries (Etcher
annotations, ML overlays, comment threads) keep working
uniformly across both. Order-independent — whichever package's
JS loads first creates the registry; the second piggy-backs.

Removed (breaking):
  - <Fresco.scroll_strip> component → now <FrescoStrip.viewer> in
    the fresco_strip package. Attrs, JS hook, handle API,
    extension contract, data-* semantics all unchanged.
  - Fresco.ScrollStrip module → FrescoStrip.Viewer.
  - defdelegate scroll_strip on Fresco.
  - makeStripHandle JS factory + FrescoScrollStrip LiveView hook
    in priv/static/fresco.js.
  - .fresco-strip-* CSS rules in fresco.js's injectStyles.
  - 16 test cases in `Fresco.scroll_strip/1` describe block in
    test/fresco_test.exs (preserved identically in fresco_strip's
    test suite).

Migration:
  # mix.exs
  -{:fresco, "~> 0.5.9"}
  +{:fresco, "~> 0.6.0"},
  +{:fresco_strip, "~> 0.1.0"}

  # assets/js/app.js
   import "../../deps/fresco/priv/static/fresco.js"
  +import "../../deps/fresco_strip/priv/static/fresco_strip.js"

  # template
  -<Fresco.scroll_strip id="reader" sources={...} extensions={...} />
  +<FrescoStrip.viewer  id="reader" sources={...} extensions={...} />

Three lines per consumer. Etcher 0.4.12+ detects the strip
handle at runtime via `"scrollTo" in handle` — no code change
required there.

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