@git-diff-view/react 0.0.34 → 0.0.35
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/dist/cjs/index.development.js +6 -6
- package/dist/cjs/index.development.js.map +1 -1
- package/dist/cjs/index.production.js +6 -6
- package/dist/cjs/index.production.js.map +1 -1
- package/dist/css/diff-view-pure.css +13 -13
- package/dist/css/diff-view.css +13 -13
- package/dist/esm/index.mjs +6 -6
- package/dist/esm/index.mjs.map +1 -1
- package/index.d.ts +10 -10
- package/package.json +2 -2
- package/src/_com.css +13 -13
- package/src/components/DiffSplitHunkLineNormal.tsx +2 -2
- package/src/components/DiffUnifiedExtendLine.tsx +1 -1
- package/src/components/DiffUnifiedWidgetLine.tsx +1 -1
- package/src/components/v2/DiffSplitHunkLineNormal_v2.tsx +2 -2
- package/styles/diff-view-pure.css +13 -13
- package/styles/diff-view.css +13 -13
package/index.d.ts
CHANGED
|
@@ -17,8 +17,8 @@ declare class File$1 {
|
|
|
17
17
|
rawFile: Record<number, string>;
|
|
18
18
|
hasDoRaw: boolean;
|
|
19
19
|
rawLength?: number;
|
|
20
|
-
syntaxFile: Record<number, SyntaxLineWithTemplate>;
|
|
21
|
-
plainFile: Record<number, {
|
|
20
|
+
syntaxFile: Record<number | string, SyntaxLineWithTemplate>;
|
|
21
|
+
plainFile: Record<number | string, {
|
|
22
22
|
value: string;
|
|
23
23
|
template?: string;
|
|
24
24
|
}>;
|
|
@@ -162,21 +162,21 @@ export declare class DiffFile {
|
|
|
162
162
|
hasBuildUnified: boolean;
|
|
163
163
|
oldFileLines: Record<number, string>;
|
|
164
164
|
oldFileDiffLines: Record<string, DiffLineItem>;
|
|
165
|
-
oldFilePlainLines: Record<number, {
|
|
165
|
+
oldFilePlainLines: Record<string | number, {
|
|
166
166
|
value: string;
|
|
167
167
|
template?: string;
|
|
168
168
|
}>;
|
|
169
|
-
oldFileSyntaxLines: Record<number, SyntaxLine & {
|
|
169
|
+
oldFileSyntaxLines: Record<string | number, SyntaxLine & {
|
|
170
170
|
template?: string;
|
|
171
171
|
}>;
|
|
172
172
|
oldFilePlaceholderLines: Record<string, boolean>;
|
|
173
173
|
newFileLines: Record<number, string>;
|
|
174
174
|
newFileDiffLines: Record<string, DiffLineItem>;
|
|
175
|
-
newFilePlainLines: Record<number, {
|
|
175
|
+
newFilePlainLines: Record<string | number, {
|
|
176
176
|
value: string;
|
|
177
177
|
template?: string;
|
|
178
178
|
}>;
|
|
179
|
-
newFileSyntaxLines: Record<number, SyntaxLine & {
|
|
179
|
+
newFileSyntaxLines: Record<string | number, SyntaxLine & {
|
|
180
180
|
template?: string;
|
|
181
181
|
}>;
|
|
182
182
|
newFilePlaceholderLines: Record<string, boolean>;
|
|
@@ -224,21 +224,21 @@ export declare class DiffFile {
|
|
|
224
224
|
hasBuildUnified: boolean;
|
|
225
225
|
oldFileLines: Record<number, string>;
|
|
226
226
|
oldFileDiffLines: Record<string, DiffLineItem>;
|
|
227
|
-
oldFilePlainLines: Record<number, {
|
|
227
|
+
oldFilePlainLines: Record<string | number, {
|
|
228
228
|
value: string;
|
|
229
229
|
template?: string;
|
|
230
230
|
}>;
|
|
231
|
-
oldFileSyntaxLines: Record<number, SyntaxLine & {
|
|
231
|
+
oldFileSyntaxLines: Record<string | number, SyntaxLine & {
|
|
232
232
|
template?: string;
|
|
233
233
|
}>;
|
|
234
234
|
oldFilePlaceholderLines: Record<string, boolean>;
|
|
235
235
|
newFileLines: Record<number, string>;
|
|
236
236
|
newFileDiffLines: Record<string, DiffLineItem>;
|
|
237
|
-
newFilePlainLines: Record<number, {
|
|
237
|
+
newFilePlainLines: Record<string | number, {
|
|
238
238
|
value: string;
|
|
239
239
|
template?: string;
|
|
240
240
|
}>;
|
|
241
|
-
newFileSyntaxLines: Record<number, SyntaxLine & {
|
|
241
|
+
newFileSyntaxLines: Record<string | number, SyntaxLine & {
|
|
242
242
|
template?: string;
|
|
243
243
|
}>;
|
|
244
244
|
newFilePlaceholderLines: Record<string, boolean>;
|
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.
|
|
6
|
+
"version": "0.0.35",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"types": "index.d.ts",
|
|
9
9
|
"files": [
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"react diff component"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@git-diff-view/core": "^0.0.
|
|
64
|
+
"@git-diff-view/core": "^0.0.35",
|
|
65
65
|
"@types/hast": "^3.0.0",
|
|
66
66
|
"fast-diff": "^1.3.0",
|
|
67
67
|
"highlight.js": "^11.11.0",
|
package/src/_com.css
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
[data-theme="light"] .diff-style-root {
|
|
6
6
|
--diff-border--: #dedede;
|
|
7
|
-
--diff-add-content--: #
|
|
7
|
+
--diff-add-content--: #dafbe1;
|
|
8
8
|
--diff-del-content--: #ffebe9;
|
|
9
|
-
--diff-add-lineNumber--: #
|
|
10
|
-
--diff-del-lineNumber--: #
|
|
9
|
+
--diff-add-lineNumber--: #aceebb;
|
|
10
|
+
--diff-del-lineNumber--: #ffcecb;
|
|
11
11
|
--diff-plain-content--: #ffffff;
|
|
12
12
|
--diff-expand-content--: #fafafa;
|
|
13
13
|
--diff-plain-lineNumber--: #fafafa;
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
--diff-plain-lineNumber-color--: #555555;
|
|
16
16
|
--diff-expand-lineNumber-color--: #555555;
|
|
17
17
|
--diff-hunk-content--: #ddf4ff;
|
|
18
|
-
--diff-hunk-lineNumber--: #
|
|
18
|
+
--diff-hunk-lineNumber--: #b6e3ff;
|
|
19
19
|
--diff-hunk-lineNumber-hover--: #0969da;
|
|
20
|
-
--diff-add-content-highlight--: #
|
|
21
|
-
--diff-del-content-highlight--: #
|
|
20
|
+
--diff-add-content-highlight--: #aceebb;
|
|
21
|
+
--diff-del-content-highlight--: #ffcecb;
|
|
22
22
|
--diff-add-widget--: #0969d2;
|
|
23
23
|
--diff-add-widget-color--: #ffffff;
|
|
24
24
|
--diff-empty-content--: #fafafa;
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
|
|
36
36
|
[data-theme="dark"] .diff-style-root {
|
|
37
37
|
--diff-border--: #3d444d;
|
|
38
|
-
--diff-add-content--: #
|
|
39
|
-
--diff-del-content--: #
|
|
40
|
-
--diff-add-lineNumber--: #
|
|
41
|
-
--diff-del-lineNumber--: #
|
|
38
|
+
--diff-add-content--: #18271f;
|
|
39
|
+
--diff-del-content--: #23191c;
|
|
40
|
+
--diff-add-lineNumber--: #284228;
|
|
41
|
+
--diff-del-lineNumber--: #4f2828;
|
|
42
42
|
--diff-plain-content--: #0d1117;
|
|
43
43
|
--diff-expand-content--: #161b22;
|
|
44
44
|
--diff-plain-lineNumber--: #161b22;
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
--diff-plain-lineNumber-color--: #a0aaab;
|
|
47
47
|
--diff-expand-lineNumber-color--: #a0aaab;
|
|
48
48
|
--diff-hunk-content--: #131d2e;
|
|
49
|
-
--diff-hunk-lineNumber--: #
|
|
49
|
+
--diff-hunk-lineNumber--: #0c2d6b;
|
|
50
50
|
--diff-hunk-lineNumber-hover--: #1f6feb;
|
|
51
|
-
--diff-add-content-highlight--: #
|
|
52
|
-
--diff-del-content-highlight--: #
|
|
51
|
+
--diff-add-content-highlight--: #2f5732;
|
|
52
|
+
--diff-del-content-highlight--: #713431;
|
|
53
53
|
--diff-add-widget--: #0969d2;
|
|
54
54
|
--diff-add-widget-color--: #ffffff;
|
|
55
55
|
--diff-empty-content--: #161b22;
|
|
@@ -163,8 +163,8 @@ const InternalDiffSplitHunkLineGitLab = ({
|
|
|
163
163
|
|
|
164
164
|
useSyncHeight({
|
|
165
165
|
selector: `tr[data-line="${lineNumber}-hunk"]`,
|
|
166
|
-
side: SplitSide[
|
|
167
|
-
enable:
|
|
166
|
+
side: SplitSide[SplitSide.old],
|
|
167
|
+
enable: side === SplitSide.new,
|
|
168
168
|
});
|
|
169
169
|
|
|
170
170
|
const couldExpand = expandEnabled && currentHunk && currentHunk.splitInfo;
|
|
@@ -32,7 +32,7 @@ const InternalDiffUnifiedExtendLine = ({
|
|
|
32
32
|
// TODO use css variable to get width
|
|
33
33
|
const width = useDomWidth({
|
|
34
34
|
selector: ".unified-diff-table-wrapper",
|
|
35
|
-
enable: typeof renderExtendLine === "function"
|
|
35
|
+
enable: typeof renderExtendLine === "function",
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
if (!renderExtendLine) return null;
|
|
@@ -44,7 +44,7 @@ const InternalDiffUnifiedWidgetLine = ({
|
|
|
44
44
|
|
|
45
45
|
const width = useDomWidth({
|
|
46
46
|
selector: ".unified-diff-table-wrapper",
|
|
47
|
-
enable: typeof renderWidgetLine === "function"
|
|
47
|
+
enable: typeof renderWidgetLine === "function",
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
if (!renderWidgetLine) return null;
|
|
@@ -154,8 +154,8 @@ const InternalDiffSplitHunkLineGitLab = ({
|
|
|
154
154
|
|
|
155
155
|
useSyncHeight({
|
|
156
156
|
selector: `div[data-state="hunk"][data-line="${lineNumber}-hunk"]`,
|
|
157
|
-
side: SplitSide[
|
|
158
|
-
enable:
|
|
157
|
+
side: SplitSide[SplitSide.old],
|
|
158
|
+
enable: side === SplitSide.new,
|
|
159
159
|
});
|
|
160
160
|
|
|
161
161
|
const couldExpand = expandEnabled && currentHunk && currentHunk.splitInfo;
|
|
@@ -267,10 +267,10 @@
|
|
|
267
267
|
}
|
|
268
268
|
.diff-tailwindcss-wrapper[data-theme="light"] .diff-style-root {
|
|
269
269
|
--diff-border--: #dedede;
|
|
270
|
-
--diff-add-content--: #
|
|
270
|
+
--diff-add-content--: #dafbe1;
|
|
271
271
|
--diff-del-content--: #ffebe9;
|
|
272
|
-
--diff-add-lineNumber--: #
|
|
273
|
-
--diff-del-lineNumber--: #
|
|
272
|
+
--diff-add-lineNumber--: #aceebb;
|
|
273
|
+
--diff-del-lineNumber--: #ffcecb;
|
|
274
274
|
--diff-plain-content--: #ffffff;
|
|
275
275
|
--diff-expand-content--: #fafafa;
|
|
276
276
|
--diff-plain-lineNumber--: #fafafa;
|
|
@@ -278,10 +278,10 @@
|
|
|
278
278
|
--diff-plain-lineNumber-color--: #555555;
|
|
279
279
|
--diff-expand-lineNumber-color--: #555555;
|
|
280
280
|
--diff-hunk-content--: #ddf4ff;
|
|
281
|
-
--diff-hunk-lineNumber--: #
|
|
281
|
+
--diff-hunk-lineNumber--: #b6e3ff;
|
|
282
282
|
--diff-hunk-lineNumber-hover--: #0969da;
|
|
283
|
-
--diff-add-content-highlight--: #
|
|
284
|
-
--diff-del-content-highlight--: #
|
|
283
|
+
--diff-add-content-highlight--: #aceebb;
|
|
284
|
+
--diff-del-content-highlight--: #ffcecb;
|
|
285
285
|
--diff-add-widget--: #0969d2;
|
|
286
286
|
--diff-add-widget-color--: #ffffff;
|
|
287
287
|
--diff-empty-content--: #fafafa;
|
|
@@ -296,10 +296,10 @@
|
|
|
296
296
|
}
|
|
297
297
|
.diff-tailwindcss-wrapper[data-theme="dark"] .diff-style-root {
|
|
298
298
|
--diff-border--: #3d444d;
|
|
299
|
-
--diff-add-content--: #
|
|
300
|
-
--diff-del-content--: #
|
|
301
|
-
--diff-add-lineNumber--: #
|
|
302
|
-
--diff-del-lineNumber--: #
|
|
299
|
+
--diff-add-content--: #18271f;
|
|
300
|
+
--diff-del-content--: #23191c;
|
|
301
|
+
--diff-add-lineNumber--: #284228;
|
|
302
|
+
--diff-del-lineNumber--: #4f2828;
|
|
303
303
|
--diff-plain-content--: #0d1117;
|
|
304
304
|
--diff-expand-content--: #161b22;
|
|
305
305
|
--diff-plain-lineNumber--: #161b22;
|
|
@@ -307,10 +307,10 @@
|
|
|
307
307
|
--diff-plain-lineNumber-color--: #a0aaab;
|
|
308
308
|
--diff-expand-lineNumber-color--: #a0aaab;
|
|
309
309
|
--diff-hunk-content--: #131d2e;
|
|
310
|
-
--diff-hunk-lineNumber--: #
|
|
310
|
+
--diff-hunk-lineNumber--: #0c2d6b;
|
|
311
311
|
--diff-hunk-lineNumber-hover--: #1f6feb;
|
|
312
|
-
--diff-add-content-highlight--: #
|
|
313
|
-
--diff-del-content-highlight--: #
|
|
312
|
+
--diff-add-content-highlight--: #2f5732;
|
|
313
|
+
--diff-del-content-highlight--: #713431;
|
|
314
314
|
--diff-add-widget--: #0969d2;
|
|
315
315
|
--diff-add-widget-color--: #ffffff;
|
|
316
316
|
--diff-empty-content--: #161b22;
|
package/styles/diff-view.css
CHANGED
|
@@ -773,10 +773,10 @@ video {
|
|
|
773
773
|
}
|
|
774
774
|
.diff-tailwindcss-wrapper[data-theme="light"] .diff-style-root {
|
|
775
775
|
--diff-border--: #dedede;
|
|
776
|
-
--diff-add-content--: #
|
|
776
|
+
--diff-add-content--: #dafbe1;
|
|
777
777
|
--diff-del-content--: #ffebe9;
|
|
778
|
-
--diff-add-lineNumber--: #
|
|
779
|
-
--diff-del-lineNumber--: #
|
|
778
|
+
--diff-add-lineNumber--: #aceebb;
|
|
779
|
+
--diff-del-lineNumber--: #ffcecb;
|
|
780
780
|
--diff-plain-content--: #ffffff;
|
|
781
781
|
--diff-expand-content--: #fafafa;
|
|
782
782
|
--diff-plain-lineNumber--: #fafafa;
|
|
@@ -784,10 +784,10 @@ video {
|
|
|
784
784
|
--diff-plain-lineNumber-color--: #555555;
|
|
785
785
|
--diff-expand-lineNumber-color--: #555555;
|
|
786
786
|
--diff-hunk-content--: #ddf4ff;
|
|
787
|
-
--diff-hunk-lineNumber--: #
|
|
787
|
+
--diff-hunk-lineNumber--: #b6e3ff;
|
|
788
788
|
--diff-hunk-lineNumber-hover--: #0969da;
|
|
789
|
-
--diff-add-content-highlight--: #
|
|
790
|
-
--diff-del-content-highlight--: #
|
|
789
|
+
--diff-add-content-highlight--: #aceebb;
|
|
790
|
+
--diff-del-content-highlight--: #ffcecb;
|
|
791
791
|
--diff-add-widget--: #0969d2;
|
|
792
792
|
--diff-add-widget-color--: #ffffff;
|
|
793
793
|
--diff-empty-content--: #fafafa;
|
|
@@ -802,10 +802,10 @@ video {
|
|
|
802
802
|
}
|
|
803
803
|
.diff-tailwindcss-wrapper[data-theme="dark"] .diff-style-root {
|
|
804
804
|
--diff-border--: #3d444d;
|
|
805
|
-
--diff-add-content--: #
|
|
806
|
-
--diff-del-content--: #
|
|
807
|
-
--diff-add-lineNumber--: #
|
|
808
|
-
--diff-del-lineNumber--: #
|
|
805
|
+
--diff-add-content--: #18271f;
|
|
806
|
+
--diff-del-content--: #23191c;
|
|
807
|
+
--diff-add-lineNumber--: #284228;
|
|
808
|
+
--diff-del-lineNumber--: #4f2828;
|
|
809
809
|
--diff-plain-content--: #0d1117;
|
|
810
810
|
--diff-expand-content--: #161b22;
|
|
811
811
|
--diff-plain-lineNumber--: #161b22;
|
|
@@ -813,10 +813,10 @@ video {
|
|
|
813
813
|
--diff-plain-lineNumber-color--: #a0aaab;
|
|
814
814
|
--diff-expand-lineNumber-color--: #a0aaab;
|
|
815
815
|
--diff-hunk-content--: #131d2e;
|
|
816
|
-
--diff-hunk-lineNumber--: #
|
|
816
|
+
--diff-hunk-lineNumber--: #0c2d6b;
|
|
817
817
|
--diff-hunk-lineNumber-hover--: #1f6feb;
|
|
818
|
-
--diff-add-content-highlight--: #
|
|
819
|
-
--diff-del-content-highlight--: #
|
|
818
|
+
--diff-add-content-highlight--: #2f5732;
|
|
819
|
+
--diff-del-content-highlight--: #713431;
|
|
820
820
|
--diff-add-widget--: #0969d2;
|
|
821
821
|
--diff-add-widget-color--: #ffffff;
|
|
822
822
|
--diff-empty-content--: #161b22;
|