v0.3.0 — three templates, one engine
Three templates instead of one, running the same engine.
Added
-
scaffold --template <name>.nextis still the default;astroand
htmlare new, and--templatewith no name lists them. The project records
which one it came from, so laterframesand--diffruns need no flag, and
scaffolding a different template over an existing project is refused rather
than leaving a tree that is neither. -
An Astro template. Ships no framework JavaScript, only the engine.
-
A zero-build HTML template. No
package.json, notsconfig, no bundler,
nothing to install. It does need a real HTTP server: module scripts and web
workers are same-origin only, sofile://will not work. Its story outline is
regenerated fromcomponents/story.jsbyframes, between markers in
index.html— edit the story, not the markup.
Changed
-
The scrubbing runtime moved into
lib/, shared by every template. A fix
to the decode window, the easing or the scrim is now one change rather than
one per template.ScrollSequence.tsxwent from 687 lines to about 135: the
engine owns the canvas, worker, decode window, animation frame, listeners,
reduced motion and the copy overlays, and the adapter hands it a container. -
The engine ships its own stylesheet, keyed off data attributes and
themeable through custom properties (--st-beat-heading-size,
--st-scrim-falloff, and the rest). Restyling a beat no longer means editing
markup you no longer own. It also takes the story outline, which was
previously hidden by a Tailwind utility — so a template without Tailwind gets
the same behaviour. -
The frames contract and the story are now JavaScript with types beside
them —frames.js+frames.d.ts,story.js+story.d.ts. A page with
no build step cannot import TypeScript, and those are exactly the files it has
to import. Editors and builds still check them: the templates that have a type
checker turn oncheckJs, so a mistypedalignstill fails.Existing projects: re-run
scrollytelling scaffold .to pick up the new
files. It never overwrites anything you have edited, and
scrollytelling scaffold . --diffreports what moved. Yourstory.tskeeps
working until you switch; the generated contract is what changes name.
Fixed
-
A page whose opening frames all decoded could report "no frames found".
The opening request covers the whole decode window, but only about half of
those are opening frames, and readiness counted every failure so far. -
Web workers were not emitted by every bundler. The engine constructed its
worker indirectly, and bundlers detect only the literal
new Worker(new URL(..., import.meta.url))form. Turbopack traced it anyway;
Vite did not, so an Astro build shipped no worker and fell back to
main-thread decoding with only a console warning.