diff --git a/.changeset/add-inline-katex-completion.md b/.changeset/add-inline-katex-completion.md deleted file mode 100644 index 9ffed1f1..00000000 --- a/.changeset/add-inline-katex-completion.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"remend": minor ---- - -Add opt-in inline KaTeX completion (`$formula` → `$formula$`) via a new `inlineKatex` option that defaults to `false` to avoid ambiguity with currency symbols. Also fixes block KaTeX completion when streaming produces a partial closing `$`. diff --git a/.changeset/fix-animation-stagger.md b/.changeset/fix-animation-stagger.md deleted file mode 100644 index dbc7a277..00000000 --- a/.changeset/fix-animation-stagger.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": patch ---- - -Add staggered `animation-delay` to streaming word/character animations so new content cascades in sequentially instead of all animating simultaneously. Configurable via the new `stagger` option (default 40ms). Set `stagger: 0` to restore the previous behavior. diff --git a/.changeset/fix-code-block-horizontal-scroll.md b/.changeset/fix-code-block-horizontal-scroll.md deleted file mode 100644 index 22c6ed20..00000000 --- a/.changeset/fix-code-block-horizontal-scroll.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": patch ---- - -Enable horizontal scrolling on code blocks so long lines are accessible instead of being clipped by `overflow-hidden`. diff --git a/.changeset/fix-code-block-memo.md b/.changeset/fix-code-block-memo.md deleted file mode 100644 index 3d67d54e..00000000 --- a/.changeset/fix-code-block-memo.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"streamdown": patch ---- - -Fix unnecessary re-renders of code blocks during streaming updates. - -**Problem:** In streaming mode, when new content arrives (e.g. a paragraph is appended), completed code blocks that haven't changed were still re-rendering. This happened because the `Streamdown` component used inline object literals as default parameter values for `linkSafety` (`{ enabled: true }`). Every time `children` changed and `Streamdown` re-rendered, these inline defaults created new references, which caused the `contextValue` useMemo to recompute a new `StreamdownContext` object. Since React propagates context changes through `memo` boundaries, any context consumer inside a memoized `Block` (such as `CodeBlock`) would re-render even though the block's own props were unchanged. - -**Fix:** Extract the inline default values for `linkSafety` into module-level constants (`defaultLinkSafetyConfig`). This ensures referential stability across renders, so `contextValue` only recomputes when the actual values change — not just because `children` updated. diff --git a/.changeset/fix-csv-utf8-bom-excel.md b/.changeset/fix-csv-utf8-bom-excel.md deleted file mode 100644 index a436c76c..00000000 --- a/.changeset/fix-csv-utf8-bom-excel.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"streamdown": patch ---- - -fix: prepend UTF-8 BOM to CSV downloads for Excel compatibility - -- `save()` now prepends `\uFEFF` for `text/csv` string content so Excel on - Windows detects UTF-8 encoding instead of falling back to ANSI. -- `TableDownloadButton` refactored to use `save()` instead of inline Blob - creation, ensuring the public API also gets the BOM fix. diff --git a/.changeset/fix-custom-tag-inline-blank-lines.md b/.changeset/fix-custom-tag-inline-blank-lines.md deleted file mode 100644 index 94ea0ffa..00000000 --- a/.changeset/fix-custom-tag-inline-blank-lines.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": patch ---- - -Fix custom tag content being prematurely split when content follows the opening tag on the same line and contains double newlines (`\n\n`). The preprocessor now ensures proper HTML block structure so the parser treats the entire tag as a single unit. diff --git a/.changeset/fix-dropdown-z-index.md b/.changeset/fix-dropdown-z-index.md deleted file mode 100644 index f15f971f..00000000 --- a/.changeset/fix-dropdown-z-index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": patch ---- - -Increase dropdown z-index for table copy and download menus to prevent clipping by surrounding elements. diff --git a/.changeset/fix-shadcn-css-vars-docs.md b/.changeset/fix-shadcn-css-vars-docs.md deleted file mode 100644 index cc9571c1..00000000 --- a/.changeset/fix-shadcn-css-vars-docs.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": patch ---- - -docs: document required CSS custom properties (shadcn/ui design tokens) in README diff --git a/.changeset/fix-single-tilde-strikethrough.md b/.changeset/fix-single-tilde-strikethrough.md deleted file mode 100644 index 9a8c6d3d..00000000 --- a/.changeset/fix-single-tilde-strikethrough.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"remend": minor ---- - -Escape single `~` between word characters to prevent false strikethrough rendering (e.g. `20~25°C` no longer renders as strikethrough). Adds a new `singleTilde` option (enabled by default) that can be disabled via `{ singleTilde: false }`. diff --git a/.changeset/fix-tailwind-v3-caret.md b/.changeset/fix-tailwind-v3-caret.md deleted file mode 100644 index 8bdadaf1..00000000 --- a/.changeset/fix-tailwind-v3-caret.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": patch ---- - -Replace Tailwind v4-only `*:last:` and `*:first:` variant syntax with `[&>*:last-child]:` and `[&>*:first-child]:` arbitrary variants for compatibility with both Tailwind CSS v3 and v4. Fixes caret rendering on every line instead of only the last child in v3. diff --git a/.changeset/fix-unknown-language-fallback.md b/.changeset/fix-unknown-language-fallback.md deleted file mode 100644 index fa9e53ea..00000000 --- a/.changeset/fix-unknown-language-fallback.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@streamdown/code": patch ---- - -Fall back to plain text highlighting when the code block language identifier is unknown or truncated mid-stream, preventing Shiki from throwing on unsupported language names. diff --git a/.changeset/line-numbers-option.md b/.changeset/line-numbers-option.md deleted file mode 100644 index 82827cb3..00000000 --- a/.changeset/line-numbers-option.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": minor ---- - -Add `lineNumbers` prop to disable line numbers in code blocks diff --git a/.changeset/meta-custom-renderer-prop.md b/.changeset/meta-custom-renderer-prop.md deleted file mode 100644 index 36a6693a..00000000 --- a/.changeset/meta-custom-renderer-prop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"streamdown": minor ---- - -Add `meta` prop to `CustomRendererProps`. Custom renderers now receive the raw metastring from the code fence (everything after the language identifier, e.g. ` ```rust {1} title="foo" ` → `meta = '{1} title="foo"'`). The prop is optional (`meta?: string`) and is `undefined` when no metastring is present. Existing custom renderers are unaffected. diff --git a/.changeset/update-remark-cjk-friendly-v2.md b/.changeset/update-remark-cjk-friendly-v2.md deleted file mode 100644 index a0461df8..00000000 --- a/.changeset/update-remark-cjk-friendly-v2.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@streamdown/cjk": patch ---- - -Updated `remark-cjk-friendly` and `remark-cjk-friendly-gfm-strikethrough` from v1.x to v2.x. The only breaking change in v2.0.0 is dropping Node.js 16 support, which Streamdown has already dropped (requires Node.js ≥18), so there is no actual impact. The actual code is identical to the latest v1.x release (v2.0.1 only added the ability to import package.json). diff --git a/packages/remend/CHANGELOG.md b/packages/remend/CHANGELOG.md index 52b64953..3fde056e 100644 --- a/packages/remend/CHANGELOG.md +++ b/packages/remend/CHANGELOG.md @@ -1,5 +1,12 @@ # remend +## 1.3.0 + +### Minor Changes + +- e50b0c4: Add opt-in inline KaTeX completion (`$formula` → `$formula$`) via a new `inlineKatex` option that defaults to `false` to avoid ambiguity with currency symbols. Also fixes block KaTeX completion when streaming produces a partial closing `$`. +- 716a5f0: Escape single `~` between word characters to prevent false strikethrough rendering (e.g. `20~25°C` no longer renders as strikethrough). Adds a new `singleTilde` option (enabled by default) that can be disabled via `{ singleTilde: false }`. + ## 1.2.2 ### Patch Changes diff --git a/packages/remend/package.json b/packages/remend/package.json index cc7e7e7a..44366e90 100644 --- a/packages/remend/package.json +++ b/packages/remend/package.json @@ -1,6 +1,6 @@ { "name": "remend", - "version": "1.2.2", + "version": "1.3.0", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", diff --git a/packages/streamdown-cjk/CHANGELOG.md b/packages/streamdown-cjk/CHANGELOG.md index 1886c10d..a0e6fca0 100644 --- a/packages/streamdown-cjk/CHANGELOG.md +++ b/packages/streamdown-cjk/CHANGELOG.md @@ -1,5 +1,11 @@ # @streamdown/cjk +## 1.0.3 + +### Patch Changes + +- 6f1ea07: Updated `remark-cjk-friendly` and `remark-cjk-friendly-gfm-strikethrough` from v1.x to v2.x. The only breaking change in v2.0.0 is dropping Node.js 16 support, which Streamdown has already dropped (requires Node.js ≥18), so there is no actual impact. The actual code is identical to the latest v1.x release (v2.0.1 only added the ability to import package.json). + ## 1.0.2 ### Patch Changes diff --git a/packages/streamdown-cjk/package.json b/packages/streamdown-cjk/package.json index afc65412..0c973fc7 100644 --- a/packages/streamdown-cjk/package.json +++ b/packages/streamdown-cjk/package.json @@ -1,6 +1,6 @@ { "name": "@streamdown/cjk", - "version": "1.0.2", + "version": "1.0.3", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", diff --git a/packages/streamdown-code/CHANGELOG.md b/packages/streamdown-code/CHANGELOG.md index b93eb541..503432ac 100644 --- a/packages/streamdown-code/CHANGELOG.md +++ b/packages/streamdown-code/CHANGELOG.md @@ -1,5 +1,11 @@ # @streamdown/code +## 1.1.1 + +### Patch Changes + +- 651873d: Fall back to plain text highlighting when the code block language identifier is unknown or truncated mid-stream, preventing Shiki from throwing on unsupported language names. + ## 1.1.0 ### Minor Changes diff --git a/packages/streamdown-code/package.json b/packages/streamdown-code/package.json index cd6514b1..54b04f49 100644 --- a/packages/streamdown-code/package.json +++ b/packages/streamdown-code/package.json @@ -1,6 +1,6 @@ { "name": "@streamdown/code", - "version": "1.1.0", + "version": "1.1.1", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", diff --git a/packages/streamdown/CHANGELOG.md b/packages/streamdown/CHANGELOG.md index 4233edaa..918c8351 100644 --- a/packages/streamdown/CHANGELOG.md +++ b/packages/streamdown/CHANGELOG.md @@ -1,5 +1,37 @@ # streamdown +## 2.5.0 + +### Minor Changes + +- d6666b6: Add `lineNumbers` prop to disable line numbers in code blocks +- d4ec6c0: Add `meta` prop to `CustomRendererProps`. Custom renderers now receive the raw metastring from the code fence (everything after the language identifier, e.g. ` ```rust {1} title="foo" ` → `meta = '{1} title="foo"'`). The prop is optional (`meta?: string`) and is `undefined` when no metastring is present. Existing custom renderers are unaffected. + +### Patch Changes + +- ac8d839: Add staggered `animation-delay` to streaming word/character animations so new content cascades in sequentially instead of all animating simultaneously. Configurable via the new `stagger` option (default 40ms). Set `stagger: 0` to restore the previous behavior. +- add5374: Enable horizontal scrolling on code blocks so long lines are accessible instead of being clipped by `overflow-hidden`. +- 75845c0: Fix unnecessary re-renders of code blocks during streaming updates. + + **Problem:** In streaming mode, when new content arrives (e.g. a paragraph is appended), completed code blocks that haven't changed were still re-rendering. This happened because the `Streamdown` component used inline object literals as default parameter values for `linkSafety` (`{ enabled: true }`). Every time `children` changed and `Streamdown` re-rendered, these inline defaults created new references, which caused the `contextValue` useMemo to recompute a new `StreamdownContext` object. Since React propagates context changes through `memo` boundaries, any context consumer inside a memoized `Block` (such as `CodeBlock`) would re-render even though the block's own props were unchanged. + + **Fix:** Extract the inline default values for `linkSafety` into module-level constants (`defaultLinkSafetyConfig`). This ensures referential stability across renders, so `contextValue` only recomputes when the actual values change — not just because `children` updated. + +- 8b1c262: fix: prepend UTF-8 BOM to CSV downloads for Excel compatibility + + - `save()` now prepends `\uFEFF` for `text/csv` string content so Excel on + Windows detects UTF-8 encoding instead of falling back to ANSI. + - `TableDownloadButton` refactored to use `save()` instead of inline Blob + creation, ensuring the public API also gets the BOM fix. + +- b105c64: Fix custom tag content being prematurely split when content follows the opening tag on the same line and contains double newlines (`\n\n`). The preprocessor now ensures proper HTML block structure so the parser treats the entire tag as a single unit. +- 9e6f991: Increase dropdown z-index for table copy and download menus to prevent clipping by surrounding elements. +- 9c18748: docs: document required CSS custom properties (shadcn/ui design tokens) in README +- 7b62e9a: Replace Tailwind v4-only `*:last:` and `*:first:` variant syntax with `[&>*:last-child]:` and `[&>*:first-child]:` arbitrary variants for compatibility with both Tailwind CSS v3 and v4. Fixes caret rendering on every line instead of only the last child in v3. +- Updated dependencies [e50b0c4] +- Updated dependencies [716a5f0] + - remend@1.3.0 + ## 2.4.0 ### Minor Changes diff --git a/packages/streamdown/package.json b/packages/streamdown/package.json index c2a3a2db..b44b3474 100644 --- a/packages/streamdown/package.json +++ b/packages/streamdown/package.json @@ -1,6 +1,6 @@ { "name": "streamdown", - "version": "2.4.0", + "version": "2.5.0", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js",