virtual-react-json-diff 1.0.9 → 1.0.11
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.
- package/README.md +31 -9
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/DiffViewer/hooks/useMinimapDraw.d.ts +2 -1
- package/dist/cjs/types/src/components/DiffViewer/types/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +5 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DiffRowOrCollapsed } from "../types";
|
|
2
2
|
type Props = {
|
|
3
3
|
canvasRef: React.RefObject<HTMLCanvasElement | null>;
|
|
4
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
4
5
|
height: number;
|
|
5
6
|
miniMapWidth: number;
|
|
6
7
|
leftDiff: DiffRowOrCollapsed[];
|
|
@@ -13,7 +14,7 @@ type Props = {
|
|
|
13
14
|
ROW_HEIGHT: number;
|
|
14
15
|
viewportHeight: number;
|
|
15
16
|
};
|
|
16
|
-
export declare function useMinimapDraw({ canvasRef, height, miniMapWidth, leftDiff, rightDiff, currentScrollTop, searchResults, currentMatchIndex, isDragging, totalLines, ROW_HEIGHT, viewportHeight, }: Props): {
|
|
17
|
+
export declare function useMinimapDraw({ canvasRef, containerRef, height, miniMapWidth, leftDiff, rightDiff, currentScrollTop, searchResults, currentMatchIndex, isDragging, totalLines, ROW_HEIGHT, viewportHeight, }: Props): {
|
|
17
18
|
drawScrollBox: (ctx: CanvasRenderingContext2D, color: string) => void;
|
|
18
19
|
drawMinimap: () => void;
|
|
19
20
|
};
|
|
@@ -37,6 +37,7 @@ export type VirtualizedDiffViewerProps = {
|
|
|
37
37
|
rightTitle?: string;
|
|
38
38
|
onSearchMatch?: (index: number) => void;
|
|
39
39
|
differOptions?: DifferOptions;
|
|
40
|
+
showSingleMinimap?: boolean;
|
|
40
41
|
className?: string;
|
|
41
42
|
miniMapWidth?: number;
|
|
42
43
|
inlineDiffOptions?: InlineDiffOptions;
|
package/dist/index.d.ts
CHANGED
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.
|
|
4
|
+
"version": "1.0.11",
|
|
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"
|
|
@@ -37,12 +37,14 @@
|
|
|
37
37
|
],
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "bun run rollup",
|
|
40
|
+
"watch": "bun run rollup --watch",
|
|
40
41
|
"prepublishOnly": "bun run build",
|
|
41
42
|
"rollup": "rollup -c --bundleConfigAsCjs",
|
|
42
43
|
"lint": "eslint",
|
|
43
44
|
"lint:fix": "eslint --fix",
|
|
44
45
|
"demo:dev": "cd demo && npm run dev",
|
|
45
|
-
"demo:build": "cd demo && npm run build"
|
|
46
|
+
"demo:build": "cd demo && npm run build",
|
|
47
|
+
"dev:watch": "concurrently \"npm run watch\" \"npm run demo:dev\""
|
|
46
48
|
},
|
|
47
49
|
"peerDependencies": {
|
|
48
50
|
"react": ">=18.0.0"
|
|
@@ -63,6 +65,7 @@
|
|
|
63
65
|
"@types/node": "^22.14.1",
|
|
64
66
|
"@types/react": ">=18.0.0",
|
|
65
67
|
"@types/react-window": "^1.8.8",
|
|
68
|
+
"concurrently": "^8.2.2",
|
|
66
69
|
"eslint": "^9.33.0",
|
|
67
70
|
"eslint-plugin-format": "^1.0.1",
|
|
68
71
|
"eslint-plugin-react-hooks": "^5.2.0",
|