Commit Graph

108 Commits

Author SHA1 Message Date
github-actions[bot] 929a8f3599 Version Packages (#36)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
streamdown@1.1.2
2025-08-25 17:41:09 -07:00
Hayden Bleasel 5ccfe24093 Resolves #5 2025-08-25 17:40:31 -07:00
Hayden Bleasel 7bd021f423 Update config.json 2025-08-25 17:34:35 -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 01e5eb091d Community + Publishing Workflow (#35)
* Scaffold changesets

* Copy AI SDK config

* Update config

* Create tender-toes-study.md

* Create CONTRIBUTING.md

* Create SECURITY.md

* Create CODE_OF_CONDUCT.md

* Create issue and PR templates
2025-08-25 14:59:18 -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 80e5330176 Update README.md 2025-08-25 11:56:34 -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
David Khourshid ead476e0f8 Update README.md (#28)
Adds the step to build the streamdown package first, since otherwise it won't find the module in the workspace.
2025-08-25 10:56:25 -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
2hu 2f486418be docs: add shikiTheme prop to README (#25) 2025-08-25 10:54:10 -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
Hayden Bleasel b932431e6a Update props 2025-08-21 09:54:37 -07:00
Yella Yohan Reddy a4647ccd8e Add Vercel header link and include dist in build outputs (#10)
* fix: add Vercel link to header

* turbo: include dist/** in build outputs

* fix: replace Link with anchor for external Vercel link
2025-08-21 09:52:43 -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
Mrinaal Arora d775eff63c Update malicious link in hardened component (#3) 2025-08-19 15:55:45 -07:00
Hayden Bleasel d8ac8af409 Add missing copy buttons 2025-08-19 10:46:17 -07:00
Hayden Bleasel f88a31f7d7 Fix typo 2025-08-18 23:29:32 -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 d3761ef8d5 Update tsconfig.json 2025-08-18 19:48:04 -07:00
Hayden Bleasel 7485cd1597 Update tsconfig.json 2025-08-18 19:40:17 -07:00
Hayden Bleasel ec2e5f93af Update installer.tsx 2025-08-18 19:38:35 -07:00
Hayden Bleasel d6b7a28917 Responsive fixes 2025-08-18 19:37:19 -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 9416d7d649 Detach code block from website 2025-08-18 19:12:10 -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 b33cd3f855 Add AI Elements demo 2025-08-18 17:33:56 -07:00
Hayden Bleasel 694dbac7d8 Update copy 2025-08-18 17:21:57 -07:00