Commit Graph

67 Commits

Author SHA1 Message Date
streamdown-github-app[bot] 913351d200 Version Packages (#46)
Co-authored-by: streamdown-bot[bot] <streamdown-bot[bot]@users.noreply.github.com>
2025-08-26 21:02:39 -07:00
Hayden Bleasel 5fbad80f2f fix bug with terminating lists on certain models (#49)
* fix asterisk list termination

* Create fancy-snails-march.md
2025-08-26 21:01:30 -07:00
Hayden Bleasel 13898aa987 feat: add data attributes to markdown components (#48)
* Add data-streamdown attributes to components

Added data-streamdown attributes to various rendered components for improved DOM identification and targeting. This enhances testability and integration with other tools that rely on custom data attributes.

* Create little-buses-lick.md

* Update verify-changesets.yml
2025-08-26 20:45:40 -07:00
Chenalejandro 390bbc73af temporary fix for error color in rehype katex (#44)
* fix

* Hardcode muted foreground color

* Update index.tsx

* Create metal-hotels-doubt.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-08-26 15:43:30 -07:00
17hz 5f4ed3d30c chore: remove package-lock.json (#42)
* chore: remove package-lock.json

* chore: ignore package-lock.json

* Create modern-groups-ring.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-08-26 10:20:04 -07:00
Hayden Bleasel 72b485dce6 Update package.json 2025-08-25 17:46:22 -07:00
Hayden Bleasel a03629c59a Manual version bump 2025-08-25 17:45:38 -07:00
github-actions[bot] 929a8f3599 Version Packages (#36)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-25 17:41:09 -07:00
Hayden Bleasel 5ccfe24093 Resolves #5 2025-08-25 17:40:31 -07:00
Hayden Bleasel f834892754 fix: codeblock dark mode and background (#40)
* Add theme provider

* Update footer.tsx

* Update code blocks

* Create yellow-webs-follow.md

* Accept two shiki themes

* Update index.tsx

* Misc fixes
2025-08-25 17:32:34 -07:00
Hayden Bleasel 045907f841 fix: handleincompletesingleunderscoreitalic is not accounting for the usage inside math equations (#38)
* Fix underscores in math equations

* Create cuddly-goats-warn.md
2025-08-25 16:30:23 -07:00
Hayden Bleasel dc9ab5fffb Fix unit tests (#37)
* Fix failing unit tests

* Add test suite to PR and Release workflows

* Create short-swans-rush.md
2025-08-25 16:29:57 -07:00
Hayden Bleasel 6093353163 Update package.json 2025-08-25 12:24:51 -07:00
Hayden Bleasel 5ce9e33e20 Suppress error rendering 2025-08-25 12:24:28 -07:00
Hayden Bleasel ae0881caff Automatic diagrams (#34)
* Update demo copy

* Extract Code component

* Merge Code components

* Update mermaid.tsx

* Update mermaid.tsx

* Intelligently render "cached" valid Mermaid diagram

* Update components.tsx

* Fix infinite loop

* Update package.json
2025-08-25 11:41:57 -07:00
Francisco Moretti 9fc596354c fix(Response): language available on code element, not pre (#16)
* fix(Response): language available on code element, not pre

Infer code language from the className on the code element (not from pre).

The className prop on the component is a string. The node.properties.classname is an array of class tokens. We use className with a regex to extract the language.

Default language plaintext. Happy to change this if JS is a better default.

* fix div inside pre

* fix(components): update regex for language extraction

Changed the regex in components.tsx to allow for non-whitespace characters in language class names, improving language detection for code blocks.

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2025-08-25 11:03:58 -07:00
Ayhan Sipahi d528e25ac1 feat: Add Interactive Mermaid Diagram Support with Manual Rendering (#18)
* feat: add Mermaid diagram support to Streamdown

- Add Mermaid package dependency
- Create Mermaid component with error handling
- Integrate Mermaid support in markdown components
- Add Mermaid demo to website
- Update README with Mermaid examples
- Add comprehensive tests for Mermaid component

* feat(mermaıd): lazy load mermaid

* feat: add interactive Mermaid diagram support with manual render buttons

* perf: optimize Mermaid initialization to prevent config conflicts

* fix: extract pre component to resolve React Hooks Rules violation

* fix: add error handling and unique ID generation

* fix: conditionally render Mermaid button only for Mermaid code blocks
2025-08-25 10:58:33 -07:00
Arnav K be33778983 chore: update lucide-react dependency to fix virus error w/ vite (#27) 2025-08-25 10:55:13 -07:00
Francisco Moretti d483d0d78c fix(streamdown): add displayName for Block (eslint react/display-name) (#15) 2025-08-25 10:53:06 -07:00
Steven a048fcd351 Add homepage and repository fields to package.json (#20) 2025-08-22 08:21:17 -07:00
Hayden Bleasel dff0eefa51 Version bump 2025-08-21 09:54:42 -07:00
toyamarinyon 7325f759b6 Add Custom Shiki Theme Support via React Context (#8)
* Add Shiki theme support to Streamdown

* Add re-render check for shikiTheme in Streamdown component
2025-08-21 09:50:34 -07:00
Alex Gleason fb6bf270f4 Support React 18 (#11) 2025-08-21 09:46:44 -07:00
Hayden Bleasel 0651ec5852 Attempt to fix inline triple backtick pattern to not match multi-line blocks 2025-08-18 22:23:45 -07:00
Hayden Bleasel 5498061f2f Parse trailing backticks 2025-08-18 22:09:34 -07:00
Hayden Bleasel 0c0219912e Update package.json 2025-08-18 21:52:42 -07:00
Hayden Bleasel 0005acfbeb Add support for triple-asterisk 2025-08-18 21:51:52 -07:00
Hayden Bleasel 61b5eda90e Add more tests 2025-08-18 21:47:23 -07:00
Hayden Bleasel 66a6cc361f Fix inline triple backticks 2025-08-18 20:32:39 -07:00
Hayden Bleasel ac3a2d3ad7 Update package.json 2025-08-18 20:20:04 -07:00
Hayden Bleasel ae4fabe5e9 Fix prop types 2025-08-18 20:18:13 -07:00
Hayden Bleasel 949d6b4c90 Update package.json 2025-08-18 19:59:53 -07:00
Hayden Bleasel ed58f2d8cc Fix ESM / CJS import for harden-react-markdown 2025-08-18 19:59:12 -07:00
Hayden Bleasel 89c51bce57 Update package.json 2025-08-18 19:20:11 -07:00
Hayden Bleasel 688b40a40e Note Tailwind styles issue 2025-08-18 19:14:04 -07:00
Hayden Bleasel cb43263aba Fix component build 2025-08-18 19:07:41 -07:00
Hayden Bleasel 5abce1484a Fix test coverage 2025-08-18 18:46:41 -07:00
Hayden Bleasel 9afbc6150b Test fixes 2025-08-18 18:45:06 -07:00
Hayden Bleasel f1910ca991 Build fixes 2025-08-18 18:43:14 -07:00
Hayden Bleasel 3a7cbe3968 Update License and README 2025-08-18 18:39:16 -07:00
Hayden Bleasel e1072c052b Responsive fixes 2025-08-18 11:31:57 -07:00
Hayden Bleasel 3f0571f185 Add implementation code 2025-08-18 11:10:24 -07:00
Hayden Bleasel 554144469d Test fixes 2025-08-18 10:59:06 -07:00
Hayden Bleasel 4ba039cfee Get test coverage to 100% 2025-08-18 10:54:13 -07:00
Hayden Bleasel ada5cba65b Get test coverage from 89.53% to 98.53% 2025-08-18 10:52:56 -07:00
Hayden Bleasel 5dae6c8efe Fix vitest setup 2025-08-18 10:47:36 -07:00
Hayden Bleasel 34f9fba905 Add coverage-v8 2025-08-18 10:44:46 -07:00
Hayden Bleasel 8ad05aa56d Fix unit tests 2025-08-18 10:42:05 -07:00
Hayden Bleasel 55e670112c New section component 2025-08-18 09:41:30 -07:00
Hayden Bleasel 0ac8e18ed4 Update parse-incomplete-markdown.ts 2025-08-18 09:35:34 -07:00