virtual-react-json-diff 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import type { DifferOptions, DiffResult, InlineDiffOptions } from "json-diff-kit";
1
+ import type { Differ, DifferOptions, DiffResult, InlineDiffOptions } from "json-diff-kit";
2
2
  export type DiffRow = {
3
3
  originalIndex: number;
4
4
  } & DiffResult;
@@ -36,7 +36,9 @@ export type VirtualizedDiffViewerProps = {
36
36
  leftTitle?: string;
37
37
  rightTitle?: string;
38
38
  onSearchMatch?: (index: number) => void;
39
+ getDiffData?: (diffData: [DiffResult[], DiffResult[]]) => void;
39
40
  differOptions?: DifferOptions;
41
+ customDiffer?: Differ;
40
42
  showSingleMinimap?: boolean;
41
43
  className?: string;
42
44
  miniMapWidth?: number;
@@ -0,0 +1,2 @@
1
+ import type { DiffResult } from "json-diff-kit";
2
+ export declare function fastHash(diff: [DiffResult[], DiffResult[]]): number;
@@ -1 +1,2 @@
1
1
  export { default as VirtualDiffViewer } from "./components/DiffViewer";
2
+ export { Differ, type DiffResult } from "json-diff-kit";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { DifferOptions, InlineDiffOptions } from 'json-diff-kit';
2
+ import { DiffResult, DifferOptions, Differ, InlineDiffOptions } from 'json-diff-kit';
3
+ export { DiffResult, Differ } from 'json-diff-kit';
3
4
 
4
5
  type VirtualizedDiffViewerProps = {
5
6
  oldValue: object;
@@ -10,7 +11,9 @@ type VirtualizedDiffViewerProps = {
10
11
  leftTitle?: string;
11
12
  rightTitle?: string;
12
13
  onSearchMatch?: (index: number) => void;
14
+ getDiffData?: (diffData: [DiffResult[], DiffResult[]]) => void;
13
15
  differOptions?: DifferOptions;
16
+ customDiffer?: Differ;
14
17
  showSingleMinimap?: boolean;
15
18
  className?: string;
16
19
  miniMapWidth?: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "virtual-react-json-diff",
3
3
  "type": "module",
4
- "version": "1.0.12",
4
+ "version": "1.0.13",
5
5
  "description": "Fast, virtualized React component for visually comparing large JSON objects. Includes search, theming, and minimap.",
6
6
  "author": {
7
7
  "name": "Utku Akyüz"