Skip to content

@veridtools/dmn-diff-highlight

0.1.1

Patch Changes

  • 16f4e67: Add name field to ModifiedChange and the modified DiffToken. The semantic renderer now shows the element's human-readable name in the modified heading (~ decision "Loan Approval" (d1) modified) instead of repeating the id.

0.1.0

Minor Changes

  • bcaec6d: feat: initial release of @veridtools/dmn-diff-highlight

    Syntax highlighting library for @veridtools/dmn-diff output. Accepts rendered diff text in any of the four formats and returns annotated HTML with semantic dmn-dh-* CSS classes.

    • highlightDiff(text, options?) — auto-detects format, returns HTML string
    • highlightResult(result, options?) — renders a DiffResult as semantic HTML
    • mountDiff(element, text, options?) — convenience DOM helper
    • detectFormat re-exported from @veridtools/dmn-diff
    • React component DiffHighlight with memoized rendering via useMemo
    • Format-faithful output: rows input → rows HTML, JSON input → syntax-highlighted JSON
    • Default Catppuccin-inspired dark/light CSS theme via custom properties (style.css)
    • 120 tests across utils, renderers, tokenizers, and the public API

Last updated:

Released under the MIT License.