virtual-react-json-diff 1.0.1 → 1.0.3
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/LICENSE +1 -1
- package/README.md +14 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/DiffViewer/Diff.stories.d.ts +15 -43
- package/dist/cjs/types/src/components/DiffViewer/types/index.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/package.json +13 -9
|
@@ -1,46 +1,18 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
leftTitle: {
|
|
15
|
-
description: string;
|
|
16
|
-
control: "text";
|
|
17
|
-
};
|
|
18
|
-
rightTitle: {
|
|
19
|
-
description: string;
|
|
20
|
-
control: "text";
|
|
21
|
-
};
|
|
22
|
-
hideSearch: {
|
|
23
|
-
description: string;
|
|
24
|
-
control: "boolean";
|
|
25
|
-
};
|
|
26
|
-
height: {
|
|
27
|
-
description: string;
|
|
28
|
-
control: "number";
|
|
29
|
-
};
|
|
30
|
-
oldValue: {
|
|
31
|
-
description: string;
|
|
32
|
-
control: "object";
|
|
33
|
-
};
|
|
34
|
-
newValue: {
|
|
35
|
-
description: string;
|
|
36
|
-
control: "object";
|
|
37
|
-
};
|
|
38
|
-
differOptions: {
|
|
39
|
-
description: string;
|
|
40
|
-
control: "object";
|
|
41
|
-
};
|
|
42
|
-
};
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { VirtualDiffViewer } from "../..";
|
|
3
|
+
import type { DifferOptions } from "json-diff-kit";
|
|
4
|
+
type StoryProps = React.ComponentProps<typeof VirtualDiffViewer> & {
|
|
5
|
+
detectCircular?: boolean;
|
|
6
|
+
maxDepth?: number;
|
|
7
|
+
showModifications?: boolean;
|
|
8
|
+
arrayDiffMethod?: DifferOptions["arrayDiffMethod"];
|
|
9
|
+
compareKey?: string;
|
|
10
|
+
ignoreCase?: boolean;
|
|
11
|
+
ignoreCaseForKey?: boolean;
|
|
12
|
+
recursiveEqual?: boolean;
|
|
13
|
+
preserveKeyOrder?: DifferOptions["preserveKeyOrder"];
|
|
43
14
|
};
|
|
15
|
+
declare const meta: Meta<StoryProps>;
|
|
44
16
|
export default meta;
|
|
45
|
-
type Story = StoryObj<
|
|
17
|
+
type Story = StoryObj<StoryProps>;
|
|
46
18
|
export declare const Primary: Story;
|
|
@@ -38,6 +38,7 @@ export interface VirtualizedDiffViewerProps {
|
|
|
38
38
|
onSearchMatch?: (index: number) => void;
|
|
39
39
|
differOptions?: DifferOptions;
|
|
40
40
|
className?: string;
|
|
41
|
+
miniMapWidth?: number;
|
|
41
42
|
}
|
|
42
43
|
export interface DiffMinimapProps {
|
|
43
44
|
leftDiff: DiffRowOrCollapsed[];
|
|
@@ -47,4 +48,5 @@ export interface DiffMinimapProps {
|
|
|
47
48
|
currentScrollTop: number;
|
|
48
49
|
searchResults?: number[];
|
|
49
50
|
currentMatchIndex?: number;
|
|
51
|
+
miniMapWidth?: number;
|
|
50
52
|
}
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virtual-react-json-diff",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Fast, virtualized React component for visually comparing large JSON objects. Includes search, theming, and minimap.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -31,12 +31,16 @@
|
|
|
31
31
|
"react",
|
|
32
32
|
"json",
|
|
33
33
|
"diff",
|
|
34
|
-
"json
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
34
|
+
"json diff",
|
|
35
|
+
"json compare",
|
|
36
|
+
"diff viewer",
|
|
37
|
+
"react json diff",
|
|
38
|
+
"json visualizer",
|
|
39
|
+
"json viewer",
|
|
40
|
+
"virtual scroll",
|
|
41
|
+
"large json",
|
|
42
|
+
"compare json",
|
|
43
|
+
"react diff viewer"
|
|
40
44
|
],
|
|
41
45
|
"devDependencies": {
|
|
42
46
|
"@fontsource/inter": "^5.1.1",
|
|
@@ -70,7 +74,7 @@
|
|
|
70
74
|
"react": "^18.0.0"
|
|
71
75
|
},
|
|
72
76
|
"dependencies": {
|
|
73
|
-
"json-diff-kit": "^1.0.
|
|
77
|
+
"json-diff-kit": "^1.0.32",
|
|
74
78
|
"react-window": "^1.8.11"
|
|
75
79
|
}
|
|
76
80
|
}
|