@rspress/plugin-preview 1.7.3 → 1.7.5
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/plugin-preview",
|
3
|
-
"version": "1.7.
|
3
|
+
"version": "1.7.5",
|
4
4
|
"description": "A plugin for rspress to preview the code block in markdown/mdx file.",
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspress/issues",
|
6
6
|
"repository": {
|
@@ -21,13 +21,13 @@
|
|
21
21
|
],
|
22
22
|
"dependencies": {
|
23
23
|
"@mdx-js/mdx": "2.2.1",
|
24
|
-
"@modern-js/utils": "2.
|
24
|
+
"@modern-js/utils": "2.41.0",
|
25
25
|
"qrcode.react": "^3.1.0",
|
26
26
|
"remark-gfm": "3.0.1",
|
27
27
|
"rspack-plugin-virtual-module": "0.1.12",
|
28
28
|
"codesandbox": "2.2.3",
|
29
29
|
"lodash": "4.17.21",
|
30
|
-
"@rspress/shared": "1.7.
|
30
|
+
"@rspress/shared": "1.7.5"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
33
33
|
"@types/mdast": "^3.0.10",
|
@@ -4,7 +4,6 @@ import { getParameters } from 'codesandbox/lib/api/define';
|
|
4
4
|
import MobileOperation from './common/mobile-operation';
|
5
5
|
import IconCode from './icons/Code';
|
6
6
|
import IconCodesandbox from './icons/Codesandbox';
|
7
|
-
import './Container.scss';
|
8
7
|
|
9
8
|
type ContainerProps = {
|
10
9
|
children: React.ReactNode[];
|
@@ -1,4 +1,71 @@
|
|
1
|
+
:root {
|
2
|
+
--rp-preview-button-hover-bg: #e5e6eb;
|
3
|
+
--rp-preview-button-bg: #e5e6eb;
|
4
|
+
}
|
5
|
+
|
6
|
+
.dark {
|
7
|
+
--rp-preview-button-hover-bg: #c5c5c5;
|
8
|
+
--rp-preview-button-bg: #c5c5c5;
|
9
|
+
}
|
10
|
+
|
1
11
|
.rspress-preview {
|
12
|
+
padding: 16px 0;
|
13
|
+
|
14
|
+
&-wrapper {
|
15
|
+
border: 1px solid #e6e6e6;
|
16
|
+
border-radius: 8px;
|
17
|
+
}
|
18
|
+
|
19
|
+
&-card {
|
20
|
+
padding: 16px;
|
21
|
+
position: relative;
|
22
|
+
border: 1px solid #e6e6e6;
|
23
|
+
border-radius: 8px;
|
24
|
+
display: flex;
|
25
|
+
}
|
26
|
+
|
27
|
+
&-qrcode {
|
28
|
+
background-color: #fff;
|
29
|
+
width: 120px;
|
30
|
+
height: 120px;
|
31
|
+
position: absolute;
|
32
|
+
top: -132px;
|
33
|
+
right: -46px;
|
34
|
+
padding: 12px;
|
35
|
+
}
|
36
|
+
|
37
|
+
&-code {
|
38
|
+
position: relative;
|
39
|
+
overflow: hidden;
|
40
|
+
flex: 1 1;
|
41
|
+
max-height: 700px;
|
42
|
+
}
|
43
|
+
|
44
|
+
&-code-hide {
|
45
|
+
position: relative;
|
46
|
+
overflow: hidden;
|
47
|
+
display: none;
|
48
|
+
}
|
49
|
+
|
50
|
+
&-code-show {
|
51
|
+
margin-top: 16px;
|
52
|
+
display: block;
|
53
|
+
}
|
54
|
+
|
55
|
+
&-device {
|
56
|
+
position: relative;
|
57
|
+
flex: 0 0;
|
58
|
+
border-left: 1px solid #e6e6e6;
|
59
|
+
display: flex;
|
60
|
+
flex-direction: column;
|
61
|
+
iframe {
|
62
|
+
border-bottom: 1px solid #e6e6e6;
|
63
|
+
width: 360px;
|
64
|
+
height: 100%;
|
65
|
+
flex: auto;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
2
69
|
&-operations {
|
3
70
|
button {
|
4
71
|
width: 28px;
|
@@ -1,68 +0,0 @@
|
|
1
|
-
:root {
|
2
|
-
--rp-preview-button-hover-bg: #e5e6eb;
|
3
|
-
--rp-preview-button-bg: #e5e6eb;
|
4
|
-
}
|
5
|
-
|
6
|
-
.dark {
|
7
|
-
--rp-preview-button-hover-bg: #c5c5c5;
|
8
|
-
--rp-preview-button-bg: #c5c5c5;
|
9
|
-
}
|
10
|
-
|
11
|
-
.rspress-preview {
|
12
|
-
padding: 16px 0;
|
13
|
-
|
14
|
-
&-wrapper {
|
15
|
-
border: 1px solid #e6e6e6;
|
16
|
-
border-radius: 8px;
|
17
|
-
}
|
18
|
-
|
19
|
-
&-card {
|
20
|
-
padding: 16px;
|
21
|
-
position: relative;
|
22
|
-
border: 1px solid #e6e6e6;
|
23
|
-
border-radius: 8px;
|
24
|
-
display: flex;
|
25
|
-
}
|
26
|
-
|
27
|
-
&-qrcode {
|
28
|
-
background-color: #fff;
|
29
|
-
width: 120px;
|
30
|
-
height: 120px;
|
31
|
-
position: absolute;
|
32
|
-
top: -132px;
|
33
|
-
right: -46px;
|
34
|
-
padding: 12px;
|
35
|
-
}
|
36
|
-
|
37
|
-
&-code {
|
38
|
-
position: relative;
|
39
|
-
overflow: hidden;
|
40
|
-
flex: 1 1;
|
41
|
-
max-height: 700px;
|
42
|
-
}
|
43
|
-
|
44
|
-
&-code-hide {
|
45
|
-
position: relative;
|
46
|
-
overflow: hidden;
|
47
|
-
display: none;
|
48
|
-
}
|
49
|
-
|
50
|
-
&-code-show {
|
51
|
-
margin-top: 16px;
|
52
|
-
display: block;
|
53
|
-
}
|
54
|
-
|
55
|
-
&-device {
|
56
|
-
position: relative;
|
57
|
-
flex: 0 0;
|
58
|
-
border-left: 1px solid #e6e6e6;
|
59
|
-
display: flex;
|
60
|
-
flex-direction: column;
|
61
|
-
iframe {
|
62
|
-
border-bottom: 1px solid #e6e6e6;
|
63
|
-
width: 360px;
|
64
|
-
height: 100%;
|
65
|
-
flex: auto;
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}
|