@kubed/diff-viewer 0.2.17 → 0.2.18

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.
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("react"),w=require("diff"),d=require("diff2html"),c=require("@kubed/icons"),o=require("./styles.js");function E(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var l=E(i),j=Object.defineProperty,p=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,y=(e,r,t)=>r in e?j(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,_=(e,r)=>{for(var t in r||(r={}))D.call(r,t)&&y(e,t,r[t]);if(p)for(var t of p(r))O.call(r,t)&&y(e,t,r[t]);return e};const u=(e,r,t={})=>{const a=w.createPatch("yaml",e,r,"","",{context:-1}),n=d.parse(a);return d.html(n,_({drawFileList:!1},t))},g=({title:e,description:r,mode:t="line-by-line",oldValue:a,newValue:n})=>{const[v,b]=i.useState(t),[h,s]=i.useState(u(a,n,{outputFormat:t})),f=m=>{b(m),s(u(a,n,{outputFormat:m}))};return i.useEffect(()=>{s(u(a,n,{outputFormat:v}))},[a,n]),l.createElement(o.DiffWrapper,null,l.createElement(o.Header,null,l.createElement(c.Terminal,{size:20}),l.createElement(o.Title,null,e),l.createElement(c.ChevronDown,{size:20,className:"switch-mode",onClick:()=>{f("line-by-line")}}),l.createElement(c.ChevronRight,{size:20,className:"switch-mode",onClick:()=>{f("side-by-side")}}),l.createElement(o.Description,null,r)),l.createElement("div",{dangerouslySetInnerHTML:{__html:h}}))};exports.DiffViewer=g;
2
+ //# sourceMappingURL=DiffViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiffViewer.js","sources":["../src/DiffViewer.tsx"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { createPatch } from 'diff';\nimport { parse, html } from 'diff2html';\nimport { Terminal, ChevronDown, ChevronRight } from '@kubed/icons';\nimport { DiffWrapper, Header, Title, Description } from './styles';\n\nconst getDiffHtml = (oldValue, newValue, options = {}) => {\n const diffStr = createPatch('yaml', oldValue, newValue, '', '', {\n context: -1,\n });\n const diffJson = parse(diffStr);\n return html(diffJson, {\n drawFileList: false,\n ...options,\n });\n};\n\nexport interface DiffViewerProps {\n title?: string | React.ReactNode;\n description?: string | React.ReactNode;\n mode?: 'line-by-line' | 'side-by-side';\n oldValue: string;\n newValue: string;\n}\n\nexport const DiffViewer = ({\n title,\n description,\n mode = 'line-by-line',\n oldValue,\n newValue,\n}: DiffViewerProps) => {\n const [_mode, setMode] = useState(mode);\n const [diffHtml, setDiffHtml] = useState(getDiffHtml(oldValue, newValue, { outputFormat: mode }));\n\n const handleModeChange = (m) => {\n setMode(m);\n setDiffHtml(getDiffHtml(oldValue, newValue, { outputFormat: m }));\n };\n\n useEffect(() => {\n setDiffHtml(getDiffHtml(oldValue, newValue, { outputFormat: _mode }));\n }, [oldValue, newValue]);\n\n return (\n <DiffWrapper>\n <Header>\n <Terminal size={20} />\n <Title>{title}</Title>\n <ChevronDown\n size={20}\n className=\"switch-mode\"\n onClick={() => {\n handleModeChange('line-by-line');\n }}\n />\n <ChevronRight\n size={20}\n className=\"switch-mode\"\n onClick={() => {\n handleModeChange('side-by-side');\n }}\n />\n <Description>{description}</Description>\n </Header>\n <div\n dangerouslySetInnerHTML={{\n __html: diffHtml,\n }}\n />\n </DiffWrapper>\n );\n};\n"],"names":["w","C","F","a","H","r","v","x","N","z","T","k","M"],"mappings":"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"}
package/cjs/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./DiffViewer.js");exports.DiffViewer=e.DiffViewer;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
package/cjs/styles.js ADDED
@@ -0,0 +1,411 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("styled-components");function o(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var d=o(i);const l=d.div`
2
+ border-radius: 4px 4px 0 0;
3
+ //border: 1px solid #ccd3db;
4
+
5
+ .d2h-wrapper {
6
+ text-align: left;
7
+ }
8
+
9
+ .d2h-file-header {
10
+ display: none;
11
+ }
12
+
13
+ .d2h-file-header.d2h-sticky-header {
14
+ position: sticky;
15
+ top: 0;
16
+ z-index: 1;
17
+ }
18
+
19
+ .d2h-file-stats {
20
+ display: -webkit-box;
21
+ display: -ms-flexbox;
22
+ display: flex;
23
+ font-size: 14px;
24
+ margin-left: auto;
25
+ }
26
+
27
+ .d2h-lines-added {
28
+ border: 1px solid #b4e2b4;
29
+ border-radius: 5px 0 0 5px;
30
+ color: #399839;
31
+ padding: 2px;
32
+ text-align: right;
33
+ vertical-align: middle;
34
+ }
35
+
36
+ .d2h-lines-deleted {
37
+ border: 1px solid #e9aeae;
38
+ border-radius: 0 5px 5px 0;
39
+ color: #c33;
40
+ margin-left: 1px;
41
+ padding: 2px;
42
+ text-align: left;
43
+ vertical-align: middle;
44
+ }
45
+
46
+ .d2h-file-name-wrapper {
47
+ -webkit-box-align: center;
48
+ -ms-flex-align: center;
49
+ align-items: center;
50
+ display: -webkit-box;
51
+ display: -ms-flexbox;
52
+ display: flex;
53
+ font-size: 15px;
54
+ width: 100%;
55
+ }
56
+
57
+ .d2h-file-name {
58
+ overflow-x: hidden;
59
+ text-overflow: ellipsis;
60
+ white-space: nowrap;
61
+ }
62
+
63
+ .d2h-file-wrapper {
64
+ border: 1px solid #ccd3db;
65
+ border-radius: 0 0 4px 4px;
66
+ border-top-width: 0;
67
+ background-color: #fff;
68
+ }
69
+
70
+ .d2h-file-collapse {
71
+ -webkit-box-pack: end;
72
+ -ms-flex-pack: end;
73
+ -webkit-box-align: center;
74
+ -ms-flex-align: center;
75
+ align-items: center;
76
+ border: 1px solid #ddd;
77
+ border-radius: 3px;
78
+ cursor: pointer;
79
+ display: none;
80
+ font-size: 12px;
81
+ justify-content: flex-end;
82
+ padding: 4px 8px;
83
+ }
84
+
85
+ .d2h-file-collapse.d2h-selected {
86
+ background-color: #c8e1ff;
87
+ }
88
+
89
+ .d2h-file-collapse-input {
90
+ margin: 0 4px 0 0;
91
+ }
92
+
93
+ .d2h-diff-table {
94
+ border-collapse: collapse;
95
+ font-family: Menlo, Consolas, monospace;
96
+ font-size: 13px;
97
+ width: 100%;
98
+ }
99
+
100
+ .d2h-files-diff {
101
+ display: -webkit-box;
102
+ display: -ms-flexbox;
103
+ display: flex;
104
+ width: 100%;
105
+ }
106
+
107
+ .d2h-file-diff {
108
+ overflow-y: hidden;
109
+ }
110
+
111
+ .d2h-file-diff.d2h-d-none,
112
+ .d2h-files-diff.d2h-d-none {
113
+ display: none;
114
+ }
115
+
116
+ .d2h-file-side-diff {
117
+ display: inline-block;
118
+ overflow-x: scroll;
119
+ overflow-y: hidden;
120
+ width: 50%;
121
+ }
122
+
123
+ .d2h-code-line {
124
+ padding: 0 8em;
125
+ }
126
+
127
+ .d2h-code-line,
128
+ .d2h-code-side-line {
129
+ display: inline-block;
130
+ -webkit-user-select: none;
131
+ -moz-user-select: none;
132
+ -ms-user-select: none;
133
+ user-select: none;
134
+ white-space: nowrap;
135
+ width: 100%;
136
+ background-color: transparent !important;
137
+ }
138
+
139
+ .d2h-code-side-line {
140
+ padding: 0 4.5em;
141
+ }
142
+
143
+ .d2h-code-line-ctn {
144
+ word-wrap: normal;
145
+ background: none;
146
+ display: inline-block;
147
+ padding: 0;
148
+ -webkit-user-select: text;
149
+ -moz-user-select: text;
150
+ -ms-user-select: text;
151
+ user-select: text;
152
+ vertical-align: middle;
153
+ white-space: pre;
154
+ width: 100%;
155
+ }
156
+
157
+ .d2h-code-line del,
158
+ .d2h-code-side-line del {
159
+ background-color: rgba(234, 133, 115, 0.7);
160
+ }
161
+
162
+ .d2h-code-line del,
163
+ .d2h-code-line ins,
164
+ .d2h-code-side-line del,
165
+ .d2h-code-side-line ins {
166
+ border-radius: 0.2em;
167
+ display: inline-block;
168
+ margin-top: -1px;
169
+ text-decoration: none;
170
+ vertical-align: middle;
171
+ }
172
+
173
+ .d2h-code-line ins,
174
+ .d2h-code-side-line ins {
175
+ background-color: rgba(85, 188, 138, 0.7);
176
+ text-align: left;
177
+ }
178
+
179
+ .d2h-code-line-prefix {
180
+ word-wrap: normal;
181
+ background: none;
182
+ display: inline;
183
+ padding: 0;
184
+ white-space: pre;
185
+ }
186
+
187
+ .line-num1 {
188
+ float: left;
189
+ }
190
+
191
+ .line-num1,
192
+ .line-num2 {
193
+ -webkit-box-sizing: border-box;
194
+ box-sizing: border-box;
195
+ overflow: hidden;
196
+ padding: 0 0.5em;
197
+ text-overflow: ellipsis;
198
+ width: 3.5em;
199
+ }
200
+
201
+ .line-num2 {
202
+ float: right;
203
+ }
204
+
205
+ .d2h-code-linenumber {
206
+ background-color: rgba(239, 244, 249, 0.8);
207
+ border: solid #eee;
208
+ border-width: 0 1px;
209
+ -webkit-box-sizing: border-box;
210
+ box-sizing: border-box;
211
+ color: rgba(0, 0, 0, 0.3);
212
+ cursor: pointer;
213
+ display: inline-block;
214
+ position: absolute;
215
+ text-align: right;
216
+ width: 7.5em;
217
+ }
218
+
219
+ .d2h-code-linenumber:after {
220
+ content: '\\200b';
221
+ }
222
+
223
+ .d2h-code-side-linenumber {
224
+ background-color: #fff;
225
+ border: solid #eee;
226
+ border-width: 0 1px;
227
+ -webkit-box-sizing: border-box;
228
+ box-sizing: border-box;
229
+ color: rgba(0, 0, 0, 0.3);
230
+ cursor: pointer;
231
+ display: inline-block;
232
+ overflow: hidden;
233
+ padding: 0 0.5em;
234
+ position: absolute;
235
+ text-align: right;
236
+ text-overflow: ellipsis;
237
+ width: 4em;
238
+ }
239
+
240
+ .d2h-code-side-linenumber:after {
241
+ content: '\\200b';
242
+ }
243
+
244
+ .d2h-code-side-emptyplaceholder,
245
+ .d2h-emptyplaceholder {
246
+ background-color: #f1f1f1;
247
+ border-color: #e1e1e1;
248
+ }
249
+
250
+ .d2h-code-line-prefix,
251
+ .d2h-code-linenumber,
252
+ .d2h-code-side-linenumber,
253
+ .d2h-emptyplaceholder {
254
+ -webkit-user-select: none;
255
+ -moz-user-select: none;
256
+ -ms-user-select: none;
257
+ user-select: none;
258
+ }
259
+
260
+ .d2h-code-linenumber,
261
+ .d2h-code-side-linenumber {
262
+ direction: rtl;
263
+ }
264
+
265
+ .d2h-del {
266
+ background-color: #fee8e9;
267
+ border-color: #e9aeae;
268
+ }
269
+
270
+ .d2h-ins {
271
+ background-color: rgba(162, 216, 187, 0.7);
272
+ border-color: #b4e2b4;
273
+ }
274
+
275
+ .d2h-info {
276
+ background-color: #f8fafd;
277
+ border-color: #d5e4f2;
278
+ color: rgba(0, 0, 0, 0.3);
279
+ }
280
+
281
+ .d2h-file-diff .d2h-del.d2h-change {
282
+ background-color: rgba(250, 231, 229, 0.7);
283
+ }
284
+
285
+ .d2h-file-diff .d2h-ins.d2h-change {
286
+ background-color: rgba(196, 230, 212, 0.7);
287
+ }
288
+
289
+ .d2h-file-list-wrapper {
290
+ margin-bottom: 10px;
291
+ }
292
+
293
+ .d2h-file-list-wrapper a {
294
+ color: #3572b0;
295
+ text-decoration: none;
296
+ }
297
+
298
+ .d2h-file-list-wrapper a:visited {
299
+ color: #3572b0;
300
+ }
301
+
302
+ .d2h-file-list-header {
303
+ text-align: left;
304
+ }
305
+
306
+ .d2h-file-list-title {
307
+ font-weight: 700;
308
+ }
309
+
310
+ .d2h-file-list-line {
311
+ display: -webkit-box;
312
+ display: -ms-flexbox;
313
+ display: flex;
314
+ text-align: left;
315
+ }
316
+
317
+ .d2h-file-list {
318
+ display: block;
319
+ list-style: none;
320
+ margin: 0;
321
+ padding: 0;
322
+ }
323
+
324
+ .d2h-file-list > li {
325
+ border-bottom: 1px solid #ddd;
326
+ margin: 0;
327
+ padding: 5px 10px;
328
+ }
329
+
330
+ .d2h-file-list > li:last-child {
331
+ border-bottom: none;
332
+ }
333
+
334
+ .d2h-file-switch {
335
+ cursor: pointer;
336
+ display: none;
337
+ font-size: 10px;
338
+ }
339
+
340
+ .d2h-icon {
341
+ fill: currentColor;
342
+ margin-right: 10px;
343
+ vertical-align: middle;
344
+ }
345
+
346
+ .d2h-deleted {
347
+ color: #c33;
348
+ }
349
+
350
+ .d2h-added {
351
+ color: #399839;
352
+ }
353
+
354
+ .d2h-changed {
355
+ color: #d0b44c;
356
+ }
357
+
358
+ .d2h-moved {
359
+ color: #3572b0;
360
+ }
361
+
362
+ .d2h-tag {
363
+ background-color: #fff;
364
+ display: -webkit-box;
365
+ display: -ms-flexbox;
366
+ display: flex;
367
+ font-size: 10px;
368
+ margin-left: 5px;
369
+ padding: 0 2px;
370
+ }
371
+
372
+ .d2h-deleted-tag {
373
+ border: 1px solid #c33;
374
+ }
375
+
376
+ .d2h-added-tag {
377
+ border: 1px solid #399839;
378
+ }
379
+
380
+ .d2h-changed-tag {
381
+ border: 1px solid #d0b44c;
382
+ }
383
+
384
+ .d2h-moved-tag {
385
+ border: 1px solid #3572b0;
386
+ }
387
+ `,r=d.div`
388
+ display: flex;
389
+ align-items: center;
390
+ padding: 12px;
391
+ border-radius: 4px 4px 0 0;
392
+ border: 1px solid #ccd3db;
393
+ background-color: #eff4f9;
394
+
395
+ .kubed-icon {
396
+ margin-right: 4px;
397
+ }
398
+
399
+ .switch-mode {
400
+ cursor: pointer;
401
+ }
402
+ `,n=d.span`
403
+ margin-right: 4px;
404
+ font-weight: 600;
405
+ color: #36435c;
406
+ `,t=d.span`
407
+ margin-left: auto;
408
+ font-weight: 600;
409
+ color: #36435c;
410
+ `;exports.Description=t,exports.DiffWrapper=l,exports.Header=r,exports.Title=n;
411
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sources":["../src/styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const DiffWrapper = styled.div`\n border-radius: 4px 4px 0 0;\n //border: 1px solid #ccd3db;\n\n .d2h-wrapper {\n text-align: left;\n }\n\n .d2h-file-header {\n display: none;\n }\n\n .d2h-file-header.d2h-sticky-header {\n position: sticky;\n top: 0;\n z-index: 1;\n }\n\n .d2h-file-stats {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n font-size: 14px;\n margin-left: auto;\n }\n\n .d2h-lines-added {\n border: 1px solid #b4e2b4;\n border-radius: 5px 0 0 5px;\n color: #399839;\n padding: 2px;\n text-align: right;\n vertical-align: middle;\n }\n\n .d2h-lines-deleted {\n border: 1px solid #e9aeae;\n border-radius: 0 5px 5px 0;\n color: #c33;\n margin-left: 1px;\n padding: 2px;\n text-align: left;\n vertical-align: middle;\n }\n\n .d2h-file-name-wrapper {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n font-size: 15px;\n width: 100%;\n }\n\n .d2h-file-name {\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .d2h-file-wrapper {\n border: 1px solid #ccd3db;\n border-radius: 0 0 4px 4px;\n border-top-width: 0;\n background-color: #fff;\n }\n\n .d2h-file-collapse {\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border: 1px solid #ddd;\n border-radius: 3px;\n cursor: pointer;\n display: none;\n font-size: 12px;\n justify-content: flex-end;\n padding: 4px 8px;\n }\n\n .d2h-file-collapse.d2h-selected {\n background-color: #c8e1ff;\n }\n\n .d2h-file-collapse-input {\n margin: 0 4px 0 0;\n }\n\n .d2h-diff-table {\n border-collapse: collapse;\n font-family: Menlo, Consolas, monospace;\n font-size: 13px;\n width: 100%;\n }\n\n .d2h-files-diff {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n }\n\n .d2h-file-diff {\n overflow-y: hidden;\n }\n\n .d2h-file-diff.d2h-d-none,\n .d2h-files-diff.d2h-d-none {\n display: none;\n }\n\n .d2h-file-side-diff {\n display: inline-block;\n overflow-x: scroll;\n overflow-y: hidden;\n width: 50%;\n }\n\n .d2h-code-line {\n padding: 0 8em;\n }\n\n .d2h-code-line,\n .d2h-code-side-line {\n display: inline-block;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n background-color: transparent !important;\n }\n\n .d2h-code-side-line {\n padding: 0 4.5em;\n }\n\n .d2h-code-line-ctn {\n word-wrap: normal;\n background: none;\n display: inline-block;\n padding: 0;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n vertical-align: middle;\n white-space: pre;\n width: 100%;\n }\n\n .d2h-code-line del,\n .d2h-code-side-line del {\n background-color: rgba(234, 133, 115, 0.7);\n }\n\n .d2h-code-line del,\n .d2h-code-line ins,\n .d2h-code-side-line del,\n .d2h-code-side-line ins {\n border-radius: 0.2em;\n display: inline-block;\n margin-top: -1px;\n text-decoration: none;\n vertical-align: middle;\n }\n\n .d2h-code-line ins,\n .d2h-code-side-line ins {\n background-color: rgba(85, 188, 138, 0.7);\n text-align: left;\n }\n\n .d2h-code-line-prefix {\n word-wrap: normal;\n background: none;\n display: inline;\n padding: 0;\n white-space: pre;\n }\n\n .line-num1 {\n float: left;\n }\n\n .line-num1,\n .line-num2 {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n padding: 0 0.5em;\n text-overflow: ellipsis;\n width: 3.5em;\n }\n\n .line-num2 {\n float: right;\n }\n\n .d2h-code-linenumber {\n background-color: rgba(239, 244, 249, 0.8);\n border: solid #eee;\n border-width: 0 1px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.3);\n cursor: pointer;\n display: inline-block;\n position: absolute;\n text-align: right;\n width: 7.5em;\n }\n\n .d2h-code-linenumber:after {\n content: '\\\\200b';\n }\n\n .d2h-code-side-linenumber {\n background-color: #fff;\n border: solid #eee;\n border-width: 0 1px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.3);\n cursor: pointer;\n display: inline-block;\n overflow: hidden;\n padding: 0 0.5em;\n position: absolute;\n text-align: right;\n text-overflow: ellipsis;\n width: 4em;\n }\n\n .d2h-code-side-linenumber:after {\n content: '\\\\200b';\n }\n\n .d2h-code-side-emptyplaceholder,\n .d2h-emptyplaceholder {\n background-color: #f1f1f1;\n border-color: #e1e1e1;\n }\n\n .d2h-code-line-prefix,\n .d2h-code-linenumber,\n .d2h-code-side-linenumber,\n .d2h-emptyplaceholder {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .d2h-code-linenumber,\n .d2h-code-side-linenumber {\n direction: rtl;\n }\n\n .d2h-del {\n background-color: #fee8e9;\n border-color: #e9aeae;\n }\n\n .d2h-ins {\n background-color: rgba(162, 216, 187, 0.7);\n border-color: #b4e2b4;\n }\n\n .d2h-info {\n background-color: #f8fafd;\n border-color: #d5e4f2;\n color: rgba(0, 0, 0, 0.3);\n }\n\n .d2h-file-diff .d2h-del.d2h-change {\n background-color: rgba(250, 231, 229, 0.7);\n }\n\n .d2h-file-diff .d2h-ins.d2h-change {\n background-color: rgba(196, 230, 212, 0.7);\n }\n\n .d2h-file-list-wrapper {\n margin-bottom: 10px;\n }\n\n .d2h-file-list-wrapper a {\n color: #3572b0;\n text-decoration: none;\n }\n\n .d2h-file-list-wrapper a:visited {\n color: #3572b0;\n }\n\n .d2h-file-list-header {\n text-align: left;\n }\n\n .d2h-file-list-title {\n font-weight: 700;\n }\n\n .d2h-file-list-line {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n text-align: left;\n }\n\n .d2h-file-list {\n display: block;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .d2h-file-list > li {\n border-bottom: 1px solid #ddd;\n margin: 0;\n padding: 5px 10px;\n }\n\n .d2h-file-list > li:last-child {\n border-bottom: none;\n }\n\n .d2h-file-switch {\n cursor: pointer;\n display: none;\n font-size: 10px;\n }\n\n .d2h-icon {\n fill: currentColor;\n margin-right: 10px;\n vertical-align: middle;\n }\n\n .d2h-deleted {\n color: #c33;\n }\n\n .d2h-added {\n color: #399839;\n }\n\n .d2h-changed {\n color: #d0b44c;\n }\n\n .d2h-moved {\n color: #3572b0;\n }\n\n .d2h-tag {\n background-color: #fff;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n font-size: 10px;\n margin-left: 5px;\n padding: 0 2px;\n }\n\n .d2h-deleted-tag {\n border: 1px solid #c33;\n }\n\n .d2h-added-tag {\n border: 1px solid #399839;\n }\n\n .d2h-changed-tag {\n border: 1px solid #d0b44c;\n }\n\n .d2h-moved-tag {\n border: 1px solid #3572b0;\n }\n`;\n\nexport const Header = styled.div`\n display: flex;\n align-items: center;\n padding: 12px;\n border-radius: 4px 4px 0 0;\n border: 1px solid #ccd3db;\n background-color: #eff4f9;\n\n .kubed-icon {\n margin-right: 4px;\n }\n\n .switch-mode {\n cursor: pointer;\n }\n`;\n\nexport const Title = styled.span`\n margin-right: 4px;\n font-weight: 600;\n color: #36435c;\n`;\n\nexport const Description = styled.span`\n margin-left: auto;\n font-weight: 600;\n color: #36435c;\n`;\n"],"names":["e"],"mappings":";;;;;;;;;;AAA6C,MAAC,WAAW,CAACA,UAAC,CAAC,GAAG,CAAC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,MAAM,CAACA,UAAC,CAAC,GAAG,CAAC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,KAAK,CAACA,UAAC,CAAC,IAAI,CAAC;AACf;AACA;AACA;AACA,CAAC,CAAC,WAAW,CAACA,UAAC,CAAC,IAAI,CAAC;AACrB;AACA;AACA;AACA;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ import l,{useState as s,useEffect as y}from"react";import{createPatch as h}from"diff";import{parse as v,html as E}from"diff2html";import{Terminal as w,ChevronDown as O,ChevronRight as g}from"@kubed/icons";import{DiffWrapper as j,Header as D,Title as C,Description as F}from"./styles.js";var P=Object.defineProperty,p=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,u=(t,e,r)=>e in t?P(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,S=(t,e)=>{for(var r in e||(e={}))k.call(e,r)&&u(t,r,e[r]);if(p)for(var r of p(e))z.call(e,r)&&u(t,r,e[r]);return t};const a=(t,e,r={})=>{const n=h("yaml",t,e,"","",{context:-1}),o=v(n);return E(o,S({drawFileList:!1},r))},T=({title:t,description:e,mode:r="line-by-line",oldValue:n,newValue:o})=>{const[f,b]=s(r),[d,i]=s(a(n,o,{outputFormat:r})),m=c=>{b(c),i(a(n,o,{outputFormat:c}))};return y(()=>{i(a(n,o,{outputFormat:f}))},[n,o]),l.createElement(j,null,l.createElement(D,null,l.createElement(w,{size:20}),l.createElement(C,null,t),l.createElement(O,{size:20,className:"switch-mode",onClick:()=>{m("line-by-line")}}),l.createElement(g,{size:20,className:"switch-mode",onClick:()=>{m("side-by-side")}}),l.createElement(F,null,e)),l.createElement("div",{dangerouslySetInnerHTML:{__html:d}}))};export{T as DiffViewer};
2
+ //# sourceMappingURL=DiffViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiffViewer.js","sources":["../src/DiffViewer.tsx"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { createPatch } from 'diff';\nimport { parse, html } from 'diff2html';\nimport { Terminal, ChevronDown, ChevronRight } from '@kubed/icons';\nimport { DiffWrapper, Header, Title, Description } from './styles';\n\nconst getDiffHtml = (oldValue, newValue, options = {}) => {\n const diffStr = createPatch('yaml', oldValue, newValue, '', '', {\n context: -1,\n });\n const diffJson = parse(diffStr);\n return html(diffJson, {\n drawFileList: false,\n ...options,\n });\n};\n\nexport interface DiffViewerProps {\n title?: string | React.ReactNode;\n description?: string | React.ReactNode;\n mode?: 'line-by-line' | 'side-by-side';\n oldValue: string;\n newValue: string;\n}\n\nexport const DiffViewer = ({\n title,\n description,\n mode = 'line-by-line',\n oldValue,\n newValue,\n}: DiffViewerProps) => {\n const [_mode, setMode] = useState(mode);\n const [diffHtml, setDiffHtml] = useState(getDiffHtml(oldValue, newValue, { outputFormat: mode }));\n\n const handleModeChange = (m) => {\n setMode(m);\n setDiffHtml(getDiffHtml(oldValue, newValue, { outputFormat: m }));\n };\n\n useEffect(() => {\n setDiffHtml(getDiffHtml(oldValue, newValue, { outputFormat: _mode }));\n }, [oldValue, newValue]);\n\n return (\n <DiffWrapper>\n <Header>\n <Terminal size={20} />\n <Title>{title}</Title>\n <ChevronDown\n size={20}\n className=\"switch-mode\"\n onClick={() => {\n handleModeChange('line-by-line');\n }}\n />\n <ChevronRight\n size={20}\n className=\"switch-mode\"\n onClick={() => {\n handleModeChange('side-by-side');\n }}\n />\n <Description>{description}</Description>\n </Header>\n <div\n dangerouslySetInnerHTML={{\n __html: diffHtml,\n }}\n />\n </DiffWrapper>\n );\n};\n"],"names":["w","C","F","a","H","v","x","N","z","T","k","M"],"mappings":"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"}
package/esm/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import{DiffViewer as i}from"./DiffViewer.js";export{i as DiffViewer};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/esm/styles.js ADDED
@@ -0,0 +1,411 @@
1
+ import e from"styled-components";const d=e.div`
2
+ border-radius: 4px 4px 0 0;
3
+ //border: 1px solid #ccd3db;
4
+
5
+ .d2h-wrapper {
6
+ text-align: left;
7
+ }
8
+
9
+ .d2h-file-header {
10
+ display: none;
11
+ }
12
+
13
+ .d2h-file-header.d2h-sticky-header {
14
+ position: sticky;
15
+ top: 0;
16
+ z-index: 1;
17
+ }
18
+
19
+ .d2h-file-stats {
20
+ display: -webkit-box;
21
+ display: -ms-flexbox;
22
+ display: flex;
23
+ font-size: 14px;
24
+ margin-left: auto;
25
+ }
26
+
27
+ .d2h-lines-added {
28
+ border: 1px solid #b4e2b4;
29
+ border-radius: 5px 0 0 5px;
30
+ color: #399839;
31
+ padding: 2px;
32
+ text-align: right;
33
+ vertical-align: middle;
34
+ }
35
+
36
+ .d2h-lines-deleted {
37
+ border: 1px solid #e9aeae;
38
+ border-radius: 0 5px 5px 0;
39
+ color: #c33;
40
+ margin-left: 1px;
41
+ padding: 2px;
42
+ text-align: left;
43
+ vertical-align: middle;
44
+ }
45
+
46
+ .d2h-file-name-wrapper {
47
+ -webkit-box-align: center;
48
+ -ms-flex-align: center;
49
+ align-items: center;
50
+ display: -webkit-box;
51
+ display: -ms-flexbox;
52
+ display: flex;
53
+ font-size: 15px;
54
+ width: 100%;
55
+ }
56
+
57
+ .d2h-file-name {
58
+ overflow-x: hidden;
59
+ text-overflow: ellipsis;
60
+ white-space: nowrap;
61
+ }
62
+
63
+ .d2h-file-wrapper {
64
+ border: 1px solid #ccd3db;
65
+ border-radius: 0 0 4px 4px;
66
+ border-top-width: 0;
67
+ background-color: #fff;
68
+ }
69
+
70
+ .d2h-file-collapse {
71
+ -webkit-box-pack: end;
72
+ -ms-flex-pack: end;
73
+ -webkit-box-align: center;
74
+ -ms-flex-align: center;
75
+ align-items: center;
76
+ border: 1px solid #ddd;
77
+ border-radius: 3px;
78
+ cursor: pointer;
79
+ display: none;
80
+ font-size: 12px;
81
+ justify-content: flex-end;
82
+ padding: 4px 8px;
83
+ }
84
+
85
+ .d2h-file-collapse.d2h-selected {
86
+ background-color: #c8e1ff;
87
+ }
88
+
89
+ .d2h-file-collapse-input {
90
+ margin: 0 4px 0 0;
91
+ }
92
+
93
+ .d2h-diff-table {
94
+ border-collapse: collapse;
95
+ font-family: Menlo, Consolas, monospace;
96
+ font-size: 13px;
97
+ width: 100%;
98
+ }
99
+
100
+ .d2h-files-diff {
101
+ display: -webkit-box;
102
+ display: -ms-flexbox;
103
+ display: flex;
104
+ width: 100%;
105
+ }
106
+
107
+ .d2h-file-diff {
108
+ overflow-y: hidden;
109
+ }
110
+
111
+ .d2h-file-diff.d2h-d-none,
112
+ .d2h-files-diff.d2h-d-none {
113
+ display: none;
114
+ }
115
+
116
+ .d2h-file-side-diff {
117
+ display: inline-block;
118
+ overflow-x: scroll;
119
+ overflow-y: hidden;
120
+ width: 50%;
121
+ }
122
+
123
+ .d2h-code-line {
124
+ padding: 0 8em;
125
+ }
126
+
127
+ .d2h-code-line,
128
+ .d2h-code-side-line {
129
+ display: inline-block;
130
+ -webkit-user-select: none;
131
+ -moz-user-select: none;
132
+ -ms-user-select: none;
133
+ user-select: none;
134
+ white-space: nowrap;
135
+ width: 100%;
136
+ background-color: transparent !important;
137
+ }
138
+
139
+ .d2h-code-side-line {
140
+ padding: 0 4.5em;
141
+ }
142
+
143
+ .d2h-code-line-ctn {
144
+ word-wrap: normal;
145
+ background: none;
146
+ display: inline-block;
147
+ padding: 0;
148
+ -webkit-user-select: text;
149
+ -moz-user-select: text;
150
+ -ms-user-select: text;
151
+ user-select: text;
152
+ vertical-align: middle;
153
+ white-space: pre;
154
+ width: 100%;
155
+ }
156
+
157
+ .d2h-code-line del,
158
+ .d2h-code-side-line del {
159
+ background-color: rgba(234, 133, 115, 0.7);
160
+ }
161
+
162
+ .d2h-code-line del,
163
+ .d2h-code-line ins,
164
+ .d2h-code-side-line del,
165
+ .d2h-code-side-line ins {
166
+ border-radius: 0.2em;
167
+ display: inline-block;
168
+ margin-top: -1px;
169
+ text-decoration: none;
170
+ vertical-align: middle;
171
+ }
172
+
173
+ .d2h-code-line ins,
174
+ .d2h-code-side-line ins {
175
+ background-color: rgba(85, 188, 138, 0.7);
176
+ text-align: left;
177
+ }
178
+
179
+ .d2h-code-line-prefix {
180
+ word-wrap: normal;
181
+ background: none;
182
+ display: inline;
183
+ padding: 0;
184
+ white-space: pre;
185
+ }
186
+
187
+ .line-num1 {
188
+ float: left;
189
+ }
190
+
191
+ .line-num1,
192
+ .line-num2 {
193
+ -webkit-box-sizing: border-box;
194
+ box-sizing: border-box;
195
+ overflow: hidden;
196
+ padding: 0 0.5em;
197
+ text-overflow: ellipsis;
198
+ width: 3.5em;
199
+ }
200
+
201
+ .line-num2 {
202
+ float: right;
203
+ }
204
+
205
+ .d2h-code-linenumber {
206
+ background-color: rgba(239, 244, 249, 0.8);
207
+ border: solid #eee;
208
+ border-width: 0 1px;
209
+ -webkit-box-sizing: border-box;
210
+ box-sizing: border-box;
211
+ color: rgba(0, 0, 0, 0.3);
212
+ cursor: pointer;
213
+ display: inline-block;
214
+ position: absolute;
215
+ text-align: right;
216
+ width: 7.5em;
217
+ }
218
+
219
+ .d2h-code-linenumber:after {
220
+ content: '\\200b';
221
+ }
222
+
223
+ .d2h-code-side-linenumber {
224
+ background-color: #fff;
225
+ border: solid #eee;
226
+ border-width: 0 1px;
227
+ -webkit-box-sizing: border-box;
228
+ box-sizing: border-box;
229
+ color: rgba(0, 0, 0, 0.3);
230
+ cursor: pointer;
231
+ display: inline-block;
232
+ overflow: hidden;
233
+ padding: 0 0.5em;
234
+ position: absolute;
235
+ text-align: right;
236
+ text-overflow: ellipsis;
237
+ width: 4em;
238
+ }
239
+
240
+ .d2h-code-side-linenumber:after {
241
+ content: '\\200b';
242
+ }
243
+
244
+ .d2h-code-side-emptyplaceholder,
245
+ .d2h-emptyplaceholder {
246
+ background-color: #f1f1f1;
247
+ border-color: #e1e1e1;
248
+ }
249
+
250
+ .d2h-code-line-prefix,
251
+ .d2h-code-linenumber,
252
+ .d2h-code-side-linenumber,
253
+ .d2h-emptyplaceholder {
254
+ -webkit-user-select: none;
255
+ -moz-user-select: none;
256
+ -ms-user-select: none;
257
+ user-select: none;
258
+ }
259
+
260
+ .d2h-code-linenumber,
261
+ .d2h-code-side-linenumber {
262
+ direction: rtl;
263
+ }
264
+
265
+ .d2h-del {
266
+ background-color: #fee8e9;
267
+ border-color: #e9aeae;
268
+ }
269
+
270
+ .d2h-ins {
271
+ background-color: rgba(162, 216, 187, 0.7);
272
+ border-color: #b4e2b4;
273
+ }
274
+
275
+ .d2h-info {
276
+ background-color: #f8fafd;
277
+ border-color: #d5e4f2;
278
+ color: rgba(0, 0, 0, 0.3);
279
+ }
280
+
281
+ .d2h-file-diff .d2h-del.d2h-change {
282
+ background-color: rgba(250, 231, 229, 0.7);
283
+ }
284
+
285
+ .d2h-file-diff .d2h-ins.d2h-change {
286
+ background-color: rgba(196, 230, 212, 0.7);
287
+ }
288
+
289
+ .d2h-file-list-wrapper {
290
+ margin-bottom: 10px;
291
+ }
292
+
293
+ .d2h-file-list-wrapper a {
294
+ color: #3572b0;
295
+ text-decoration: none;
296
+ }
297
+
298
+ .d2h-file-list-wrapper a:visited {
299
+ color: #3572b0;
300
+ }
301
+
302
+ .d2h-file-list-header {
303
+ text-align: left;
304
+ }
305
+
306
+ .d2h-file-list-title {
307
+ font-weight: 700;
308
+ }
309
+
310
+ .d2h-file-list-line {
311
+ display: -webkit-box;
312
+ display: -ms-flexbox;
313
+ display: flex;
314
+ text-align: left;
315
+ }
316
+
317
+ .d2h-file-list {
318
+ display: block;
319
+ list-style: none;
320
+ margin: 0;
321
+ padding: 0;
322
+ }
323
+
324
+ .d2h-file-list > li {
325
+ border-bottom: 1px solid #ddd;
326
+ margin: 0;
327
+ padding: 5px 10px;
328
+ }
329
+
330
+ .d2h-file-list > li:last-child {
331
+ border-bottom: none;
332
+ }
333
+
334
+ .d2h-file-switch {
335
+ cursor: pointer;
336
+ display: none;
337
+ font-size: 10px;
338
+ }
339
+
340
+ .d2h-icon {
341
+ fill: currentColor;
342
+ margin-right: 10px;
343
+ vertical-align: middle;
344
+ }
345
+
346
+ .d2h-deleted {
347
+ color: #c33;
348
+ }
349
+
350
+ .d2h-added {
351
+ color: #399839;
352
+ }
353
+
354
+ .d2h-changed {
355
+ color: #d0b44c;
356
+ }
357
+
358
+ .d2h-moved {
359
+ color: #3572b0;
360
+ }
361
+
362
+ .d2h-tag {
363
+ background-color: #fff;
364
+ display: -webkit-box;
365
+ display: -ms-flexbox;
366
+ display: flex;
367
+ font-size: 10px;
368
+ margin-left: 5px;
369
+ padding: 0 2px;
370
+ }
371
+
372
+ .d2h-deleted-tag {
373
+ border: 1px solid #c33;
374
+ }
375
+
376
+ .d2h-added-tag {
377
+ border: 1px solid #399839;
378
+ }
379
+
380
+ .d2h-changed-tag {
381
+ border: 1px solid #d0b44c;
382
+ }
383
+
384
+ .d2h-moved-tag {
385
+ border: 1px solid #3572b0;
386
+ }
387
+ `,i=e.div`
388
+ display: flex;
389
+ align-items: center;
390
+ padding: 12px;
391
+ border-radius: 4px 4px 0 0;
392
+ border: 1px solid #ccd3db;
393
+ background-color: #eff4f9;
394
+
395
+ .kubed-icon {
396
+ margin-right: 4px;
397
+ }
398
+
399
+ .switch-mode {
400
+ cursor: pointer;
401
+ }
402
+ `,o=e.span`
403
+ margin-right: 4px;
404
+ font-weight: 600;
405
+ color: #36435c;
406
+ `,l=e.span`
407
+ margin-left: auto;
408
+ font-weight: 600;
409
+ color: #36435c;
410
+ `;export{l as Description,d as DiffWrapper,i as Header,o as Title};
411
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sources":["../src/styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const DiffWrapper = styled.div`\n border-radius: 4px 4px 0 0;\n //border: 1px solid #ccd3db;\n\n .d2h-wrapper {\n text-align: left;\n }\n\n .d2h-file-header {\n display: none;\n }\n\n .d2h-file-header.d2h-sticky-header {\n position: sticky;\n top: 0;\n z-index: 1;\n }\n\n .d2h-file-stats {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n font-size: 14px;\n margin-left: auto;\n }\n\n .d2h-lines-added {\n border: 1px solid #b4e2b4;\n border-radius: 5px 0 0 5px;\n color: #399839;\n padding: 2px;\n text-align: right;\n vertical-align: middle;\n }\n\n .d2h-lines-deleted {\n border: 1px solid #e9aeae;\n border-radius: 0 5px 5px 0;\n color: #c33;\n margin-left: 1px;\n padding: 2px;\n text-align: left;\n vertical-align: middle;\n }\n\n .d2h-file-name-wrapper {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n font-size: 15px;\n width: 100%;\n }\n\n .d2h-file-name {\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .d2h-file-wrapper {\n border: 1px solid #ccd3db;\n border-radius: 0 0 4px 4px;\n border-top-width: 0;\n background-color: #fff;\n }\n\n .d2h-file-collapse {\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border: 1px solid #ddd;\n border-radius: 3px;\n cursor: pointer;\n display: none;\n font-size: 12px;\n justify-content: flex-end;\n padding: 4px 8px;\n }\n\n .d2h-file-collapse.d2h-selected {\n background-color: #c8e1ff;\n }\n\n .d2h-file-collapse-input {\n margin: 0 4px 0 0;\n }\n\n .d2h-diff-table {\n border-collapse: collapse;\n font-family: Menlo, Consolas, monospace;\n font-size: 13px;\n width: 100%;\n }\n\n .d2h-files-diff {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n }\n\n .d2h-file-diff {\n overflow-y: hidden;\n }\n\n .d2h-file-diff.d2h-d-none,\n .d2h-files-diff.d2h-d-none {\n display: none;\n }\n\n .d2h-file-side-diff {\n display: inline-block;\n overflow-x: scroll;\n overflow-y: hidden;\n width: 50%;\n }\n\n .d2h-code-line {\n padding: 0 8em;\n }\n\n .d2h-code-line,\n .d2h-code-side-line {\n display: inline-block;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n background-color: transparent !important;\n }\n\n .d2h-code-side-line {\n padding: 0 4.5em;\n }\n\n .d2h-code-line-ctn {\n word-wrap: normal;\n background: none;\n display: inline-block;\n padding: 0;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n vertical-align: middle;\n white-space: pre;\n width: 100%;\n }\n\n .d2h-code-line del,\n .d2h-code-side-line del {\n background-color: rgba(234, 133, 115, 0.7);\n }\n\n .d2h-code-line del,\n .d2h-code-line ins,\n .d2h-code-side-line del,\n .d2h-code-side-line ins {\n border-radius: 0.2em;\n display: inline-block;\n margin-top: -1px;\n text-decoration: none;\n vertical-align: middle;\n }\n\n .d2h-code-line ins,\n .d2h-code-side-line ins {\n background-color: rgba(85, 188, 138, 0.7);\n text-align: left;\n }\n\n .d2h-code-line-prefix {\n word-wrap: normal;\n background: none;\n display: inline;\n padding: 0;\n white-space: pre;\n }\n\n .line-num1 {\n float: left;\n }\n\n .line-num1,\n .line-num2 {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n padding: 0 0.5em;\n text-overflow: ellipsis;\n width: 3.5em;\n }\n\n .line-num2 {\n float: right;\n }\n\n .d2h-code-linenumber {\n background-color: rgba(239, 244, 249, 0.8);\n border: solid #eee;\n border-width: 0 1px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.3);\n cursor: pointer;\n display: inline-block;\n position: absolute;\n text-align: right;\n width: 7.5em;\n }\n\n .d2h-code-linenumber:after {\n content: '\\\\200b';\n }\n\n .d2h-code-side-linenumber {\n background-color: #fff;\n border: solid #eee;\n border-width: 0 1px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.3);\n cursor: pointer;\n display: inline-block;\n overflow: hidden;\n padding: 0 0.5em;\n position: absolute;\n text-align: right;\n text-overflow: ellipsis;\n width: 4em;\n }\n\n .d2h-code-side-linenumber:after {\n content: '\\\\200b';\n }\n\n .d2h-code-side-emptyplaceholder,\n .d2h-emptyplaceholder {\n background-color: #f1f1f1;\n border-color: #e1e1e1;\n }\n\n .d2h-code-line-prefix,\n .d2h-code-linenumber,\n .d2h-code-side-linenumber,\n .d2h-emptyplaceholder {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .d2h-code-linenumber,\n .d2h-code-side-linenumber {\n direction: rtl;\n }\n\n .d2h-del {\n background-color: #fee8e9;\n border-color: #e9aeae;\n }\n\n .d2h-ins {\n background-color: rgba(162, 216, 187, 0.7);\n border-color: #b4e2b4;\n }\n\n .d2h-info {\n background-color: #f8fafd;\n border-color: #d5e4f2;\n color: rgba(0, 0, 0, 0.3);\n }\n\n .d2h-file-diff .d2h-del.d2h-change {\n background-color: rgba(250, 231, 229, 0.7);\n }\n\n .d2h-file-diff .d2h-ins.d2h-change {\n background-color: rgba(196, 230, 212, 0.7);\n }\n\n .d2h-file-list-wrapper {\n margin-bottom: 10px;\n }\n\n .d2h-file-list-wrapper a {\n color: #3572b0;\n text-decoration: none;\n }\n\n .d2h-file-list-wrapper a:visited {\n color: #3572b0;\n }\n\n .d2h-file-list-header {\n text-align: left;\n }\n\n .d2h-file-list-title {\n font-weight: 700;\n }\n\n .d2h-file-list-line {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n text-align: left;\n }\n\n .d2h-file-list {\n display: block;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .d2h-file-list > li {\n border-bottom: 1px solid #ddd;\n margin: 0;\n padding: 5px 10px;\n }\n\n .d2h-file-list > li:last-child {\n border-bottom: none;\n }\n\n .d2h-file-switch {\n cursor: pointer;\n display: none;\n font-size: 10px;\n }\n\n .d2h-icon {\n fill: currentColor;\n margin-right: 10px;\n vertical-align: middle;\n }\n\n .d2h-deleted {\n color: #c33;\n }\n\n .d2h-added {\n color: #399839;\n }\n\n .d2h-changed {\n color: #d0b44c;\n }\n\n .d2h-moved {\n color: #3572b0;\n }\n\n .d2h-tag {\n background-color: #fff;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n font-size: 10px;\n margin-left: 5px;\n padding: 0 2px;\n }\n\n .d2h-deleted-tag {\n border: 1px solid #c33;\n }\n\n .d2h-added-tag {\n border: 1px solid #399839;\n }\n\n .d2h-changed-tag {\n border: 1px solid #d0b44c;\n }\n\n .d2h-moved-tag {\n border: 1px solid #3572b0;\n }\n`;\n\nexport const Header = styled.div`\n display: flex;\n align-items: center;\n padding: 12px;\n border-radius: 4px 4px 0 0;\n border: 1px solid #ccd3db;\n background-color: #eff4f9;\n\n .kubed-icon {\n margin-right: 4px;\n }\n\n .switch-mode {\n cursor: pointer;\n }\n`;\n\nexport const Title = styled.span`\n margin-right: 4px;\n font-weight: 600;\n color: #36435c;\n`;\n\nexport const Description = styled.span`\n margin-left: auto;\n font-weight: 600;\n color: #36435c;\n`;\n"],"names":[],"mappings":";;AAA6C,MAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AACf;AACA;AACA;AACA,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;AACrB;AACA;AACA;AACA;;;;"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface DiffViewerProps {
3
+ title?: string | React.ReactNode;
4
+ description?: string | React.ReactNode;
5
+ mode?: 'line-by-line' | 'side-by-side';
6
+ oldValue: string;
7
+ newValue: string;
8
+ }
9
+ export declare const DiffViewer: ({ title, description, mode, oldValue, newValue, }: DiffViewerProps) => React.JSX.Element;
10
+ //# sourceMappingURL=DiffViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiffViewer.d.ts","sourceRoot":"","sources":["../src/DiffViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAiBnD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACvC,IAAI,CAAC,EAAE,cAAc,GAAG,cAAc,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,UAAU,sDAMpB,eAAe,sBAyCjB,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './DiffViewer';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const DiffWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const Header: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const Title: import("styled-components").StyledComponent<"span", any, {}, never>;
4
+ export declare const Description: import("styled-components").StyledComponent<"span", any, {}, never>;
5
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,oEAkYvB,CAAC;AAEF,eAAO,MAAM,MAAM,oEAelB,CAAC;AAEF,eAAO,MAAM,KAAK,qEAIjB,CAAC;AAEF,eAAO,MAAM,WAAW,qEAIvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubed/diff-viewer",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "homepage": "https://github.com/kubesphere/kube-design",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,8 +24,8 @@
24
24
  "styled-components": "^5.3.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "@kubed/hooks": "0.2.17",
28
- "@kubed/icons": "0.2.17",
27
+ "@kubed/hooks": "0.2.18",
28
+ "@kubed/icons": "0.2.18",
29
29
  "react": ">=16.8.6",
30
30
  "react-dom": ">=16.8.6",
31
31
  "react-is": "^17.0.2"