react-diff-viewer-continued 4.0.2 → 4.0.4
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/.github/workflows/release.yml +7 -7
- package/CHANGELOG.md +16 -0
- package/README.md +3 -3
- package/biome.json +14 -0
- package/lib/cjs/src/compute-hidden-blocks.d.ts +1 -1
- package/lib/cjs/src/compute-hidden-blocks.js +9 -9
- package/lib/cjs/src/compute-lines.d.ts +2 -1
- package/lib/cjs/src/compute-lines.js +27 -14
- package/lib/cjs/src/expand.js +2 -3
- package/lib/cjs/src/fold.js +2 -3
- package/lib/cjs/src/index.d.ts +9 -8
- package/lib/cjs/src/index.js +66 -47
- package/lib/cjs/src/styles.d.ts +29 -25
- package/lib/cjs/src/styles.js +162 -135
- package/lib/esm/src/compute-hidden-blocks.js +8 -7
- package/lib/esm/src/compute-lines.js +11 -8
- package/lib/esm/src/expand.js +2 -2
- package/lib/esm/src/fold.js +2 -2
- package/lib/esm/src/index.js +50 -41
- package/lib/esm/src/styles.js +163 -136
- package/package.json +33 -25
- package/release.config.js +13 -13
- package/.travis.yml +0 -13
package/lib/esm/src/styles.js
CHANGED
|
@@ -1,128 +1,144 @@
|
|
|
1
|
-
import createEmotion from
|
|
2
|
-
|
|
3
|
-
export default (styleOverride, useDarkTheme = false, nonce = '') => {
|
|
1
|
+
import createEmotion from "@emotion/css/create-instance";
|
|
2
|
+
export default (styleOverride, useDarkTheme = false, nonce = "") => {
|
|
4
3
|
const { variables: overrideVariables = {}, ...styles } = styleOverride;
|
|
5
4
|
const themeVariables = {
|
|
6
5
|
light: {
|
|
7
6
|
...{
|
|
8
|
-
diffViewerBackground:
|
|
9
|
-
diffViewerColor:
|
|
10
|
-
addedBackground:
|
|
11
|
-
addedColor:
|
|
12
|
-
removedBackground:
|
|
13
|
-
removedColor:
|
|
14
|
-
changedBackground:
|
|
15
|
-
wordAddedBackground:
|
|
16
|
-
wordRemovedBackground:
|
|
17
|
-
addedGutterBackground:
|
|
18
|
-
removedGutterBackground:
|
|
19
|
-
gutterBackground:
|
|
20
|
-
gutterBackgroundDark:
|
|
21
|
-
highlightBackground:
|
|
22
|
-
highlightGutterBackground:
|
|
23
|
-
codeFoldGutterBackground:
|
|
24
|
-
codeFoldBackground:
|
|
25
|
-
emptyLineBackground:
|
|
26
|
-
gutterColor:
|
|
27
|
-
addedGutterColor:
|
|
28
|
-
removedGutterColor:
|
|
29
|
-
codeFoldContentColor:
|
|
30
|
-
diffViewerTitleBackground:
|
|
31
|
-
diffViewerTitleColor:
|
|
32
|
-
diffViewerTitleBorderColor:
|
|
7
|
+
diffViewerBackground: "#fff",
|
|
8
|
+
diffViewerColor: "#212529",
|
|
9
|
+
addedBackground: "#e6ffed",
|
|
10
|
+
addedColor: "#24292e",
|
|
11
|
+
removedBackground: "#ffeef0",
|
|
12
|
+
removedColor: "#24292e",
|
|
13
|
+
changedBackground: "#fffbdd",
|
|
14
|
+
wordAddedBackground: "#acf2bd",
|
|
15
|
+
wordRemovedBackground: "#fdb8c0",
|
|
16
|
+
addedGutterBackground: "#cdffd8",
|
|
17
|
+
removedGutterBackground: "#ffdce0",
|
|
18
|
+
gutterBackground: "#f7f7f7",
|
|
19
|
+
gutterBackgroundDark: "#f3f1f1",
|
|
20
|
+
highlightBackground: "#fffbdd",
|
|
21
|
+
highlightGutterBackground: "#fff5b1",
|
|
22
|
+
codeFoldGutterBackground: "#dbedff",
|
|
23
|
+
codeFoldBackground: "#f1f8ff",
|
|
24
|
+
emptyLineBackground: "#fafbfc",
|
|
25
|
+
gutterColor: "#212529",
|
|
26
|
+
addedGutterColor: "#212529",
|
|
27
|
+
removedGutterColor: "#212529",
|
|
28
|
+
codeFoldContentColor: "#212529",
|
|
29
|
+
diffViewerTitleBackground: "#fafbfc",
|
|
30
|
+
diffViewerTitleColor: "#212529",
|
|
31
|
+
diffViewerTitleBorderColor: "#eee",
|
|
33
32
|
},
|
|
34
33
|
...(overrideVariables.light || {}),
|
|
35
34
|
},
|
|
36
35
|
dark: {
|
|
37
36
|
...{
|
|
38
|
-
diffViewerBackground:
|
|
39
|
-
diffViewerColor:
|
|
40
|
-
addedBackground:
|
|
41
|
-
addedColor:
|
|
42
|
-
removedBackground:
|
|
43
|
-
removedColor:
|
|
44
|
-
changedBackground:
|
|
45
|
-
wordAddedBackground:
|
|
46
|
-
wordRemovedBackground:
|
|
47
|
-
addedGutterBackground:
|
|
48
|
-
removedGutterBackground:
|
|
49
|
-
gutterBackground:
|
|
50
|
-
gutterBackgroundDark:
|
|
51
|
-
highlightBackground:
|
|
52
|
-
highlightGutterBackground:
|
|
53
|
-
codeFoldGutterBackground:
|
|
54
|
-
codeFoldBackground:
|
|
55
|
-
emptyLineBackground:
|
|
56
|
-
gutterColor:
|
|
57
|
-
addedGutterColor:
|
|
58
|
-
removedGutterColor:
|
|
59
|
-
codeFoldContentColor:
|
|
60
|
-
diffViewerTitleBackground:
|
|
61
|
-
diffViewerTitleColor:
|
|
62
|
-
diffViewerTitleBorderColor:
|
|
37
|
+
diffViewerBackground: "#2e303c",
|
|
38
|
+
diffViewerColor: "#FFF",
|
|
39
|
+
addedBackground: "#044B53",
|
|
40
|
+
addedColor: "white",
|
|
41
|
+
removedBackground: "#632F34",
|
|
42
|
+
removedColor: "white",
|
|
43
|
+
changedBackground: "#3e302c",
|
|
44
|
+
wordAddedBackground: "#055d67",
|
|
45
|
+
wordRemovedBackground: "#7d383f",
|
|
46
|
+
addedGutterBackground: "#034148",
|
|
47
|
+
removedGutterBackground: "#632b30",
|
|
48
|
+
gutterBackground: "#2c2f3a",
|
|
49
|
+
gutterBackgroundDark: "#262933",
|
|
50
|
+
highlightBackground: "#2a3967",
|
|
51
|
+
highlightGutterBackground: "#2d4077",
|
|
52
|
+
codeFoldGutterBackground: "#262831",
|
|
53
|
+
codeFoldBackground: "#262831",
|
|
54
|
+
emptyLineBackground: "#363946",
|
|
55
|
+
gutterColor: "#666c87",
|
|
56
|
+
addedGutterColor: "#8c8c8c",
|
|
57
|
+
removedGutterColor: "#8c8c8c",
|
|
58
|
+
codeFoldContentColor: "#656a8b",
|
|
59
|
+
diffViewerTitleBackground: "#2f323e",
|
|
60
|
+
diffViewerTitleColor: "#757a9b",
|
|
61
|
+
diffViewerTitleBorderColor: "#353846",
|
|
63
62
|
},
|
|
64
63
|
...(overrideVariables.dark || {}),
|
|
65
64
|
},
|
|
66
65
|
};
|
|
67
66
|
const variables = useDarkTheme ? themeVariables.dark : themeVariables.light;
|
|
68
|
-
const { css, cx } = createEmotion({ key:
|
|
67
|
+
const { css, cx } = createEmotion({ key: "react-diff", nonce });
|
|
69
68
|
const content = css({
|
|
70
|
-
width:
|
|
71
|
-
label:
|
|
69
|
+
width: "auto",
|
|
70
|
+
label: "content",
|
|
72
71
|
});
|
|
73
72
|
const splitView = css({
|
|
74
|
-
label:
|
|
73
|
+
label: "split-view",
|
|
75
74
|
});
|
|
76
75
|
const summary = css({
|
|
77
76
|
background: variables.diffViewerTitleBackground,
|
|
78
77
|
color: variables.diffViewerTitleColor,
|
|
79
|
-
padding:
|
|
80
|
-
display:
|
|
81
|
-
alignItems:
|
|
82
|
-
gap:
|
|
78
|
+
padding: "0.5em 1em",
|
|
79
|
+
display: "flex",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
gap: "0.5em",
|
|
83
82
|
fontFamily: "monospace",
|
|
84
83
|
fill: variables.diffViewerTitleColor,
|
|
85
84
|
});
|
|
86
85
|
const diffContainer = css({
|
|
87
|
-
width:
|
|
88
|
-
minWidth:
|
|
89
|
-
overflowX:
|
|
90
|
-
tableLayout:
|
|
86
|
+
width: "100%",
|
|
87
|
+
minWidth: "1000px",
|
|
88
|
+
overflowX: "auto",
|
|
89
|
+
tableLayout: "fixed",
|
|
91
90
|
background: variables.diffViewerBackground,
|
|
92
91
|
pre: {
|
|
93
92
|
margin: 0,
|
|
94
|
-
whiteSpace:
|
|
95
|
-
lineHeight:
|
|
96
|
-
width:
|
|
93
|
+
whiteSpace: "pre-wrap",
|
|
94
|
+
lineHeight: "1.6em",
|
|
95
|
+
width: "fit-content",
|
|
97
96
|
},
|
|
98
|
-
label:
|
|
99
|
-
borderCollapse:
|
|
97
|
+
label: "diff-container",
|
|
98
|
+
borderCollapse: "collapse",
|
|
100
99
|
});
|
|
101
100
|
const lineContent = css({
|
|
102
|
-
overflow:
|
|
103
|
-
width:
|
|
101
|
+
overflow: "hidden",
|
|
102
|
+
width: "100%",
|
|
104
103
|
});
|
|
105
104
|
const contentText = css({
|
|
106
105
|
color: variables.diffViewerColor,
|
|
107
|
-
whiteSpace:
|
|
108
|
-
fontFamily:
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
whiteSpace: "pre-wrap",
|
|
107
|
+
fontFamily: "monospace",
|
|
108
|
+
lineBreak: "anywhere",
|
|
109
|
+
textDecoration: "none",
|
|
110
|
+
label: "content-text",
|
|
111
111
|
});
|
|
112
112
|
const unselectable = css({
|
|
113
|
-
userSelect:
|
|
114
|
-
label:
|
|
113
|
+
userSelect: "none",
|
|
114
|
+
label: "unselectable",
|
|
115
|
+
});
|
|
116
|
+
const allExpandButton = css({
|
|
117
|
+
background: "transparent",
|
|
118
|
+
border: "none",
|
|
119
|
+
cursor: "pointer",
|
|
120
|
+
display: "flex",
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
justifyContent: "center",
|
|
123
|
+
margin: 0,
|
|
124
|
+
label: "all-expand-button",
|
|
125
|
+
":hover": {
|
|
126
|
+
fill: variables.addedGutterColor,
|
|
127
|
+
},
|
|
128
|
+
":focus": {
|
|
129
|
+
outline: `1px ${variables.addedGutterColor} solid`,
|
|
130
|
+
},
|
|
115
131
|
});
|
|
116
132
|
const titleBlock = css({
|
|
117
133
|
background: variables.diffViewerTitleBackground,
|
|
118
|
-
padding:
|
|
119
|
-
lineHeight:
|
|
134
|
+
padding: "0.5em",
|
|
135
|
+
lineHeight: "1.4em",
|
|
120
136
|
height: "2.4em",
|
|
121
|
-
overflow:
|
|
122
|
-
width:
|
|
137
|
+
overflow: "hidden",
|
|
138
|
+
width: "50%",
|
|
123
139
|
borderBottom: `1px solid ${variables.diffViewerTitleBorderColor}`,
|
|
124
|
-
label:
|
|
125
|
-
|
|
140
|
+
label: "title-block",
|
|
141
|
+
":last-child": {
|
|
126
142
|
borderLeft: `1px solid ${variables.diffViewerTitleBorderColor}`,
|
|
127
143
|
},
|
|
128
144
|
[`.${contentText}`]: {
|
|
@@ -131,7 +147,7 @@ export default (styleOverride, useDarkTheme = false, nonce = '') => {
|
|
|
131
147
|
});
|
|
132
148
|
const lineNumber = css({
|
|
133
149
|
color: variables.gutterColor,
|
|
134
|
-
label:
|
|
150
|
+
label: "line-number",
|
|
135
151
|
});
|
|
136
152
|
const diffRemoved = css({
|
|
137
153
|
background: variables.removedBackground,
|
|
@@ -142,7 +158,7 @@ export default (styleOverride, useDarkTheme = false, nonce = '') => {
|
|
|
142
158
|
[`.${lineNumber}`]: {
|
|
143
159
|
color: variables.removedGutterColor,
|
|
144
160
|
},
|
|
145
|
-
label:
|
|
161
|
+
label: "diff-removed",
|
|
146
162
|
});
|
|
147
163
|
const diffAdded = css({
|
|
148
164
|
background: variables.addedBackground,
|
|
@@ -153,86 +169,95 @@ export default (styleOverride, useDarkTheme = false, nonce = '') => {
|
|
|
153
169
|
[`.${lineNumber}`]: {
|
|
154
170
|
color: variables.addedGutterColor,
|
|
155
171
|
},
|
|
156
|
-
label:
|
|
172
|
+
label: "diff-added",
|
|
157
173
|
});
|
|
158
174
|
const diffChanged = css({
|
|
159
175
|
background: variables.changedBackground,
|
|
160
176
|
[`.${lineNumber}`]: {
|
|
161
177
|
color: variables.gutterColor,
|
|
162
178
|
},
|
|
163
|
-
label:
|
|
179
|
+
label: "diff-changed",
|
|
164
180
|
});
|
|
165
181
|
const wordDiff = css({
|
|
166
182
|
padding: 2,
|
|
167
|
-
display:
|
|
183
|
+
display: "inline-flex",
|
|
168
184
|
borderRadius: 4,
|
|
169
|
-
wordBreak:
|
|
170
|
-
label:
|
|
185
|
+
wordBreak: "break-all",
|
|
186
|
+
label: "word-diff",
|
|
171
187
|
});
|
|
172
188
|
const wordAdded = css({
|
|
173
189
|
background: variables.wordAddedBackground,
|
|
174
|
-
textDecoration:
|
|
175
|
-
label:
|
|
190
|
+
textDecoration: "none",
|
|
191
|
+
label: "word-added",
|
|
176
192
|
});
|
|
177
193
|
const wordRemoved = css({
|
|
178
194
|
background: variables.wordRemovedBackground,
|
|
179
|
-
textDecoration:
|
|
180
|
-
label:
|
|
195
|
+
textDecoration: "none",
|
|
196
|
+
label: "word-removed",
|
|
181
197
|
});
|
|
182
198
|
const codeFoldGutter = css({
|
|
183
199
|
backgroundColor: variables.codeFoldGutterBackground,
|
|
184
|
-
label:
|
|
185
|
-
minWidth:
|
|
186
|
-
width:
|
|
200
|
+
label: "code-fold-gutter",
|
|
201
|
+
minWidth: "50px",
|
|
202
|
+
width: "50px",
|
|
187
203
|
});
|
|
188
204
|
const codeFoldContentContainer = css({
|
|
189
|
-
padding:
|
|
205
|
+
padding: "",
|
|
206
|
+
});
|
|
207
|
+
const codeFoldExpandButton = css({
|
|
208
|
+
background: variables.codeFoldBackground,
|
|
209
|
+
cursor: "pointer",
|
|
210
|
+
display: "inline",
|
|
211
|
+
margin: 0,
|
|
212
|
+
border: "none",
|
|
213
|
+
label: "code-fold-expand-button",
|
|
190
214
|
});
|
|
191
215
|
const codeFoldContent = css({
|
|
192
216
|
color: variables.codeFoldContentColor,
|
|
193
|
-
|
|
217
|
+
fontFamily: "monospace",
|
|
218
|
+
label: "code-fold-content",
|
|
194
219
|
});
|
|
195
220
|
const block = css({
|
|
196
|
-
display:
|
|
197
|
-
width:
|
|
198
|
-
height:
|
|
199
|
-
backgroundColor:
|
|
200
|
-
borderWidth:
|
|
201
|
-
borderStyle:
|
|
202
|
-
borderColor: variables.diffViewerTitleBorderColor
|
|
221
|
+
display: "block",
|
|
222
|
+
width: "10px",
|
|
223
|
+
height: "10px",
|
|
224
|
+
backgroundColor: "#ddd",
|
|
225
|
+
borderWidth: "1px",
|
|
226
|
+
borderStyle: "solid",
|
|
227
|
+
borderColor: variables.diffViewerTitleBorderColor,
|
|
203
228
|
});
|
|
204
229
|
const blockAddition = css({
|
|
205
|
-
backgroundColor: variables.wordAddedBackground
|
|
230
|
+
backgroundColor: variables.wordAddedBackground,
|
|
206
231
|
});
|
|
207
232
|
const blockDeletion = css({
|
|
208
|
-
backgroundColor: variables.wordRemovedBackground
|
|
233
|
+
backgroundColor: variables.wordRemovedBackground,
|
|
209
234
|
});
|
|
210
235
|
const codeFold = css({
|
|
211
236
|
backgroundColor: variables.codeFoldBackground,
|
|
212
237
|
height: 40,
|
|
213
238
|
fontSize: 14,
|
|
214
|
-
alignItems:
|
|
215
|
-
userSelect:
|
|
239
|
+
alignItems: "center",
|
|
240
|
+
userSelect: "none",
|
|
216
241
|
fontWeight: 700,
|
|
217
|
-
label:
|
|
242
|
+
label: "code-fold",
|
|
218
243
|
a: {
|
|
219
|
-
textDecoration:
|
|
220
|
-
cursor:
|
|
244
|
+
textDecoration: "underline !important",
|
|
245
|
+
cursor: "pointer",
|
|
221
246
|
pre: {
|
|
222
|
-
display:
|
|
247
|
+
display: "inline",
|
|
223
248
|
},
|
|
224
249
|
},
|
|
225
250
|
});
|
|
226
251
|
const emptyLine = css({
|
|
227
252
|
backgroundColor: variables.emptyLineBackground,
|
|
228
|
-
label:
|
|
253
|
+
label: "empty-line",
|
|
229
254
|
});
|
|
230
255
|
const marker = css({
|
|
231
256
|
width: 28,
|
|
232
257
|
paddingLeft: 10,
|
|
233
258
|
paddingRight: 10,
|
|
234
|
-
userSelect:
|
|
235
|
-
label:
|
|
259
|
+
userSelect: "none",
|
|
260
|
+
label: "marker",
|
|
236
261
|
[`&.${diffAdded}`]: {
|
|
237
262
|
pre: {
|
|
238
263
|
color: variables.addedColor,
|
|
@@ -246,25 +271,25 @@ export default (styleOverride, useDarkTheme = false, nonce = '') => {
|
|
|
246
271
|
});
|
|
247
272
|
const highlightedLine = css({
|
|
248
273
|
background: variables.highlightBackground,
|
|
249
|
-
label:
|
|
274
|
+
label: "highlighted-line",
|
|
250
275
|
[`.${wordAdded}, .${wordRemoved}`]: {
|
|
251
|
-
backgroundColor:
|
|
276
|
+
backgroundColor: "initial",
|
|
252
277
|
},
|
|
253
278
|
});
|
|
254
279
|
const highlightedGutter = css({
|
|
255
|
-
label:
|
|
280
|
+
label: "highlighted-gutter",
|
|
256
281
|
});
|
|
257
282
|
const gutter = css({
|
|
258
|
-
userSelect:
|
|
283
|
+
userSelect: "none",
|
|
259
284
|
minWidth: 50,
|
|
260
|
-
width:
|
|
261
|
-
padding:
|
|
262
|
-
whiteSpace:
|
|
263
|
-
label:
|
|
264
|
-
textAlign:
|
|
285
|
+
width: "50px",
|
|
286
|
+
padding: "0 10px",
|
|
287
|
+
whiteSpace: "nowrap",
|
|
288
|
+
label: "gutter",
|
|
289
|
+
textAlign: "right",
|
|
265
290
|
background: variables.gutterBackground,
|
|
266
|
-
|
|
267
|
-
cursor:
|
|
291
|
+
"&:hover": {
|
|
292
|
+
cursor: "pointer",
|
|
268
293
|
background: variables.gutterBackgroundDark,
|
|
269
294
|
pre: {
|
|
270
295
|
opacity: 1,
|
|
@@ -281,22 +306,22 @@ export default (styleOverride, useDarkTheme = false, nonce = '') => {
|
|
|
281
306
|
},
|
|
282
307
|
[`&.${highlightedGutter}`]: {
|
|
283
308
|
background: variables.highlightGutterBackground,
|
|
284
|
-
|
|
309
|
+
"&:hover": {
|
|
285
310
|
background: variables.highlightGutterBackground,
|
|
286
311
|
},
|
|
287
312
|
},
|
|
288
313
|
});
|
|
289
314
|
const emptyGutter = css({
|
|
290
|
-
|
|
315
|
+
"&:hover": {
|
|
291
316
|
background: variables.gutterBackground,
|
|
292
|
-
cursor:
|
|
317
|
+
cursor: "initial",
|
|
293
318
|
},
|
|
294
|
-
label:
|
|
319
|
+
label: "empty-gutter",
|
|
295
320
|
});
|
|
296
321
|
const line = css({
|
|
297
|
-
verticalAlign:
|
|
298
|
-
label:
|
|
299
|
-
textDecoration:
|
|
322
|
+
verticalAlign: "baseline",
|
|
323
|
+
label: "line",
|
|
324
|
+
textDecoration: "none",
|
|
300
325
|
});
|
|
301
326
|
const column = css({});
|
|
302
327
|
const defaultStyles = {
|
|
@@ -320,6 +345,7 @@ export default (styleOverride, useDarkTheme = false, nonce = '') => {
|
|
|
320
345
|
wordRemoved,
|
|
321
346
|
noSelect: unselectable,
|
|
322
347
|
codeFoldGutter,
|
|
348
|
+
codeFoldExpandButton,
|
|
323
349
|
codeFoldContentContainer,
|
|
324
350
|
codeFold,
|
|
325
351
|
emptyGutter,
|
|
@@ -330,6 +356,7 @@ export default (styleOverride, useDarkTheme = false, nonce = '') => {
|
|
|
330
356
|
column,
|
|
331
357
|
codeFoldContent,
|
|
332
358
|
titleBlock,
|
|
359
|
+
allExpandButton,
|
|
333
360
|
};
|
|
334
361
|
const computerOverrideStyles = Object.keys(styles).reduce((acc, key) => ({
|
|
335
362
|
...acc,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-diff-viewer-continued",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
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": [
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
"Pranesh Ravi<praneshpranesh@gmail.com>",
|
|
20
20
|
"Bart Riepe <bart@serial-experiments.com>"
|
|
21
21
|
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./lib/cjs/src/index.d.ts",
|
|
26
|
+
"import": "./lib/esm/src/index.js",
|
|
27
|
+
"require": "./lib/cjs/src/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
22
30
|
"main": "lib/cjs/src/index",
|
|
23
31
|
"module": "lib/esm/src/index",
|
|
24
32
|
"typings": "lib/cjs/src/index",
|
|
@@ -28,43 +36,43 @@
|
|
|
28
36
|
"publish:examples": "NODE_ENV=production pnpm run build:examples && gh-pages -d examples/dist -r $GITHUB_REPO_URL",
|
|
29
37
|
"publish:examples:local": "NODE_ENV=production pnpm run build:examples && gh-pages -d examples/dist",
|
|
30
38
|
"start:examples": "vite examples",
|
|
39
|
+
"dev": "vite dev examples",
|
|
31
40
|
"test": "vitest",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"prettier": "prettier --write ."
|
|
41
|
+
"check": "biome check src/ test/",
|
|
42
|
+
"check:fix": "biome check --write --unsafe src/ test/"
|
|
35
43
|
},
|
|
36
44
|
"dependencies": {
|
|
37
|
-
"@emotion/css": "^11.
|
|
38
|
-
"
|
|
45
|
+
"@emotion/css": "^11.13.5",
|
|
46
|
+
"@emotion/react": "^11.14.0",
|
|
47
|
+
"classnames": "^2.5.1",
|
|
39
48
|
"diff": "^5.2.0",
|
|
40
49
|
"memoize-one": "^6.0.0"
|
|
41
50
|
},
|
|
42
51
|
"devDependencies": {
|
|
43
|
-
"@biomejs/biome": "^1.
|
|
52
|
+
"@biomejs/biome": "^1.9.4",
|
|
44
53
|
"@semantic-release/changelog": "6.0.1",
|
|
45
54
|
"@semantic-release/git": "10.0.1",
|
|
46
55
|
"@testing-library/react": "^13.4.0",
|
|
47
|
-
"@types/diff": "^5.
|
|
48
|
-
"@types/
|
|
49
|
-
"@types/
|
|
50
|
-
"@types/react": "^18.
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"react": "^18.
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"vitest": "^1.2.2"
|
|
56
|
+
"@types/diff": "^5.2.3",
|
|
57
|
+
"@types/node": "^20.17.16",
|
|
58
|
+
"@types/react": "^18.3.18",
|
|
59
|
+
"@types/react-dom": "^18.3.5",
|
|
60
|
+
"gh-pages": "^5.0.0",
|
|
61
|
+
"happy-dom": "^13.10.1",
|
|
62
|
+
"react": "^18.3.1",
|
|
63
|
+
"react-dom": "^18.3.1",
|
|
64
|
+
"sass": "^1.83.4",
|
|
65
|
+
"semantic-release": "^24.2.1",
|
|
66
|
+
"ts-node": "^10.9.2",
|
|
67
|
+
"typescript": "^5.7.3",
|
|
68
|
+
"vite": "^5.4.14",
|
|
69
|
+
"vitest": "^3.0.4"
|
|
62
70
|
},
|
|
63
71
|
"peerDependencies": {
|
|
64
|
-
"react": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
65
|
-
"react-dom": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
72
|
+
"react": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
73
|
+
"react-dom": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
66
74
|
},
|
|
67
75
|
"engines": {
|
|
68
|
-
"node": ">=
|
|
76
|
+
"node": ">= 16"
|
|
69
77
|
}
|
|
70
78
|
}
|
package/release.config.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
export default {
|
|
2
2
|
plugins: [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
"@semantic-release/commit-analyzer",
|
|
4
|
+
"@semantic-release/release-notes-generator",
|
|
5
|
+
"@semantic-release/npm",
|
|
6
|
+
"@semantic-release/changelog",
|
|
7
|
+
"@semantic-release/github",
|
|
8
8
|
[
|
|
9
|
-
|
|
9
|
+
"@semantic-release/git",
|
|
10
10
|
{
|
|
11
11
|
message:
|
|
12
|
-
|
|
12
|
+
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
|
|
13
13
|
assets: [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
"CHANGELOG.md",
|
|
15
|
+
"package.json",
|
|
16
|
+
"package-lock.json",
|
|
17
|
+
"pnpm-lock.yaml",
|
|
18
|
+
"npm-shrinkwrap.json",
|
|
19
19
|
],
|
|
20
20
|
},
|
|
21
21
|
],
|
package/.travis.yml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
language: node_js
|
|
2
|
-
node_js: 12
|
|
3
|
-
before_script: yarn build
|
|
4
|
-
after_success: './publish-examples.sh'
|
|
5
|
-
deploy:
|
|
6
|
-
skip_cleanup: true
|
|
7
|
-
provider: npm
|
|
8
|
-
email: praneshpranesh@gmail.com
|
|
9
|
-
api_key:
|
|
10
|
-
secure: ytHogDV6wWZKY3eCgdJ5TFCz57llxTe6W1EuLBbg3TvHfpAmcL5XzT77T0lNTYY95XmABwGpf4qvqui1fXVoFqqSXVPSVt9I1aQ4gxBzxPKHGPV++wwgVOBfZErIlYPW4kcYJQvfemBDBfAMQS2u/0si5mZbeyVkvlnhHLnylsc1sJUGGnq9PJxwCagBd/DAhYYCU5d4a9psOwo6GnAwzs37rgVIb5oNhbtex0r1u5D4irweVz4V1TkwhMczw3v8t0d+I2REqjGkqLdKJOt9Q/Uqc7v34wIAy4Xng8zla7PKlzVNDlsA19en4DezJ/YRU3o6JxsMICRDyIRcwaebX2S7S35cif2gJRSF+LRCq2XdHvDAXPt6trQoeo9mSdq6+dL4/uYbhliUOyhzw84CRdY3+VrST1h7h8LAGODQzYJbQs20PkVL2527Bk+eS+tNCNpr/jSWG/iDO477j9jTGNVloF2IRHikbnZDFcF4ZrKE5RHEWSbQzyHkOOTgo5k+p6Doyv4jSgdLlnck2+f5n4Ocs/xh1c0UAphdW/mw/8lAv0+gpoL8f3rfN4AD5LYjjQ7xK5yO6RfIzsmAOqs7WCyY0ewXaPaP6Nz+Ne5Q2CKwVZiqj3qvd4o3aJodnquJ1iKzxbNHd/LFScEQxYSslyRluHrM+7DASPfccA7ePnE=
|
|
11
|
-
on:
|
|
12
|
-
tags: true
|
|
13
|
-
repo: praneshr/react-diff-viewer
|