diff --git a/.changeset/brave-shiki-four.md b/.changeset/brave-shiki-four.md deleted file mode 100644 index 6f220213..00000000 --- a/.changeset/brave-shiki-four.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@streamdown/code": major ---- - -Upgrade Shiki to v4. Node.js 20 or newer is now required when using `@streamdown/code`. diff --git a/.changeset/code-copy-callbacks.md b/.changeset/code-copy-callbacks.md deleted file mode 100644 index 72a0ec71..00000000 --- a/.changeset/code-copy-callbacks.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": patch ---- - -Wire `onCopy` and `onError` through default code and Mermaid copy controls via `controls.code.copy` and `controls.mermaid.copy`. diff --git a/.changeset/feat-default-component-fallback.md b/.changeset/feat-default-component-fallback.md deleted file mode 100644 index 6ccc27c6..00000000 --- a/.changeset/feat-default-component-fallback.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -"streamdown": minor ---- - -feat: add `fallbackComponent` prop for missing map entries / `allowedTags` - -Adds a new `fallbackComponent` prop to ``. When provided, it is -used as a fallback renderer for any HTML tag or allowed custom tag that does -not have an explicit entry in the `components` map: - -```tsx - - createElement(node!.tagName, props, children) - } -> - {markdown} - -``` - -`fallbackComponent` applies to custom tags declared via `allowedTags` (with no -explicit component entry) and to standard HTML tags absent from the built-in -component set (e.g. ``, ``, `
`, `
`). Built-in and explicit -`components` entries always win — this is not a full unstyled mode. - -Refs #543 diff --git a/.changeset/fix-code-block-buttons-absolute.md b/.changeset/fix-code-block-buttons-absolute.md deleted file mode 100644 index d794d8b5..00000000 --- a/.changeset/fix-code-block-buttons-absolute.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"streamdown": patch ---- - -fix(code-block): use absolute positioning for action buttons to fix click events in nested scroll containers - -Switches the code block action button wrapper from `position: sticky` to -`position: absolute` (with `position: relative` on the container) so that -hit-testing works correctly in layouts with multiple nested `overflow: auto` -scroll containers. Previously, the `sticky` + `pointer-events-none/auto` -pattern caused browsers to mis-route click events to the code block wrapper -rather than the buttons when the component was embedded in 2+ nested scroll -containers. diff --git a/.changeset/incomplete-image-placeholder.md b/.changeset/incomplete-image-placeholder.md deleted file mode 100644 index 8ec9633b..00000000 --- a/.changeset/incomplete-image-placeholder.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"remend": patch -"streamdown": patch ---- - -Incomplete images during streaming now render a loading placeholder instead of being removed entirely. Incomplete images (e.g. `![alt](https://exampl`) are replaced with `![alt](streamdown:incomplete-image)` by remend, and the streamdown `ImageComponent` renders an animated skeleton for this special URL. This mirrors the existing behavior for incomplete links (`streamdown:incomplete-link`). The `streamdown` protocol is allowlisted for `img[src]` in the default sanitize schema so the sentinel survives rehype-sanitize + rehype-harden. diff --git a/.changeset/preserve-markdown-table-literals.md b/.changeset/preserve-markdown-table-literals.md deleted file mode 100644 index 73ce3003..00000000 --- a/.changeset/preserve-markdown-table-literals.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": patch ---- - -Preserve literal HTML tags and character entities when copying or downloading tables as Markdown. diff --git a/.changeset/quick-blocks-stream.md b/.changeset/quick-blocks-stream.md deleted file mode 100644 index 03e362c2..00000000 --- a/.changeset/quick-blocks-stream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": patch ---- - -Speed up block parsing by lexing only block tokens and reusing already parsed blocks while a document streams. diff --git a/.changeset/shared-overlay-portal.md b/.changeset/shared-overlay-portal.md deleted file mode 100644 index de14e3b3..00000000 --- a/.changeset/shared-overlay-portal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": patch ---- - -Add a top-level `portal` prop for configuring the container used by Mermaid fullscreen, table fullscreen, and the built-in link safety modal. diff --git a/.changeset/tidy-aliens-swim.md b/.changeset/tidy-aliens-swim.md deleted file mode 100644 index ae3b7a95..00000000 --- a/.changeset/tidy-aliens-swim.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"streamdown": patch ---- - -Fix Mermaid diagrams so text is readable and diagrams auto-fit container. -- Normalize SVG to remove responsive shrinking -- Extract intrinsic size from viewBox -- Add width-and-height auto-fit in PanZoom -- Preserve user zoom/pan after initial fit -- Add tests for SVG utilities and auto-fit behavior diff --git a/.changeset/unwrap-list-item-paragraphs.md b/.changeset/unwrap-list-item-paragraphs.md deleted file mode 100644 index 25b91a49..00000000 --- a/.changeset/unwrap-list-item-paragraphs.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"streamdown": patch ---- - -fix: unwrap a single paragraph child inside list items - -Loose list items from the markdown pipeline are often wrapped in a `

`. `MemoLi` now detects that sole paragraph child (including the memoized paragraph component) and renders its contents directly, so list items stay visually tight. Also updates the list animation retrigger test to match the unwrapped markup. - -Fixes #475 diff --git a/.changeset/update-marked-v18.md b/.changeset/update-marked-v18.md deleted file mode 100644 index 17b139a3..00000000 --- a/.changeset/update-marked-v18.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"streamdown": patch ---- - -Update `marked` from `^17.0.1` to `^18.0.11`. - -marked v18 no longer folds a block token's trailing blank line(s) into its own `raw`; that whitespace now surfaces as a separate `space` token immediately following the block (e.g. after `html`, `heading`, and `table` tokens). This changed the token stream shape that `parseMarkdownIntoBlocks` consumes, causing a dangling `space` token after a closed custom-tag HTML block to be emitted as its own standalone block. `parseMarkdownIntoBlocks` now folds a `space` token into the preceding block instead of pushing it as a new one, restoring v17-identical block boundaries and counts. The lossless `token.raw` concatenation invariant is preserved. diff --git a/packages/remend/CHANGELOG.md b/packages/remend/CHANGELOG.md index 75d72331..45d72397 100644 --- a/packages/remend/CHANGELOG.md +++ b/packages/remend/CHANGELOG.md @@ -1,5 +1,11 @@ # remend +## 1.3.2 + +### Patch Changes + +- e0ce123: Incomplete images during streaming now render a loading placeholder instead of being removed entirely. Incomplete images (e.g. `![alt](https://exampl`) are replaced with `![alt](streamdown:incomplete-image)` by remend, and the streamdown `ImageComponent` renders an animated skeleton for this special URL. This mirrors the existing behavior for incomplete links (`streamdown:incomplete-link`). The `streamdown` protocol is allowlisted for `img[src]` in the default sanitize schema so the sentinel survives rehype-sanitize + rehype-harden. + ## 1.3.1 ### Patch Changes diff --git a/packages/remend/package.json b/packages/remend/package.json index c971fc7f..d6a63b16 100644 --- a/packages/remend/package.json +++ b/packages/remend/package.json @@ -1,6 +1,6 @@ { "name": "remend", - "version": "1.3.1", + "version": "1.3.2", "description": "Self-healing markdown. Intelligently parses and styles incomplete Markdown blocks.", "homepage": "https://streamdown.ai/docs/termination", "repository": { diff --git a/packages/streamdown-code/CHANGELOG.md b/packages/streamdown-code/CHANGELOG.md index 503432ac..497fac89 100644 --- a/packages/streamdown-code/CHANGELOG.md +++ b/packages/streamdown-code/CHANGELOG.md @@ -1,5 +1,11 @@ # @streamdown/code +## 2.0.0 + +### Major Changes + +- db6fefc: Upgrade Shiki to v4. Node.js 20 or newer is now required when using `@streamdown/code`. + ## 1.1.1 ### Patch Changes diff --git a/packages/streamdown-code/package.json b/packages/streamdown-code/package.json index 19988048..c92a3b7c 100644 --- a/packages/streamdown-code/package.json +++ b/packages/streamdown-code/package.json @@ -1,6 +1,6 @@ { "name": "@streamdown/code", - "version": "1.1.1", + "version": "2.0.0", "description": "Shiki syntax highlighting plugin for Streamdown", "repository": { "type": "git", diff --git a/packages/streamdown/CHANGELOG.md b/packages/streamdown/CHANGELOG.md index 247d48f9..d720e148 100644 --- a/packages/streamdown/CHANGELOG.md +++ b/packages/streamdown/CHANGELOG.md @@ -1,5 +1,69 @@ # streamdown +## 2.7.0 + +### Minor Changes + +- b1965bb: feat: add `fallbackComponent` prop for missing map entries / `allowedTags` + + Adds a new `fallbackComponent` prop to ``. When provided, it is + used as a fallback renderer for any HTML tag or allowed custom tag that does + not have an explicit entry in the `components` map: + + ```tsx + + createElement(node!.tagName, props, children) + } + > + {markdown} + + ``` + + `fallbackComponent` applies to custom tags declared via `allowedTags` (with no + explicit component entry) and to standard HTML tags absent from the built-in + component set (e.g. ``, ``, `

`, `
`). Built-in and explicit + `components` entries always win — this is not a full unstyled mode. + + Refs #543 + +### Patch Changes + +- c971f42: Wire `onCopy` and `onError` through default code and Mermaid copy controls via `controls.code.copy` and `controls.mermaid.copy`. +- 163c63b: fix(code-block): use absolute positioning for action buttons to fix click events in nested scroll containers + + Switches the code block action button wrapper from `position: sticky` to + `position: absolute` (with `position: relative` on the container) so that + hit-testing works correctly in layouts with multiple nested `overflow: auto` + scroll containers. Previously, the `sticky` + `pointer-events-none/auto` + pattern caused browsers to mis-route click events to the code block wrapper + rather than the buttons when the component was embedded in 2+ nested scroll + containers. + +- e0ce123: Incomplete images during streaming now render a loading placeholder instead of being removed entirely. Incomplete images (e.g. `![alt](https://exampl`) are replaced with `![alt](streamdown:incomplete-image)` by remend, and the streamdown `ImageComponent` renders an animated skeleton for this special URL. This mirrors the existing behavior for incomplete links (`streamdown:incomplete-link`). The `streamdown` protocol is allowlisted for `img[src]` in the default sanitize schema so the sentinel survives rehype-sanitize + rehype-harden. +- 5504e50: Preserve literal HTML tags and character entities when copying or downloading tables as Markdown. +- 5b26c28: Speed up block parsing by lexing only block tokens and reusing already parsed blocks while a document streams. +- 18dcb20: Add a top-level `portal` prop for configuring the container used by Mermaid fullscreen, table fullscreen, and the built-in link safety modal. +- fdf4e33: Fix Mermaid diagrams so text is readable and diagrams auto-fit container. + - Normalize SVG to remove responsive shrinking + - Extract intrinsic size from viewBox + - Add width-and-height auto-fit in PanZoom + - Preserve user zoom/pan after initial fit + - Add tests for SVG utilities and auto-fit behavior +- 53812cf: fix: unwrap a single paragraph child inside list items + + Loose list items from the markdown pipeline are often wrapped in a `

`. `MemoLi` now detects that sole paragraph child (including the memoized paragraph component) and renders its contents directly, so list items stay visually tight. Also updates the list animation retrigger test to match the unwrapped markup. + + Fixes #475 + +- a155a9e: Update `marked` from `^17.0.1` to `^18.0.11`. + + marked v18 no longer folds a block token's trailing blank line(s) into its own `raw`; that whitespace now surfaces as a separate `space` token immediately following the block (e.g. after `html`, `heading`, and `table` tokens). This changed the token stream shape that `parseMarkdownIntoBlocks` consumes, causing a dangling `space` token after a closed custom-tag HTML block to be emitted as its own standalone block. `parseMarkdownIntoBlocks` now folds a `space` token into the preceding block instead of pushing it as a new one, restoring v17-identical block boundaries and counts. The lossless `token.raw` concatenation invariant is preserved. + +- Updated dependencies [e0ce123] + - remend@1.3.2 + ## 2.6.0 ### Minor Changes diff --git a/packages/streamdown/package.json b/packages/streamdown/package.json index e6de8fc1..6246eb72 100644 --- a/packages/streamdown/package.json +++ b/packages/streamdown/package.json @@ -1,6 +1,6 @@ { "name": "streamdown", - "version": "2.6.0", + "version": "2.7.0", "description": "A drop-in replacement for react-markdown, designed for AI-powered streaming.", "homepage": "https://streamdown.ai", "repository": {