Export TableCopyDropdown, TableDownloadButton, TableDownloadDropdown,
and table utility functions (extractTableDataFromElement, tableDataToCSV,
tableDataToTSV, tableDataToMarkdown, escapeMarkdownTableCell, TableData)
from the main entry point, enabling custom table overrides to preserve
copy/download interactivity.
Also fixes a type error in table components where `size` prop was passed
to SVG icons that only accept standard SVG attributes (width/height).
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add useIsBlockIncomplete hook for detecting incomplete streaming blocks
Custom components can now detect when the block they're rendering is still
being streamed (incomplete). This is useful for showing loading states in
code blocks during streaming.
- Add BlockIncompleteContext and useIsBlockIncomplete hook
- Add hasIncompleteCodeFence utility to detect unclosed code fences
- Calculate isIncomplete state per block during render
- Default CodeComponent uses the hook to set data-incomplete attribute
- Add comprehensive tests for the new functionality
* docs: add useIsBlockIncomplete documentation
- Add "Streaming State" section to components.mdx explaining the hook
- Add "Avoid Continuous Re-rendering" section to mermaid.mdx with example
* fix: support tilde code fences in hasIncompleteCodeFence
Adds support for detecting incomplete ~~~ code fences in addition to
backtick fences, per CommonMark/GFM spec.
* fix: address PR review — line-based fence detection, rename hook/context
- rewrite hasIncompleteCodeFence to walk line-by-line per CommonMark spec
- fixes 6+ backtick fences being miscounted
- fixes false positives from inline backticks in prose
- respects fence character matching and length requirements
- rename block-position-context.ts → block-incomplete-context.ts
- rename useIsBlockIncomplete → useIsCodeFenceIncomplete
- add tests for edge cases (long fences, inline backticks, indentation)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* docs: fix incorrect line-break behavior description in GFM docs
The GFM documentation incorrectly stated that single newlines are
preserved as visible line breaks. In reality, remark-gfm (like
standard Markdown) treats single newlines as soft breaks, rendering
them as spaces.
Updated the Line Breaks section to:
- Correctly explain soft break behavior
- Document hard break syntax (trailing spaces and backslash)
- Show how to add remark-breaks plugin for automatic line breaks
Fixes#388
* fix: use PluggableList array for remarkPlugins example
Co-authored-by: vercel[bot] <vercel[bot]@users.noreply.github.com>
---------
Co-authored-by: Shurik <shurik@openclaw.ai>
Co-authored-by: vercel[bot] <vercel[bot]@users.noreply.github.com>
Document that custom components fully replace default implementations
including their built-in Tailwind classes. The className prop only
contains classes from the Markdown AST, not Streamdown's default styles.
Add a warning callout and a before/after example showing how to
preserve default h2 styles when overriding.
Fixes#394
Co-authored-by: Shurik <shurik@openclaw.ai>