Last 12 weeks ยท 229 commits
5 of 6 standards met
Summary Adds an opt-in prop that renders children of specified custom tags as plain text (no markdown parsing). This is useful for mention/entity tags in AI UIs where child content is a data label (e.g. a username or handle) rather than prose. Motivation When using with custom components, markdown inside tag children is still parsed. For example: renders with emphasis on , which is unintended for entity tags. Requiring model-side escaping () everywhere is fragile and adds prompt/runtime complexity. Solution A new prop. For tags in that list, markdown metacharacters inside the tag content are escaped before the markdown parser runs, so the parser treats the children as plain text. Output: renders as literal text โ no emphasis. Why preprocessing, not a rehype plugin The earlier approach (a rehype plugin that flattens children to text post-parse) loses the original characters โ by the time rehype runs, has already been parsed into so the underscores are gone. Escaping before parsing preserves the original content. Changes New โ escapes markdown metacharacters inside matching tag content before parsing Modified โ adds to and wires the preprocessor into Modified โ 5 new tests for the prop New** โ 10 unit tests for the preprocessor All 807 existing tests continue to pass. Closes #419
Given the directory structure on monorepo (npm, turbo): In the message documentation (https://ai-sdk.dev/elements/components/response) says that streamdown should be sourced in globals.css in a following way: The package is in the root and I was still unable to import correctly the styles what results in stream being updated with no updates in the UI. Could you please add some information how to configure it with monorepo?
Repository: vercel/streamdown. Description: A drop-in replacement for react-markdown, designed for AI-powered streaming. Stars: 4540, Forks: 230. Primary language: TypeScript. Languages: TypeScript (88.2%), MDX (9.5%), HTML (1.3%), CSS (0.7%), JavaScript (0.3%). Homepage: https://streamdown.ai/ Topics: ai, markdown, streaming. Latest release: streamdown@2.3.0 (1w ago). Open PRs: 12, open issues: 23. Last activity: 3d ago. Community health: 100%. Top contributors: haydenbleasel, streamdown-github-app[bot], 2hu12, dependabot[bot], FranciscoMoretti, aradhyacp, ayhansipahi, sleitor, thatbeautifuldream, turbobot-temp and others.
TypeScript
Closes #422 Summary When overriding streamdown's component with custom React components, the built-in copy/download buttons are lost because custom components fully replace default implementations. The table action components (, ) and their utilities are internal โ not exported from the public API. This PR adds exports to the main entry point so consumers can import these components and wire them into custom table overrides. Changes Export table components from : , , with their prop types Export table utilities: , , , , , Fix icon type error: Replace with on SVG icons in table components (pre-existing type issue exposed by new exports) Add documentation section in explaining how to preserve table interactivity with custom overrides Add changeset** for minor version bump Test Plan [x] โ streamdown package builds successfully with new exports [x] โ all 792 tests pass (59 test files) [x] โ linting/formatting passes [x] Generated includes all new type exports
Problem When overriding streamdown's component with custom React components via the prop, the built-in copy and download buttons are lost. This happens because custom components fully replace default implementations, and the table action components (, ) and their utilities are internal โ not exported from the public API. There's no way for consumers to import these components and wire them into their custom table overrides. Expected Behavior Table action components and utilities should be exported from streamdown's public API so consumers can preserve copy/download interactivity when using custom table components: Additional Context The components already exist internally (, , ) โ they just need to be re-exported from the main entry point.