Skip to content

Releases: vercel/streamdown

streamdown@2.3.0

19 Feb 16:42
b46781c

Choose a tag to compare

Minor Changes

  • 3657e42: Add useIsCodeFenceIncomplete hook for detecting incomplete code fences during streaming

    Custom components can now detect when the code fence in their block is still being streamed. This is useful for deferring expensive renders (syntax highlighting, Mermaid diagrams) until the code block is complete.

    import { useIsCodeFenceIncomplete } from "streamdown";
    
    const MyCodeBlock = ({ children }) => {
      const isIncomplete = useIsCodeFenceIncomplete();
    
      if (isIncomplete) {
        return <div>Loading code...</div>;
      }
    
      return (
        <pre>
          <code>{children}</code>
        </pre>
      );
    };

    The hook returns true when:

    • Streaming is active (isAnimating={true})
    • The component is in the last block being streamed
    • That block has an unclosed code fence

    The default code block component now uses this hook to set a data-incomplete attribute when incomplete, enabling CSS-based loading states.

  • 32fb079: fix: hide download button on broken images and display a custom "Image not available" message instead

  • d73d7bb: Make the action buttons in code block header sticky.
    Ensures copy buttons remain accessible for long code blocks.
    Improves usability when viewing large snippets.

  • 15645da: Move code block lazy loading to the highlighting layer so block shells render immediately with plain text content before syntax colors resolve. This improves visual stability and removes the spinner fallback for standard code blocks.

Patch Changes

  • 0987479: fix: codeblock highlight flicker while streaming
  • 5d438ca: Add support for copying table data as Markdown in TableCopyDropdown.
    Introduces a Markdown copy option alongside existing formats.
    Allows users to quickly copy tables in valid Markdown format.
  • ce9b4c2: Fix syntax highlighting
  • ba03332: Redesign Mermaid diagram
  • 6e91867: fix nested same-tag HTML block parsing in parseMarkdownIntoBlocks
  • 7f9127b: Add normalizeHtmlIndentation prop to prevent indented HTML tags from being treated as code blocks
  • fdef60d: Bump rehype-harden to fix "can't access property "type", node is undefined"
  • 1abbf1e: Redesign table
  • fb9f97c: handle custom tags with blank lines in content
  • Updated dependencies [6374fbf]
    • remend@1.2.1

remend@1.2.1

19 Feb 16:42
b46781c

Choose a tag to compare

Patch Changes

  • 6374fbf: Fix stray asterisks stemming from mermaid diagrams

@streamdown/code@1.0.3

19 Feb 16:42
b46781c

Choose a tag to compare

Patch Changes

streamdown@2.2.0

09 Feb 17:31
c9a392e

Choose a tag to compare

Minor Changes

  • c1e1e66: Bake animate into streamdown as built-in animated prop

Patch Changes

  • d5fe6d6: fix: properly handle HTML void elements in parse-blocks

  • 6bb03ca: fix: escape HTML when rehype-raw is omitted (#330)

  • a12de57: Custom tags in components

  • 83f043c: Fix: certain LaTeX syntaxes e.g. (...) are not rendering

  • aabb9ab: Fix $$ inside code blocks being treated as math delimiters

    Code blocks can contain $$ as shell syntax (e.g., pstree -p $$ for current process ID). The math block merging logic was incorrectly counting $$ inside code blocks, causing subsequent content to be merged as if it were part of a math block.

    Added tracking of previous token type to skip math merging when the previous block was a code block.

  • 9f72224: Fix footnote detection incorrectly matching regex character classes

    The footnote reference and definition patterns were too permissive, using [^\]\s] which matches any character except ] and whitespace. This caused regex negated character classes like [^\s...] in code blocks to be incorrectly detected as footnotes, resulting in the entire document being returned as a single block.

    Updated the patterns to only match valid footnote identifiers (alphanumeric characters, underscores, and hyphens) using [\w-] instead.

  • 6b42a85: Remove CJS builds

  • aeadcd6: Fix single-line indented code blocks

  • 82bc4a6: Fix tel links being blocked by default

  • fd5533c: fix: Tables cause vertical scroll trap

  • e633ff7: Strip trailing newlines in code blocks

  • 6be5da8: Fix carets and dark code blocks on Tailwind v3

  • 573ece6: Add documentation for monorepos

  • 48756b5: Extend ReactMarkdown props

  • Updated dependencies [c347b53]

  • Updated dependencies [6b42a85]

  • Updated dependencies [4fffb9f]

  • Updated dependencies [3e6a77d]

    • remend@1.2.0

remend@1.2.0

09 Feb 17:31
c9a392e

Choose a tag to compare

Minor Changes

  • 3e6a77d: Handle incomplete HTML tags

Patch Changes

  • c347b53: Fix whitespace-bound asterisks
  • 6b42a85: Remove CJS builds
  • 4fffb9f: Repair comparison operators in list items

@streamdown/mermaid@1.0.2

09 Feb 17:31
c9a392e

Choose a tag to compare

Patch Changes

  • ac25c6b: Fix incorrect zoom-out icon SVG in Mermaid preview plugin.
  • 6b42a85: Remove CJS builds
  • a1e2fad: Patch upstream security vulnerability

@streamdown/math@1.0.2

09 Feb 17:31
c9a392e

Choose a tag to compare

Patch Changes

@streamdown/code@1.0.2

09 Feb 17:31
c9a392e

Choose a tag to compare

Patch Changes

  • c995fb7: Add bundled-language aliases for common JavaScript, TypeScript, and shell code fence labels.
  • 6b42a85: Remove CJS builds

@streamdown/cjk@1.0.2

09 Feb 17:31
c9a392e

Choose a tag to compare

Patch Changes

streamdown@2.1.0

20 Jan 02:00
c2337f0

Choose a tag to compare

What's Changed

  • Switch to plugin architecture by @haydenbleasel in #352
  • Version Packages by @streamdown-github-app[bot] in #353

Full Changelog: https://github.com/vercel/streamdown/compare/streamdown@2.0.1...streamdown@2.1.0