Commit Graph

216 Commits

Author SHA1 Message Date
streamdown-github-app[bot] b46781c928 Version Packages (#397)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-19 08:39:50 -08:00
Hayden Bleasel 0987479ebf Resolves #402 2026-02-18 20:21:55 -08:00
Hayden Bleasel fdef60dda9 Create old-sloths-exist.md 2026-02-18 19:09:28 -08:00
Hayden Bleasel ba033328e0 Redesign Mermaid diagram 2026-02-18 12:32:49 -08:00
Hayden Bleasel 1abbf1e6a2 Redesign table 2026-02-18 11:16:58 -08:00
Hayden Bleasel 6374fbf56f Fix mermaid asterisk bug 2026-02-18 11:16:29 -08:00
Aradhya C P d73d7bbb4f feat: make code block header action buttons sticky (copy/download) (#401)
* refactor: simplify CodeBlockHeader component by removing unused children prop

* fix: remove overflow-hidden class from CodeBlockContainer

* feat: add sticky button for code block actions

* fix: update selector for code block action buttons in tests

* feat: add sticky action buttons to code block header for improved accessibility
2026-02-18 09:17:48 -08:00
Tim Neutkens 6e918670af Fix nested <details> tag (#403)
* Fix nested <details> tag

* Add changeset for nested details fix

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>
2026-02-18 09:01:34 -08:00
Hayden Bleasel ce9b4c2336 Resolves #386 2026-02-17 17:21:12 -08:00
Hayden Bleasel fb9f97c1ff Resolves #387 2026-02-17 16:59:52 -08:00
Hayden Bleasel c59733684e Resolves #384 2026-02-17 16:46:50 -08:00
Aradhya C P 32fb079dde fix: Conditionally hide download button and show custom fallback for broken images (#383)
* fix: prevent download button from overlapping broken images

* fix: show custom fallback for broken images instead of browser default

* docs: added changeset

* fix: update download button logic to prevent display when image fails to load
2026-02-17 16:39:18 -08:00
PaulSenon 15645da72e Feat/code block cls lower lazy boundary (#392)
* feat: Improve code block visual stability by moving lazy highlight boundary

* style: update contributing linter rules and fixed missed linter issues

* revert superfluous changes to CONTRIBUTING.md and geistdocs.tsx

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>
2026-02-17 16:36:48 -08:00
Waseem 3657e42bcc feat: add useIsBlockIncomplete hook for detecting incomplete streaming blocks (#381)
* 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>
2026-02-17 16:14:57 -08:00
zhdzb 7f9127b843 Add normalizeHtmlIndentation prop to prevent indented HTML tags from being treated as code blocks (#264) 2026-02-17 16:04:51 -08:00
Hayden Bleasel 0a810abb99 Change streamdown version from minor to patch
Add Markdown copy option for table data in TableCopyDropdown.
2026-02-17 09:17:18 -08:00
Aradhya C P 5d438ca902 feat: support copying table data as Markdown in TableCopyDropdown (#396)
* Add support for copying table data as Markdown in TableCopyDropdown

* Refactor content generation in TableCopyDropdown to use formatters for cleaner code

* docs: add changeset
2026-02-17 09:09:27 -08:00
streamdown-github-app[bot] c9a392ecdd Version Packages (#361)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-09 09:29:28 -08:00
Hayden Bleasel 4be8f6c258 Merge animate into main library 2026-02-08 15:25:00 -08:00
Hayden Bleasel 3e6a77d0ae Resolves #50 2026-02-08 14:56:37 -08:00
Hayden Bleasel 48756b5c88 Resolves #298 2026-02-08 13:12:11 -08:00
Hayden Bleasel 573ece690d Resolves #350 2026-02-08 12:48:50 -08:00
Hayden Bleasel 83f043c005 Resolves #194 2026-02-08 12:46:26 -08:00
Hayden Bleasel c1e1e66a0f Resolves #290, resolves #371, resolves #153 2026-02-07 18:12:43 -08:00
Hayden Bleasel 82bc4a6336 Resolves #373 2026-02-07 17:26:09 -08:00
Hayden Bleasel aeadcd6ba5 Fix single-line indented code blocks 2026-02-07 17:09:28 -08:00
Hayden Bleasel 6be5da87df Resolves #374 2026-02-07 17:04:59 -08:00
Hayden Bleasel a1e2fad475 Resolves #368 2026-02-07 17:00:33 -08:00
Hayden Bleasel 4fffb9f96a Resolves #376 2026-02-07 16:52:15 -08:00
Hayden Bleasel c347b53fea Resolves #370 2026-02-07 16:49:12 -08:00
Hayden Bleasel 6b42a859ed Resolves #378 2026-02-07 16:44:06 -08:00
AKAS ac25c6bf25 Updated Zoom Out Icon SVG (#375)
* UpdatedZoomOutIcon SVG

* Refactor ZoomOutIcon SVG structure

* Add patch changeset for mermaid zoom-out icon fix

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>
2026-02-07 16:38:57 -08:00
asd123freedom d5fe6d6c83 fix: properly handle HTML void elements in parse-blocks (#364)
* fix: properly handle HTML void elements in parse-blocks

* Create common-symbols-rush.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2026-01-23 09:39:46 -08:00
0xDon 9f7222455d fix: footnote detection incorrectly matching regex character classes (#365)
The footnote reference and definition patterns used [^\]\s] which matches
any character except ] and whitespace. This incorrectly detected regex
negated character classes like [^\s...] in code blocks as footnotes,
causing parseMarkdownIntoBlocks to return the entire document as one block.

Updated patterns to use [\w-] to only match valid footnote identifiers
(alphanumeric, underscore, hyphen).

Added regression tests to prevent this issue from recurring.
2026-01-23 09:36:38 -08:00
0xDon aabb9abbef fix: don't treat $$ inside code blocks as math delimiters (#366)
* fix: don't treat $$ inside code blocks as math delimiters

Code blocks can contain $$ as shell syntax (e.g., pstree -p $$ for current PID).
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.

* chore: add changeset for dollar sign fix
2026-01-23 09:35:14 -08:00
Hayden Bleasel fd5533c609 Resolves #355 2026-01-20 14:54:04 -08:00
Hayden Bleasel e633ff73f2 Resolves #360 2026-01-20 14:40:32 -08:00
Alex Supkay 6bb03caf80 fix: escape HTML when rehype-raw is omitted (#330) (#331)
* fix: escape HTML when rehype-raw is omitted (#330)

* chore: add changeset
2026-01-20 14:29:05 -08:00
Kelden c995fb7f5f Add bundled language aliases for JS/TS code fences (#356)
* fix: add code language aliases for shiki

* fix: derive language aliases from shiki metadata

* fix: normalize language ids to lowercase
2026-01-20 14:19:30 -08:00
Obada Khalili a12de57496 Custom tags in components (#359)
* allow custom tags in components

* comment

* tests

* docs

* lint

* changeset
2026-01-20 14:18:48 -08:00
streamdown-github-app[bot] c2337f06d7 Version Packages (#353)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-18 21:07:35 -08:00
Hayden Bleasel 900d726ce4 Resolves #354 2026-01-18 11:48:17 -08:00
Hayden Bleasel 5a06a01385 Resolves #305 2026-01-17 18:02:04 -08:00
Hayden Bleasel 8e24a9e42f Resolves #283 2026-01-17 17:13:50 -08:00
Hayden Bleasel add8edaeab Resolves #301 2026-01-17 16:59:58 -08:00
Hayden Bleasel 19dae64c01 Resolves #313 2026-01-17 15:47:48 -08:00
Hayden Bleasel e45f2a22dc Resolves #314 2026-01-17 15:47:22 -08:00
Hayden Bleasel 337625516c Resolves #332 2026-01-17 15:06:24 -08:00
Hayden Bleasel f0641f4942 Resolves #320 2026-01-17 15:02:06 -08:00
Hayden Bleasel 32bcb5d535 Resolves #325 2026-01-17 14:53:18 -08:00