The word-fade engine ships with every app, whether or not it animates
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 1/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- react, rollup, typescript
- Ambito
- frontend, performance
Direzione di ricerca
The issue identifies index.tsx imports from lib/animate and the proposed streamdown/animate entry; read those alongside the existing opt-in plugin entries and #680's Mermaid deferral. Check the linked PR #682 for the implementation and tests. Done means apps without animated do not request the animation engine, while both described animation configurations work as specified.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem Statement
index.tsx imports createAnimateTimeline and createRenderAnimatePlugin from lib/animate statically. The word-fade engine is therefore in the main bundle of every app, including apps that never set animated. In an app that imports only Streamdown, the engine is about 2.1 KiB gzip with Rolldown and 2.3 KiB with esbuild.
Proposed Solution
Code highlighting, math, CJK and Mermaid are already opt-in plugins. The animation could follow the same pattern:
- Build the engine as its own entry,
streamdown/animate, which the main bundle reaches only throughimport(). animatedtogether withplugins={{ animate }}bundles it and animates from the first render.animatedalone loads it on demand, after the component's first commit on the client.- Text renders without the fade until the engine arrives.
- The words already on screen when it arrives stay put, so on a cold start the first words of the first animated message appear without the fade.
- Components without
animatednever request it.
createAnimatePlugin stays importable from streamdown.
Alternatives Considered
- Making
animatedrequireplugins.animate. That's simpler, but it breaks existing code, so it would wait for a major. - Leaving the engine in the main bundle, as it is today.
Use Case
Chat UIs that render settled answers, or that pace text with their own reveal, never use the word fade but ship it with every page that renders Markdown.
Priority
Nice to have
Contribution
- I am willing to help implement this feature
Additional Context
I have an implementation with tests and will open a PR after this issue.
Related: #619 (animation lifetime and history), #625 (smooth streaming), #626 (animation effects) and #678 (animation after isAnimating ends) touch the same engine; #663 adds another entry to the package; #680 defers the Mermaid block the same way.
- Lingua principale
- TypeScript
- Stelle
- 5.7k
- Fork
- 319
- Merge medio
- 2g 14h
- PR unite (30g)
- 24
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di vercel/streamdown
-
remend: unclosed `$$` in a table cell is closed on a new line when an earlier line has mathForse già presa @orinnz l’ha presa 33 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
vercel/streamdown#652 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
vercel/streamdown#714 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
allowedTags: a self-closing custom tag at the end of a line turns every later blank line into `<!---->` (preprocessCustomTags)Forse già presa @ahmedriad1 l’ha presa 7 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
vercel/streamdown#706 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
vercel/streamdown#699 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Mermaid's UI ships in the main bundle although the chart is lazy-loadedForse già presa @xyrolle l’ha presa 19 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
vercel/streamdown#679 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di vercel/streamdown
Issue simili
-
cloudflare-cache-binding: `unstorage://` keys are rejected by the Cache API, cache never storesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni
-
desktop: pasted image breaks and send fails with "Failed to fetch" after the clipboard temp file is deletedForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertareproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
anomalyco/opencode#62052 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
strapi/design-system#2084 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno