Skip to content

v0.1.5 — Diff Viewer Enhancements & Compatibility Layer

Choose a tag to compare

@Zhang-JiahangH Zhang-JiahangH released this 08 Apr 07:20
· 13 commits to main since this release
2860276

v0.1.5

Summary

This release improves compatibility, flexibility, and customization of the diff viewer, including support for react-diff-viewer-style props, unified diff mode, and enhanced line interactions.

Added

  • Compatibility layer for react-diff-viewer props:
    • oldValue / newValue aliases for original / modified
    • splitView toggle for split vs unified rendering
    • showDiffOnly and extraLinesSurroundingDiff mapped to collapse behavior
  • Unified (inline) diff rendering mode
  • renderContent(line) for custom syntax highlighting (e.g. Prism, Shiki)
  • Line interaction features:
    • onLineNumberClick with stable line IDs (L-12, R-8)
    • highlightLines with range support
    • hideLineNumbers
  • Custom code fold message via codeFoldMessageRenderer
  • Imperative method resetCodeBlocks()

Changed

  • Improved inline diff visualization with word-level highlights and disableWordDiff
  • Expanded diff strategies via compareMethod (CHARS, WORDS, WORDS_WITH_SPACE, LINES, TRIMMED_LINES, SENTENCES, CSS)
  • Enhanced styling and theming via styles and useDarkTheme
  • Added leftTitle / rightTitle for headers
  • Added linesOffset support
  • Bumped workspace package versions from 0.1.4 to 0.1.5