virtual-react-json-diff 1.0.13 → 1.0.14

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.
@@ -12,7 +12,6 @@ type ListDataType = {
12
12
  type VirtualDiffGridProps = {
13
13
  leftDiff: DiffRowOrCollapsed[];
14
14
  rightDiff: DiffRowOrCollapsed[];
15
- outerRef: React.RefObject<Node | null>;
16
15
  listRef: React.RefObject<List<ListDataType>>;
17
16
  height: number;
18
17
  inlineDiffOptions?: InlineDiffOptions;
@@ -20,6 +19,8 @@ type VirtualDiffGridProps = {
20
19
  setScrollTop: Dispatch<React.SetStateAction<number>>;
21
20
  onExpand: (segmentIndex: number) => void;
22
21
  overScanCount?: number;
22
+ viewerRef?: React.RefObject<HTMLDivElement>;
23
+ listContainerRef?: React.RefObject<HTMLDivElement>;
23
24
  };
24
25
  declare const VirtualDiffGrid: React.FC<VirtualDiffGridProps>;
25
26
  export default VirtualDiffGrid;
@@ -1,2 +1,2 @@
1
1
  import type { DiffRowOrCollapsed } from "../types";
2
- export declare function useRowHeights(leftView: DiffRowOrCollapsed[]): number[];
2
+ export declare function useRowHeights(leftView: DiffRowOrCollapsed[], viewerRef?: React.RefObject<HTMLDivElement | null>): number[];
@@ -1,5 +1,5 @@
1
1
  import type { DiffRowOrCollapsed, SearchState } from "../types";
2
- export declare function useSearch(leftView: DiffRowOrCollapsed[], initialTerm?: string, onSearchMatch?: (index: number) => void): {
2
+ export declare function useSearch(leftView: DiffRowOrCollapsed[], initialTerm?: string, onSearchMatch?: (index: number) => void, viewerRef?: React.RefObject<HTMLDivElement | null>, listContainerRef?: React.RefObject<HTMLDivElement | null>): {
3
3
  searchState: SearchState;
4
4
  handleSearch: (term: string) => void;
5
5
  navigateMatch: (direction: "next" | "prev") => number | undefined;
@@ -1,3 +1,3 @@
1
1
  import type { DiffRowOrCollapsed } from "../types";
2
2
  export declare function performSearch(term: string, leftView: DiffRowOrCollapsed[]): number[];
3
- export declare function highlightMatches(term: string, className?: string): void;
3
+ export declare function highlightMatches(term: string, container: HTMLDivElement): void;
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.13",
4
+ "version": "1.0.14",
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"