16 Commits

Author SHA1 Message Date
Hayden Bleasel d3ed120364 Remend (#279)
* Initial extraction

* Split up files

* Misc cleanup

* Break apart test file

* Add vitest/coverage-v8

* Increase coverage to 99.63%

* Fix cognitive complexity issues

* Run Ultracite

* Delete parse-incomplete-markdown.ts

* Add postbuild script for use client directive

* Update README.md

* Add default export

* Update docs

* Rename package

* Create wicked-badgers-decide.md

* Fix remend tests

* Fix remend benchmarks

* Fix remaining Streamdown tests

* Update underscore-bug.test.tsx

* Update test.yml

* Update test.yml
2025-12-03 11:17:18 -08:00
Eli Ozcan b2e832f667 fix: validate language before creating highlighter (#257)
* fix: validate language before highlighting

* fix: highlighter language validation function types

* add: changeset
2025-11-24 21:45:58 -08:00
kavinkasper a4899494e7 fix: add missing tooltip support to action buttons (#254)
* fix: add missing title attributes to action buttons for accessibility

* Create vast-cameras-move.md

---------

Co-authored-by: kavin kumar <kavin.kumar@agilepoint.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-11-24 09:46:17 -08:00
Hayden Bleasel 49c66e82e7 Misc cleanup 2025-11-23 14:44:51 -08:00
Hayden Bleasel 74cac00f9b Fix code block data attributes 2025-11-23 14:17:34 -08:00
Hayden Bleasel 1e547d492a Fix code blocks in dark mode 2025-11-23 13:58:18 -08:00
Hayden Bleasel dbd198f3cc Undo lucide import optimization 2025-11-23 11:32:29 -08:00
Hayden Bleasel 476167eab7 Bundle size optimization (#244)
* Direct icon imports

* Lazy load mermaid and shiki until used

* Only load KaTeX when maths is present

* Add changesets

* Improve test app output

* Create lucide-react.d.ts

* Update packages/streamdown/lib/code-block/skeleton.tsx

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-11-22 18:50:11 -08:00
Hayden Bleasel 62888665f8 Performance improvements, part 2 (#241)
* Add functional benchmarking suite

* Optimize regex performance

* Fix rendering issue with code blocks

* Fix bench commands

* Table optimizations

* Math Block Detection Caching

* Parse blocks optimizations

* More regex-to-loop optimizations

* Update layout.tsx

* Remove dependency on vfile

* Optimize string operations

* Create markdown.test.tsx

* Optimized cache key generation

* Fix display issue

* Add core Markdown parsing benchmarks

* Update section.tsx

* CSV / TSV escaping optimization

* More optimizations

* Run Ultracite

* Fix remaining lint issues
2025-11-21 17:45:53 -08:00
Hayden Bleasel c025bc5a31 Run Ultracite 2025-11-21 15:36:01 -08:00
Hayden Bleasel 606209d10c Fix Code Blocks (#240)
* Display fallback html

* Rebuild code blocks on codeToTokens

* Remove unused code

* Fix flashing during re-rendering

* Remove useRef

* Switch back to JS Regex engine

* Create single highlighter

* Create container

* Restore singleton cache for highlighters

* Update static.tsx

* Fix tests

* Reapply memoization, consolidate effects, etc.

* Remove Static Code Block

* Run Ultracite

* Fix rendering flashes

* Add token highlight cache

* Update settings.json

* Create flat-gifts-fix.md
2025-11-21 14:55:50 -08:00
Hayden Bleasel 4e12df6209 Performance optimizations (#237)
* Merge contexts

* Fix unit tests

* Enhanced memoization

* Add caching layer to markdown parser

* Fix TS / lint errors

* Fix act() warnings in tests

* Add LRU cache to Markdown processor

* Syntax HighlightManager optimizations

* Switch to single highlighting instance

* Update global.css

* Shift light/dark mode syntax highlighting to CSS

* Fix Fumadocs affecting code blocks

* Fix code block static mode

* Run Ultracite

* Fix tests

* Ultracite fixes

* Cleanup code block implementation

* Update packages/streamdown/index.tsx

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Create every-cats-clean.md

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-11-20 15:17:41 -08:00
Hayden Bleasel 726e482608 Fix duplicate highlighters being created 2025-11-20 01:10:45 -08:00
Hayden Bleasel c85a42b1d5 Remove excess client directives 2025-11-19 14:25:01 -08:00
Hayden Bleasel b55cbdc954 Fix security issues, improve performance (#233)
* Resolves https://github.com/vercel/streamdown/security/code-scanning/9

* Resolves https://github.com/vercel/streamdown/security/code-scanning/7

* Resolves https://github.com/vercel/streamdown/security/code-scanning/6

* Resolves https://github.com/vercel/streamdown/security/code-scanning/3

* Resolves https://github.com/vercel/streamdown/security/code-scanning/1

* Bump deps, resolves https://github.com/vercel/streamdown/security/dependabot/10

* Run Ultracite

* Create major-spoons-do.md

* Update parse-incomplete-markdown.ts

* Update packages/streamdown/lib/parse-incomplete-markdown.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Update parse-incomplete-markdown.test.ts

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-11-19 13:57:04 -08:00
Hayden Bleasel 52db013a3b Static Mode (#231)
* Implement mode

* Add tests

* Create static test page

* Split up code block files

* Load static / streaming code block dynamically

* Extract highlighting from highlight manager

* Remove abort controller from static

* Add static fallback

* Split header

* Update docs

* Create soft-dragons-type.md

* Fix tests
2025-11-19 08:57:58 -08:00