react-diff-viewer-continued 3.2.5 → 3.2.6
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/.all-contributorsrc +9 -0
- package/CHANGELOG.md +7 -0
- package/README.md +4 -3
- package/lib/styles.d.ts +22 -22
- package/lib/styles.js +25 -25
- package/package.json +2 -2
package/.all-contributorsrc
CHANGED
|
@@ -23,6 +23,15 @@
|
|
|
23
23
|
"contributions": [
|
|
24
24
|
"code"
|
|
25
25
|
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"login": "KimBiYam",
|
|
29
|
+
"name": "Chang Hyun Kim",
|
|
30
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/59679962?v=4",
|
|
31
|
+
"profile": "http://kimbiyam.me",
|
|
32
|
+
"contributions": [
|
|
33
|
+
"code"
|
|
34
|
+
]
|
|
26
35
|
}
|
|
27
36
|
],
|
|
28
37
|
"contributorsPerLine": 7,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.2.6](https://github.com/aeolun/react-diff-viewer-continued/compare/v3.2.5...v3.2.6) (2023-03-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* release for chore fix ([9775afa](https://github.com/aeolun/react-diff-viewer-continued/commit/9775afac2388942d97c839954186eb5b4fd64c3c))
|
|
7
|
+
|
|
1
8
|
## [3.2.5](https://github.com/aeolun/react-diff-viewer-continued/compare/v3.2.4...v3.2.5) (2023-01-23)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<br/>
|
|
4
4
|
|
|
5
5
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
6
|
-
[](#contributors-)
|
|
7
7
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/react-diff-viewer-continued)
|
|
@@ -376,8 +376,9 @@ Check package.json for more build scripts.
|
|
|
376
376
|
<table>
|
|
377
377
|
<tbody>
|
|
378
378
|
<tr>
|
|
379
|
-
<td align="center"><a href="https://github.com/ericmorgan1"><img src="https://avatars.githubusercontent.com/u/10346191?v=4?s=100" width="100px;" alt="Eric M."/><br /><sub><b>Eric M.</b></sub></a><br /><a href="https://github.com/Aeolun/react-diff-viewer-continued/commits?author=ericmorgan1" title="Code">💻</a></td>
|
|
380
|
-
<td align="center"><a href="https://github.com/spyroid"><img src="https://avatars.githubusercontent.com/u/844495?v=4?s=100" width="100px;" alt="Andrei Kovalevsky"/><br /><sub><b>Andrei Kovalevsky</b></sub></a><br /><a href="https://github.com/Aeolun/react-diff-viewer-continued/commits?author=spyroid" title="Code">💻</a></td>
|
|
379
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ericmorgan1"><img src="https://avatars.githubusercontent.com/u/10346191?v=4?s=100" width="100px;" alt="Eric M."/><br /><sub><b>Eric M.</b></sub></a><br /><a href="https://github.com/Aeolun/react-diff-viewer-continued/commits?author=ericmorgan1" title="Code">💻</a></td>
|
|
380
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/spyroid"><img src="https://avatars.githubusercontent.com/u/844495?v=4?s=100" width="100px;" alt="Andrei Kovalevsky"/><br /><sub><b>Andrei Kovalevsky</b></sub></a><br /><a href="https://github.com/Aeolun/react-diff-viewer-continued/commits?author=spyroid" title="Code">💻</a></td>
|
|
381
|
+
<td align="center" valign="top" width="14.28%"><a href="http://kimbiyam.me"><img src="https://avatars.githubusercontent.com/u/59679962?v=4?s=100" width="100px;" alt="Chang Hyun Kim"/><br /><sub><b>Chang Hyun Kim</b></sub></a><br /><a href="https://github.com/Aeolun/react-diff-viewer-continued/commits?author=KimBiYam" title="Code">💻</a></td>
|
|
381
382
|
</tr>
|
|
382
383
|
</tbody>
|
|
383
384
|
</table>
|
package/lib/styles.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSInterpolation } from '@emotion/css';
|
|
2
2
|
export interface ReactDiffViewerStyles {
|
|
3
3
|
diffContainer?: string;
|
|
4
4
|
diffRemoved?: string;
|
|
@@ -55,27 +55,27 @@ export interface ReactDiffViewerStylesOverride {
|
|
|
55
55
|
dark?: ReactDiffViewerStylesVariables;
|
|
56
56
|
light?: ReactDiffViewerStylesVariables;
|
|
57
57
|
};
|
|
58
|
-
diffContainer?:
|
|
59
|
-
diffRemoved?:
|
|
60
|
-
diffAdded?:
|
|
61
|
-
diffChanged?:
|
|
62
|
-
marker?:
|
|
63
|
-
emptyGutter?:
|
|
64
|
-
highlightedLine?:
|
|
65
|
-
lineNumber?:
|
|
66
|
-
highlightedGutter?:
|
|
67
|
-
contentText?:
|
|
68
|
-
gutter?:
|
|
69
|
-
line?:
|
|
70
|
-
wordDiff?:
|
|
71
|
-
wordAdded?:
|
|
72
|
-
wordRemoved?:
|
|
73
|
-
codeFoldGutter?:
|
|
74
|
-
codeFold?:
|
|
75
|
-
emptyLine?:
|
|
76
|
-
content?:
|
|
77
|
-
titleBlock?:
|
|
78
|
-
splitView?:
|
|
58
|
+
diffContainer?: CSSInterpolation;
|
|
59
|
+
diffRemoved?: CSSInterpolation;
|
|
60
|
+
diffAdded?: CSSInterpolation;
|
|
61
|
+
diffChanged?: CSSInterpolation;
|
|
62
|
+
marker?: CSSInterpolation;
|
|
63
|
+
emptyGutter?: CSSInterpolation;
|
|
64
|
+
highlightedLine?: CSSInterpolation;
|
|
65
|
+
lineNumber?: CSSInterpolation;
|
|
66
|
+
highlightedGutter?: CSSInterpolation;
|
|
67
|
+
contentText?: CSSInterpolation;
|
|
68
|
+
gutter?: CSSInterpolation;
|
|
69
|
+
line?: CSSInterpolation;
|
|
70
|
+
wordDiff?: CSSInterpolation;
|
|
71
|
+
wordAdded?: CSSInterpolation;
|
|
72
|
+
wordRemoved?: CSSInterpolation;
|
|
73
|
+
codeFoldGutter?: CSSInterpolation;
|
|
74
|
+
codeFold?: CSSInterpolation;
|
|
75
|
+
emptyLine?: CSSInterpolation;
|
|
76
|
+
content?: CSSInterpolation;
|
|
77
|
+
titleBlock?: CSSInterpolation;
|
|
78
|
+
splitView?: CSSInterpolation;
|
|
79
79
|
}
|
|
80
80
|
declare const _default: (styleOverride: ReactDiffViewerStylesOverride, useDarkTheme?: boolean) => ReactDiffViewerStyles;
|
|
81
81
|
export default _default;
|
package/lib/styles.js
CHANGED
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
const
|
|
14
|
+
const css_1 = require("@emotion/css");
|
|
15
15
|
// eslint-disable-next-line import/no-anonymous-default-export
|
|
16
16
|
exports.default = (styleOverride, useDarkTheme = false) => {
|
|
17
17
|
const { variables: overrideVariables = {} } = styleOverride, styles = __rest(styleOverride, ["variables"]);
|
|
@@ -72,17 +72,17 @@ exports.default = (styleOverride, useDarkTheme = false) => {
|
|
|
72
72
|
}, (overrideVariables.dark || {})),
|
|
73
73
|
};
|
|
74
74
|
const variables = useDarkTheme ? themeVariables.dark : themeVariables.light;
|
|
75
|
-
const content = (0,
|
|
75
|
+
const content = (0, css_1.css)({
|
|
76
76
|
width: '100%',
|
|
77
77
|
label: 'content',
|
|
78
78
|
});
|
|
79
|
-
const splitView = (0,
|
|
79
|
+
const splitView = (0, css_1.css)({
|
|
80
80
|
[`.${content}`]: {
|
|
81
81
|
width: '50%',
|
|
82
82
|
},
|
|
83
83
|
label: 'split-view',
|
|
84
84
|
});
|
|
85
|
-
const diffContainer = (0,
|
|
85
|
+
const diffContainer = (0, css_1.css)({
|
|
86
86
|
width: '100%',
|
|
87
87
|
background: variables.diffViewerBackground,
|
|
88
88
|
pre: {
|
|
@@ -93,15 +93,15 @@ exports.default = (styleOverride, useDarkTheme = false) => {
|
|
|
93
93
|
label: 'diff-container',
|
|
94
94
|
borderCollapse: 'collapse',
|
|
95
95
|
});
|
|
96
|
-
const codeFoldContent = (0,
|
|
96
|
+
const codeFoldContent = (0, css_1.css)({
|
|
97
97
|
color: variables.codeFoldContentColor,
|
|
98
98
|
label: 'code-fold-content',
|
|
99
99
|
});
|
|
100
|
-
const contentText = (0,
|
|
100
|
+
const contentText = (0, css_1.css)({
|
|
101
101
|
color: variables.diffViewerColor,
|
|
102
102
|
label: 'content-text',
|
|
103
103
|
});
|
|
104
|
-
const titleBlock = (0,
|
|
104
|
+
const titleBlock = (0, css_1.css)({
|
|
105
105
|
background: variables.diffViewerTitleBackground,
|
|
106
106
|
padding: 10,
|
|
107
107
|
borderBottom: `1px solid ${variables.diffViewerTitleBorderColor}`,
|
|
@@ -113,11 +113,11 @@ exports.default = (styleOverride, useDarkTheme = false) => {
|
|
|
113
113
|
color: variables.diffViewerTitleColor,
|
|
114
114
|
},
|
|
115
115
|
});
|
|
116
|
-
const lineNumber = (0,
|
|
116
|
+
const lineNumber = (0, css_1.css)({
|
|
117
117
|
color: variables.gutterColor,
|
|
118
118
|
label: 'line-number',
|
|
119
119
|
});
|
|
120
|
-
const diffRemoved = (0,
|
|
120
|
+
const diffRemoved = (0, css_1.css)({
|
|
121
121
|
background: variables.removedBackground,
|
|
122
122
|
color: variables.removedColor,
|
|
123
123
|
pre: {
|
|
@@ -128,7 +128,7 @@ exports.default = (styleOverride, useDarkTheme = false) => {
|
|
|
128
128
|
},
|
|
129
129
|
label: 'diff-removed',
|
|
130
130
|
});
|
|
131
|
-
const diffAdded = (0,
|
|
131
|
+
const diffAdded = (0, css_1.css)({
|
|
132
132
|
background: variables.addedBackground,
|
|
133
133
|
color: variables.addedColor,
|
|
134
134
|
pre: {
|
|
@@ -139,33 +139,33 @@ exports.default = (styleOverride, useDarkTheme = false) => {
|
|
|
139
139
|
},
|
|
140
140
|
label: 'diff-added',
|
|
141
141
|
});
|
|
142
|
-
const diffChanged = (0,
|
|
142
|
+
const diffChanged = (0, css_1.css)({
|
|
143
143
|
background: variables.changedBackground,
|
|
144
144
|
[`.${lineNumber}`]: {
|
|
145
145
|
color: variables.gutterColor,
|
|
146
146
|
},
|
|
147
147
|
label: 'diff-changed',
|
|
148
148
|
});
|
|
149
|
-
const wordDiff = (0,
|
|
149
|
+
const wordDiff = (0, css_1.css)({
|
|
150
150
|
padding: 2,
|
|
151
151
|
display: 'inline-flex',
|
|
152
152
|
borderRadius: 4,
|
|
153
153
|
wordBreak: 'break-all',
|
|
154
154
|
label: 'word-diff',
|
|
155
155
|
});
|
|
156
|
-
const wordAdded = (0,
|
|
156
|
+
const wordAdded = (0, css_1.css)({
|
|
157
157
|
background: variables.wordAddedBackground,
|
|
158
158
|
label: 'word-added',
|
|
159
159
|
});
|
|
160
|
-
const wordRemoved = (0,
|
|
160
|
+
const wordRemoved = (0, css_1.css)({
|
|
161
161
|
background: variables.wordRemovedBackground,
|
|
162
162
|
label: 'word-removed',
|
|
163
163
|
});
|
|
164
|
-
const codeFoldGutter = (0,
|
|
164
|
+
const codeFoldGutter = (0, css_1.css)({
|
|
165
165
|
backgroundColor: variables.codeFoldGutterBackground,
|
|
166
166
|
label: 'code-fold-gutter',
|
|
167
167
|
});
|
|
168
|
-
const codeFold = (0,
|
|
168
|
+
const codeFold = (0, css_1.css)({
|
|
169
169
|
backgroundColor: variables.codeFoldBackground,
|
|
170
170
|
height: 40,
|
|
171
171
|
fontSize: 14,
|
|
@@ -179,11 +179,11 @@ exports.default = (styleOverride, useDarkTheme = false) => {
|
|
|
179
179
|
},
|
|
180
180
|
},
|
|
181
181
|
});
|
|
182
|
-
const emptyLine = (0,
|
|
182
|
+
const emptyLine = (0, css_1.css)({
|
|
183
183
|
backgroundColor: variables.emptyLineBackground,
|
|
184
184
|
label: 'empty-line',
|
|
185
185
|
});
|
|
186
|
-
const marker = (0,
|
|
186
|
+
const marker = (0, css_1.css)({
|
|
187
187
|
width: 25,
|
|
188
188
|
paddingLeft: 10,
|
|
189
189
|
paddingRight: 10,
|
|
@@ -200,17 +200,17 @@ exports.default = (styleOverride, useDarkTheme = false) => {
|
|
|
200
200
|
},
|
|
201
201
|
},
|
|
202
202
|
});
|
|
203
|
-
const highlightedLine = (0,
|
|
203
|
+
const highlightedLine = (0, css_1.css)({
|
|
204
204
|
background: variables.highlightBackground,
|
|
205
205
|
label: 'highlighted-line',
|
|
206
206
|
[`.${wordAdded}, .${wordRemoved}`]: {
|
|
207
207
|
backgroundColor: 'initial',
|
|
208
208
|
},
|
|
209
209
|
});
|
|
210
|
-
const highlightedGutter = (0,
|
|
210
|
+
const highlightedGutter = (0, css_1.css)({
|
|
211
211
|
label: 'highlighted-gutter',
|
|
212
212
|
});
|
|
213
|
-
const gutter = (0,
|
|
213
|
+
const gutter = (0, css_1.css)({
|
|
214
214
|
userSelect: 'none',
|
|
215
215
|
minWidth: 50,
|
|
216
216
|
padding: '0 10px',
|
|
@@ -241,14 +241,14 @@ exports.default = (styleOverride, useDarkTheme = false) => {
|
|
|
241
241
|
},
|
|
242
242
|
},
|
|
243
243
|
});
|
|
244
|
-
const emptyGutter = (0,
|
|
244
|
+
const emptyGutter = (0, css_1.css)({
|
|
245
245
|
'&:hover': {
|
|
246
246
|
background: variables.gutterBackground,
|
|
247
247
|
cursor: 'initial',
|
|
248
248
|
},
|
|
249
249
|
label: 'empty-gutter',
|
|
250
250
|
});
|
|
251
|
-
const line = (0,
|
|
251
|
+
const line = (0, css_1.css)({
|
|
252
252
|
verticalAlign: 'baseline',
|
|
253
253
|
label: 'line',
|
|
254
254
|
});
|
|
@@ -277,11 +277,11 @@ exports.default = (styleOverride, useDarkTheme = false) => {
|
|
|
277
277
|
titleBlock,
|
|
278
278
|
};
|
|
279
279
|
const computerOverrideStyles = Object.keys(styles).reduce((acc, key) => (Object.assign(Object.assign({}, acc), {
|
|
280
|
-
[key]: (0,
|
|
280
|
+
[key]: (0, css_1.css)(styles[key]),
|
|
281
281
|
})), {});
|
|
282
282
|
return Object.keys(defaultStyles).reduce((acc, key) => (Object.assign(Object.assign({}, acc), {
|
|
283
283
|
[key]: computerOverrideStyles[key]
|
|
284
|
-
? (0,
|
|
284
|
+
? (0, css_1.cx)(defaultStyles[key], computerOverrideStyles[key])
|
|
285
285
|
: defaultStyles[key],
|
|
286
286
|
})), {});
|
|
287
287
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-diff-viewer-continued",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Continuation of a simple and beautiful text diff viewer component made with diff and React",
|
|
6
6
|
"keywords": [
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"prettier": "prettier --write ."
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
+
"@emotion/css": "^11.10.5",
|
|
38
39
|
"classnames": "^2.3.1",
|
|
39
40
|
"diff": "^5.1.0",
|
|
40
|
-
"emotion": "^10.0.27",
|
|
41
41
|
"memoize-one": "^6.0.0",
|
|
42
42
|
"prop-types": "^15.8.1"
|
|
43
43
|
},
|