@assistant-ui/react-streamdown#
0.3.20#
Patch Changes#
-
#8875
3aff80b- serve the preprocess helpers from one source:@assistant-ui/react-markdown/preprocessis a new subpath, and@assistant-ui/react-streamdownre-exports the same functions instead of carrying a copy (@okisdev) -
#8973
8e4852c- chore: maintenance update with no changes to runtime behavior. (@Kinfe123) -
#7074
df4d532- fix: type everyPluginConfigslot with its streamdown plugin interface instead ofunknown(@ShobhitPatra) -
#8897
dff60b2- renderStreamdownTextPrimitivethrough a single memoized body component (@okisdev) -
Updated dependencies [
9ea0271,c306b56,3aff80b,0a3ca24,ce74db7,c46e1a2]:- @assistant-ui/react-markdown@0.14.20
0.3.19#
Patch Changes#
-
#8725
4f0f4f5- require streamdown 2.7 and remend 1.4, and keep the tail-bounded remend repair in step with remend 1.4's code spans, so a comparison after an escaped backtick still gets escaped (@okisdev) -
Updated dependencies [
098c140]:- @assistant-ui/react-markdown@0.14.19
0.3.18#
Patch Changes#
-
#8562
b48b05d- preserve currency and math delimiters inside html blocks during preprocessing. (@okisdev) -
#8564
92f42ee- preserve raw html bodies inside list and blockquote containers during streaming repair. (@okisdev) -
#8563
31970dc- keep comparison escapes within each line without splitting settled prose or slowing down on blank lines. (@okisdev) -
Updated dependencies [
b48b05d]:- @assistant-ui/react-markdown@0.14.18
0.3.17#
Patch Changes#
-
#7746
05a1f0d- fix: fail the build when emitted output imports an undeclared package (@okisdev)aui-buildkept package imports external without checking them against the manifest, so emitted JavaScript or declarations could import a package a consumer cannot resolve. A build now allows only the package's own name, its declared dependencies, peers and optional dependencies (with a@types/*package standing in for the module it types), itsimportsmap and node builtins. tsdown'sdeps.onlyImportcovers import statements; a pass over the finished declarations covers the two shapes it does not visit, an inlineimport("pkg").Typeand a/// <reference types="pkg" />directive.Test helpers,
testUtilsmodules and benches undersrcare no longer build entries. They were unreachable through every exports map and carriedvitestandink-testing-libraryimports into published output.@assistant-ui/react-streamdowndeclaresremark-rehype, whoseOptionstype it re-exports asRemarkRehypeOptions. -
#8012
e721183- fix: stop applying streaming tail repair after a message finishes. (@Kinfe123) -
#7973
6d4e873- fix(react-streamdown): stop an unmatched mid-line$$from pairing with later display math (@rupic-app) -
#8039
41ec387- fix(markdown): end quoted code fences and$$blocks where their own blockquote ends, so a deeper>line no longer closes one early and a blank or shallower line no longer leaves one open (@rupic-app) -
#7663
1ba52b8- fix: stop nested raw pre markup from causing quadratic rerender comparisons (@rupic-app) -
#7982
c8f6943- fix(react-streamdown): end streaming$$math where remark-math ends it, so a$$inside a display block no longer leaks escapes into the math or appends a stray closer (@rupic-app) -
#7846
b758f0c- fix: let a newSyntaxHighlighter,CodeHeaderorcomponentsByLanguageentry reach settled code blocks (@okisdev)a code block that streamdown had already rendered kept the previous highlighter or header when
components.SyntaxHighlighter,components.CodeHeaderor an entry ofcomponentsByLanguagechanged without new text, because streamdown's root memo ignorescomponentsand never re-renders the block. the code adapter now reads its components from a context that the primitive provides above streamdown, so the change reaches every mounted code block in place; the block, its siblings and the rest of the message keep their DOM and state, and a streamed token still re-renders nothing that has settled. -
#7770
4afc116- fix: keep the streaming escapes out of every fence and$$block, including one that opens right after a paragraph line or nests in a list item, and settle the paragraph a block interrupts, so~inside code and math is no longer escaped and a dangling**before a fence no longer lands its closer after the closing marker (@okisdev) -
#8047
bc07dc7- fix(react-streamdown): stop the streaming repair from escaping text inside raw HTML blocks (@rupic-app) -
#7969
768549f- fix: recognize a fence or$$block that opens on a list marker line (- ~~~,1. ```bash,- $$), so~inside it is no longer escaped and its closing marker no longer opens a fence that leaves the rest of the message without streaming repair or escapes (@okisdev) -
#7886
5f21b37- fix(react-streamdown): stoppreprocessfrom restarting smooth streaming when a rewrite changes already-revealed text (@Kinfe123) -
Updated dependencies [
41ec387]:- @assistant-ui/react-markdown@0.14.17
0.3.16#
Patch Changes#
-
#7651
f36e945- fix: keep settled code blocks from re-rendering when streamdown re-renders their block (@okisdev)a custom
SyntaxHighlighterran again for every settled code block on each streamed token when anycomponentsentry was an inline function, and for every code block once ananimatedmessage completed; components readinguseStreamdownPrePropsre-rendered the same way.PreOverridenow keeps its context value while the parsed pre props are equal by value, the code adapter compares the hastnodeby value, and an inlinecomponentsByLanguagemap keeps its identity while its entries are unchanged. a code block whose fence metadata changes while its code stays the same now hands the newnodetoCodeHeaderandSyntaxHighlighterinstead of the previous one. -
Updated dependencies [
b7f9a96,5f6b4a8]:- @assistant-ui/react-markdown@0.14.16
0.3.15#
Patch Changes#
- #7053
57d8db5- fix: keep remend escapes out of settled~~~fences and$$math blocks (@ShobhitPatra)
0.3.14#
Patch Changes#
-
#6987
b8c5e68- fix: compare arrays with indexed loops so sparse-array holes cannot read as equal; a sparse suggestions list now compacts to a dense one before it reaches the per-suggestion lookup (@Kinfe123) -
#6873
2590b3f- fix: read tilde fences in the currency walker, and end an unclosed fence with its blockquote instead of the rest of the input (@ephraimduncan) -
#6807
9d218b3- fix: keep a fenced display body inside the list item or blockquote it was written in (@okisdev)giving the
$$markers their own lines put them at the root column, which ends the container the math was written inside: an equation in a list item rendered as a sibling of the list. the markers now carry the prefix of the line the match opened on and the body is aligned to it, and that line is read from the original text so a code span earlier on it cannot truncate it. -
#6807
9d218b3- perf: parse once per token withdeferon (@okisdev)the deferred path rendered the previous text at normal priority and the new text in the deferred pass, and react-markdown parses the whole accumulated text on every render, so a token cost two full parses. the renderer is memoized, which turns the urgent pass into a bail-out because that text was parsed on the previous commit. a caller's inline
remarkPluginsarray no longer defeats the memo. -
#6941
05c7904- perf: bound the streaming remend window scan to each line, so the boundary pass stays linear in the message instead of scanning the remaining text once per line (@rupic-app) -
#6810
910bab3- fix: read a backtick run as a fence only when it starts a line, so an info string no longer closes a fenced block (@rupic-app) -
#7069
95cdda5- fix: update memoized children when their text or props change (@ephraimduncan) -
#6885
f38aea4- fix: preserve text escapes and custom handler changes in earlier paragraphs without completing or deleting their unfinished Markdown. (@ephraimduncan)Incomplete Markdown repair stays in the final block. Earlier blocks receive numeric-range escapes, comparison-operator escapes, and custom handlers. Custom handlers receive the earlier text and final block as separate strings.
RemendConfiggainssingleTildeandcomparisonOperators, so the two escapes that now reach settled text can be turned off without disabling incomplete-Markdown repair. -
#6897
11678cb- fix: preserve rehype plugin markup in code blocks and pass the complete code text to code headers in both Markdown renderers. (@ephraimduncan) -
#7082
3a45a01- fix: render userpreandcodecomponents through the code adapter without remounting the code block on every render, and keep the element of a raw<pre>that has nocodechild (@ShobhitPatra) -
#6919
caa643f- fix: preserve currency and math inside indented tilde fences (@rupic-app) -
Updated dependencies [
b8c5e68,2590b3f,9d218b3,9d218b3,910bab3,11678cb,caa643f]:- @assistant-ui/react-markdown@0.14.15
0.3.13#
Patch Changes#
-
#6732
8c33c29- fix: stop bracket-delimited math from swallowing the rest of the message (@okisdev) -
#6732
8c33c29- fix: keep code spans and fences inert when normalizing math delimiters (@okisdev) -
#6732
8c33c29- fix: stop charging every streamed token a second render pass whendeferis off (@okisdev) -
Updated dependencies [
8c33c29,8c33c29,8c33c29]:- @assistant-ui/react-markdown@0.14.14
0.3.12#
Patch Changes#
-
#6449
e818d4a- refactor: single-source the code-fence contract on a react-markdown subpath. the CodeHeader/SyntaxHighlighter prop types, the by-language override entry, and the language-class parser now live in @assistant-ui/react-markdown/code-fence; react-streamdown re-exports the types from there instead of keeping structurally compatible copies. @types/hast moves to dependencies in both packages so the published declarations reference hast by name instead of a broken store-relative path. (@okisdev) -
#6330
3d4fa54- fix: bump streamdown to 2.6 so fenced code updates when streamed content changes (@okisdev) -
Updated dependencies [
6dcd69f,0fa835c,e96d3de,e818d4a]:- @assistant-ui/react-markdown@0.14.13
0.3.11#
Patch Changes#
- #6160
235fa59- fix: preserve currency inside one- and two-backtick code spans that contain longer backtick runs (@okisdev)
0.3.10#
Patch Changes#
0.3.9#
Patch Changes#
-
#5612
c3fed24- fix: merge user rehypePlugins after the security hardening pipeline instead of dropping it (@ShobhitPatra) -
#5615
b3561cb- fix: preserve Streamdown sanitization extensions with security (@rupic-app)
0.3.8#
Patch Changes#
- Updated dependencies [
9a7e776,2f5d0d4]:- @assistant-ui/react@0.15.0
0.3.7#
Patch Changes#
0.3.6#
Patch Changes#
0.3.5#
Patch Changes#
0.3.4#
Patch Changes#
-
#4408
b6016d1- feat: export math-delimiter preprocess helpers for the markdown text primitives (@okisdev)adds
normalizeMathDelimiters,rewriteLatexBracketDelimiters,rewriteCustomMathTags, andescapeCurrencyDollarsso you can pass them to thepreprocessprop instead of copy-pasting a regex blob. they rewrite the\(...\)/[...]brackets and[/math]/[/inline]tags that models emit to the$...$/$$...$$form remark-math parses, and escape$5-style currency so single-dollar math doesn't eat it. -
#4418
2a03d96- perf: repair only the trailing block of streaming markdown instead of the whole message (@okisdev)StreamdownTextPrimitivelet Streamdown runremend(incomplete-markdown repair) over the entire accumulated message on every streaming flush, which grows with the message. It now repairs only the last top-level block (the only place a dangling opener can be, since inline constructs cannot cross a blank line and blocks are split after repair), which is render-equivalent but bounds the heavierremendrepair to the tail instead of running it over the whole message each flush.tailBoundedRemendandfindRemendWindowStartare exported so you can apply the same windowing yourself. Customremendoptions are honored, repair falls back to the full message when a customparseMarkdownIntoBlocksFnis supplied, andparseIncompleteMarkdown={false}still disables repair entirely.
0.3.3#
Patch Changes#
-
#4348
5ca6558- feat: opt-indeferprop on the markdown text primitives (@okisdev)StreamdownTextPrimitiveandMarkdownTextPrimitiveaccept adeferflag that routes the streamed text throughuseDeferredValue, so re-parsing the growing message runs at a lower priority and typing/scrolling stay responsive while a long message streams in. intermediate streaming states may be skipped under load; the final text always renders. default off; the shadcn kit's markdown-text turns it on. -
#4357
fb1a7d3- feat:smoothprop onStreamdownTextPrimitive(@okisdev)opt-in typewriter reveal via the now-public
useSmooth, acceptingboolean | SmoothOptions. the pipeline runs preprocess, then smooth, then the existingdeferdeferral, anddata-status/isAnimatingderive from the smooth status so the caret keeps blinking and the copy/download controls stay disabled until the reveal catches up. default off; streamdown's block memoization bounds the per-frame cost to linear string scans plus the tail block parse. the@assistant-ui/reactpeer floor moves to the release that shipsSmoothOptions.
0.3.2#
Patch Changes#
0.3.1#
Patch Changes#
0.3.0#
Patch Changes#
- Updated dependencies [
040d469]:- @assistant-ui/react@0.14.0
0.2.0#
Patch Changes#
- Updated dependencies [
801b9a6,7098bab,aa6e071,b090acb,df7eb3e,f4a693e,d864d07]:- @assistant-ui/react@0.13.0
0.1.11#
Patch Changes#
-
#3851
e19c347- fix: pass memoized code component to streamdown instead of invoking it as a function, and render CodeHeader when no SyntaxHighlighter is configured for a block (@okisdev) -
Updated dependencies [
ce865bc,c56f98f,9aa5410,a1f84ae,b4fde97,d53ff4f,17958c9,477fa8a]:- @assistant-ui/react@0.12.26
0.1.10#
Patch Changes#
- c988db8: chore: update dependencies
- Updated dependencies [c988db8]
- @assistant-ui/react@0.12.25
0.1.9#
Patch Changes#
- bdce66f: chore: update dependencies
- 209ae81: chore: remove aui-source export condition from package.json exports
- Updated dependencies [6554892]
- Updated dependencies [d726499]
- Updated dependencies [876f75d]
- Updated dependencies [bdce66f]
- Updated dependencies [c362685]
- Updated dependencies [4abb898]
- Updated dependencies [209ae81]
- Updated dependencies [50b3100]
- Updated dependencies [af70d7f]
- @assistant-ui/react@0.12.22
0.1.8#
Patch Changes#
- 52403c3: chore: update dependencies
- Updated dependencies [3227e71]
- Updated dependencies [52403c3]
- @assistant-ui/react@0.12.21
0.1.7#
Patch Changes#
- 736344c: chore: update dependencies
- 3bd38ed: fix(react-streamdown): preserve data-block in PreOverride for block code detection
- Updated dependencies [28a987a]
- Updated dependencies [736344c]
- Updated dependencies [ff3be2a]
- Updated dependencies [70b19f3]
- Updated dependencies [70b19f3]
- Updated dependencies [c71cb58]
- @assistant-ui/react@0.12.20
0.1.6#
Patch Changes#
- 349f3c7: chore: update deps
- Updated dependencies [1ed9867]
- Updated dependencies [427ffaa]
- Updated dependencies [349f3c7]
- Updated dependencies [02614aa]
- Updated dependencies [642bcda]
- @assistant-ui/react@0.12.18
0.1.5#
Patch Changes#
- 613c884: fix(react-streamdown): useMessagePartText provide status
- Updated dependencies [5ae74fe]
- Updated dependencies [8ed9d6f]
- @assistant-ui/react@0.12.16
0.1.4#
Patch Changes#
- 36ef3a2: chore: update dependencies
- Updated dependencies [36ef3a2]
- Updated dependencies [6692226]
- Updated dependencies [c31c0fa]
- Updated dependencies [1672be8]
- Updated dependencies [28f39fe]
- Updated dependencies [3a1cb66]
- Updated dependencies [14769af]
- Updated dependencies [7c360ce]
- Updated dependencies [a638f05]
- Updated dependencies [8a78cd2]
- @assistant-ui/react@0.12.12
0.1.3#
Patch Changes#
- 93910bd: Rename .tsx files to .ts where no JSX syntax is used
- Updated dependencies [5bbe8a9]
- Updated dependencies [5e304ea]
- Updated dependencies [546c053]
- Updated dependencies [a7039e3]
- Updated dependencies [16c10fd]
- Updated dependencies [98c3d54]
- Updated dependencies [b181803]
- Updated dependencies [7836760]
- Updated dependencies [9276547]
- Updated dependencies [b65428e]
- Updated dependencies [af5b085]
- Updated dependencies [61b54e9]
- Updated dependencies [a094c45]
- Updated dependencies [4d7f712]
- Updated dependencies [ecc29ec]
- Updated dependencies [6e97999]
- Updated dependencies [a247fc9]
- Updated dependencies [f414af9]
- Updated dependencies [b48912c]
- Updated dependencies [93910bd]
- Updated dependencies [58a8472]
- @assistant-ui/react@0.12.11
0.1.2#
Patch Changes#
- a088518: chore: update dependencies
- Updated dependencies [a088518]
- Updated dependencies [d8122cc]
- @assistant-ui/react@0.12.9
0.1.1#
Patch Changes#
- d45b893: chore: update dependencies
- Updated dependencies [d45b893]
- Updated dependencies [fe71bfc]
- @assistant-ui/react@0.12.5
0.1.0#
Minor Changes#
-
378a9fd: feat: add @assistant-ui/react-streamdown package
New package providing Streamdown-based markdown rendering as an alternative to
@assistant-ui/react-markdown.Features:
StreamdownTextPrimitivecomponent for rendering markdown- Built-in support for Shiki syntax highlighting, KaTeX math, and Mermaid diagrams via plugins
- Compatibility API for migrating from react-markdown (SyntaxHighlighter, CodeHeader, componentsByLanguage)
- Optimized streaming with block-based rendering and remend
Patch Changes#
- Updated dependencies [07d1c65]
- Updated dependencies [b591d72]
- Updated dependencies [59a338a]
- Updated dependencies [acbaf07]
- Updated dependencies [c665612]
- Updated dependencies [0371d72]
- Updated dependencies [e8b3f34]
- @assistant-ui/react@0.12.3