@brillout/docpress 0.6.5 → 0.6.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/components/RemovedFile.tsx +16 -0
- package/components/index.ts +1 -0
- package/css/code/diff.css +20 -14
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { RemovedFile }
|
|
2
|
+
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
5
|
+
function RemovedFile({ children }: { children: React.ReactNode }) {
|
|
6
|
+
return (
|
|
7
|
+
<div
|
|
8
|
+
className={
|
|
9
|
+
// Styling for .diff-removed-file is defined in src/css/code/diff.css
|
|
10
|
+
'diff-removed-file'
|
|
11
|
+
}
|
|
12
|
+
>
|
|
13
|
+
{children}
|
|
14
|
+
</div>
|
|
15
|
+
)
|
|
16
|
+
}
|
package/components/index.ts
CHANGED
package/css/code/diff.css
CHANGED
|
@@ -1,33 +1,39 @@
|
|
|
1
1
|
/* Attributes generted by https://shiki.style/packages/transformers#transformernotationdiff */
|
|
2
|
-
pre.has-diff .diff {
|
|
3
|
-
position: relative;
|
|
4
|
-
}
|
|
5
2
|
|
|
6
|
-
pre.has-diff .diff.remove
|
|
7
|
-
|
|
3
|
+
pre.has-diff .diff.remove,
|
|
4
|
+
/* For <RemovedFile> */
|
|
5
|
+
.diff-removed-file code {
|
|
6
|
+
background-color: #fbdcda !important;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
pre.has-diff .diff.add {
|
|
11
|
-
background-color: #d7ecdf;
|
|
10
|
+
background-color: #d7ecdf !important;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
|
-
pre.has-diff .diff
|
|
15
|
-
|
|
13
|
+
pre.has-diff [data-line].diff,
|
|
14
|
+
.diff-removed-file [data-line] {
|
|
15
|
+
position: relative;
|
|
16
|
+
}
|
|
17
|
+
pre.has-diff .diff::before,
|
|
18
|
+
/* For <RemovedFile> */
|
|
19
|
+
.diff-removed-file [data-line]::before {
|
|
16
20
|
position: absolute;
|
|
17
21
|
font-weight: 500;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
pre.has-diff .diff.add::before {
|
|
21
|
-
content:
|
|
22
|
-
color:
|
|
25
|
+
content: '+';
|
|
26
|
+
color: #0c0;
|
|
23
27
|
font-size: 1.2em;
|
|
24
|
-
top: -
|
|
28
|
+
top: -1px;
|
|
25
29
|
left: 3px;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
pre.has-diff .diff.remove::before
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
pre.has-diff .diff.remove::before,
|
|
33
|
+
/* For <RemovedFile> */
|
|
34
|
+
.diff-removed-file [data-line]::before {
|
|
35
|
+
content: '-';
|
|
36
|
+
color: #f77;
|
|
31
37
|
font-size: 1.4em;
|
|
32
38
|
top: -5px;
|
|
33
39
|
left: 2px;
|