Commit Graph

358 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 9562177cb8 Update index.tsx 2026-02-18 21:10:34 -08:00
Hayden Bleasel d892b140d8 Misc fixes 2026-02-18 21:07:39 -08:00
Hayden Bleasel 1102f1855e Fix all Biome lint and formatting errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:57:01 -08:00
Hayden Bleasel 6618620f97 Update index.tsx 2026-02-18 20:45:25 -08:00
Hayden Bleasel 184a4976ec Improve Mermaid error design 2026-02-18 20:45:04 -08:00
Hayden Bleasel b12332252d Hide carets when rendering code blocks and tables 2026-02-18 20:43:33 -08:00
Hayden Bleasel 0987479ebf Resolves #402 2026-02-18 20:21:55 -08:00
Hayden Bleasel 9ef44f7a05 streamdown: 100% line coverage (778 tests)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:11:56 -08:00
Hayden Bleasel 1a63c1242a remend: 100% test coverage
Remove dead code (isAsteriskListMarker, redundant isWithinCodeBlock
checks, unreachable fallbacks) and replace defensive patterns (|| [],
?? defaults) with non-null assertions where invariants guarantee
safety. Add coverage-gaps test suite covering edge cases in emphasis,
link, strikethrough, HTML tag, math block, and horizontal rule handlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:11:06 -08:00
Hayden Bleasel 01de03184a streamdown: boost test coverage from 88% to 97.87% (759 tests)
Added 23 test files covering components, hooks, mermaid, tables, markdown filtering, image handling, animation, code blocks, and more. Updated vitest config to exclude external packages from coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:48:38 -08:00
Hayden Bleasel 6b1fc5ba48 streamdown-cjk: 100% test coverage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:19:27 -08:00
Hayden Bleasel ba992232e7 streamdown-code: 100% test coverage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:19:00 -08:00
Hayden Bleasel 93a79cc06b Resolves #270 2026-02-18 19:08:39 -08:00
Hayden Bleasel 068acdf5f4 Fix fullscreen, fix unit tests 2026-02-18 12:40:06 -08:00
Hayden Bleasel 72fdc868e4 Update pan-zoom.tsx 2026-02-18 12:34:13 -08:00
Hayden Bleasel ba033328e0 Redesign Mermaid diagram 2026-02-18 12:32:49 -08:00
Hayden Bleasel 713109de45 Update components.tsx 2026-02-18 12:26:18 -08:00
Hayden Bleasel 1ea5900b62 Redesign code block 2026-02-18 12:25:33 -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
Hayden Bleasel fb327acacc Fix rebase conflict for #392 2026-02-18 09:22:03 -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
Hayden Bleasel cf94df7718 Fix tests 2026-02-18 09:05:12 -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
Hayden Bleasel 66d405cc24 Update normalize-html-indentation.test.tsx 2026-02-17 16:19:20 -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
Dmitrii 61c251b5ac fix(remend): don't treat underscores inside HTML tags as emphasis (#400)
When processing HTML like `<a target="_blank">`, the underscore in
`_blank` was being counted as an unclosed emphasis marker, causing
remend to append a trailing `_` to close it.

Added `isWithinHtmlTag()` check to `shouldSkipUnderscore()` — if the
underscore is between `<` and `>` of an HTML tag, it's skipped for
emphasis counting.

Fixes #385

Co-authored-by: Shurik <shurik@openclaw.ai>
2026-02-17 15:46:09 -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 2035c2ce6a Ultracite fixes 2026-02-08 15:25:49 -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 cc6135ca4a Run Ultracite 2026-02-08 13:16:33 -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 58bed568a5 Update index.ts 2026-02-07 18:18:04 -08:00
Hayden Bleasel 7fab201ebc Ultracite fixes 2026-02-07 18:16:08 -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 c6cbe8b254 Update plugin-types.ts 2026-02-07 17:18:26 -08:00
Hayden Bleasel 5a8f6e873a Run Ultracite 2026-02-07 17:17:08 -08:00
Hayden Bleasel aeadcd6ba5 Fix single-line indented code blocks 2026-02-07 17:09:28 -08:00