virtual-react-json-diff 1.0.8 → 1.0.9
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 +1 -1
- package/dist/cjs/types/demo/src/App.d.ts +5 -0
- package/dist/cjs/types/demo/src/components/Sidebar.d.ts +8 -0
- package/dist/cjs/types/demo/src/main.d.ts +1 -0
- package/dist/cjs/types/demo/src/types/index.d.ts +18 -0
- package/dist/cjs/types/src/components/DiffViewer/hooks/useDragScroll.d.ts +1 -1
- package/dist/cjs/types/src/components/DiffViewer/hooks/useMinimapDraw.d.ts +1 -1
- package/package.json +4 -12
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[![Downloads][download-badge]][npm-url]
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
👉 [Try it now](https://virtual-react-json-diff.netlify.app)
|
|
7
|
+
👉 [Try it now](https://virtual-react-json-diff.netlify.app) (New Demo Page Available)
|
|
8
8
|
|
|
9
9
|
A high-performance React component for visually comparing large JSON objects. Built on top of [json-diff-kit](https://www.npmjs.com/package/json-diff-kit), this viewer supports:
|
|
10
10
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./Sidebar.css";
|
|
2
|
+
import type { Config } from "../types";
|
|
3
|
+
type Props = {
|
|
4
|
+
config: Config;
|
|
5
|
+
updateConfig: (key: keyof Config, value: Config[keyof Config]) => void;
|
|
6
|
+
};
|
|
7
|
+
declare function Sidebar(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Sidebar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DifferOptions } from "json-diff-kit";
|
|
2
|
+
export type Config = {
|
|
3
|
+
className: string;
|
|
4
|
+
leftTitle: string;
|
|
5
|
+
rightTitle: string;
|
|
6
|
+
miniMapWidth: number;
|
|
7
|
+
hideSearch: boolean;
|
|
8
|
+
height: number;
|
|
9
|
+
detectCircular: boolean;
|
|
10
|
+
maxDepth: number;
|
|
11
|
+
showModifications: boolean;
|
|
12
|
+
arrayDiffMethod: DifferOptions["arrayDiffMethod"];
|
|
13
|
+
compareKey: string;
|
|
14
|
+
ignoreCase: boolean;
|
|
15
|
+
ignoreCaseForKey: boolean;
|
|
16
|
+
recursiveEqual: boolean;
|
|
17
|
+
preserveKeyOrder: DifferOptions["preserveKeyOrder"];
|
|
18
|
+
};
|
|
@@ -4,7 +4,7 @@ type UseDragScrollParams = {
|
|
|
4
4
|
viewportHeight: number;
|
|
5
5
|
ROW_HEIGHT: number;
|
|
6
6
|
onScroll: (scrollTop: number) => void;
|
|
7
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
7
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
8
8
|
};
|
|
9
9
|
type UseDragScrollReturn = {
|
|
10
10
|
handleMouseDown: (e: React.MouseEvent) => 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.
|
|
4
|
+
"version": "1.0.9",
|
|
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"
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"build": "bun run rollup",
|
|
40
40
|
"prepublishOnly": "bun run build",
|
|
41
41
|
"rollup": "rollup -c --bundleConfigAsCjs",
|
|
42
|
-
"storybook": "storybook dev -p 6006",
|
|
43
|
-
"build-storybook": "storybook build",
|
|
44
42
|
"lint": "eslint",
|
|
45
|
-
"lint:fix": "eslint --fix"
|
|
43
|
+
"lint:fix": "eslint --fix",
|
|
44
|
+
"demo:dev": "cd demo && npm run dev",
|
|
45
|
+
"demo:build": "cd demo && npm run build"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": ">=18.0.0"
|
|
@@ -60,13 +60,6 @@
|
|
|
60
60
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
61
61
|
"@rollup/plugin-terser": "^0.4.3",
|
|
62
62
|
"@rollup/plugin-typescript": "^11.1.2",
|
|
63
|
-
"@storybook/addon-essentials": "8.6.0-alpha.0",
|
|
64
|
-
"@storybook/addon-interactions": "8.6.0-alpha.0",
|
|
65
|
-
"@storybook/addon-onboarding": "8.6.0-alpha.0",
|
|
66
|
-
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
67
|
-
"@storybook/blocks": "8.6.0-alpha.0",
|
|
68
|
-
"@storybook/react": "8.6.0-alpha.0",
|
|
69
|
-
"@storybook/react-vite": "8.6.0-alpha.0",
|
|
70
63
|
"@types/node": "^22.14.1",
|
|
71
64
|
"@types/react": ">=18.0.0",
|
|
72
65
|
"@types/react-window": "^1.8.8",
|
|
@@ -82,7 +75,6 @@
|
|
|
82
75
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
83
76
|
"rollup-plugin-postcss": "^4.0.2",
|
|
84
77
|
"simple-git-hooks": "^2.13.1",
|
|
85
|
-
"storybook": "8.6.0-alpha.0",
|
|
86
78
|
"tslib": "^2.6.0",
|
|
87
79
|
"typescript": "^5.1.6"
|
|
88
80
|
},
|