Commit Graph

434 Commits

Author SHA1 Message Date
Farnabaz 168f626fc9 lint: fix 2026-08-19 20:58:08 +02:00
Farnabaz 5f6eb42436 fix: extract shared pinned-scroll hook for code blocks and tables
Share bottom-pin scroll behavior across code blocks and tables, keep
height props in the memo compare, and expand table scroll coverage.
2026-08-19 20:37:53 +02:00
Farnabaz c482253e6c Merge remote-tracking branch 'origin/main' into feature/scrollable-code-blocks-tables 2026-08-19 20:22:37 +02:00
Farnabaz 49bd1434b9 fix: concurrent animation across streaming blocks (#581)
Co-authored-by: Dmitrii Troitskii <jsleitor@gmail.com>
Co-authored-by: Isaac Wasserman <isaacrwasserman@gmail.com>
Co-authored-by: aradhyacp <cparadhya@proton.me>
2026-08-19 19:59:39 +02:00
Farnabaz c7042eed78 Merge branch 'main' into feature/scrollable-code-blocks-tables 2026-08-19 19:12:49 +02:00
Sjoerd Andringa a99d675691 fix(remend): drop lookbehind from single-tilde pattern for Safari < 16.3 (#576)
Co-authored-by: Sjoerd Andringa <sjoerd@jobport.nl>
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-19 18:04:57 +02:00
omribz156 9f9640969c fix(remend): handle intraword asterisk closers (#582)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-19 13:45:11 +02:00
Dmitrii b25dbdbc42 fix(custom-tags): render Markdown inside custom tags with multiline content (#484)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-19 13:02:07 +02:00
omribz156 fb5d7b969c fix(mermaid): serialize svg downloads (#526)
Co-authored-by: Omri SirComp <omribz156@gmail.com>
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-14 17:04:54 +02:00
Shayan 7e824007a3 fix: detect static text direction per block (#569)
Co-authored-by: Shayan SalehiRad <youtforsh@gmail.com>
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-14 15:59:00 +02:00
Aradhya C P f46cd3cfd9 fix(table): preserve line breaks when copy/download table (#554)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-14 15:11:39 +02:00
Dmitrii f7d1fb5080 fix(table): add table-wrapper to fullscreen portal so copy/download work (#470)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-13 17:43:44 +02:00
Danylo Kachur e7bdf57b95 fix(mermaid): make controls reachable in the fullscreen view (#552)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-13 17:15:47 +02:00
Aradhya C P b2500388a3 fix(a11y): add aria-labels for Mermaid toolbar buttons (#488)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-13 16:38:20 +02:00
Dmitrii 2733922599 fix(mermaid): add aria-hidden to decorative SVG icons(#487) 2026-08-13 16:19:26 +02:00
Simon f0a726bb54 fix(icons): add aria-hidden to decorative SVG icons (#486)
Co-authored-by: Simon <lvtianpeng93@gmail.com>
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-13 16:18:34 +02:00
Aradhya C P d8937596e4 fix(mermaid): fullscreen overlay accessibility and add stable data-streamdown attribute (#507) 2026-08-13 15:46:05 +02:00
Dmitrii 8d36719ad8 fix(deps): remove mermaid as hard runtime dependency (#502)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-13 13:52:34 +02:00
五茶 8093f2ae18 fix(remend): recognize LaTeX paren and bracket math (#523) 2026-08-13 12:39:56 +02:00
Dmitrii a1a714257f feat: add image control options (disable download/hover on images) (#514)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-13 11:15:22 +02:00
Aradhya C P fe38e75ed9 fix: improve accessibility for code block control buttons (#560)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-12 17:46:14 +02:00
Dmitrii ea02609764 fix: prioritize shikiTheme prop over code plugin default theme (#497) 2026-08-12 15:13:54 +02:00
HelloYou 26a84401e3 fix(sanitize): prevent double user-content- prefix on footnote ids (#563)
Co-authored-by: HelloYou <helloyou2012@gmail.com>
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-12 14:47:40 +02:00
Anton Osipov 8fffa9d640 fix: render link safety modal in a portal to avoid <p> hydration error (#529)
Co-authored-by: Anton Osipov <170366728+osipov-anton@users.noreply.github.com>
2026-08-12 14:28:21 +02:00
Aradhya C P dc3f1d2c27 fix: prevent code block line collapse when lineNumbers is disabled (#533)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-12 14:07:27 +02:00
Ghoshan Jaganathamani 9813dd646b fix(types): stop requiring shiki for type-checking streamdown (#565)
Co-authored-by: Ghoshan Jaganathamani <175198591+ghostyfreak@users.noreply.github.com>
2026-08-12 13:31:34 +02:00
Aradhya C P 8f02c0967a fix: restore table copy and download actions in fullscreen mode (#568)
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2026-08-12 12:05:27 +02:00
Dmitrii Troitskii 541d90688c feat: add scrollable code blocks and tables with auto-scroll during streaming 2026-03-18 22:40:07 +00:00
streamdown-github-app[bot] 15ba1aee86 Version Packages (#457)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-17 10:32:35 -07:00
Hayden Bleasel 38aae89ee3 Update broken-markdown-variants.test.ts 2026-03-17 09:06:16 -07:00
Hayden Bleasel d566c819d4 Create broken-markdown-variants.test.ts 2026-03-16 14:31:18 -07:00
Sora Morimoto b752b44a80 fix(streamdown): move mermaid from devDependencies to dependencies (#466)
The published type declarations (dist/index.d.ts) import MermaidConfig
from the mermaid package, making it part of the public API. Having it as
a devDependency meant consumers could end up resolving different mermaid
versions for streamdown and @streamdown/mermaid, causing type errors due
to incompatible MermaidConfig types.
2026-03-16 10:39:55 -07:00
Hayden Bleasel 90a7b58ca8 Run fix 2026-03-12 17:35:48 -07:00
ziyadev 9e6f991f0d fix(streamdown): increase dropdown z-index (#463)
* fix(streamdown): increase dropdown z-index

* chore: rm duplicate class

* chore: increase dropdown z-index

* add patch changeset for dropdown z-index fix

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-12 17:34:25 -07:00
Dmitrii d6666b6de3 feat: add lineNumbers prop to disable line numbers in code blocks (#460)
* feat: add lineNumbers prop to disable line numbers in code blocks

* docs: add lineNumbers prop and noLineNumbers meta string

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Dmitrii Troitskii <jsleitor@gmail.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-12 17:31:46 -07:00
Dmitrii 6a79e04690 fix(streamdown): preserve double newlines in literalTagContent tags (#459)
* fix(streamdown): preserve double newlines in literalTagContent tags

When a tag is in literalTagContent mode, double newlines (\n\n) inside
the tag content were incorrectly treated as paragraph separators by the
markdown parser, causing the content after the first blank line to be
excluded from the tag's children.

Fix: in preprocessLiteralTagContent, after escaping markdown metacharacters,
replace \n\n with &#10;&#10; HTML entities. This prevents the markdown
parser from interpreting blank lines as paragraph breaks while still
preserving the newline characters (rehype-raw decodes &#10; back to \n).

Fixes vercel/streamdown#456

* Run pnpm fix to resolve formatting issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix pre-existing formatting issue in code-block/index.tsx

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix lint and formatting issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Dmitrii Troitskii <jsleitor@gmail.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 15:41:03 -07:00
Hayden Bleasel b9796c8e91 Improve test coverage 2026-03-11 15:19:40 -07:00
Hayden Bleasel 6b49db1a20 Fix polynomial regular expression issue 2026-03-10 16:58:24 -07:00
Hayden Bleasel 6d4100a861 Update utils.test.ts 2026-03-10 16:53:48 -07:00
Hayden Bleasel 9f8ed4cdb3 Lint fixes 2026-03-10 16:53:02 -07:00
Hayden Bleasel ac8d83978a Resolves #437 2026-03-10 16:50:39 -07:00
Hayden Bleasel 51f5ba6cf7 Update remend priorities 2026-03-10 16:47:15 -07:00
Hayden Bleasel 716a5f05a9 Resolves #445 2026-03-10 16:46:10 -07:00
Hayden Bleasel 7b62e9a88d Resolves #454 2026-03-10 16:35:12 -07:00
Hayden Bleasel b105c64378 Resolves #456 2026-03-10 16:30:53 -07:00
Tatsunori Uchino 6f1ea07b22 chore(deps): update remark-cjk-friendly and remark-cjk-friendly-gfm-strikethrough to v2.x (#455)
* Update remark-cjk-friendly and remark-cjk-friendly-gfm-strikethrough to v2.x

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Tatsunori Uchino <tats.u@live.jp>

* Fix wrong changeset level (minor -> patch)

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2026-03-10 16:06:46 -07:00
Dmitrii 9c18748f00 docs: document required CSS custom properties (shadcn/ui design tokens) (#451)
* docs: document required CSS custom properties (shadcn/ui design tokens)

* docs: document required CSS custom properties in README

---------

Co-authored-by: Dmitrii Troitskii <jsleitor@gmail.com>
2026-03-10 16:04:54 -07:00
Dmitrii 651873df54 fix(streamdown-code): fall back to plain text for unknown/truncated language identifiers (#434)
* fix(streamdown-code): fall back to plain text for unknown/truncated language identifiers

When a code block's language identifier is unrecognised by Shiki (e.g.
'rus' from a network-truncated 'rust'), createHighlighter throws a
ShikiError. Previously the .catch() block only logged the error and
left subscribers hanging, causing a permanent React render-cycle stall.

Fix: resolve the language to the 'text' fallback *before* calling
getHighlighter() when the identifier is not in the bundledLanguages
set. This prevents the exception entirely and ensures the code block
renders with plain-text highlighting instead of breaking.

Fixes #433

* Add changeset for unknown language fallback fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add test for unknown/truncated language fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix TypeScript error: widen safeLanguage type to include SpecialLanguage

`'text'` is a SpecialLanguage in Shiki, not a BundledLanguage, so the
type annotations for getHighlighter and getHighlighterCacheKey need to
accept both.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix formatting: remove trailing comma, use double quotes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Dmitrii Troitskii <jsleitor@gmail.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 16:04:19 -07:00
Dmitrii d4ec6c0e96 feat: add meta prop to custom renderer props (#447)
Custom renderers now receive the raw metastring from code fences via a
new optional `meta` prop. Everything after the language identifier is
passed through (e.g. ```rust {1} title="foo"``` → meta = '{1} title="foo"').

- Added `meta?: string` to `CustomRendererProps` in `plugin-types.ts`
- Pass `meta={metastring}` to custom renderers in `components.tsx`
- Added tests for meta prop presence and absence
- Added minor changeset

Closes #443

Co-authored-by: Dmitrii Troitskii <jsleitor@gmail.com>
2026-03-10 16:04:02 -07:00
shloimy-wiesel 8b1c262982 fix(save): prepend UTF-8 BOM to CSV blobs for Excel compatibility (#441)
* fix(save): prepend UTF-8 BOM to CSV blobs for Excel compatibility

Closes #440

* fix(download): refactor TableDownloadButton to use save() for CSV downloads and ensure UTF-8 BOM compatibility
2026-03-10 16:02:51 -07:00