Streamdown 2.5がリリース
本文の状態
日本語全文を表示中
詳細モードで約2分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Vercel Blog
Streamdownは、リアルタイムでトークン化されたマークダウンをレンダリングするReactコンポーネントライブラリで、AIアプリケーション向けに設計されています。バージョン2.5では、インラインKaTeXサポート、段階的ストリーミングアニメーション、コードブロックやCSVエクスポートの修正、Tailwind v3互換性の向上が追加されました。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
Streamdown 2.5 リリース
Streamdownは、ストリーミングされるマークダウンコンテンツのレンダリングを容易かつ美しく行うReactコンポーネントライブラリです。AIを活用したアプリケーション向けに構築され、マークダウンがトークン化されてリアルタイムでストリーミングされる際に生じる特有の課題に対応します。
v2.5では、インラインKaTeXサポート、段階的ストリーミングアニメーション、コードブロックとCSVエクスポートに関する一連の修正、およびTailwind v3との互換性向上が追加されました。
ストリーミングパーサーの改善
新たに追加されたinlineKatexオプションは、ストリーミング中に$formulaを$formula$へ自動補完し、通貨記号との曖昧さを回避します。このオプションのデフォルト値はfalseです。また、ストリーミングによって閉じ括弧$が部分的に生成される場合のブロックKaTeXの補完も修正されました。
別の変更として、単語文字間の単一のチルダ~(例: 20~25°C)は、誤った取り消し線レンダリングを防ぐためにエスケープされるようになりました。これはデフォルトで有効化される新オプションsingleTildeによって制御されます。
段階的ストリーミングアニメーション
ストリーミングされる単語や文字のアニメーションが、すべて同時ではなく順次(カスケード状)に実行されるようになりました。その間隔は新オプションstagger(デフォルト40ms)で設定可能です。stagger: 0を設定すると以前の動作に戻ります。
コードブロック
カスタムレンダラーが、新たにオプションとして追加されたmetaプロパティを通じて、コードフェンスからの生のメタ文字列(metastring)を受け取るようになりました。また、lineNumbersプロパティを使用して行番号表示を無効化できるようになりました。
長い行は切り取られずに水平スクロールするようになり、完了したコードブロックは新たなストリーミングコンテンツが到着しても再レンダリングされなくなりました。さらに、未知または切り詰められた言語識別子はエラーをスローせず、プレーンテキストとしてハイライト表示されるようになります。
バグ修正
save()メソッドがtext/csv形式のコンテンツに対してUTF-8 BOMを付加するようになり、Windows版Excelがエンコーディングを正しく認識します。Tailwind v4専用の*:last: / *:first:構文が任意のバリアント相当の構文に置き換えられ、Tailwind CSS v3におけるキャレットのレンダリングが修正されました。
ドキュメントを読んで始めましょう。
Read more
原文を表示
Streamdown is a React component library that makes rendering streaming markdown content easy and beautiful. Built for AI-powered applications, it handles the unique challenges that arise when markdown is tokenized and streamed in real time.
v2.5 adds inline KaTeX support, staggered streaming animations, and a round of fixes for code blocks, CSV exports, and better Tailwind v3 compatibility.
Streaming parser improvements
The new inlineKatex option auto-completes $formula to $formula$ during streaming, avoiding ambiguity with currency symbols, and the option defaults to false. Block KaTeX completion is also fixed when streaming produces a partial closing $.
Separately, single ~ between word characters (e.g. 20~25°C) is now escaped to prevent false strikethrough rendering, controlled via a new singleTilde option that is enabled by default.
Staggered streaming animations
Streaming word and character animations now cascade sequentially rather than animating all at once. The timing is configurable via a new stagger option (default 40ms). Set stagger: 0 to restore the previous behavior.
Code blocks
Custom renderers now receive the raw metastring from the code fence via a new optional meta prop, and the lineNumbers prop lets you disable line numbers.
Long lines now scroll horizontally instead of being clipped, completed blocks no longer re-render when new streaming content arrives, and unknown or truncated language identifiers fall back to plain text highlighting instead of throwing an error.
Bug fixes
save() now prepends a UTF-8 BOM for text/csv content, so Excel on Windows correctly detects encoding. Tailwind v4-only *:last: / *:first: syntax is replaced with arbitrary variant equivalents, fixing caret rendering in Tailwind CSS v3.
Read the documentation to get started.
Read more
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み