Repository navigation
Conversation
Contributor
|
@thedonmon is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
thedonmon
marked this pull request as ready for review
September 19, 2026 13:32
Merged
5 of 7 tasks
Contributor
✅ All commits are signedAll 12 commit(s) in this pull request have a verified signature. Thanks! Checked at 550c9cb. |
Some providers and relays deliver text in bursts (for example ~150 characters every ~500 ms), which renders as a jump followed by a pause, with the caret jumping ahead. `smooth` measures the time between arrivals and reveals each chunk a word at a time so it finishes about when the next chunk is expected. - Off by default; rendering is unchanged when off. - Only appends are paced. Resets, edits and full-text replacements render immediately, as does content present on mount. - Words split across chunks are held until complete. CJK characters are their own units. - When `isAnimating` goes false the remainder drains within 250 ms, and Streamdown stays in streaming mode until then. - Hidden tabs render immediately, since animation frames are paused there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`smooth` already spaces words out as it reveals them. The animate plugin's default 40 ms per-word stagger then queued them a second time, so animated text trailed the reveal and left blank space (with the caret) where scheduled words had not faded in yet. Under `smooth`, `stagger` now defaults to 0; an explicit `stagger` is still honored. Also narrow `animated` by type instead of comparing the memo key to "true", since the key now includes `smooth`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
An `AnimationEffect` bundles a keyframes name with the per-word behavior those keyframes need, so effects can ship as plugins instead of core presets: - `scatter`: extra delay per word, hashed from its position, for a stable scattered reveal order. Stored with the word's timing, so re-renders keep it. - `decorate`: `data-*` attributes for each word while it animates, for effect styles to draw. Other attribute names are dropped, since the animate plugin runs after sanitization. - `duration`: a default that `animated.duration` overrides. String animation names are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffusion-style effects for `animated.animation`: - `diffuse`: words sharpen out of a blur, in scattered order. - `scramble`: words start as same-shape noise glyphs that change once and resolve to the real text. The real text stays in the DOM (painted transparent) and the glyphs are pseudo-elements with empty alt text, so copy and assistive tech get real words. Falls back to a fade under prefers-reduced-motion. Effects are plain objects plus a stylesheet; the package has no dependency on streamdown. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This repo reserves minor for marketing releases. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resolve pnpm-lock.yaml by taking main's lockfile and adding only the @streamdown/effects importer. Match main's plugin packages by moving @streamdown/effects to vitest ^5. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resolve conflicts with vercel#635's style-object word spans: makeSpan takes the config plus vercel#619's explicit timing and effect attributes, and the container div gets one callback ref shared by the animation drain and the caret host. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
thedonmon
force-pushed
the
feat/animation-effects
branch
from
October 2, 2026 02:15
cd837e7 to
754349f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Lets
animated.animationtake an effect object, and adds an@streamdown/effectspackage with two effects:diffuse: words sharpen out of a blur, in scattered order.scramble: words start as noise glyphs and resolve to the real text, in scattered order.Type of Change
Related Issues
Depends on #619 and #625. This branch includes their commits, so it stays a draft until they merge. Without #619, a re-render resets words that are still animating, and
smoothre-renders every few frames, so the effects never show.Changes Made
AnimationEffectis{ name, duration?, scatter?, decorate? }.scatteradds a stable per-word delay for a scattered order.decorateaddsdata-*attributes while a word animates; other attribute names are dropped. String animation names work as before.@streamdown/effectspackage with no dependency onstreamdown.scramblekeeps the real text in the DOM, so copy and screen readers get real words. It falls back to a fade withprefers-reduced-motion.Testing
Screendrop_2026-09-19-09-40-08_27B738.mp4
Checked both effects in Chrome with
smoothon headings, lists, tables, inline code, strikethrough and math.Additional Notes
This adds a new published package. If you'd rather not, the two effects could live in core instead.
🤖 Generated with Claude Code