Skip to content

Conversation

@AVGVSTVS96
Copy link

Description

Draft – needs rebase
Will update shortly, opening now as reference
Integrates react-shiki into streamdown.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring (no functional changes)

Related Issues

Fixes #
Closes #
Related to #

Changes Made

Testing

  • All existing tests pass
  • Added new tests for the changes
  • Manually tested the changes

Test Coverage

Screenshots/Demos

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have created a changeset (pnpm changeset)

Changeset

  • I have created a changeset for these changes

Additional Notes

AVGVSTVS96 and others added 8 commits October 18, 2025 01:58
…reamdown

First working draft - all package tests pass, not yet tested on website
or elsewhere
react-shiki doesn't handle lang loading bc passing custom highlighter
bypasses it's lang resolution
Commit 23d8efe introduced the if (!isCopied) guard to fix onCopy being
called multiple times. This commit preserves that guard and removes the
unnecessary useEffect cleanup pattern. React 18+ handles unmounted state
updates safely, and effects aren't needed for event handler timeouts.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
- Add isAnimating prop and StreamdownRuntimeContext for streaming UX
- Replace harden-react-markdown with rehype-harden plugin system
- Export defaultRehypePlugins and defaultRemarkPlugins for customization
- Add useRef timeout cleanup to prevent memory leaks
- Disable copy/download buttons during streaming
- Update test apps and website to use isAnimating prop
- All 258 tests passing with react-shiki simplifications preserved

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@vercel
Copy link
Contributor

vercel bot commented Nov 20, 2025

@AVGVSTVS96 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant