@git-diff-view/react 0.0.21 → 0.0.23

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/index.d.ts CHANGED
@@ -115,6 +115,7 @@ export declare class DiffFile {
115
115
  unifiedLines: UnifiedLineItem[];
116
116
  unifiedHunkLines: Record<string, DiffHunkItem>;
117
117
  highlighterName: string;
118
+ highlighterType: string;
118
119
  composeByDiff: boolean;
119
120
  hasSomeLineCollapsed: boolean;
120
121
  version: string;
@@ -155,6 +156,7 @@ export declare class DiffFile {
155
156
  unifiedLines: UnifiedLineItem[];
156
157
  unifiedHunkLines: Record<string, DiffHunkItem>;
157
158
  highlighterName: string;
159
+ highlighterType: string;
158
160
  composeByDiff: boolean;
159
161
  hasSomeLineCollapsed: boolean;
160
162
  version: string;
@@ -825,19 +827,17 @@ export type DiffViewProps_2<T> = Omit<DiffViewProps<T>, "data"> & {
825
827
  hunks: string[];
826
828
  };
827
829
  };
828
- export declare function DiffView<T>(props: DiffViewProps_1<T> & {
830
+ declare function _DiffView<T>(props: DiffViewProps_1<T> & {
829
831
  ref?: ForwardedRef<{
830
832
  getDiffFileInstance: () => DiffFile;
831
833
  }>;
832
834
  }): ReactNode;
833
- export declare function DiffView<T>(props: DiffViewProps_2<T> & {
835
+ declare function _DiffView<T>(props: DiffViewProps_2<T> & {
834
836
  ref?: ForwardedRef<{
835
837
  getDiffFileInstance: () => DiffFile;
836
838
  }>;
837
839
  }): ReactNode;
838
- export declare namespace DiffView {
839
- var displayName: string;
840
- }
840
+ export declare const DiffView: typeof _DiffView;
841
841
  export declare const version: string;
842
842
 
843
843
  export {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "@git-diff-view/react",
4
4
  "author": "MrWangJustToDo",
5
5
  "license": "MIT",
6
- "version": "0.0.21",
6
+ "version": "0.0.23",
7
7
  "main": "index.js",
8
8
  "types": "index.d.ts",
9
9
  "files": [
@@ -16,7 +16,7 @@
16
16
  "url": "git+https://github.com/MrWangJustToDo/git-diff-view.git",
17
17
  "directory": "packages/react"
18
18
  },
19
- "homepage": "https://github.com/MrWangJustToDo/git-diff-view",
19
+ "homepage": "https://mrwangjusttodo.github.io/git-diff-view",
20
20
  "exports": {
21
21
  ".": {
22
22
  "require": "./index.js",
@@ -59,16 +59,17 @@
59
59
  "react diff component"
60
60
  ],
61
61
  "dependencies": {
62
- "@git-diff-view/core": "^0.0.21",
62
+ "@git-diff-view/core": "^0.0.23",
63
+ "@git-diff-view/utils": "^0.0.23",
63
64
  "@types/hast": "^3.0.0",
64
65
  "fast-diff": "^1.3.0",
65
- "highlight.js": "^11.10.0",
66
- "lowlight": "^3.2.0",
67
- "reactivity-store": "^0.3.8",
68
- "use-sync-external-store": "^1.2.2"
66
+ "highlight.js": "^11.11.0",
67
+ "lowlight": "^3.3.0",
68
+ "reactivity-store": "^0.3.9",
69
+ "use-sync-external-store": "^1.4.0"
69
70
  },
70
71
  "devDependencies": {
71
- "@types/use-sync-external-store": "^0.0.3",
72
+ "@types/use-sync-external-store": "^0.0.6",
72
73
  "autoprefixer": "^10.4.20",
73
74
  "postcss": "^8.4.47",
74
75
  "postcss-cli": "^11.0.0",
package/readme.md CHANGED
@@ -1,4 +1,4 @@
1
- ## A React UI Component to render `git diff` data, support `Split View` and `Unified View`, just like `GitHub` and `GitLab`.
1
+ ## A React DiffView Component like GitHub, Easy to use and feature complete.
2
2
 
3
3
  ### Usage
4
4
 
@@ -72,6 +72,11 @@ const bundle = file.getBundle();
72
72
  const diffFile = DiffFile.createInstance(data || {}, bundle);
73
73
  <DiffView diffFile={diffFile} {...props} />;
74
74
  ```
75
+ ### example
76
+
77
+ #### [react-example](https://github.com/MrWangJustToDo/git-diff-view/tree/main/ui/react-example)
78
+ #### [react-ssr-example](https://github.com/MrWangJustToDo/git-diff-view/tree/main/ui/next-page-example)
79
+ #### [react-rsc-example](https://github.com/MrWangJustToDo/git-diff-view/tree/main/ui/next-app-example)
75
80
 
76
81
  ### Screen Shot
77
82
 
@@ -96,8 +101,3 @@ const diffFile = DiffFile.createInstance(data || {}, bundle);
96
101
  | diffViewAddWidget| enable `addWidget` button, type: boolean |
97
102
  | onAddWidgetClick | when the `addWidget` button clicked, type: `({ side: "old" | "new", lineNumber: number }) => void` |
98
103
 
99
- ### example
100
-
101
- #### [react-example](https://github.com/MrWangJustToDo/git-diff-view/tree/main/ui/react-example)
102
- #### [react-ssr-example](https://github.com/MrWangJustToDo/git-diff-view/tree/main/ui/next-page-example)
103
- #### [react-rsc-example](https://github.com/MrWangJustToDo/git-diff-view/tree/main/ui/next-app-example)