Releases: lzinga/BlazorTextDiff
Releases · lzinga/BlazorTextDiff
Release v2026.02.23.33037
BlazorTextDiff v2026.02.23.33037
Breaking Changes
- Removed JavaScript interop — the component is now pure C#/Blazor. Remove the
<script src="_content/BlazorTextDiff/js/BlazorTextDiff.js"></script>tag from your HTML. - Removed DI registration —
ISideBySideDiffBuilderandIDifferno longer need to be registered. Remove anybuilder.Services.AddScoped<ISideBySideDiffBuilder, SideBySideDiffBuilder>()calls fromProgram.cs. DiffStatsconstructor changed — now accepts both(DiffPaneModel? oldText, DiffPaneModel? newText)to correctly count deletions from the old pane. Previously only accepted a single pane, causing deletion counts to always be zero.- Removed
ShowWhiteSpaceparameter — this parameter no longer exists onTextDiff.
Added
- Character-level highlighting — changed lines now highlight the specific characters that differ, not just the whole line. Uses
CharacterChunkerfrom DiffPlex for true per-character diffing. - Word + character two-tier highlights — partially changed words get a soft background (
*-wordclass) with the specific changed characters strongly highlighted inside (*-characterclass). Fully changed words use the character-level class directly. - Adjacent highlight merging — consecutive highlighted characters merge into a single smooth pill shape via CSS
:has()and+selectors. Rounded corners only appear on the first and last character in a run. - CSS custom properties for highlight shape —
--diff-char-radius,--diff-char-padding,--diff-word-radius,--diff-word-paddingfor easy customization of highlight appearance. Classparameter — pass additional CSS class(es) to the rootdiff-containerelement for scoped style overrides.AdditionalAttributessplatting — unmatched HTML attributes (style,id,data-*, etc.) pass through to the root element.IgnoreCaseparameter — toggle case-insensitive diff comparison.IgnoreWhiteSpaceparameter — toggle whitespace-insensitive diff comparison.- Interactive collapse/expand — the "..." collapse indicator is now a
<button>that toggles between "▼ Show more" and "▲ Show less". - Inline SVG loading spinner — replaced the Bootstrap-dependent CSS spinner with a self-contained SVG animation.
- Dark mode — full dark theme via
@media (prefers-color-scheme: dark)with appropriate highlight colors. - Responsive layout — panes stack vertically on narrow screens (
max-width: 768px). - Reduced motion support —
@media (prefers-reduced-motion: reduce)disables transitions. - Print styles — clean output when printing.
- Focus states — keyboard-accessible focus outlines on line numbers and badges.
- CI workflow — new
.github/workflows/ci.ymlruns build + test on every push and PR. - Unit tests — 38 tests across 4 test files covering
DiffStats,TextDiff,TextDiffLine, andTextDiffPane. - Character highlight demo page —
Pages/CharacterHighlight.razorshowing typo corrections and code refactoring examples.
Changed
- Project structure — moved projects under
src/andtests/directories. - Package updates —
Microsoft.AspNetCore.Components.Web9.0.8 → 9.0.13,Microsoft.AspNetCore.Components.WebAssembly9.0.8 → 9.0.13,DiffPlex1.8.0 → 1.9.0. - Publish workflow — now manual-only (
workflow_dispatch). Automatic CI testing handled by the newci.ymlworkflow. - Deploy workflow — updated paths for
src/structure, added test step before build. - Demo pages refactored — consolidated from 5 pages to 3 (Home playground, Character Highlight, Async). Removed
IgnoreCaseDemo.razor,IgnoreWhitespaceDemo.razor, andSurveyPrompt.razor. - README — complete rewrite documenting current API, all parameters, CSS custom properties table, highlight system explanation, and styling examples.
Fixed
- DiffStats deletion count — deletions are now correctly counted from the old text pane instead of always showing zero.
- CSS
rgba()with custom properties —rgba(var(--diff-border-primary), 0.3)doesn't work with hex values; replaced withcolor-mix(in srgb, var(...) 30%, transparent). - Loading spinner text — fixed the spinner so the text doesn't spin along with the icon.
Removed
BlazorTextDiff.js— JavaScript file deleted; all functionality is now pure C#.BlazorDiff.scss— SCSS source removed; CSS is maintained directly.compilerconfig.json— SCSS compiler configuration removed along with related.csprojentries.docs/readme.md— placeholder file removed.SurveyPrompt.razor— unused demo component removed.IgnoreCaseDemo.razor/IgnoreWhitespaceDemo.razor— consolidated into the main playground page.
📦 Package Information
- Version: 2026.02.23.33037
- Built: 22319135039
- Commit: e4f1225
📥 Installation
dotnet add package BlazorTextDiff --version 2026.02.23.33037🔗 Links
Release v2025.08.07.33170
BlazorTextDiff v2025.08.07.33170
📦 Package Information
- Version: 2025.08.07.33170
- Built: 16812618067
- Commit: c3ef401
📥 Installation
dotnet add package BlazorTextDiff --version 2025.08.07.33170